Rfc6810 bis

pull request for reviewing code
Done: 2a371c4ed4fdfefdf3a9dfdc33986828ba4d4547