Fixed in https://github.com/fmarier/jwcrypto/commit/8f6c93d7c096cc09653b891fe4c1614dc69df8f1 and https://github.com/fmarier/jwcrypto/commit/12d3f142d7ea0dc10e51754b55867fba804f043a of my fork: https://github.com/fmarier/jwcrypto/tree/0.5.x-comments