-
Notifications
You must be signed in to change notification settings - Fork 430
Added support for pure Python RSA library when present. #1
Conversation
asn1_cert['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey']), 'DER') | ||
except ImportError: | ||
raise NotImplementedError( | ||
'Please install pyasn1 and pyasn1_module to parse x509.') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
i'm good with leaving serious testing for a later patch -- but if possible, could you throw a few example input/output pairs into the |
I've added the test framework. Please update your PR to include tests! |
return RsaSigner(pkey) | ||
|
||
except ImportError: | ||
RsaSigner = None |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pkey = RSA.importKey(key) | ||
else: | ||
raise NotImplementedError( | ||
'PKCS12 format is not supported by the PyCrpto library. ' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
You'll probably have to redo this PR - I've updated this repo using the history from the old googlecode repo, so things will probably not match. On the other hand, that transition has now taken place, so we can actually act on this pull request once it's settled. |
John - it's unlikely I'll have time. Would you be able to pick it up? On Thu, Apr 24, 2014 at 1:40 PM, John Asmuth notifications@github.comwrote:
|
I can if John can't, but not for another week or so. -cc sent from my phone
|
Thank you. On Thu, Apr 24, 2014 at 6:17 PM, Craig Citro notifications@github.comwrote:
|
Pull recent auth2client release (crypt + timeout)
It looks like you haven't yet signed Google's Contributor License Agreement - please do so? |
Just submitted the GCLA today. Cheers, Adam On Tue, Mar 17, 2015 at 9:53 PM Nathaniel Manista notifications@github.com
|
@aeijdenberg Is this not already supported? |
It certainly wasn't in 2013 when I submitted the PR. :) I'll go check now. |
So it looks like the support Orest added in 2014 for AppDefaultCredentials uses the pure Python module which is a good thing, however SignedJwtAssertionCredentials appears to live on inside of client.py and as far as I can tell still won't use the pure Python libraries. I'm happy to redo this PR when I'm next back at my desk. I actually know how to use git now so it might be easier! |
Yeah I don't think Orest (or whoever else added the I've been meaning to right that wrong with #211 but haven't had time (or at least time without higher priority issues). Let's continue this conversation over there (and maybe we'll end up filing a "use pure Python when necessary / possible" issue as well). |
I have context with the changes to add the _service_account module. It was understood that SignedJwtAssertionCredentials existed, but it was tied to P12 and had a confusing name. The plan was that the new _ServiceAccountCredentials would replace as described in #211, but we kept it internal intially to avoid locking in the public surface before further review. |
I like it! |
Happy to add tests later once the tests are part of the main repo.