No, it's not wrong. The Keystore works with the same password if I remove Camel 
dependency. With camel added, it gives the error. Some more Information from 
Java Security Logs. Not sure why in non-working logs code picks bouncycastle.

Non-working logs:
Provider: KeyStore.JKS type from: SUN
Provider: MessageDigest.SHA algorithm from: SUN
pkcs12: Loading PKCS#7 data
pkcs12: Loading PKCS#7 encryptedData (PBEWithSHA1AndRC2_40 iterations: 50000)
jar: beginEntry 
org/bouncycastle/jcajce/provider/symmetric/RC2$PBEWithSHAAnd40BitRC2.class
jar: Manifest Entry: 
org/bouncycastle/jcajce/provider/symmetric/RC2$PBEWithSHAAnd40BitRC2.class 
digest=SHA-256
jar:   manifest 
3654e2acabc5ecdfbc8e5c1b37356975ead6804bd65560e61e190999cc14fbf28
jar:   computed 
3654e2acabc5ecdfbc8e51cb37356975ead6804bd65560e61e190999cc14fbf28
jar:
jar: beginEntry 
org/bouncycastle/jcajce/provider/symmetric/util/BaseBlockCipher.class
jar: Manifest Entry:


Working Logs:
Provider: KeyStore.JKS type from: SUN
Provider: MessageDigest.SHA algorithm from: SUN
pkcs12: Loading PKCS#7 data
ProviderConfig: Loading provider: com.sun.crypto.provider.SunJCE
policy: getPermissions:
        PD CodeSource: 
(file:/C:/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/sunjce_provider.jar 
<no signer certificates>)
        PD ClassLoader: sun.misc.Launcher$ExtClassLoader@3c4c4927
        PD Principals: <no principals>
policy: evaluate codesources:
        Policy CodeSource: 
(file:/C:/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/* <no signer 
certificates>)
        Active CodeSource: (file:/C: 
/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/sunjce_provider.jar <no signer 
certificates>)
policy: evaluate principals:
        Policy Principals: []
        Active Principals: []
policy:   granting ("java.security.AllPermission" "<all permissions>" "<all 
actions>")
policy: evaluation (codesource/principals) passed


Thanks,
Mrinal
-----Original Message-----
From: Andrea Cosentino <anco...@gmail.com> 
Sent: Wednesday, June 17, 2020 4:55 PM
To: users@camel.apache.org
Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro 
Software. Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


The keystore password is wrong.

Il mer 17 giu 2020, 22:33 Mrinal Sharma <msha...@smithmicro.com> ha scritto:

> Can you elaborate more?
>
> -----Original Message-----
> From: Andrea Cosentino <anco...@gmail.com>
> Sent: Wednesday, June 17, 2020 3:54 PM
> To: users@camel.apache.org
> Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE
>
> CAUTION - EXTERNAL EMAIL This email originated from outside of Smith 
> Micro Software. Do not click links or open attachments unless you 
> recognize the sender and know the content is safe.
>
>
> The error is explicit.
>
> Il mer 17 giu 2020, 21:47 Mrinal Sharma <msha...@smithmicro.com> ha
> scritto:
>
> > Hello,
> >
> > I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) 
> > application which loads PKCS12 file in UAAServer. Once I added Camel 
> > 3 Dependency the KeyStore API's started giving errors.
> >
> > --------------------------------------------------------------------
> > --
> > --------------------------------------------------------------------
> > --
> > -----------------------------------------------
> >
> > KeyPair keyPair = new KeyStoreKeyFactory(
> >              new
> > ClassPathResource(uaaProperties.getKeyStore().getName()),
> > uaaProperties.getKeyStore().getPassword().toCharArray())
> >              .getKeyPair(uaaProperties.getKeyStore().getAlias());
> >
> > --------------------------------------------------------------------
> > --
> > --------------------------------------------------------------------
> > --
> > -----------------------------------------------
> > The error that is thrown is :
> > Caused by: java.io.IOException: keystore password was incorrect
> >
> > Why would addition of Camel 3 cause this error?
> >
> > Thanks,
> > Mrinal Sharma
> >
> >
> >
>

Reply via email to