Blame doc/functions/gnutls_pcert_import_rawpk_raw

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_pcert_import_rawpk_raw} (gnutls_pcert_st* @var{pcert}, const gnutls_datum_t* @var{rawpubkey}, gnutls_x509_crt_fmt_t @var{format}, unsigned int @var{key_usage}, unsigned int @var{flags})
Packit aea12f
@var{pcert}: The pcert structure to import the data into.
Packit aea12f
Packit aea12f
@var{rawpubkey}: The raw public-key in @code{gnutls_datum_t}  format to be imported.
Packit aea12f
Packit aea12f
@var{format}: The format of the raw public-key. DER or PEM.
Packit aea12f
Packit aea12f
@var{key_usage}: An ORed sequence of @code{GNUTLS_KEY_} * flags.
Packit aea12f
Packit aea12f
@var{flags}: zero for now
Packit aea12f
Packit aea12f
This convenience function will import (i.e. convert) the given raw
Packit aea12f
public key  @code{rawpubkey} into a @code{gnutls_pcert_st}  structure. The structure
Packit aea12f
must be deinitialized afterwards using @code{gnutls_pcert_deinit()} .
Packit aea12f
Note that the caller is responsible for freeing  @code{rawpubkey} . All necessary
Packit aea12f
values will be copied into  @code{pcert} .
Packit aea12f
Packit aea12f
Key usage (as defined by X.509 extension (2.5.29.15)) can be explicitly
Packit aea12f
set because there is no certificate structure around the key to define
Packit aea12f
this value. See for more info @code{gnutls_x509_crt_get_key_usage()} .
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
Packit aea12f
negative error value.
Packit aea12f
Packit aea12f
@strong{Since:} 3.6.6
Packit aea12f
@end deftypefun