source:
axis/splitkey.pl
@
b8d69ec
Last change on this file since b8d69ec was 55de6a9, checked in by , 14 years ago | |
---|---|
|
|
File size: 417 bytes |
Line | |
---|---|
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use IO::File; |
5 | |
6 | my $cert = new IO::File(">./cert.pem") || die "Can't open cert.pem: $!\n"; |
7 | my $key = new IO::File(">./key.pem") || die "Can't open key.pem: $!\n"; |
8 | |
9 | while (<>) { |
10 | (/-----BEGIN.*PRIVATE KEY/ .. /-----END.*PRIVATE KEY/) && do { |
11 | print $key $_; |
12 | }; |
13 | (/-----BEGIN CERTIFICATE/ .. /-----END CERTIFICATE/) && do { |
14 | print $cert $_; |
15 | }; |
16 | } |
17 | $key->close(); |
18 | $cert->close(); |
Note: See TracBrowser
for help on using the repository browser.