Hi Tharinda, If you want to work with certificate sample code you can try this example[1][2].
[1] http://l-lin.github.io/2014/09/09/Auth_with_certificates_Tomcat_spring/ [2] https://github.com/wso2/carbon-identity/tree/master/components/carbon-authenticators/mutual-ssl-authenticator/org.wso2.carbon.identity.authenticator.mutualssl/src/main/java/org/wso2/carbon/identity/authenticator On Fri, Feb 19, 2016 at 9:06 AM, Niranjan Karunanandham <[email protected]> wrote: > Hi Tharinda, > > What's the Kernel version in which you want to do this? In Kernel 4.2.0, > the SSL certificate was stored in the Keystore defined in carbon.xml > (<KeyStore>) and it can be retrieved using the methods mentioned in this > thread. > But if you are using Kernel 4.4.x, the keystore for the SSL certificate is > defined in catalina-server.xml (same as tomcat) [1]. Here if you use the > above method, you will retrieve the certificate which is used for > encrypting [2]. > > [1] - > https://docs.wso2.com/display/Carbon440/Configuring+catalina-server.xml > [2] - > https://docs.wso2.com/display/Carbon440/Configuring+Keystores+in+WSO2+Products > > Regards, > Nira > > On Thu, Feb 18, 2016 at 11:14 AM, Thusitha Thilina Dayaratne < > [email protected]> wrote: > >> Hi Tharinda, >> >> You can refer to >> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/KeyStoreManager.java >> It contains teh method to get privateKey as well getDefaultPrivateKey, >> getPrivateKey(String keyStoreName, String alias) >> >> >> On Thu, Feb 18, 2016 at 11:10 AM, Tharinda Ehelepola <[email protected]> >> wrote: >> >>> Hi Godwin, >>> >>> That's what I need. And also I need to access the private key. Can you >>> please share any code example on git relevant for this. >>> >>> Thanks, >>> Tharinda. >>> >>> On Thu, Feb 18, 2016 at 10:57 AM, Godwin Shrimal <[email protected]> >>> wrote: >>> >>>> Hi Tharinda, >>>> >>>> If you need to do this in carbon runtime, you can use KeyStoreManager >>>> class as follows to get public certificate of the keystore in super and >>>> other tenants. >>>> >>>> KeyStoreManager.getInstance(tenantID).getDefaultPublicKey(); >>>> >>>> >>>> Thanks >>>> Godwin >>>> >>>> On Thu, Feb 18, 2016 at 10:42 AM, Tharinda Ehelepola < >>>> [email protected]> wrote: >>>> >>>>> Hi , >>>>> >>>>> According to the subject I need to access EMM public key certificate >>>>> which is stored in "wso2carbon.jks". How can I do it? >>>>> >>>>> Regards, >>>>> Tharinda. >>>>> -- >>>>> >>>>> *Tharinda Ehelepola* >>>>> >>>>> *Software Engineering Intern* >>>>> LinkedIn <https://lk.linkedin.com/in/tharindadilshan> >>>>> TP : 94711834769 >>>>> Email: [email protected] >>>>> Web: tharinda.tk >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Godwin Amila Shrimal* >>>> Senior Software Engineer >>>> WSO2 Inc.; http://wso2.com >>>> lean.enterprise.middleware >>>> >>>> mobile: *+94772264165* >>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* >>>> twitter: https://twitter.com/godwinamila >>>> >>> >>> >>> >>> -- >>> >>> *Tharinda Ehelepola* >>> >>> *Software Engineering Intern* >>> LinkedIn <https://lk.linkedin.com/in/tharindadilshan> >>> TP : 94711834769 >>> Email: [email protected] >>> Web: tharinda.tk >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Thusitha Dayaratne >> Software Engineer >> WSO2 Inc. - lean . enterprise . middleware | wso2.com >> >> Mobile +94712756809 >> Blog alokayasoya.blogspot.com >> About http://about.me/thusithathilina >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > > *Niranjan Karunanandham* > Senior Software Engineer - WSO2 Inc. > WSO2 Inc.: http://www.wso2.com > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Thank you Best Regards *Rajjaz HM* Associate Software Engineer WSO2 Inc. <http://wso2.com/> lean | enterprise | middleware Mobile | +94752833834 Email | [email protected] LinkedIn | Blogger | WSO2 Profile <http://wso2.com/about/team/mohammer_rajjaz/>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
