Blob Blame History Raw




@deftypefun {int} {gnutls_dh_params_export2_pkcs3} (gnutls_dh_params_t @var{params}, gnutls_x509_crt_fmt_t @var{format}, gnutls_datum_t * @var{out})
@var{params}: Holds the DH parameters

@var{format}: the format of output params. One of PEM or DER.

@var{out}: will contain a PKCS3 DHParams structure PEM or DER encoded

This function will export the given dh parameters to a PKCS3
DHParams structure. This is the format generated by "openssl dhparam" tool.
The data in  @code{out} will be allocated using @code{gnutls_malloc()} .

If the structure is PEM encoded, it will have a header
of "BEGIN DH PARAMETERS".

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned,
otherwise a negative error code is returned.

@strong{Since:} 3.1.3
@end deftypefun