Revision 9b649d9a739c96d2599f4481fcfad749ac37482d authored by Dr. Stephen Henson on 06 August 2014, 13:47:50 UTC, committed by Matt Caswell on 06 August 2014, 19:33:25 UTC
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
1 parent abbd585
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 ...