-
Notifications
You must be signed in to change notification settings - Fork 169
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
[BC Idea]: Support of RSACryptoServiceProvider.ImportEncryptedPkcs8PrivateKey Method #309
Comments
Just a little more patience. We're currently setting the right automations up between GitHub <-> DevOps <-> BCIdeas. Shortly we'll be ready to triage and approve ideas! |
Approved! Please create your PR. |
@JesperSchulz We got stuck using the DotNetRSACryptoServiceProvider.ImportEncryptedPkcs8PrivateKey function which has 2 different overloads and the AL compiler cannot recognize the call. It's a problem of the ReadOnlySpan generic datatype, which AL language cannot handle properly. If not, we may have to look for a completely different solution outside of standard System application. |
Let me loop in someone from the compiler team! Stay tuned! |
It may not be possible to be specific enough with AL. So, you'll need a .NET wrapper to disambiguate: Byte vs. Char https://learn.microsoft.com/en-us/previous-versions/dynamicsnav-2018-developer/Using-Generics |
Yes, that's the point. |
We have a similar situation where we are trying to use ImportFromPem, but our issue here is that the code compiles, but when executing we get an error stating that BC cannot load System.Private.CoreLib.
Can you please help with this? |
BC Idea Link
https://experience.dynamics.com/ideas/idea/?ideaid=a9ddabfd-ca32-ee11-a81c-6045bdb6c2ac
Description
We need to be able to work with an encrypted private key in "DER-encoded encrypted PKCS8" format.
Specifically, to import and decrypt the key using the provided password, convert and save it to XmlString format.
Furthermore, use the key to sign the data using RSACryptoServiceProvider, SHA512 hash function, PKCS#1 v1.5 padding
In the BC22 System Application, there are appropriate codeunits 1474 "Signature Key" and 1266 "Cryptography Management", but they do not provide these functions.
The idea is to add new procedures to these codeunits to enable the desired functionality.
Internal work item: AB#479951
The text was updated successfully, but these errors were encountered: