Hi,
I'm having trouble getting wss4j/bouncyCastle/jce to find my
certificate.
Everything I've read on my error (below) says I've got something wrong
with my alias.
So, I added to debug code which seems to show I've got my alias stuff
right.
I learned the following from my debug code:
Point A: keystore.getCertificateChain(alias) returns null
Point B: keystore.containsAlias(alias) returns true.
This is where I'm not understanding things, b/c my "Point A" and "Point
B" (in my own head) seem mutually exclusive.
Thanks all,
--Erik Ostermueller
#####Here is the error I'm getting:
Caused by: org.apache.ws.security.WSSecurityException:
WSHandler: Signature: error during message
processingorg.apache.ws.security.WSSecurityException:
General security error (Unexpected number of X509Data: for
Signature)
#####Here is my key generation:
%JAVA_HOME%\bin\keytool -genseckey -providerClass
org.bouncycastle.jce.provider.BouncyCastleProvider -storetype JCEKS
-keyalg DESede -keystore .\conf\bob.jks -alias bob -validity 365
-storepass password -keypass password
###### I added the following debug code to the very top of
CryptoBase#getCertificates(alias) from wss4j 1.5.4
try {
Certificate[] etoCerts =
keystore.getCertificateChain(alias);
java.security.Key myKey =
keystore.getKey(alias,"password".toCharArray() );
System.out.println("CryptoBase#getCertificates A --
keystore entries [" + keystore.size() + "] alias [" + alias + "]
keystore.isKeyEntry [" + keystore.isKeyEntry(alias) + "] containsAlias
[" + keystore.containsAlias(alias) + "] etoCerts [" + etoCerts + "]
myKey[" + myKey + "] key algo [" + myKey.getAlgorithm() + "] format [" +
myKey.getFormat() + "]");
for(Enumeration xenum = keystore.aliases();
xenum.hasMoreElements();) {
Object objAlias = xenum.nextElement();
System.out.println("Found alias [" + objAlias +
"]");
}
} catch (Exception e) {
System.out.println("error looking for the aliases ETO
6/19/2008 10:13:23 AM");
e.printStackTrace();
}
###### The above code produced the following output
CryptoBase#getCertificates A -- keystore entries [1] alias [bob]
keystore.isKeyEntry [true] containsAlias [true] etoCerts [null]
[EMAIL PROTECTED] key algo [DESede] format
[RAW]
Found alias [bob]
______________
The information contained in this message is proprietary and/or confidential.
If you are not the
intended recipient, please: (i) delete the message and all copies; (ii) do not
disclose,
distribute or use the message in any manner; and (iii) notify the sender
immediately. In addition,
please be aware that any message addressed to our domain is subject to
archiving and review by
persons other than the intended recipient. Thank you.
_____________