<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Aleksey Sanin wrote:
<blockquote cite="mid421AA773.401@aleksey.com" type="cite">Note that
this is not only 00s but also FFs for negative values
<br>
(11, 111, 1111, 11111, etc. all represent the same -1).</blockquote>
I think there're a little misunderstanding about this pointer. a serial
number with leading "00" is a positive integer in the case that
positive integer first byte big then "0x80". Such as for integer 0x81,
the big integer format is 0x0081, with leading "0x00".<br>
<br>
For negative serial number, the first bit must be set, otherwise it is
a positive integer. For example, the big integer "0x81" is a negative
integer, while "0x71" is a positive integer.<br>
<br>
I attached the rules about how to encode and decode integer, hope that
helps.<br>
<br>
-Andrew<br>
<img src="cid:part1.01060903.06060002@Sun.COM" alt=""><br>
<blockquote cite="mid421AA773.401@aleksey.com" type="cite"> The real
<br>
question is how smart are the NSPR (CERT_FindCertByIssuerAndSN)
<br>
and MSCrypto (CertCompareIntegerBlob) functions? Do they understand
<br>
that these numbers are the same or not?
<br>
<br>
Anyone wants to test it?
<br>
<br>
Aleksey
<br>
<br>
Michael Mi wrote:
<br>
<blockquote type="cite">I gree with you than "01", "00 01", "00 00 00
01" are same bns theoretically.
<br>
<br>
</blockquote>
_______________________________________________
<br>
xmlsec mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</a>
<br>
<a class="moz-txt-link-freetext" href="http://www.aleksey.com/mailman/listinfo/xmlsec">http://www.aleksey.com/mailman/listinfo/xmlsec</a>
<br>
</blockquote>
<br>
</body>
</html>