Next: , Previous: , Up: Associating the credentials   [Contents][Index]


6.4.2 Raw public-keys

As of version 3.6.6 GnuTLS supports Raw public-keys. With raw public-keys only the public-key part (that is normally embedded in a certificate) is transmitted to the peer. In order to load a raw public-key and its corresponding private key in a credentials structure one can use the following functions.

int gnutls_certificate_set_key (gnutls_certificate_credentials_t res, const char ** names, int names_size, gnutls_pcert_st * pcert_list, int pcert_list_size, gnutls_privkey_t key)
int gnutls_certificate_set_rawpk_key_mem (gnutls_certificate_credentials_t cred, const gnutls_datum_t * spki, const gnutls_datum_t * pkey, gnutls_x509_crt_fmt_t format, const char * pass, unsigned int key_usage, const char ** names, unsigned int names_length, unsigned int flags)
int gnutls_certificate_set_rawpk_key_file (gnutls_certificate_credentials_t cred, const char * rawpkfile, const char * privkeyfile, gnutls_x509_crt_fmt_t format, const char * pass, unsigned int key_usage, const char ** names, unsigned int names_length, unsigned int privkey_flags, unsigned int pkcs11_flags)