Fixed in https://github.com/fmarier/jwcrypto/commit/9662a8ee5557d96a4d6411cfadb25d322e00b270 of my fork: https://github.com/fmarier/jwcrypto/tree/0.5.x-comments