repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
etc/services - sync with NetBSD-8
[minix.git]
/
crypto
/
external
/
bsd
/
openssl
/
dist
/
demos
/
b64.pl
blob
8aa5fb464d38770bac6becaf46a205dc81287ed0
1
#!/usr/local/bin/perl
2
3
#
4
# Make PEM encoded data have lines of 64 bytes of data
5
#
6
7
while
(<>)
8
{
9
if
(
/^-----BEGIN/
..
/^-----END/
)
10
{
11
if
(
/^-----BEGIN/
) {
$first
=
$_
;
next
; }
12
if
(
/^-----END/
) {
$last
=
$_
;
next
; }
13
$out
.=
$_
;
14
}
15
}
16
$out
=~
s/\s//g
;
17
$out
=~
s/(.{64})/$1\n/g
;
18
print
"
$first
$out
\n
$last
\n
"
;
19
20