aspose file tools*
The moose likes Security and the fly likes strange difference on certificate serial nuimber Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "strange difference on certificate serial nuimber" Watch "strange difference on certificate serial nuimber" New topic
Author

strange difference on certificate serial nuimber

zhang kui
Greenhorn

Joined: Sep 10, 2003
Posts: 2
dear all:

I would get the crl(certification revocation list) from one ldap server, in which the certificates based on PKI are saved. I have done somehting as follow:
1. [connection to ldap server]
2. [search]
3. [ return byte[] value ]
4. [parse the return value / get the crl list]
5. [handle each X509CRLEntry, get certfication serial number by calling getSerialNumber() ]
6. [ return final serail number ]
7. something seems wrong :
the serial number return by sun cert package is like:
83079285076462345718802332854154855
but if I open the same return result by windows 2000 system, the serial number looks like:
1000 2000 2004 0727 1110 0000 0280 19

I was wonering what cause such difference? potential encoding? different implementation way?
zhang kui
Greenhorn

Joined: Sep 10, 2003
Posts: 2
hi,hi,

I got the answer by myself.

when to display the BigInteger number as string, we can choose toString based on different radix, when chose 16, the problem is solved
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: strange difference on certificate serial nuimber