Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Java 2.0.5
-
Security Level: Public (Public issues, viewable by everyone)
-
None
-
JDK 7
Description
In encrypt() function with KeyIdentifier.X509SubjectName, or SkiKeyIdentifier, the KeyInfo in EncryptedKey is generated correspondantly (see below). But the decrypt() function fails with the message:
XMLSecurityException: Key could not be resolved and no key was loaded for Decryption.
Even if I set the XMLSecurityProperties.EncryptionUseThisCertificate for the decryption function. (ignored by API ?) The same code works with other KeyIdentifier(s) such as KeyValue, IssuerSerial, X509KeyIdentifier.
--------------------------------------------------------------------
<dsig:KeyInfo>
<dsig:X509Data>
<dsig:X509SKI>iVvT2bl+7ys0vup4tz+7YQ4a34E=</dsig:X509SKI>
</dsig:X509Data>
</dsig:KeyInfo>
<dsig:KeyInfo>
<dsig:X509Data> <dsig:X509SubjectName>CN=localhost,OU=EBICSServer,O=Axway,L=Puteaux,ST=France,C=FR</dsig:X509SubjectName>
</dsig:X509Data>
</dsig:KeyInfo>