vlm | a3ba89f | 2004-09-26 13:13:31 +0000 | [diff] [blame] | 1 | |
vlm | 26ad7fd | 2005-02-28 15:53:32 +0000 | [diff] [blame] | 2 | GENERAL INFORMATION |
| 3 | =================== |
| 4 | |
vlm | a3ba89f | 2004-09-26 13:13:31 +0000 | [diff] [blame] | 5 | The X.509 (PKIX1) certificate decoder. Invoking `make` will compile the ASN.1 |
vlm | 1210e41 | 2005-02-28 15:37:08 +0000 | [diff] [blame] | 6 | specifications from the rfc3280.txt in the above directory. |
| 7 | |
| 8 | The ../../skeletons/asn-decoder-template.c will supply the missing |
| 9 | "int main()" routine which drives the decoding process. |
vlm | a3ba89f | 2004-09-26 13:13:31 +0000 | [diff] [blame] | 10 | |
vlm | 26ad7fd | 2005-02-28 15:53:32 +0000 | [diff] [blame] | 11 | x509dump USAGE |
| 12 | ============== |
| 13 | |
| 14 | To use the code, you'll have to prepare an X.509 certificate in DER encoding. |
| 15 | The typical X.509 certificate will have a PEM form (DER encoded data wrapped |
| 16 | in base64, wrapped in PEM "BEGIN" and "END" sections). The openssl x509 utility |
| 17 | may be used to convert between PEM and DER. |
| 18 | |
| 19 | EXAMPLE: Convert 'certificate.pem' into 'certificate.der': |
| 20 | |
| 21 | openssl x509 -inform PEM -in certificate.pem \ |
| 22 | -outform DER -out certificate.der |
| 23 | |
| 24 | After convertsion, the x509dump utility may be used to dump the contents |
| 25 | of the DER-encoded X.509 certificate: |
| 26 | |
| 27 | ./x509dump -x certificate.der # Print as XML (BASIC-XER) |
| 28 | |
| 29 | The full list of recognized command line options may be obtained with |
| 30 | |
| 31 | > ./x509dump -h |
| 32 | Usage: ./x509dump [options] <data.ber> ... |
| 33 | Where options are: |
| 34 | -b <size> Set the i/o buffer size (default is 8192) |
| 35 | -c Check ASN.1 constraints after decoding |
| 36 | -d Enable debugging (-dd is even better) |
| 37 | -n <num> Process files <num> times |
| 38 | -s <size> Set the stack usage limit |
| 39 | -p Print out the decoded contents |
| 40 | -x Print out as XML |
| 41 | |