SignedJwtAssertionCredentials on AppEngine doesn't recognize PEM key

前端 未结 2 1418
太阳男子
太阳男子 2020-12-08 11:59

SignedJwtAssertionCredentials on appengine (with pycrypto 2.6) doesn\'t support the PKCS12 format, therefore I\'m trying to use PEM keys instead, as suggested everywhere..

相关标签:
2条回答
  • 2020-12-08 12:39

    for those interested, I ended up compiling a short tutorial on how to use the Google+ Domains APIs with python on App Engine, you can find it here: https://gist.github.com/vircheck/6292176

    It's also applicable to other APIs based on service accounts, such as the Drive API etc..

    0 讨论(0)
  • 2020-12-08 12:57

    Yeah, the error is hugely misleading. What you're doing is fine; just remove the header from the PEM file so that it begins with -----BEGIN PRIVATE KEY-----, or run the following command over it:

    openssl pkcs8 -nocrypt -in privatekey.pem -passin pass:notasecret -topk8 -out pk.pem
    
    0 讨论(0)
提交回复
热议问题