Revision 894c04aa05ba1e64735d7beb9c2a1da93d288e31 authored by Andy Polyakov on 21 June 2016, 21:05:16 UTC, committed by Andy Polyakov on 21 June 2016, 21:44:54 UTC
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 4577871ca393275ac0436b2b08f1a75661ced314)
1 parent 1278ce4
b64.pl
#!/usr/local/bin/perl
#
# Make PEM encoded data have lines of 64 bytes of data
#
while (<>)
{
if (/^-----BEGIN/ .. /^-----END/)
{
if (/^-----BEGIN/) { $first=$_; next; }
if (/^-----END/) { $last=$_; next; }
$out.=$_;
}
}
$out =~ s/\s//g;
$out =~ s/(.{64})/$1\n/g;
print "$first$out\n$last\n";

Computing file changes ...