diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-10-07 06:57:09 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-10-07 06:57:09 +0000 |
commit | 540c94f107f9c9ab19e440a2816e6ef2121cae3d (patch) | |
tree | d94c3a54e8050ce77e1956055283787bfb3de90c /sbin/isakmpd/cert.c | |
parent | 817bd17bb8b18c0ceafede999b1b8455c8bd748d (diff) |
cert.c: Merge with EOM 1.18
cert.h: Merge with EOM 1.8
libcrypto.c: Merge with EOM 1.14
policy.h: Merge with EOM 1.12
x509.h: Merge with EOM 1.11
author: niklas
Multiple subject name matching, makes certificate interop with PGPnet at least
partly working. Added some error checking.
Diffstat (limited to 'sbin/isakmpd/cert.c')
-rw-r--r-- | sbin/isakmpd/cert.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sbin/isakmpd/cert.c b/sbin/isakmpd/cert.c index 6b3d3a1dc1c..cb5ab144b8f 100644 --- a/sbin/isakmpd/cert.c +++ b/sbin/isakmpd/cert.c @@ -1,5 +1,5 @@ -/* $OpenBSD: cert.c,v 1.15 2000/06/08 20:51:55 niklas Exp $ */ -/* $EOM: cert.c,v 1.17 2000/05/17 16:46:35 angelos Exp $ */ +/* $OpenBSD: cert.c,v 1.16 2000/10/07 06:57:08 niklas Exp $ */ +/* $EOM: cert.c,v 1.18 2000/09/28 12:53:27 niklas Exp $ */ /* * Copyright (c) 1998, 1999 Niels Provos. All rights reserved. @@ -66,7 +66,7 @@ struct cert_handler cert_handler[] = { x509_cert_init, x509_cert_get, x509_cert_validate, x509_cert_insert, x509_cert_free, x509_certreq_validate, x509_certreq_decode, x509_free_aca, - x509_cert_obtain, x509_cert_get_key, x509_cert_get_subject + x509_cert_obtain, x509_cert_get_key, x509_cert_get_subjects }, #endif #ifdef USE_KEYNOTE @@ -75,7 +75,7 @@ struct cert_handler cert_handler[] = { keynote_cert_init, keynote_cert_get, keynote_cert_validate, keynote_cert_insert, keynote_cert_free, keynote_certreq_validate, keynote_certreq_decode, keynote_free_aca, - keynote_cert_obtain, keynote_cert_get_key, keynote_cert_get_subject + keynote_cert_obtain, keynote_cert_get_key, keynote_cert_get_subjects }, #endif }; @@ -140,3 +140,14 @@ certreq_decode (u_int16_t type, u_int8_t *data, u_int32_t datalen) return ret; } + +void +cert_free_subjects (int n, u_int8_t **id, u_int32_t *len) +{ + int i; + + for (i = 0; i < n; i++) + free (id[i]); + free (id); + free (len); +} |