You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
I have checked that the [API documentation][api-docs] doesn't solve my issue.
I have searched the [Box Developer Forums][dev-forums] and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
I have searched [Issues in this repo][github-repo] and my issue isn't already reported.
Description of the Issue
Some keys being generated by the Developer tools lead to the error System.Security.Cryptography.CryptographicException: 'The specified RSA parameters are not valid. Exponent and Modulus are required. If D is present, it must have the same length as Modulus. If D is present, P, Q, DP, DQ, and InverseQ are required and must have half the length of Modulus, rounded up, otherwise they must be omitted.'
However, I'd like to ask for some clarification on how these keys were generated and what you mean by Developer tools.
Do you mean the Box developer console at https://cloud.app.box.com/developers/console when you say Developer tools? Or are you referring to tools like OpenSSL? If so, could you specify which tool you used, what command you ran, and with what parameters?
Hi @emily-crank,
Thanks for the explanation. Because of it, I was able to reproduce it on my end.
This repository is generated by our codegen tool, so we can't directly create a PR with the code to this repository. Instead, we need to add it to our codegen tool. I have already created a PR there based on your fork, so it should appear in this repository soon.
Thanks for pointing out the error and for your help!
Best regards
Description of the Issue
Some keys being generated by the Developer tools lead to the error System.Security.Cryptography.CryptographicException: 'The specified RSA parameters are not valid. Exponent and Modulus are required. If D is present, it must have the same length as Modulus. If D is present, P, Q, DP, DQ, and InverseQ are required and must have half the length of Modulus, rounded up, otherwise they must be omitted.'
See https://stackoverflow.com/questions/949727/bouncycastle-rsaprivatekey-to-net-rsaprivatekey for how to create an RSA key from the BouncyCastle objects; the key lengths need to be truncated.
The text was updated successfully, but these errors were encountered: