diff options
author | Adriaan de Jong <dejong@fox-it.com> | 2012-02-14 11:11:24 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-03-30 11:33:03 +0200 |
commit | 00b973f8af85c3ea8fa3cef80eec55e8dc139b27 (patch) | |
tree | 42ad20eb89be0436bee7a397f2269272a4799414 /src/openvpn/pkcs11_backend.h | |
parent | 31444111839f0720d6173a71f66fa3a988bcf9fb (diff) | |
download | openvpn-00b973f8af85c3ea8fa3cef80eec55e8dc139b27.tar.gz openvpn-00b973f8af85c3ea8fa3cef80eec55e8dc139b27.tar.xz openvpn-00b973f8af85c3ea8fa3cef80eec55e8dc139b27.zip |
Migrated x509_get_subject to use of the garbage collector
This also cleans up a messy call in pkcs11.c to _openssl_get_subject, as discussed at FOSDEM.
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn/pkcs11_backend.h')
-rw-r--r-- | src/openvpn/pkcs11_backend.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/openvpn/pkcs11_backend.h b/src/openvpn/pkcs11_backend.h index 6b5ad31..7b7ec45 100644 --- a/src/openvpn/pkcs11_backend.h +++ b/src/openvpn/pkcs11_backend.h @@ -42,13 +42,11 @@ * Retrieve PKCS #11 Certificate's DN in a printable format. * * @param certificate The PKCS #11 helper certificate object - * @param dn Buffer that the certificate subject DN will be placed in. - * @param dn_len Size of said buffer. + * @param gc Garbage collection pool to allocate memory in * - * @return 1 on failure, 0 on success + * @return Certificate's DN on success, NULL on failure */ -int pkcs11_certificate_dn (pkcs11h_certificate_t certificate, char *dn, - size_t dn_len); +char * pkcs11_certificate_dn (pkcs11h_certificate_t certificate, struct gc_arena *gc); /** * Retrieve PKCS #11 Certificate's serial number in a printable format. |