Rfc6810 bis

pull request for reviewing code
would a read-lock be sufficient?