system-keys

system-keys

Functions

Types and Values

Description

Functions

gnutls_system_key_iter_deinit ()

void
gnutls_system_key_iter_deinit (gnutls_system_key_iter_t iter);

This function will deinitialize the iterator.

Parameters

iter

an iterator of system keys

 

Since: 3.4.0


gnutls_system_key_iter_get_info ()

int
gnutls_system_key_iter_get_info (gnutls_system_key_iter_t *iter,
                                 unsigned  cert_type,
                                 char **cert_url,
                                 char **key_url,
                                 char **label,
                                 gnutls_datum_t *der,
                                 unsigned int flags);

This function will return on each call a certificate and key pair URLs, as well as a label associated with them, and the DER-encoded certificate. When the iteration is complete it will return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE.

Typically cert_type should be GNUTLS_CRT_X509.

All values set are allocated and must be cleared using gnutls_free(),

Parameters

iter

an iterator of the system keys (must be set to NULL initially)

 

cert_type

A value of gnutls_certificate_type_t which indicates the type of certificate to look for

 

cert_url

The certificate URL of the pair (may be NULL)

 

key_url

The key URL of the pair (may be NULL)

 

label

The friendly name (if any) of the pair (may be NULL)

 

der

if non-NULL the DER data of the certificate

 

flags

should be zero

 

Returns

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.

Since: 3.4.0


gnutls_system_key_delete ()

int
gnutls_system_key_delete (const char *cert_url,
                          const char *key_url);

This function will delete the key and certificate pair.

Parameters

cert_url

the URL of the certificate

 

key_url

the URL of the key

 

Returns

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.

Since: 3.4.0


gnutls_system_key_add_x509 ()

int
gnutls_system_key_add_x509 (gnutls_x509_crt_t crt,
                            gnutls_x509_privkey_t privkey,
                            const char *label,
                            char **cert_url,
                            char **key_url);

This function will added the given key and certificate pair, to the system list.

Parameters

crt

the certificate to be added

 

privkey

the key to be added

 

label

the friendly name to describe the key

 

cert_url

if non-NULL it will contain an allocated value with the certificate URL

 

key_url

if non-NULL it will contain an allocated value with the key URL

 

Returns

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.

Since: 3.4.0

Types and Values

gnutls_system_key_iter_t

typedef struct system_key_iter_st *gnutls_system_key_iter_t;

struct system_key_iter_st

struct system_key_iter_st;