You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by NewToGit <om...@gmail.com> on 2009/11/30 13:54:12 UTC
keyStore.isKeyEntry() returning false
Hi,
I'm creating my KeyStore (disPartner.jks) as shown below but the
isKeyEntry("dispubcer") method is returning false can someone tell me why
please.
But when I retrieve the certificate using getCertiticate("dispubcer") it
finds it no problem.
%-| please help me.
echo 'Create dis store ... '
$JAVA_HOME/bin/keytool -genkeypair -alias dis -keystore disStore.jks -dname
"cn=dis" -keypass dispass -storepass dispass -keyalg rsa
echo 'Self-sign dis ... '
$JAVA_HOME/bin/keytool -selfcert -alias dis -keystore disStore.jks -keypass
dispass -storepass dispass
echo 'Export dis public key...'
$JAVA_HOME/bin/keytool -export -keystore disStore.jks -alias dis -storepass
dispass -file dispub.cer
echo 'Create disPartner store ... '
$JAVA_HOME/bin/keytool -genkeypair -alias dispartner -keystore
disPartner.jks -dname "cn=dispartner" -keypass disPartnerpass -storepass
disPartnerpass -keyalg rsa
echo 'Self-sign disPartner ... '
$JAVA_HOME/bin/keytool -selfcert -alias dispartner -keystore disPartner.jks
-keypass disPartnerpass -storepass disPartnerpass
echo 'Export disPartner public key...'
$JAVA_HOME/bin/keytool -export -keystore disPartner.jks -alias dispartner
-storepass disPartnerpass -file disPartnerpub.cer
echo 'Import dispub.cer->disPartner.jks... '
$JAVA_HOME/bin/keytool -import -alias dispubcer -file dispub.cer -keystore
disPartner.jks -storepass disPartnerpass
echo 'removing dispub.cer ...'
rm dispub.cer
echo 'Import disPartnerpub.cer->disStore.jks... '
$JAVA_HOME/bin/keytool -import -alias disPartnerpubcert -file
disPartnerpub.cer -keystore disStore.jks -storepass dispass
echo 'removing disPartnerpub.cer ...'
rm disPartnerpub.cer
echo 'Done.'
--
View this message in context: http://old.nabble.com/keyStore.isKeyEntry%28%29-returning-false-tp26574263p26574263.html
Sent from the WSS4J mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
RE: keyStore.isKeyEntry() returning false
Posted by "Dittmann, Werner (NSN - DE/Munich)" <we...@nsn.com>.
That's quite simple: the disPartner.jks does not contain a key
with that alias, only a certificate. The key in disPartner.jks
is named "dispartner".
Regards,
Werner
> -----Original Message-----
> From: ext NewToGit [mailto:omarnetbox@gmail.com]
> Sent: Monday, November 30, 2009 1:54 PM
> To: wss4j-dev@ws.apache.org
> Subject: keyStore.isKeyEntry() returning false
>
>
> Hi,
>
> I'm creating my KeyStore (disPartner.jks) as shown below but the
> isKeyEntry("dispubcer") method is returning false can someone
> tell me why
> please.
>
> But when I retrieve the certificate using
> getCertiticate("dispubcer") it
> finds it no problem.
>
> %-| please help me.
>
> echo 'Create dis store ... '
> $JAVA_HOME/bin/keytool -genkeypair -alias dis -keystore
> disStore.jks -dname
> "cn=dis" -keypass dispass -storepass dispass -keyalg rsa
> echo 'Self-sign dis ... '
> $JAVA_HOME/bin/keytool -selfcert -alias dis -keystore
> disStore.jks -keypass
> dispass -storepass dispass
> echo 'Export dis public key...'
> $JAVA_HOME/bin/keytool -export -keystore disStore.jks -alias
> dis -storepass
> dispass -file dispub.cer
>
> echo 'Create disPartner store ... '
> $JAVA_HOME/bin/keytool -genkeypair -alias dispartner -keystore
> disPartner.jks -dname "cn=dispartner" -keypass disPartnerpass
> -storepass
> disPartnerpass -keyalg rsa
> echo 'Self-sign disPartner ... '
> $JAVA_HOME/bin/keytool -selfcert -alias dispartner -keystore
> disPartner.jks
> -keypass disPartnerpass -storepass disPartnerpass
> echo 'Export disPartner public key...'
> $JAVA_HOME/bin/keytool -export -keystore disPartner.jks
> -alias dispartner
> -storepass disPartnerpass -file disPartnerpub.cer
>
> echo 'Import dispub.cer->disPartner.jks... '
> $JAVA_HOME/bin/keytool -import -alias dispubcer -file
> dispub.cer -keystore
> disPartner.jks -storepass disPartnerpass
> echo 'removing dispub.cer ...'
> rm dispub.cer
> echo 'Import disPartnerpub.cer->disStore.jks... '
> $JAVA_HOME/bin/keytool -import -alias disPartnerpubcert -file
> disPartnerpub.cer -keystore disStore.jks -storepass dispass
> echo 'removing disPartnerpub.cer ...'
> rm disPartnerpub.cer
>
> echo 'Done.'
>
> --
> View this message in context:
> http://old.nabble.com/keyStore.isKeyEntry%28%29-returning-fals
> e-tp26574263p26574263.html
> Sent from the WSS4J mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org