<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt'>“OPTIONAL” means the parser <u>must</u> deal with complete absence, not only encoded as ASN.1 NULL.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>Broken parsers should be fixed.<o:p></o:p></span></p><div><div><p class=MsoNormal><span style='color:black'>--<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>Uri<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><i><o:p> </o:p></i></p><p class=MsoNormal><i><span style='color:black'>There are two ways to design a system. One is to make is so simple there are obviously no deficiencies.</span></i><span style='font-size:12.0pt;color:black'><o:p></o:p></span></p><p class=MsoNormal><i><span style='color:black'>The other is to make it so complex there are no obvious deficiencies.</span></i><span style='font-size:12.0pt;color:black'><o:p></o:p></span></p><p class=MsoNormal><i><span style='color:black'>                                                                                                                                     -  C. A. R. Hoare</span></i><span style='font-size:12.0pt;color:black'><o:p></o:p></span></p></div></div><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>openssl-users-bounce <openssl-users-bounces@openssl.org> on behalf of openssl-users <openssl-users@openssl.org><br><b>Organization: </b>WiseMo A/S<br><b>Reply-To: </b>Jakob Bohm <jb-openssl@wisemo.com><br><b>Date: </b>Thursday, January 28, 2021 at 21:10<br><b>To: </b>openssl-users <openssl-users@openssl.org><br><b>Subject: </b>Re: Encoding of AlgorithmIdentifier with NULL parameters<o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><tt><span style='font-size:10.0pt'>Also note that the official ASN.1 declaration for </span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>AlgorithmIdentifier (from X.509 (2012), section 7.2) marks </tt><br><tt>the parameters field as OPTIONAL, so parsers really should </tt><br><tt>accept its absence.</tt><br><br><tt>However if broken parsers are common (this thread </tt><br><tt>only found one such parser), maybe it would be </tt><br><tt>good practice to include the NULL value for compatibility.</tt><br><br><tt>AlgorithmIdentifier{ALGORITHM:SupportedAlgorithms} ::= SEQUENCE {</tt><br><tt>    algorithm ALGORITHM.&id({SupportedAlgorithms}),</tt><br><tt>    parameters ALGORITHM.&Type({SupportedAlgorithms}{@algorithm}) OPTIONAL,</tt><br><tt>... }</tt></span><o:p></o:p></p></div></body></html>