Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Fri Nov 11, 2016 12:11 am
In the tutorial :
Get-and-Verify-Digital-Signature-in-PDF-with-C-Code

you see that the certificate is certified by HarryHu how can I get that HarryHu value?
Thank you
-

scarrier92
-
- Posts: 6
- Joined: Thu Nov 10, 2016 10:51 pm
Fri Nov 11, 2016 5:48 am
Hi scarrier92,
Thanks for your inquiry.
Please first get the IssuerName, and then extract the value according to the information. Here is sample code for your reference.
- Code: Select all
PdfSignature signatureOne = signatures[0];
string s = signatureOne.Certificate.IssuerName.Name;
Regex regex = new Regex("CN.*");
string value = regex.Match(s).Value.Replace("CN=","");
If there is any qeustion, welcome to get it back to us.
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Fri Nov 18, 2016 9:08 am
Hi scarrier92,
How is the issue now ? Has it been resolved ?
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Wed Nov 23, 2016 8:52 am
Dear scarrier92,
Thanks for your feedback.
If there is any news about that issue, we will inform you.
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Fri Nov 25, 2016 6:49 am
Dear scarrier92,
Thanks for your waiting.
That thread has updated, now please try to get the subject of the second certificate, and the information after CN is what you want.
- Code: Select all
X509Certificate2Collection collection = signatureOne.Certificates;
string s = collection[0].Subject.ToString();
If there is any quesiton, welcome to get it back to us.
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Mon Nov 28, 2016 10:52 pm
Working perfectly
Thank you!
-

scarrier92
-
- Posts: 6
- Joined: Thu Nov 10, 2016 10:51 pm
Tue Nov 29, 2016 1:37 am
Dear scarrier92,
Thanks for the feedback.
Please feel free to contact us if there is any question, we are here for help.
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am