<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Why not?
<div class=""><br class="">
</div>
<div class="">This serial number could also be displayed as 3203232750, or 000BEED73EE, or 03203232750.</div>
<div class=""><br class="">
<div class="">
<div class="">Cordialement,</div>
<div class="">Erwann Abalea</div>
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">Le 30 janv. 2017 à 11:03, Matthias Ballreich <<a href="mailto:matthias.ballreich@outlook.de" class="">matthias.ballreich@outlook.de</a>> a écrit :</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">thanks for explanation.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">But why did Windows Cert Manager and Firefox Cert Manager show <b class=""><font size="2" class=""><span style="font-size: 10pt;" class="">00BEED73EE<span class="Apple-converted-space"> </span></span></font></b>as
 serial number instead of <b class=""><font size="2" class=""><span style="font-size: 10pt;" class="">BEED73EE</span></font><span class="Apple-converted-space"> </span></b>(which openssl shows)?</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><font size="2" class=""><span style="font-size: 10pt;" class=""></span></font><br class="">
</div>
</div>
<hr tabindex="-1" style="display: inline-block; width: 750.671875px;" class="">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">Von:</b><span class="Apple-converted-space"> </span>openssl-users <<a href="mailto:openssl-users-bounces@openssl.org" class="">openssl-users-bounces@openssl.org</a>>
 im Auftrag von Viktor Dukhovni <<a href="mailto:openssl-users@dukhovni.org" class="">openssl-users@dukhovni.org</a>><br class="">
<b class="">Gesendet:</b><span class="Apple-converted-space"> </span>Samstag, 28. Januar 2017 17:00:53<br class="">
<b class="">An:</b><span class="Apple-converted-space"> </span><a href="mailto:openssl-users@openssl.org" class="">openssl-users@openssl.org</a><br class="">
<b class="">Betreff:</b><span class="Apple-converted-space"> </span>Re: [openssl-users] Leading Zeros in ASN1_INTEGER?</font>
<div class=""> </div>
</div>
</div>
<font size="2" style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-size: 10pt;" class=""><br class="">
> On Jan 28, 2017, at 10:01 AM, Matthias Ballreich <<a href="mailto:matthias.ballreich@outlook.de" class="">matthias.ballreich@outlook.de</a>> wrote:<br class="">
> <br class="">
> is it normal that OpenSSL removes the leading Zeros in an ASN1_INTEGER?<br class="">
> I tried to read the Certificate Serial and the Certificate Serial in the<br class="">
> AuthorityKeyID-Extension with C++, which works very well, but i noticed<br class="">
> that OpenSSL removes the leading Zeros on it.<br class="">
> <br class="">
> The real ASN1-Value is: 00BEED73EE for example, but i got only BEED73EE.<br class="">
> If i view the Certificate inside Microsoft Cert Tool (Certmgr.exe) the<br class="">
> leading Zeros are listed there. Same on Firefox, if i Import and view<br class="">
> the Certificate there. So is this the correct way of handling inside<br class="">
> OpenSSL or is it a bug or?<br class="">
<br class="">
Integers don't have leading zeros.  Octet strings representing integers<br class="">
(in non-DER form) might have leading zeros, but you should not confuse<br class="">
the data type with its representation.  OpenSSL outputs the correct DER<br class="">
form of the serial *number* in certificates.<br class="">
<br class="">
Leading zeros are needed in the DER representation of positive integers<br class="">
whose most significant nibble is in the range from 8 to F.  Otherwise<br class="">
the leading bit would cause the integer to be interpreted as negative.<br class="">
<br class="">
-- <br class="">
        Viktor.<br class="">
<br class="">
-- <br class="">
openssl-users mailing list<br class="">
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" class="">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br class="">
</span></font><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">openssl-users
 mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">To
 unsubscribe:<span class="Apple-converted-space"> </span></span><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://mta.openssl.org/mailman/listinfo/openssl-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>