Skip to content

cert.PrivateKey-->cert.GetRSAPrivateKey() #4478

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

Merged
merged 1 commit into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ static void Main()
Console.WriteLine("Certificate Verified?: {0}{1}",x509.Verify(),Environment.NewLine);
Console.WriteLine("Simple Name: {0}{1}",x509.GetNameInfo(X509NameType.SimpleName,true),Environment.NewLine);
Console.WriteLine("Signature Algorithm: {0}{1}",x509.SignatureAlgorithm.FriendlyName,Environment.NewLine);
Console.WriteLine("Private Key: {0}{1}",x509.PrivateKey.ToXmlString(false),Environment.NewLine);
Console.WriteLine("Public Key: {0}{1}",x509.PublicKey.Key.ToXmlString(false),Environment.NewLine);
Console.WriteLine("Certificate Archived?: {0}{1}",x509.Archived,Environment.NewLine);
Console.WriteLine("Length of Raw Data: {0}{1}",x509.RawData.Length,Environment.NewLine);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void SignXmlFile(string FileName, string SignedFileName, string Su
SignedXml signedXml = new SignedXml(doc);

// Add the key to the SignedXml document.
signedXml.SigningKey = cert.PrivateKey;
signedXml.SigningKey = cert.GetRSAPrivateKey();

// Create a reference to be signed.
Reference reference = new Reference();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void SignXmlFile(string FileName, string SignedFileName, string Su
SignedXml signedXml = new SignedXml(doc);

// Add the key to the SignedXml document.
signedXml.SigningKey = cert.PrivateKey;
signedXml.SigningKey = cert.GetRSAPrivateKey();

// Create a reference to be signed.
Reference reference = new Reference();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void SignXmlFile(string FileName, string SignedFileName, string Su
SignedXml signedXml = new SignedXml(doc);

// Add the key to the SignedXml document.
signedXml.SigningKey = cert.PrivateKey;
signedXml.SigningKey = cert.GetRSAPrivateKey();

// Create a reference to be signed.
Reference reference = new Reference();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Class CertSelect
Console.WriteLine("Certificate Verified?: {0}{1}", x509.Verify(), Environment.NewLine)
Console.WriteLine("Simple Name: {0}{1}", x509.GetNameInfo(X509NameType.SimpleName, True), Environment.NewLine)
Console.WriteLine("Signature Algorithm: {0}{1}", x509.SignatureAlgorithm.FriendlyName, Environment.NewLine)
Console.WriteLine("Private Key: {0}{1}", x509.PrivateKey.ToXmlString(False), Environment.NewLine)
Console.WriteLine("Public Key: {0}{1}", x509.PublicKey.Key.ToXmlString(False), Environment.NewLine)
Console.WriteLine("Certificate Archived?: {0}{1}", x509.Archived, Environment.NewLine)
Console.WriteLine("Length of Raw Data: {0}{1}", x509.RawData.Length, Environment.NewLine)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Module SignVerifyEnvelope
Dim signedXml As New SignedXml(doc)

' Add the key to the SignedXml document.
signedXml.SigningKey = cert.PrivateKey
signedXml.SigningKey = cert.GetRSAPrivateKey()

' Create a reference to be signed.
Dim reference As New Reference()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Module SignVerifyEnvelope
Dim signedXml As New SignedXml(doc)

' Add the key to the SignedXml document.
signedXml.SigningKey = cert.PrivateKey
signedXml.SigningKey = cert.GetRSAPrivateKey()

' Create a reference to be signed.
Dim reference As New Reference()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Module SignVerifyEnvelope
Dim signedXml As New SignedXml(doc)

' Add the key to the SignedXml document.
signedXml.SigningKey = cert.PrivateKey
signedXml.SigningKey = cert.GetRSAPrivateKey()

' Create a reference to be signed.
Dim reference As New Reference()
Expand Down