diff options
Diffstat (limited to 'main/openvpn/src/openvpn/ssl_verify_backend.h')
-rw-r--r-- | main/openvpn/src/openvpn/ssl_verify_backend.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/main/openvpn/src/openvpn/ssl_verify_backend.h b/main/openvpn/src/openvpn/ssl_verify_backend.h index fa4369d2..4e9ad60f 100644 --- a/main/openvpn/src/openvpn/ssl_verify_backend.h +++ b/main/openvpn/src/openvpn/ssl_verify_backend.h @@ -113,18 +113,33 @@ result_t backend_x509_get_username (char *common_name, int cn_len, char * x509_username_field, openvpn_x509_cert_t *peer_cert); /* - * Return the certificate's serial number. + * Return the certificate's serial number in decimal string representation. * * The serial number is returned as a string, since it might be a bignum. * * @param cert Certificate to retrieve the serial number from. * @param gc Garbage collection arena to use when allocating string. * - * @return The certificate's serial number. + * @return String representation of the certificate's serial number + * in decimal notation, or NULL on error. */ char *backend_x509_get_serial (openvpn_x509_cert_t *cert, struct gc_arena *gc); /* + * Return the certificate's serial number in hex string representation. + * + * The serial number is returned as a string, since it might be a bignum. + * + * @param cert Certificate to retrieve the serial number from. + * @param gc Garbage collection arena to use when allocating string. + * + * @return String representation of the certificate's serial number + * in hex notation, or NULL on error. + */ +char *backend_x509_get_serial_hex (openvpn_x509_cert_t *cert, + struct gc_arena *gc); + +/* * Save X509 fields to environment, using the naming convention: * * X509_{cert_depth}_{name}={value} |