On 10/11/2016 14:14, DJ Lucas wrote:

On November 10, 2016 4:00:39 AM CST, Pierre Labastie <[email protected]> 
wrote:
On 10/11/2016 08:24, DJ Lucas wrote:

P.S. I'd appreciate a second set of eyes on convert_pem(). It works
well enough, but I could not get it to play nicely using only pipes.
As a result, right now it uses a total of three temporary files per
conversion. This is terribly inefficient and I'd like to fix it, but
I
just can't see it tonight.

--DJ


Quick look: why using "covert_pem" and not "convert_pem"?
Typo. Thank you. :-)

Why would you need a loop in covert_pem for finding the "END" line?
Isn't the file examined for only one certificate?

It is, but it contains a lot more data than is necessary for the DER encoded 
file. We are only interested in that small part of it. There should be around 
10 lines that begin in ^END. I suppose we could limit to a range beginning at 
startline and just grab the first instance.
Ah, sorry, I looked at that too quickly. I should have remembered that.

I do not see where the octal/char conversion is done (missing format in

printf?).
They are already formatted as \NNN.
 From the manpage:
\<NNN>    Interprets <NNN> as octal number and prints the corresponding 
character from the character set.

I see. I still think you could try "perl -e <perl command>" for this part of the script.

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to