<html xmlns:v="urn:schemas-microsoft-com:vml" 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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@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;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.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><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText"><span style="color:#1F497D">I used OpenSSL 1.0.2h  <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">OpenSSL> version<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">OpenSSL 1.0.2h  3 May 2016<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:#1F497D">Lily<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> openssl-users [mailto:openssl-users-bounces@openssl.org]
<b>On Behalf Of </b>Benjamin Kaduk via openssl-users<br>
<b>Sent:</b> Monday, September 18, 2017 8:24 PM<br>
<b>To:</b> openssl-users@openssl.org; Viktor Dukhovni<br>
<b>Subject:</b> Re: [openssl-users] Openssl failed to decrypt certificate without \r\n<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On 09/18/2017 12:59 AM, Viktor Dukhovni wrote:<br>
<br>
<o:p></o:p></p>
<pre><o:p> </o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>On Sep 17, 2017, at 10:23 PM, Zhang, Lily (USD) <a href="mailto:Lily.Zhang@dell.com"><Lily.Zhang@dell.com></a> wrote:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Would you help me to take a look this certificate issue?<o:p></o:p></pre>
<pre>In order to send out the file, I added ".txt" in the file name. Please remove it before test it.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Leaf_no_rn.cer doesn't have \r\n in the BASE64 string, it can't be parsed by openssl.<o:p></o:p></pre>
<pre>Leaf_with_rn.cer is the same as Leaf_no_rn.cer, but it has \r\n in BASE64 string. <o:p></o:p></pre>
<pre>Both the attached two certificates can be parsed by Windows.<o:p></o:p></pre>
</blockquote>
<pre><o:p> </o:p></pre>
<pre>This is expected, the OpenSSL PEM file reader does not support<o:p></o:p></pre>
<pre>input lines with IIRC more than 64 bytes.  PEM files are not<o:p></o:p></pre>
<pre>supposed to have longer lines.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
The current code in master should not have a particular limit on line lengths for *certificates* -- in test/recipes/04-test_pem_data we have files with 1025 characters on a line, and only use a 256-byte buffer when reading.  The PEM format does specify a 64-(base64-)characters-per-line
 limit when the additional PEM encryption/etc. features are used, but certificates do not use that feature and do not have a line length restriction.  Perhaps Lily should specify what version of OpenSSL is in use.<br>
<br>
-Ben<br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>