Debian Codegraph @

doc/functions/gnutls_dh_params_export_pkcs3

raw
1
2
3
4
5 @deftypefun {int} {gnutls_dh_params_export_pkcs3} (gnutls_dh_params_t @var{params}, gnutls_x509_crt_fmt_t @var{format}, unsigned char * @var{params_data}, size_t * @var{params_data_size})
6 @var{params}: Holds the DH parameters
7
8 @var{format}: the format of output params. One of PEM or DER.
9
10 @var{params_data}: will contain a PKCS3 DHParams structure PEM or DER encoded
11
12 @var{params_data_size}: holds the size of params_data (and will be replaced by the actual size of parameters)
13
14 This function will export the given dh parameters to a PKCS3
15 DHParams structure. This is the format generated by "openssl dhparam" tool.
16 If the buffer provided is not long enough to hold the output, then
17 GNUTLS_E_SHORT_MEMORY_BUFFER will be returned.
18
19 If the structure is PEM encoded, it will have a header
20 of "BEGIN DH PARAMETERS".
21
22 @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned,
23 otherwise a negative error code is returned.
24 @end deftypefun