gnutls-gnutls.htmlPrev ch01.htmlUp index.htmlHome GNU TLS API Reference Manual gnutls-x509.htmlNext #top_of_pageTop                    | 
                  
#descDescription extra
extra — 
Synopsis
#define     
gnutls-extra.html#LIBGNUTLS-EXTRA-VERSION:CAPSLIBGNUTLS_EXTRA_VERSION int         (
gnutls-extra.html#gnutls-openpgp-recv-key-func*gnutls_openpgp_recv_key_func ) ( gnutls-gnutls.html#gnutls-session-tgnutls_session_t  session,
                                             unsigned char *keyfpr,
                                             unsigned int keyfpr_length,
                                             
gnutls-gnutls.html#gnutls-datum-tgnutls_datum_t  *key);
../gss/gss-ext.html#voidvoid         gnutls-extra.html#gnutls-openpgp-set-recv-key-functiongnutls_openpgp_set_recv_key_function                                             (
gnutls-gnutls.html#gnutls-session-tgnutls_session_t  session,
                                             
gnutls-extra.html#gnutls-openpgp-recv-key-funcgnutls_openpgp_recv_key_func  func);
int         
gnutls-extra.html#gnutls-certificate-set-openpgp-key-filegnutls_certificate_set_openpgp_key_file                                             (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const char *CERTFILE,
                                             const char *KEYFILE);
int         
gnutls-extra.html#gnutls-certificate-set-openpgp-key-memgnutls_certificate_set_openpgp_key_mem                                             (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const 
gnutls-gnutls.html#gnutls-datum-tgnutls_datum_t  *CERT,
                                             const 
gnutls-gnutls.html#gnutls-datum-tgnutls_datum_t  *KEY);
int         
gnutls-extra.html#gnutls-certificate-set-openpgp-keyservergnutls_certificate_set_openpgp_keyserver                                             (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const char *keyserver,
                                             int port);
int         
gnutls-extra.html#gnutls-certificate-set-openpgp-trustdbgnutls_certificate_set_openpgp_trustdb                                             (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const char *trustdb);
int         
gnutls-extra.html#gnutls-certificate-set-openpgp-keyring-memgnutls_certificate_set_openpgp_keyring_mem                                             (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  c,
                                             unsigned char *data,
                                             size_t dlen);
int         
gnutls-extra.html#gnutls-certificate-set-openpgp-keyring-filegnutls_certificate_set_openpgp_keyring_file                                             (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  c,
                                             const char *file);
int         
gnutls-extra.html#gnutls-global-init-extragnutls_global_init_extra         (void);
const char* 
gnutls-extra.html#gnutls-extra-check-versiongnutls_extra_check_version       (const char *req_version);
Description
Details
LIBGNUTLS_EXTRA_VERSION
#define LIBGNUTLS_EXTRA_VERSION LIBGNUTLS_VERSION
gnutls_openpgp_recv_key_func ()
int         (*gnutls_openpgp_recv_key_func) ( gnutls-gnutls.html#gnutls-session-tgnutls_session_t  session,
                                             unsigned char *keyfpr,
                                             unsigned int keyfpr_length,
                                             
gnutls-gnutls.html#gnutls-datum-tgnutls_datum_t  *key);A callback of this type is used to retrieve OpenPGP keys.  Only
useful on the server, and will only be used if the peer send a key
fingerprint instead of a full key.  See also
gnutls-extra.html#gnutls-openpgp-set-recv-key-functiongnutls_openpgp_set_recv_key_function() .
session :  a TLS session
keyfpr :  key fingerprint
keyfpr_length :  length of key fingerprint
key :  output key.
Returns : gnutls_openpgp_set_recv_key_function ()
../gss/gss-ext.html#voidvoid         gnutls_openpgp_set_recv_key_function
                                            (
gnutls-gnutls.html#gnutls-session-tgnutls_session_t  session,
                                             
gnutls-extra.html#gnutls-openpgp-recv-key-funcgnutls_openpgp_recv_key_func  func);This funtion will set a key retrieval function for OpenPGP keys. This
callback is only useful in server side, and will be used if the peer
sent a key fingerprint instead of a full key.
session :  a TLS session
func :  the callback
gnutls_certificate_set_openpgp_key_file ()
int         gnutls_certificate_set_openpgp_key_file
                                            (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const char *CERTFILE,
                                             const char *KEYFILE);
This funtion is used to load OpenPGP keys into the GnuTLS credentials structure.
It doesn't matter whether the keys are armored or but, but the files
should only contain one key which should not be encrypted.
res :  the destination context to save the data.
CERTFILE :  the file that contains the public key.
KEYFILE :  the file that contains the secret key.
Returns : gnutls_certificate_set_openpgp_key_mem ()
int         gnutls_certificate_set_openpgp_key_mem
                                            (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const 
gnutls-gnutls.html#gnutls-datum-tgnutls_datum_t  *CERT,
                                             const 
gnutls-gnutls.html#gnutls-datum-tgnutls_datum_t  *KEY);This funtion is used to load OpenPGP keys into the GnuTLS credential structure.
It doesn't matter whether the keys are armored or but, but the files
should only contain one key which should not be encrypted.
res :  the destination context to save the data.
CERT :  the datum that contains the public key.
KEY :  the datum that contains the secret key.
Returns : gnutls_certificate_set_openpgp_keyserver ()
int         gnutls_certificate_set_openpgp_keyserver
                                            (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const char *keyserver,
                                             int port);
This funtion will set a key server for use with openpgp keys. This
key server will only be used if the peer sends a key fingerprint instead
of a key in the handshake. Using a key server may delay the handshake
process.
res :  the destination context to save the data.
keyserver :  is the key server address
port :  is the key server port to connect to
Returns : gnutls_certificate_set_openpgp_trustdb ()
int         gnutls_certificate_set_openpgp_trustdb
                                            (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  res,
                                             const char *trustdb);
This funtion will set a GnuPG trustdb which will be used in key
verification functions. Only version 3 trustdb files are supported.
res :  the destination context to save the data.
trustdb :  is the trustdb filename
Returns : gnutls_certificate_set_openpgp_keyring_mem ()
int         gnutls_certificate_set_openpgp_keyring_mem
                                            (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  c,
                                             unsigned char *data,
                                             size_t dlen);
The function is used to set keyrings that will be used internally
by various OpenPGP functions. For example to find a key when it
is needed for an operations. The keyring will also be used at the
verification functions.
c :  A certificate credentials structure
data :  buffer with keyring data.
dlen :  length of data buffer.
Returns : gnutls_certificate_set_openpgp_keyring_file ()
int         gnutls_certificate_set_openpgp_keyring_file
                                            (
gnutls-gnutls.html#gnutls-certificate-credentials-tgnutls_certificate_credentials_t  c,
                                             const char *file);
The function is used to set keyrings that will be used internally
by various OpenPGP functions. For example to find a key when it
is needed for an operations. The keyring will also be used at the
verification functions.
c :  A certificate credentials structure
file :  filename of the keyring.
Returns : gnutls_global_init_extra ()
int         gnutls_global_init_extra        (void);This function initializes the global state of gnutls-extra library to defaults.
Returns : zero on success.
Note that 
gnutls-gnutls.html#gnutls-global-initgnutls_global_init()  has to be called before this function.
If this function is not called then the gnutls-extra library will not
be usable.
gnutls_extra_check_version ()
const char* gnutls_extra_check_version      (const char *req_version);Check that the version of the gnutls-extra library is at minimum
the requested one and return the version string; return NULL if the
condition is not satisfied.  If a NULL is passed to this function,
no check is done, but the version string is simply returned.
req_version :  the version to check
Returns : 