Hi,

To generate cert from the keystore

keytool -genkey -alias keyAlias-keyalg RSA -keypass changeit -storepass
changeit keystore keystore.jks

To export the generated certificate

keytool -export -alias keyAlias-storepass changeit -file server.cer
-keystore keystore.jks


You can use above commands to do it and more information from doc
https://docs.oracle.com/cd/E19798-01/821-1751/ghlgv/index.html

Regards,
Malintha

On Thu, Oct 1, 2015 at 4:46 PM, Danushka Fernando <danush...@wso2.com>
wrote:

> You need to export the certificate from the keystore and import it to
> java. You can use keytool for that purpose.
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Thu, Oct 1, 2015 at 11:31 AM, Sriashalya Srivathsan <asha...@wso2.com>
> wrote:
>
>> Hi Malintha,
>> I have a problem in adding keystore in to java.we can add the certificate
>> to java cacert, but I have keystore. how to add it?
>>
>> On Thu, Oct 1, 2015 at 11:12 AM, Sriashalya Srivathsan <asha...@wso2.com>
>> wrote:
>>
>>> Thanx Malintha, I'll check on that
>>>
>>> On Thu, Oct 1, 2015 at 10:49 AM, Malintha Adikari <malin...@wso2.com>
>>> wrote:
>>>
>>>> Hi Sriashalya,
>>>>
>>>> Are you getting this error while sending requests to IS ? When you
>>>> install new keystore to wso2 product you have to configure it in carbon.xml
>>>> also.
>>>>
>>>> <KeyStore>
>>>>             <!-- Keystore file location-->
>>>>
>>>> <Location>${carbon.home}/repository/resources/security/wso2carbon.jks</Location>
>>>>             <!-- Keystore type (JKS/PKCS12 etc.)-->
>>>>             <Type>JKS</Type>
>>>>             <!-- Keystore password-->
>>>>             <Password>wso2carbon</Password>
>>>>             <!-- Private Key alias-->
>>>>             <KeyAlias>wso2carbon</KeyAlias>
>>>>             <!-- Private Key password-->
>>>>             <KeyPassword>wso2carbon</KeyPassword>
>>>>         </KeyStore>
>>>>
>>>> Regards,
>>>> Malintha
>>>>
>>>> On Thu, Oct 1, 2015 at 10:35 AM, Sriashalya Srivathsan <
>>>> asha...@wso2.com> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> Getting the following error while adding the keystore to IS which is
>>>>> provided by the API.
>>>>>
>>>>> javax.net.ssl.SSLHandshakeException:
>>>>> sun.security.validator.ValidatorException: PKIX path building failed:
>>>>> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
>>>>> valid certification path to requested target
>>>>>
>>>>> I've added the certificate to java cacerts and wso2 IS.
>>>>>
>>>>>
>>>>> --
>>>>> Regards
>>>>> S.Sriashalya,
>>>>> WSO2 *Inc*.
>>>>> lean . enterprise . middleware
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> Dev@wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Malintha Adikari*
>>>> Software Engineer
>>>> WSO2 Inc.; http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> Mobile: +94 71 2312958
>>>> Blog:    http://malinthas.blogspot.com
>>>> Page:   http://about.me/malintha
>>>>
>>>
>>>
>>>
>>> --
>>> Regards
>>> S.Sriashalya,
>>> WSO2 *Inc*.
>>> lean . enterprise . middleware
>>>
>>
>>
>>
>> --
>> Regards
>> S.Sriashalya,
>> WSO2 *Inc*.
>> lean . enterprise . middleware
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 
*Malintha Adikari*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

Mobile: +94 71 2312958
Blog:    http://malinthas.blogspot.com
Page:   http://about.me/malintha
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to