Spire.PDF-for-Java icon indicating copy to clipboard operation
Spire.PDF-for-Java copied to clipboard

How to get certification public key from ?

Open WisdomFamily opened this issue 5 years ago • 1 comments

PdfField pf = wc.get(i); if (pf instanceof PdfSignatureFieldWidget) { PdfSignatureFieldWidget sfw = (PdfSignatureFieldWidget) pf; PdfSignature sn = sfw.getSignature(); X509Certificate2 x509 = sn.getCertificates().get_Item(0); issuer = sn.getCertificate().get_IssuerName().getName(); if (sn.verifySignature() && issuers.contains(issuer)) { log.info("issuer={}\nissuers=", issuer, issuers); return issuer; } } Here could not get the certificate public key via the X509Certificate2 x509 = sn.getCertificates().

WisdomFamily avatar Mar 20 '20 04:03 WisdomFamily

Thanks for your question. Sorry, we don't support getting the public key from the certificate. If you have any further questions, please feel free to write to us.

eiceblue avatar Mar 25 '25 09:03 eiceblue