Всем добрый день.
Пытаюсь сделать утилиту подписи SOAP-запросов.
Windows 10, CSP 5 Установлен.
Вроде все сделал по доке, взял Java8-311, установил JCP, JCSP и все нужные либы.
При непосредственно вызове sig.sign(signContext); Получаю ошибку "Unsupported method".
Сначала думал что-то не так с контекстом. Но вывел debug-логи и увидел вполне приятную карнтинку:
Marshalling Reference
Adding digestValueElem
check resolvability by class org.apache.xml.security.utils.resolver.ResourceResolver
State I can resolve reference: ""
ResolverFragment with empty URI (means complete document)
URIDereferencer class name: ru.CryptoPro.JCPxml.dsig.internal.dom.DOMURIDereferencer
Data class name: ru.CryptoPro.JCPxml.dsig.internal.dom.ApacheNodeSetData
Provider for Digest: null
Resolved Provider for Digest: JCP version 2.0
Create URI "http://www.w3.org/2000/09/xmldsig#enveloped-signature" class "class org.apache.xml.security.transforms.implementations.TransformEnvelopedSignature"
The NodeList is [Transform: null]
setElement(Transform, "null"
Created transform for algorithm:
http://www.w3.org/2000/0...dsig#enveloped-signature ApacheData = true
Create URI "http://www.w3.org/2001/10/xml-exc-c14n#" class "class org.apache.xml.security.transforms.implementations.TransformC14NExclusive"
The NodeList is [Transform: null]
setElement(Transform, "null"
Created transform for algorithm:
http://www.w3.org/2001/10/xml-exc-c14n# ApacheData = true
Pre-digested input:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><fillAidsRequest xmlns="http://iac.spb.ru/mb#"><aidsBlank><Request><blankInfo><id....
SelfTester constructor.
initiating of jar list...
jar classes: ru.CryptoPro.JCP.Install.JCPInstaller
getting class url for class name: ru.CryptoPro.JCP.Install.JCPInstaller
jar file:/D:/Work/crypto-pro-service/work-dir/java-with-crypto-pro/jre1.8.0_311-win-x64/lib/ext/JCP.jar has been added to self-tester.
initiating of jar list completed.
initiating of jar list...
jar classes: ru.CryptoPro.JCP.Install.JCPInstaller
building of test list...
building of test list completed.
initiating...
initiating completed.
SelfTester constructor OK.
starting tester thread...
SelfTester run.
Reference object uri =
Reference digesting completed
Signature Provider: null
Loading JCP 2.0.41975
JCP has been loaded.
Resolved Signature Provider: JCP version 2.0
Signing with key: CryptoPro Gost PrivateKey (GOST3410DH_2012_256) with parameters: 1.2.643.7.1.1.6.1
Create URI "http://www.w3.org/2001/10/xml-exc-c14n#" class "class org.apache.xml.security.transforms.implementations.TransformC14NExclusive"
The NodeList is [CanonicalizationMethod: null]
setElement(CanonicalizationMethod, "null"
Created transform for algorithm:
http://www.w3.org/2001/10/xml-exc-c14n# isNodeSet() = true
Canonicalized SignedInfo:
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Canonicali....
Data to be signed/verified:PFNpZ25lZEluZm8geG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxD
YW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8x
MC94bWwtZXhjLWMxNG4jIj48L0Nhbm9uaWNhbGl6YXRpb25NZXRob2Q+PFNpZ25hdHVyZU1ldGhv
ZCBBbGdvcml0aG09InVybjppZXRmOnBhcmFtczp4bWw6bnM6Y3B4bWxzZWM6YWxnb3JpdGhtczpn
b3N0cjM0MTAyMDEyLWdvc3RyMzQxMTIwMTItMjU2Ij48L1NpZ25hdHVyZU1ldGhvZD48UmVmZXJl
bmNlIFVSST0iIj48VHJhbnNmb3Jtcz48VHJhbnNmb3JtIEFsZ29yaXRobT0iaHR0cDovL3d3dy53
My5vcmcvMjAwMC8wOS94bWxkc2lnI2VudmVsb3BlZC1zaWduYXR1cmUiPjwvVHJhbnNmb3JtPjxU
cmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzEwL3htbC1leGMtYzE0
biMiPjwvVHJhbnNmb3JtPjwvVHJhbnNmb3Jtcz48RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0idXJu
OmlldGY6cGFyYW1zOnhtbDpuczpjcHhtbHNlYzphbGdvcml0aG1zOmdvc3RyMzQxMTIwMTItMjU2
Ij48L0RpZ2VzdE1ldGhvZD48RGlnZXN0VmFsdWU+WThYcXRJZ0NxNHAxV2s5KytKNm5LSlBvNHZY
U2NXbWNkbnlvZmN4VzFydz08L0RpZ2VzdFZhbHVlPjwvUmVmZXJlbmNlPjwvU2lnbmVkSW5mbz4=
И далее сразу исключение: java.security.SignatureException: Unsupported method.
at ru.CryptoPro.JCSP.Key.AbstractKeySpec.signature(Unknown Source) ~[JCSP.jar:41975]
Отредактировано пользователем 14 декабря 2021 г. 22:35:05(UTC)
| Причина: Не указана