gnutls_x509_crt_check_key_purpose3
Api function
Usage
#include <gnutls/x509.h>
unsigned gnutls_x509_crt_check_key_purpose(gnutls_x509_crt_t cert, const char * purpose, unsigned flags);
Arguments
gnutls_x509_crt_t cert
|
should contain a |
|---|---|
const char * purpose
|
a key purpose OID (e.g., |
unsigned flags
|
zero or |
Overview
This function will check whether the given certificate matches the provided key purpose. If flags contains GNUTLS_KP_FLAG_ALLOW_ANY then it a certificate marked for any purpose will not match.
Returns
zero if the key purpose doesn't match, and non-zero otherwise.
Since
3.5.6
Releases
6 releases since Debian 9 (Stretch); the text changed 5 times.