Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoxDeveloperEditionAPIConnection - decryptPrivateKey() - PEMParser returns PrivateKeyInfo already - Invalid cast #470

Closed
henrykuijpers opened this issue Sep 25, 2017 · 1 comment

Comments

@henrykuijpers
Copy link
Contributor

When calling the decryptPrivateKey() method, the PEMParser returns an object that is in fact already a PrivateKeyInfo.

Therefore, the code in the else-block is executed, which just blatantly casts the "keyPair" object to a "PEMKeyPair" -- Invalid cast.

Can you please fix this method, so that it uses the PrivateKeyInfo in case that is returned from the keyReader?

@henrykuijpers
Copy link
Contributor Author

Pull request: #471

iamharish pushed a commit that referenced this issue Sep 26, 2017
…rser returns PrivateKeyInfo already - Invalid cast #470 (#471)

* Fixing BoxDeveloperEditionAPIConnection - decryptPrivateKey() - PEMParser returns PrivateKeyInfo already - Invalid cast #470

* Adding space after 'cast'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants