У меня есть следующий файл подписи, который содержит сертификат подписавшего, ответ OCSP и другую информацию:
<?xml version="1.0" encoding="UTF-8"?>
<asic:XAdESSignatures xmlns:asic="http://uri.etsi.org/02918/v1.2.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#">
<ds:Signature Id="S0">
<ds:SignedInfo Id="S0-SignedInfo">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11">
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256">
</ds:SignatureMethod>
<ds:Reference Id="S0-ref-0" URI="Lisa_1.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>zL9dI436Zdwxm0H2Ojs9iolp7s6PxApJDrRe3BFY2Fs=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-1" URI="Lisa_2.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>cNX/ShcNgqfC38HXg7aPsnkKoCd5nzzwwt4VufluiXM=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-2" URI="Lisa_3.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>/vLjJAWc/GEfEpebWvJTRaYY4kL46zG7t/LooLy49tQ=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-3" URI="Lisa_4.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>KdjdZx73736VjhGN2358wBu7wCR9E3CfxszQ5jMEgB0=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-4" URI="Lisa_5.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>5pvrm/hnncmdmcTwLP89IeXUlWGE+xZ/qhKgSI9M0AE=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-5" URI="Lisa_6.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>axdl5fEKUaPvIjKFrd1ccVw+SDbmcEtvvUIHnnFhGwo=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-6" URI="LVKM2019121900083.pdf">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>VDUABdolFkW/0GdCxMIpYVcY0PDSUN4gowCqS7sMnPQ=</ds:DigestValue>
</ds:Reference>
<ds:Reference Id="S0-ref-sp" Type="http://uri.etsi.org/01903#SignedProperties" URI="#S0-SignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>sBlyyA+c4Gk5pMjprkaXQWiO54S4zYefKZ3uyAhD/4Q=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo><ds:SignatureValue Id="S0-SIG">
ULSFutc0fX+nqz5FkKZKexVtrsD4wTsKZcUYC+jU8P03iPE89oSWv7xoeTfZRRlRqUZTjINMT5yq9gaXWo/pFA==</ds:SignatureValue>
<ds:KeyInfo Id="S0-KeyInfo">
<ds:X509Data><ds:X509Certificate>MIIF1jCCA76gAwIBAgIQAjeRaJLVRMdZL99aR55h0TANBgkqhkiG9w0BAQsFADBj
MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
czEXMBUGA1UEYQwOTlRSRUUtMTA3NDcwMTMxFzAVBgNVBAMMDkVTVEVJRC1TSyAy
MDE1MB4XDTE3MDYwMTA5MzMxNFoXDTIyMDYwMTIwNTk1OVowgZoxCzAJBgNVBAYT
AkVFMRswGQY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ICAQBxq+Wy+RO1FlDhKMnooVm4WaRXtL9Y
IiuMryuoyN01clA2gweAD4Sa8c3Rzt8EoRqdoWvqDAwt3AvrjrWttwSQdbP8b3Al
uBId5j7jop4xt0ZDPld5gcaDemavMBCEZVOlpDzWPiZ8nxiHfjaR5o/sMEKjCjW4
T7n8RUnM3sr3JRSXTZtYBZgmiMeFig7oi348x4W2Dztn0MpycAKancrb959piK3f
nwuHNxd/ptTmA9pn+MB/vwlzJEeozuTcJ0f083ifejBdbg8DYPvdq/XmKpJ97Lvc
gvP01QcrhThpnV8rn0SeQ9k493aYmOUy3fjHH+dZGrzslz4gAjMtRQIi0XC1qpuu
eDEFLwi95CPZ6e/VBr26iCxDrHb1Y3uSox9ZuVSz2eLx4BAUQzVhDIIC3HjXBhap
OLNhuo234I3KEBSWxdLP6winSONaaqiIVDvicPwz3WLV1rLcQGuUBSQG8jpb3yGp
QJd+cJdE3OB6T8Ko5l6tER3PBf53VY5J2MI2ICu0DTT1Bn0yJTPm0g0vk/Y6zGDK
r3Ehyb09qnJnRQl/W/U6iJWMY4wQjNKJMHMUwJoKVGtySl8jUpY1IVM0RJBPhsqy
FyiUelwYmYhVxbMPHdwT9Osi0Dt7pPseQvYu2BcArIzISXOVOO0BJLCGyKBPIa98
R+NCqJyEz0Ltfw==</ds:X509Certificate></ds:X509Data></ds:KeyInfo>
<ds:Object Id="S0-object-xades"><xades:QualifyingProperties Id="S0-QualifyingProperties" Target="#S0" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"><xades:SignedProperties Id="S0-SignedProperties">
<xades:SignedSignatureProperties Id="S0-SignedSignatureProperties">
<xades:SigningTime>2019-12-20T08:40:24Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>wdTxx+frwDnSWdcBRnGZD+YbyfX2UPIZ8g2kJnouk1U=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=ESTEID-SK 2015,2.5.4.97=#0c0e4e545245452d3130373437303133,O=AS Sertifitseerimiskeskus,C=EE</ds:X509IssuerName>
<ds:X509SerialNumber>2946981553353315672823176122903454161</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
<xades:SignaturePolicyIdentifier>
<xades:SignaturePolicyId>
<xades:SigPolicyId>
<xades:Identifier Qualifier="OIDAsURN">
urn:oid:1.3.6.1.4.1.10015.1000.3.2.1</xades:Identifier>
</xades:SigPolicyId>
<xades:SigPolicyHash>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
</ds:DigestMethod>
<ds:DigestValue>3Tl1oILSvOAWomdI9VeWV6IA/32eSXRUri9kPEz1IVs=</ds:DigestValue>
</xades:SigPolicyHash>
<xades:SigPolicyQualifiers>
<xades:SigPolicyQualifier>
<xades:SPURI>
https://www.sk.ee/repository/bdoc-spec21.pdf</xades:SPURI>
</xades:SigPolicyQualifier>
</xades:SigPolicyQualifiers>
</xades:SignaturePolicyId>
</xades:SignaturePolicyIdentifier>
<xades:SignatureProductionPlace>
</xades:SignatureProductionPlace>
<xades:SignerRole>
<xades:ClaimedRoles>
<xades:ClaimedRole>Esimees</xades:ClaimedRole>
</xades:ClaimedRoles>
</xades:SignerRole>
</xades:SignedSignatureProperties>
<xades:SignedDataObjectProperties>
<xades:DataObjectFormat ObjectReference="#S0-ref-0">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
<xades:DataObjectFormat ObjectReference="#S0-ref-1">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
<xades:DataObjectFormat ObjectReference="#S0-ref-2">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
<xades:DataObjectFormat ObjectReference="#S0-ref-3">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
<xades:DataObjectFormat ObjectReference="#S0-ref-4">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
<xades:DataObjectFormat ObjectReference="#S0-ref-5">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
<xades:DataObjectFormat ObjectReference="#S0-ref-6">
<xades:MimeType>application/pdf</xades:MimeType>
</xades:DataObjectFormat>
</xades:SignedDataObjectProperties>
</xades:SignedProperties><xades:UnsignedProperties Id="S0-UnsigedProperties">
<xades:UnsignedSignatureProperties Id="S0-UnsigedSignatureProperties">
<xades:CertificateValues Id="S0-CertificateValues">
<xades:EncapsulatedX509Certificate Id="S0-CA_CERT1">
MIIGcDCCBVigAwIBAgIQRUgJC4ec7yFWcqzT3mwbWzANBgkqhkiG9w0BAQwFADB1
MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG
CSqGSIb3DQEJARYJcGtpQHNrLmVlMCAXDTE1MTIxNzEyMzg0M1oYDzIwMzAxMjE3
MjM1OTU5WjBjMQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVy
aW1pc2tlc2t1czEXMBUGA1UEYQwOTlRSRUUtMTA3NDcwMTMxFzAVBgNVBAMMDkVT
VEVJRC1TSyAyMDE1MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0oH6
1NDxbdW9k8nLA1qGaL4B7vydod2Ewp/STBZB3wEtIJCLdkpEsS8pXfFiRqwDVsgG
Gbu+Q99trlb5LI7yi7rIkRov5NftBdSNPSU5rAhYPQhvZZQgOwRaHa5Ey+BaLJHm
LqYQS9hQvQsCYyws+xVvNFUpK0pGD64iycqdMuBl/nWq3fLuZppwBh0VFltm4nhr
/1S0R9TRJpqFUGbGr4OK/DwebQ5PjhdS40gCUNwmC7fPQ4vIH+x+TCk2aG+u3MoA
z0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QdrBZAzpZ7lfaAuL
FaICP+bAm6uW2JUrM6abOw==</xades:EncapsulatedX509Certificate>
</xades:CertificateValues>
<xades:RevocationValues Id="S0-RevocationValues">
<xades:OCSPValues><xades:EncapsulatedOCSPValue Id="N0">
MIIHWgoBAKCCB1MwggdPBgkrBgEFBQcwAQEEggdAMIIHPDCCAVyhgaAwgZ0xCzAJ
BgNVBAYTAkVFMQ4wDAYDVQQIEwVIYXJqdTEQMA4GA1UEBxMHVGFsbGlubjEiMCAG
A1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czENMAsGA1UECxMET0NTUDEf
MB0GA1UEAxMWU0sgT0NTUCBSRVNQT05ERVIgMjAxMTEYMBYGCSqGSIb3DQEJARYJ
cGtpQHNrLmVlGA8yMDE5MTIyMDA4NDAzN1owYDBeMEkwCQYFKw4DAhoFAAQU/ycP
pUs92lD7/iLb2ohCQQ7zE+4EFLOriLyZ1WKkhSoIzbQdcjuDckdRAhACN5FoktVE
x1kv31pHnmHRgAAYDzIwMTkxMjIwMDg0MDM3WqFEMEIwQAYJKwYBBQUHMAECBDMw
MTANBglghkgBZQMEAgEFAAQgjgPEikDH3TdGkQJLlWHBsjYRKmDt80Rnh07j5B9Z
UIcwDQYJKoZIhvcNAQELBQADggEBAAMgn/SzZSF0QARw0NJgXutzAxZZvLFHCGj7
nTJSt/N6BVm3YyNSOgzN3lH+2EhUr1DcDxf4x93x2EwU2MjwRdeD8sBdJxXNPc+m
U4xMQVIkaKMKt7uEDjExfl6oceh35tEa5QNqeAoFaIy4ELTTyULm+nZcDFTn0RlY
xwOsOlnYcgTT7JIUoKmVrHEKAIcK7ToXdvI/8Nziczf1vFDdQl8syVlH1MmmLq5N
qVwE+8XCDdHn6ranXtf8mh3KJds02n2ViBDU8onMEDCGUK35mPLTi9eB5XTtxgyW
ZrTISlIjhjMJNozoFyyeqCW2ih4E1ntm4IC6SWDaP/VoLU6ZrnKgggTEMIIEwDCC
BLwwggOkoAMCAQICEHKclZna7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BwIBFhto
dHRwczovL3d3dy5zay5lZS9hamF0ZW1wZWwwHwYDVR0jBBgwFoAUEvJaPupWHL/N
Bqzx8SXJqUvUFJkwPQYDVR0fBDYwNDAyoDCgLoYsaHR0cDovL3d3dy5zay5lZS9y
ZXBvc2l0b3J5L2NybHMvZWVjY3JjYS5jcmwwDQYJKoZIhvcNAQEFBQADggEBAMNr
CsL0x7WBrQ/CcPZjVLo/5logUgRAXmNi4VvFerYwTwD6d7OoljodBW1Udi1Mq6kc
IE938lohrIg5v+nCKjPiG5S6f/M7X0UI6roVulwg/UitNjkPWUnQcHJqAAKWSxl0
At+MHYJlf4S00zcTjZwwAgSs/VPg8vWuGU+LaTZGx/I6vwTJ3vBc270bdW46VwT+
4Iy1/s3cfP4adFquLQ/n/TVV9Pr5vWoRCrs8eEMz50ge4YVjPTpy2U+56EUGvilp
OXPnuVaEeUdrezI1ZfAnftpZcYksajEm1Of9twcwCoDfjUHawWQM6We5X2gLixWi
Aj/mwJurltiVKzOmmzs=</xades:EncapsulatedOCSPValue>
</xades:OCSPValues></xades:RevocationValues></xades:UnsignedSignatureProperties>
</xades:UnsignedProperties></xades:QualifyingProperties></ds:Object>
</ds:Signature>
</asic:XAdESSignatures>
Мне нужно получить сертификат подписавшего и ответ OCSP из файла, который я упоминал ранее. Ниже приведен код, который я использовал для получения сертификата подписавшего, и данные, относящиеся к сертификату (написано в java):
public static void main(String[] args) throws Exception {
File xmlFile = new File("signatures0.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(xmlFile);
doc.getDocumentElement().normalize();
NodeList nodeList = doc.getElementsByTagName("ds:X509Certificate");
for (int itr = 0; itr < nodeList.getLength(); itr++) {
Node node = nodeList.item(itr);
String encodedBlock = node.getTextContent().replace("\n", "");
byte[] decodedBlock = Base64.getDecoder().decode(encodedBlock.getBytes(StandardCharsets.UTF_8));
ByteArrayInputStream inputStream = new ByteArrayInputStream(decodedBlock);
CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
X509Certificate cert = (X509Certificate) certFactory.generateCertificate(inputStream);
System.out.println(cert.getIssuerDN());
System.out.println(cert.getSubjectX500Principal().toString());
System.out.println(cert.getPublicKey());
cert.checkValidity();
}
}