]> git.pld-linux.org Git - packages/certificates.git/blame - cert-split
- splits ca-bundle.crt from mod_ssl into separate certificates
[packages/certificates.git] / cert-split
CommitLineData
45070a12
TP
1#!/usr/bin/perl -w
2
3use strict;
4
5my $buf="";
6my $crt="";
7my $in=0;
8
9while(<STDIN>) {
10 next if /^#/;
11 if(/^=+$/) {
12 if($in) {
13 print CRT $crt;
14 close CRT;
15 $buf=~s|/|-|g;
16 $buf=~s|\n||;
17 open CRT,">$buf.crt";
18 $buf="";
19 $crt="";
20 } else {
21 $buf=~s|/|-|g;
22 $buf=~s|\n||;
23 open CRT,">$buf.crt";
24 $buf="";
25 $in=1;
26 }
27 } else {
28 $crt.=$buf;
29 $buf=$_;
30 }
31}
32print CRT $crt.$buf;
33close CRT;
This page took 0.057268 seconds and 4 git commands to generate.