Rfc6810 bis

pull request for reviewing code
Done: bcdd0f01b1f741d25d844c332627caecd6569041