Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. AsymmetricCipherKeyPair issuerKeyPair=null;
  2. if (issuerCertificate.HasCngKey())
  3. {
  4. var cngPrivateKey = issuerCertificate.GetCngPrivateKey();
  5. var rsa = new RSACng(cngPrivateKey);
  6.  
  7. issuerKeyPair = DotNetUtilities.GetKeyPair(privateKey);
  8. }
  9.  
  10. System.ArgumentException: Unsupported algorithm specified
  11. Parameter name: privateKey
  12. at Org.BouncyCastle.Security.DotNetUtilities.GetKeyPair(AsymmetricAlgorithm privateKey)
  13. at Statoil.PleaseInspect.Sap.Services.CertificateGeneratorService.IssueCertificate(String subjectName, X509Certificate2 issuerCertificate, String[] subjectAlternativeNames, KeyPurposeID[] usages) in C:APPLdevmad-pleaseinspect-authservicesrcStatoil.PleaseInspect.SapServicesCertificateGeneratorService.cs:line 70
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement