Rfc6810 bis

pull request for reviewing code
Done: dd2f9bc66bd26ccfe8c4bf0a389c7ea83879c6c5