Skip to content

Error signing with RS256 #24

Description

@damjtoh
>>> import jws
>>> header = {'alg': 'RS256'}
>>> payload = { 'claim': 'JSON is the raddest.', 'iss': 'brianb' }
>>> signature = jws.sign(header, payload, 'secret')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/jws/__init__.py", line 29, in sign
    signature = signer(_signing_input(head, payload, is_json), key)
  File "/Library/Python/2.7/site-packages/jws/algos.py", line 74, in sign
    return self.padder.new(key).sign(self.hashm)             # pycrypto 2.5
  File "build/bdist.macosx-10.10-intel/egg/Crypto/Signature/PKCS1_v1_5.py", line 106, in sign
AttributeError: 'str' object has no attribute 'n'

I couldn't find anything related to this issue.
I have pycrypto 2.6.1

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions