extra

Name

extra -- 

Synopsis



#define     LIBGNUTLS_EXTRA_VERSION
int         (*gnutls_openpgp_recv_key_func) (gnutls_session_t,
                                             unsigned char *keyfpr,
                                             unsigned int keyfpr_length,
                                             gnutls_datum_t *key);
void        gnutls_openpgp_set_recv_key_function
                                            (gnutls_session_t,
                                             gnutls_openpgp_recv_key_func);
int         gnutls_certificate_set_openpgp_key_file
                                            (gnutls_certificate_credentials_t res,
                                             const char *CERTFILE,
                                             const char *KEYFILE);
int         gnutls_certificate_set_openpgp_key_mem
                                            (gnutls_certificate_credentials_t res,
                                             const gnutls_datum_t *CERT,
                                             const gnutls_datum_t *KEY);
int         gnutls_certificate_set_openpgp_keyserver
                                            (gnutls_certificate_credentials_t res,
                                             const char *keyserver,
                                             int port);
int         gnutls_certificate_set_openpgp_trustdb
                                            (gnutls_certificate_credentials_t res,
                                             const char *trustdb);
int         gnutls_certificate_set_openpgp_keyring_mem
                                            (gnutls_certificate_credentials_t c,
                                             unsigned char *data,
                                             size_t dlen);
int         gnutls_certificate_set_openpgp_keyring_file
                                            (gnutls_certificate_credentials_t res,
                                             const char *name);
int         gnutls_global_init_extra        (void);
const char* gnutls_extra_check_version      (const char*);
int         gnutls_srp_base64_encode        (const gnutls_datum_t *data,
                                             char *result,
                                             int *result_size);
int         gnutls_srp_base64_encode_alloc  (const gnutls_datum_t *data,
                                             gnutls_datum_t *result);
int         gnutls_srp_base64_decode        (const gnutls_datum_t *b64_data,
                                             char *result,
                                             int *result_size);
int         gnutls_srp_base64_decode_alloc  (const gnutls_datum_t *b64_data,
                                             gnutls_datum_t *result);

Description

Details

LIBGNUTLS_EXTRA_VERSION

#define LIBGNUTLS_EXTRA_VERSION LIBGNUTLS_VERSION


gnutls_openpgp_recv_key_func ()

int         (*gnutls_openpgp_recv_key_func) (gnutls_session_t,
                                             unsigned char *keyfpr,
                                             unsigned int keyfpr_length,
                                             gnutls_datum_t *key);

Param1 :

keyfpr :

keyfpr_length :

key :

Returns :


gnutls_openpgp_set_recv_key_function ()

void        gnutls_openpgp_set_recv_key_function
                                            (gnutls_session_t,
                                             gnutls_openpgp_recv_key_func);

Param1 :

Param2 :


gnutls_certificate_set_openpgp_key_file ()

int         gnutls_certificate_set_openpgp_key_file
                                            (gnutls_certificate_credentials_t res,
                                             const char *CERTFILE,
                                             const char *KEYFILE);

res :

CERTFILE :

KEYFILE :

Returns :


gnutls_certificate_set_openpgp_key_mem ()

int         gnutls_certificate_set_openpgp_key_mem
                                            (gnutls_certificate_credentials_t res,
                                             const gnutls_datum_t *CERT,
                                             const gnutls_datum_t *KEY);

res :

CERT :

KEY :

Returns :


gnutls_certificate_set_openpgp_keyserver ()

int         gnutls_certificate_set_openpgp_keyserver
                                            (gnutls_certificate_credentials_t res,
                                             const char *keyserver,
                                             int port);

res :

keyserver :

port :

Returns :


gnutls_certificate_set_openpgp_trustdb ()

int         gnutls_certificate_set_openpgp_trustdb
                                            (gnutls_certificate_credentials_t res,
                                             const char *trustdb);

res :

trustdb :

Returns :


gnutls_certificate_set_openpgp_keyring_mem ()

int         gnutls_certificate_set_openpgp_keyring_mem
                                            (gnutls_certificate_credentials_t c,
                                             unsigned char *data,
                                             size_t dlen);

c :

data :

dlen :

Returns :


gnutls_certificate_set_openpgp_keyring_file ()

int         gnutls_certificate_set_openpgp_keyring_file
                                            (gnutls_certificate_credentials_t res,
                                             const char *name);

res :

name :

Returns :


gnutls_global_init_extra ()

int         gnutls_global_init_extra        (void);

Returns :


gnutls_extra_check_version ()

const char* gnutls_extra_check_version      (const char*);

Param1 :

Returns :


gnutls_srp_base64_encode ()

int         gnutls_srp_base64_encode        (const gnutls_datum_t *data,
                                             char *result,
                                             int *result_size);

This function will convert the given data to printable data, using the base64 encoding, as used in the libsrp. This is the encoding used in SRP password files. If the provided buffer is not long enough GNUTLS_E_SHORT_MEMORY_BUFFER is returned.

data :

contain the raw data

result :

the place where base64 data will be copied

result_size :

holds the size of the result

Returns :


gnutls_srp_base64_encode_alloc ()

int         gnutls_srp_base64_encode_alloc  (const gnutls_datum_t *data,
                                             gnutls_datum_t *result);

This function will convert the given data to printable data, using the base64 encoding. This is the encoding used in SRP password files. This function will allocate the required memory to hold the encoded data.

You should use gnutls_free() to free the returned data.

data :

contains the raw data

result :

will hold the newly allocated encoded data

Returns :


gnutls_srp_base64_decode ()

int         gnutls_srp_base64_decode        (const gnutls_datum_t *b64_data,
                                             char *result,
                                             int *result_size);

This function will decode the given encoded data, using the base64 encoding found in libsrp.

Note that b64_data should be null terminated.

b64_data :

contain the encoded data

result :

the place where decoded data will be copied

result_size :

holds the size of the result

Returns :

GNUTLS_E_SHORT_MEMORY_BUFFER if the buffer given is not long enough, or 0 on success.


gnutls_srp_base64_decode_alloc ()

int         gnutls_srp_base64_decode_alloc  (const gnutls_datum_t *b64_data,
                                             gnutls_datum_t *result);

This function will decode the given encoded data. The decoded data will be allocated, and stored into result. It will decode using the base64 algorithm found in libsrp.

You should use gnutls_free() to free the returned data.

b64_data :

contains the encoded data

result :

the place where decoded data lie

Returns :