Rfc6810 bis

pull request for reviewing code
Done: 53a6140b000ec7c8b92c0b9c2676ac0501087e26