Hi, I have managed to solve the problem. The step was to get the encoded value first from the certificate and then use the MessageDigest instance with MD5 algorithm.
Thank you, Manoj Best Regards.. Manoj Kumara Software Engineer WSO2, Inc.; http://wso2.com Twitter: http://twitter.com/ManKuma Mobile: +94713448188 On Thu, May 9, 2013 at 5:20 PM, Ananda Manoj Kumara <ma...@wso2.com> wrote: > Hi Pushpalanka, > > During the second step I just pass the returned values of the byte[] to > MessageDigest instance. > thank you for the feedback and I'll look in to your points. > > > > Best Regards.. > > > Manoj Kumara > Software Engineer > WSO2, Inc.; http://wso2.com > > Twitter: http://twitter.com/ManKuma > Mobile: +94713448188 > > > On Thu, May 9, 2013 at 3:15 PM, Pushpalanka Jayawardhana > <la...@wso2.com>wrote: > >> Hi Manoj, >> >> At the second step make sure you do not do any modification to the >> signature value read from the keystore. >> Also AFAIK certificate is generally used with public key. Not private key. >> Hope this will make some help. >> >> Thanks, >> >> Pushpalanka Jayawardhana >> >> Software Engineer >> >> WSO2 Lanka (pvt) Ltd >> [image: >> Facebook]<http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.facebook.com%2Fpushpalanka> >> [image: >> Twitter]<http://s.wisestamp.com/links?url=http%3A%2F%2Ftwitter.com%2FPushpalanka> >> [image: >> LinkedIn]<http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.linkedin.com%2Fprofile%2Fview%3Fid%3D75175642%26trk%3Dtab_pro> >> [image: >> Blogger]<http://s.wisestamp.com/links?url=http%3A%2F%2Fpushpalankajaya.blogspot.com%2F> >> [image: >> SlideShare]<http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.slideshare.net%2FPushpalanka> >> Mobile: +94779716248 >> <http://s.wisestamp.com/links?url=http%3A%2F%2Fr1.wisestamp.com%2Fr%2Flanding%3Fu%3Dc984892c0c4ca423%26v%3D3.13.2%26t%3D1361257731639%26promo%3D10%26dest%3Dhttp%253A%252F%252Fwww.wisestamp.com%252Femail-install%253Futm_source%253Dextension%2526utm_medium%253Demail%2526utm_campaign%253Dpromo_10> >> >> On Thu, May 9, 2013 at 2:35 PM, Ananda Manoj Kumara <ma...@wso2.com>wrote: >> >>> Hi, >>> >>> I need to get the $subject value to validate default wso2carbon >>> keystore. I have done the following steps, >>> >>> >>> - I have taken the certificate corresponding to alias 'wso2carbon' >>> from the primary keystore. >>> - Then I created the MD5 value from the signature value taken from >>> the certificate which is a byte[] and providing these byte values to >>> MessageDigest instance and then taking the hex value. >>> - But the value is not matched with the value in the keystore file >>> value of wso2carbon, PrivateKeyEntry, Certificate fingerprint (MD5). >>> >>> >>> It will be great someone can help. >>> >>> Thanks, >>> Manoj >>> >>> >>> Best Regards.. >>> >>> >>> Manoj Kumara >>> Software Engineer >>> WSO2, Inc.; http://wso2.com >>> >>> Twitter: http://twitter.com/ManKuma >>> Mobile: +94713448188 >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev