Rfc6810 bis

pull request for reviewing code
Done: c5d5260ba3d2f39303cecb9efca2d0840885eafc