source: axis/splitkey.pl @ 5bbad08

compt_changesinfo-ops
Last change on this file since 5bbad08 was e2d324a, checked in by Ted Faber <faber@…>, 14 years ago

Stop erasing key files!

  • Property mode set to 100644
File size: 427 bytes
Line 
1#!/usr/bin/perl
2
3use strict;
4use IO::File;
5
6my $cert = new IO::File(">./splitcert.pem") || die "Can't open cert.pem: $!\n";
7my $key = new IO::File(">./splitkey.pem") || die "Can't open key.pem: $!\n";
8
9while (<>) {
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.