Revision dd6da173fdd24ea2076c8a25d92c1ddf1fade372 authored by Richard Levitte on 20 January 2015, 14:14:24 UTC, committed by Matt Caswell on 22 January 2015, 09:42:21 UTC
Reviewed-by: Tim Hudson <tjh@openssl.org>
1 parent 6ff1bf3
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 ...