Rfc6810 bis

pull request for reviewing code
Done: 4b959b0a7ec29bfb85097e31ed550c48181c6aec