Revision b3d8de7903fb5751591f0e4cd5737f9d6fabe4dd authored by Kurt Roeckx on 23 December 2013, 18:41:28 UTC, committed by Dr. Stephen Henson on 14 February 2014, 22:35:15 UTC
(cherry picked from commit e547c45f1c74e976656c042ec9d873f6eea0e756)
1 parent 0413ea5
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 ...