Re: [Dev] Geting certificate fingerprint (MD5) value form a certificate

2013-05-09 Thread Ananda Manoj Kumara
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  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 
> 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]
>>  [image:
>> Twitter]
>>  [image:
>> LinkedIn]
>>  [image:
>> Blogger]
>>  [image:
>> SlideShare]
>> Mobile: +94779716248
>> 
>>
>> On Thu, May 9, 2013 at 2:35 PM, Ananda Manoj Kumara 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


Re: [Dev] Geting certificate fingerprint (MD5) value form a certificate

2013-05-09 Thread Ananda Manoj Kumara
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 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]
>  [image:
> Twitter]
>  [image:
> LinkedIn]
>  [image:
> Blogger]
>  [image:
> SlideShare]
> Mobile: +94779716248
>
> 
>
> On Thu, May 9, 2013 at 2:35 PM, Ananda Manoj Kumara 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


Re: [Dev] Geting certificate fingerprint (MD5) value form a certificate

2013-05-09 Thread Pushpalanka Jayawardhana
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]
[image:
Twitter]
[image:
LinkedIn]
[image:
Blogger]
[image:
SlideShare]
Mobile: +94779716248


On Thu, May 9, 2013 at 2:35 PM, Ananda Manoj Kumara  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