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

RSADispose special handling can be removed #1214

Closed
mregen opened this issue Dec 11, 2020 · 1 comment · Fixed by #1347
Closed

RSADispose special handling can be removed #1214

mregen opened this issue Dec 11, 2020 · 1 comment · Fixed by #1347
Assignees

Comments

@mregen
Copy link
Contributor

mregen commented Dec 11, 2020

Type of Issue
[ ] Bug [X ] Enhancement [ ] Compliance [ ] Question [ ] Help wanted

There is a lot of special handling for Mono and RSA keys, the issue is fixed since a long time and should be removed:
mono/mono#6306
search for RSADispose()

Code snippets

        internal static RsaPrivateCrtKeyParameters GetPrivateKeyParameter(X509Certificate2 certificate)
        {
            RSA rsa = null;
            try
            {
                // try to get signing/private key from certificate passed in
                rsa = certificate.GetRSAPrivateKey();
                return GetPrivateKeyParameter(rsa);
            }
            finally
            {
                RsaUtils.RSADispose(rsa);
            }
        }

Environment (please complete the following information):

  • Runtime: [Mono]
@mregen mregen self-assigned this Dec 11, 2020
@mregen
Copy link
Contributor Author

mregen commented Dec 30, 2020

test

mregen added a commit that referenced this issue Apr 1, 2021
-Issue has been fixed in Mono, no more workarounds
-Fixes #1214 
-fix some Roslynator and other warnings
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

Successfully merging a pull request may close this issue.

1 participant