-
Notifications
You must be signed in to change notification settings - Fork 113
API XMLSec GnuTLS X509
API Group: xmlsec_gnutls_x509
X.509 certificate handling for the GnuTLS back-end.
X509 certificates verification support functions for GnuTLS.
X509 certificates support functions for GnuTLS.
X509 certificates implementation for GnuTLS. X509 certificates implementation for GnuTLS.
Defined as: xmlSecGnuTLSKeyDataX509GetKlass()
Source: include/xmlsec/gnutls/x509.h
The GnuTLS X509 data klass.
Defined as: xmlSecGnuTLSKeyDataRawX509CertGetKlass()
Source: include/xmlsec/gnutls/x509.h
The GnuTLS raw X509 certificate klass.
Defined as: xmlSecGnuTLSX509StoreGetKlass()
Source: include/xmlsec/gnutls/x509.h
The GnuTLS X509 store klass.
xmlSecKeyDataId xmlSecGnuTLSKeyDataX509GetKlass(void);Source: include/xmlsec/gnutls/x509.h
The GnuTLS X509 key data klass.
The GnuTLS X509 key data klass (http://www.w3.org/TR/xmldsig-core/#sec-X509Data).
Returns: the X509 data klass.
gnutls_x509_crt_t xmlSecGnuTLSKeyDataX509GetKeyCert(xmlSecKeyDataPtr data);Source: include/xmlsec/gnutls/x509.h
Gets the certificate from which the key was extracted.
Parameters:
-
data— the pointer to X509 key data.
Returns: the key's certificate or NULL if key data was not used for key extraction or an error occurs.
int xmlSecGnuTLSKeyDataX509AdoptKeyCert(xmlSecKeyDataPtr data, gnutls_x509_crt_t cert);Source: include/xmlsec/gnutls/x509.h
Adds certificate to the X509 key data and sets the it as the key's.
Parameters:
-
data— the pointer to X509 key data. -
cert— the pointer to GnuTLS X509 certificate. certificate indata. On success, thedataowns the cert.
Returns: 0 on success or a negative value if an error occurs.
int xmlSecGnuTLSKeyDataX509AdoptCert(xmlSecKeyDataPtr data, gnutls_x509_crt_t cert);Source: include/xmlsec/gnutls/x509.h
Adds certificate to the X509 key data.
Parameters:
-
data— the pointer to X509 key data. -
cert— the pointer to GnuTLS X509 certificate.
Returns: 0 on success or a negative value if an error occurs.
gnutls_x509_crt_t xmlSecGnuTLSKeyDataX509GetCert(xmlSecKeyDataPtr data, xmlSecSize pos);Source: include/xmlsec/gnutls/x509.h
Gets a certificate from X509 key data.
Parameters:
-
data— the pointer to X509 key data. -
pos— the desired certificate position.
Returns: the pointer to certificate or NULL if pos is larger than the number of certificates in data or an error occurs.
xmlSecSize xmlSecGnuTLSKeyDataX509GetCertsSize(xmlSecKeyDataPtr data);Source: include/xmlsec/gnutls/x509.h
Gets the number of certificates in data.
Parameters:
-
data— the pointer to X509 key data.
Returns: te number of certificates in data.
int xmlSecGnuTLSKeyDataX509AdoptCrl(xmlSecKeyDataPtr data, gnutls_x509_crl_t crl);Source: include/xmlsec/gnutls/x509.h
Adds crl to the X509 key data.
Parameters:
-
data— the pointer to X509 key data. -
crl— the pointer to GnuTLS X509 crl.
Returns: 0 on success or a negative value if an error occurs.
gnutls_x509_crl_t xmlSecGnuTLSKeyDataX509GetCrl(xmlSecKeyDataPtr data, xmlSecSize pos);Source: include/xmlsec/gnutls/x509.h
Gets a crl from X509 key data.
Parameters:
-
data— the pointer to X509 key data. -
pos— the desired crl position.
Returns: the pointer to crl or NULL if pos is larger than the number of crls in data or an error occurs.
xmlSecSize xmlSecGnuTLSKeyDataX509GetCrlsSize(xmlSecKeyDataPtr data);Source: include/xmlsec/gnutls/x509.h
Gets the number of crls in data.
Parameters:
-
data— the pointer to X509 key data.
Returns: te number of crls in data.
xmlSecKeyDataPtr xmlSecGnuTLSX509CertGetKey(gnutls_x509_crt_t cert);Source: include/xmlsec/gnutls/x509.h
Extracts public key from the cert.
Parameters:
-
cert— the certificate.
Returns: public key value or NULL if an error occurs.
xmlSecKeyDataId xmlSecGnuTLSKeyDataRawX509CertGetKlass(void);Source: include/xmlsec/gnutls/x509.h
The raw X509 certificates key data klass.
Returns: raw X509 certificates key data klass.
xmlSecKeyDataStoreId xmlSecGnuTLSX509StoreGetKlass(void);Source: include/xmlsec/gnutls/x509.h
The GnuTLS X509 certificates key data store klass.
Returns: pointer to GnuTLS X509 certificates key data store klass.
gnutls_x509_crt_t xmlSecGnuTLSX509StoreVerify(xmlSecKeyDataStorePtr store, xmlSecPtrListPtr certs, xmlSecPtrListPtr crls, const xmlSecKeyInfoCtx *keyInfoCtx);Source: include/xmlsec/gnutls/x509.h
Verifies certs list.
Parameters:
-
store— the pointer to X509 key data store klass. -
certs— the untrusted certificates. -
crls— the crls. -
keyInfoCtx— the pointer to dsig:KeyInfo/ element processing context.
Returns: pointer to the first verified certificate from certs.
int xmlSecGnuTLSX509StoreAdoptCert(xmlSecKeyDataStorePtr store, gnutls_x509_crt_t cert, xmlSecKeyDataType type);Source: include/xmlsec/gnutls/x509.h
Adds cert to the trusted or untrusted store.
Adds trusted (root) or untrusted certificate to the store.
Parameters:
-
store— the pointer to X509 key data store klass. -
cert— the pointer to GnuTLS X509 certificate. -
type— the certificate type (trusted/untrusted).
Returns: 0 on success or a negative value if an error occurs.
int xmlSecGnuTLSX509StoreVerifyCrl(xmlSecKeyDataStorePtr store, gnutls_x509_crl_t crl, xmlSecKeyInfoCtxPtr keyInfoCtx);Source: include/xmlsec/gnutls/x509.h
Verifies crl by checking:
Parameters:
-
store— the pointer to X509 key data store klass. -
crl— the CRL to verify. -
keyInfoCtx— the key info context for verification parameters.
- Signature is valid (signed by issuer cert in store)
- thisUpdate <= verification_time <= nextUpdate
Returns: 1 if verified, 0 if not verified, or a negative value on error.
int xmlSecGnuTLSX509StoreAdoptCrl(xmlSecKeyDataStorePtr store, gnutls_x509_crl_t crl);Source: include/xmlsec/gnutls/x509.h
Adds CRL to the store.
Parameters:
-
store— the pointer to X509 key data store klass. -
crl— the pointer to GnuTLS X509 CRL.
Returns: 0 on success or a negative value if an error occurs.