Rfc6810 bis

pull request for reviewing code
Done: 
b96077fdb4858402e10293625b29ccad46170a51
4b959b0a7ec29bfb85097e31ed550c48181c6aec