Make use of the card's extended capabilities.
[gnupg.git] / tools / der-to-pem
blob183996654b70678f03bd2c4d63c08d0b0b6a647d
1 #!/bin/sh
2 # Convert A BER or DER encoding to PEM format.
4 # Copyright 20032 Free Software Foundation, Inc.
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.
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.
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
24 echo "-----BEGIN CERTIFICATE-----"
25 mimencode $input
26 echo "-----END CERTIFICATE-----"