Rfc6810 bis

pull request for reviewing code
Done: 4575b8ce2028d876e125eec4e838541d3eb08f7f