~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to tools/der-to-pem

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Mueller
  • Date: 2005-03-29 10:30:32 UTC
  • Revision ID: james.westby@ubuntu.com-20050329103032-sj42n2ain3ipx310
Tags: upstream-1.9.15
ImportĀ upstreamĀ versionĀ 1.9.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#          Convert A BER or DER encoding to PEM format.
 
3
#
 
4
# Copyright 20032 Free Software Foundation, Inc.
 
5
#
 
6
# This program is Free Software; as a special exception the author gives
 
7
# unlimited permission to copy and/or distribute it, with or without
 
8
# modifications, as long as this notice is preserved.
 
9
#
 
10
# This program is distributed in the hope that it will be useful, but
 
11
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 
12
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
13
 
 
14
PGM="der-to-pem"
 
15
if [ $# == 0 ]; then
 
16
  input=""
 
17
elif [ $# == 1 ]; then
 
18
  input="$1"
 
19
else
 
20
  echo "usage: $PGM [<inputfile>]" >&2
 
21
  exit 1
 
22
fi
 
23
 
 
24
echo "-----BEGIN CERTIFICATE-----"
 
25
mimencode $input
 
26
echo "-----END CERTIFICATE-----"
 
27