Rfc6810 bis

pull request for reviewing code
Done: f81c98c8907b6b38ce2ff1876f6dfaac7fc3c21d