~ubuntu-branches/ubuntu/hoary/postfix/hoary-security

« back to all changes in this revision

Viewing changes to tls/doc/loadCAcert.pl

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-10-06 11:50:33 UTC
  • Revision ID: james.westby@ubuntu.com-20041006115033-9oky44ylqmhjy7eq
Tags: 2.1.3-1ubuntu17
* Deliver man pages for master.cf services in section 8postfix.
  Remove smtpd.8.gz diversion. Closes: #274777
* Clean up postfix-mysql documentation (created README.Debian files).
  Closes: Warty#2022
* Fix typo in postmap man page.  Closes: #271369

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/perl -T
 
2
 
 
3
require 5.003;
 
4
use strict;
 
5
use CGI;
 
6
 
 
7
my $cert_dir = "/usr/local/ssl/certs";
 
8
my $cert_file = "CAcert.pem";
 
9
 
 
10
my $query = new CGI;
 
11
 
 
12
my $kind = $query->param('FORMAT');
 
13
if($kind eq 'DER') { $cert_file = "CAcert.der"; }
 
14
 
 
15
my $cert_path = "$cert_dir/$cert_file";
 
16
 
 
17
open(CERT, "<$cert_path");
 
18
my $data = join '', <CERT>;
 
19
close(CERT);
 
20
print "Content-Type: application/x-x509-ca-cert\n";
 
21
print "Content-Length: ", length($data), "\n\n$data";
 
22
 
 
23
1;