diff options
Diffstat (limited to 'doc/reference/html/gnutls-gnutls.html')
-rw-r--r-- | doc/reference/html/gnutls-gnutls.html | 27114 |
1 files changed, 27114 insertions, 0 deletions
diff --git a/doc/reference/html/gnutls-gnutls.html b/doc/reference/html/gnutls-gnutls.html new file mode 100644 index 0000000..eed7057 --- /dev/null +++ b/doc/reference/html/gnutls-gnutls.html @@ -0,0 +1,27114 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>gnutls: GnuTLS API Reference Manual</title> +<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> +<link rel="home" href="index.html" title="GnuTLS API Reference Manual"> +<link rel="up" href="intro.html" title="GnuTLS API Reference Manual"> +<link rel="prev" href="intro.html" title="GnuTLS API Reference Manual"> +<link rel="next" href="gnutls-abstract.html" title="abstract"> +<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> +<link rel="stylesheet" href="style.css" type="text/css"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> +<td width="100%" align="left" class="shortcuts"> +<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> + <a href="#gnutls-gnutls.description" class="shortcut">Description</a></span> +</td> +<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> +<td><a accesskey="u" href="intro.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> +<td><a accesskey="p" href="intro.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="n" href="gnutls-abstract.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> +</tr></table> +<div class="refentry"> +<a name="gnutls-gnutls"></a><div class="titlepage"></div> +<div class="refnamediv"><table width="100%"><tr> +<td valign="top"> +<h2><span class="refentrytitle"><a name="gnutls-gnutls.top_of_page"></a>gnutls</span></h2> +<p>gnutls</p> +</td> +<td class="gallery_image" valign="top" align="right"></td> +</tr></table></div> +<div class="refsect1"> +<a name="gnutls-gnutls.functions"></a><h2>Functions</h2> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="functions_proto_type"> +<col class="functions_proto_name"> +</colgroup> +<tbody> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-get-name" title="gnutls_pk_algorithm_get_name ()">gnutls_pk_algorithm_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#GNUTLS-CURVE-TO-BITS:CAPS" title="GNUTLS_CURVE_TO_BITS()">GNUTLS_CURVE_TO_BITS</a><span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#GNUTLS-BITS-TO-CURVE:CAPS" title="GNUTLS_BITS_TO_CURVE()">GNUTLS_BITS_TO_CURVE</a><span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#GNUTLS-BITS-ARE-CURVE:CAPS" title="GNUTLS_BITS_ARE_CURVE()">GNUTLS_BITS_ARE_CURVE</a><span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-init" title="gnutls_init ()">gnutls_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-deinit" title="gnutls_deinit ()">gnutls_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-bye" title="gnutls_bye ()">gnutls_bye</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake" title="gnutls_handshake ()">gnutls_handshake</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-reauth" title="gnutls_reauth ()">gnutls_reauth</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-timeout" title="gnutls_handshake_set_timeout ()">gnutls_handshake_set_timeout</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-rehandshake" title="gnutls_rehandshake ()">gnutls_rehandshake</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-key-update" title="gnutls_session_key_update ()">gnutls_session_key_update</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="returnvalue">gnutls_alert_description_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-get" title="gnutls_alert_get ()">gnutls_alert_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-send" title="gnutls_alert_send ()">gnutls_alert_send</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-send-appropriate" title="gnutls_alert_send_appropriate ()">gnutls_alert_send_appropriate</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-get-name" title="gnutls_alert_get_name ()">gnutls_alert_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-get-strname" title="gnutls_alert_get_strname ()">gnutls_alert_get_strname</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="returnvalue">gnutls_sec_param_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-pk-bits-to-sec-param" title="gnutls_pk_bits_to_sec_param ()">gnutls_pk_bits_to_sec_param</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sec-param-get-name" title="gnutls_sec_param_get_name ()">gnutls_sec_param_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">unsigned <span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sec-param-to-pk-bits" title="gnutls_sec_param_to_pk_bits ()">gnutls_sec_param_to_pk_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">unsigned <span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sec-param-to-symmetric-bits" title="gnutls_sec_param_to_symmetric_bits ()">gnutls_sec_param_to_symmetric_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-group-t" title="enum gnutls_group_t"><span class="returnvalue">gnutls_group_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-group-get" title="gnutls_group_get ()">gnutls_group_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="returnvalue">gnutls_cipher_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-cipher-get" title="gnutls_cipher_get ()">gnutls_cipher_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="returnvalue">gnutls_cipher_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-early-cipher-get" title="gnutls_early_cipher_get ()">gnutls_early_cipher_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-kx-algorithm-t" title="enum gnutls_kx_algorithm_t"><span class="returnvalue">gnutls_kx_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-kx-get" title="gnutls_kx_get ()">gnutls_kx_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t"><span class="returnvalue">gnutls_mac_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-mac-get" title="gnutls_mac_get ()">gnutls_mac_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="returnvalue">gnutls_digest_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-prf-hash-get" title="gnutls_prf_hash_get ()">gnutls_prf_hash_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="returnvalue">gnutls_digest_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-early-prf-hash-get" title="gnutls_early_prf_hash_get ()">gnutls_early_prf_hash_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="returnvalue">gnutls_certificate_type_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-get" title="gnutls_certificate_type_get ()">gnutls_certificate_type_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="returnvalue">gnutls_certificate_type_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-get2" title="gnutls_certificate_type_get2 ()">gnutls_certificate_type_get2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-get" title="gnutls_sign_algorithm_get ()">gnutls_sign_algorithm_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-get-client" title="gnutls_sign_algorithm_get_client ()">gnutls_sign_algorithm_get_client</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-get-requested" title="gnutls_sign_algorithm_get_requested ()">gnutls_sign_algorithm_get_requested</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-cipher-get-name" title="gnutls_cipher_get_name ()">gnutls_cipher_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="returnvalue">gnutls_digest_algorithm_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-oid-to-digest" title="gnutls_oid_to_digest ()">gnutls_oid_to_digest</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-set-enabled" title="gnutls_ecc_curve_set_enabled ()">gnutls_ecc_curve_set_enabled</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sign-set-secure" title="gnutls_sign_set_secure ()">gnutls_sign_set_secure</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-sign-set-secure-for-certs" title="gnutls_sign_set_secure_for_certs ()">gnutls_sign_set_secure_for_certs</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-digest-set-secure" title="gnutls_digest_set_secure ()">gnutls_digest_set_secure</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-protocol-set-enabled" title="gnutls_protocol_set_enabled ()">gnutls_protocol_set_enabled</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-error-is-fatal" title="gnutls_error_is_fatal ()">gnutls_error_is_fatal</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-perror" title="gnutls_perror ()">gnutls_perror</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-strerror" title="gnutls_strerror ()">gnutls_strerror</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-random" title="gnutls_handshake_set_random ()">gnutls_handshake_set_random</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><span class="returnvalue">gnutls_handshake_description_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-get-last-out" title="gnutls_handshake_get_last_out ()">gnutls_handshake_get_last_out</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><span class="returnvalue">gnutls_handshake_description_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-get-last-in" title="gnutls_handshake_get_last_in ()">gnutls_handshake_get_last_in</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-ping" title="gnutls_heartbeat_ping ()">gnutls_heartbeat_ping</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-pong" title="gnutls_heartbeat_pong ()">gnutls_heartbeat_pong</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-timeout" title="gnutls_record_set_timeout ()">gnutls_record_set_timeout</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-disable-padding" title="gnutls_record_disable_padding ()">gnutls_record_disable_padding</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-cork" title="gnutls_record_cork ()">gnutls_record_cork</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-uncork" title="gnutls_record_uncork ()">gnutls_record_uncork</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-discard-queued" title="gnutls_record_discard_queued ()">gnutls_record_discard_queued</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-state" title="gnutls_record_get_state ()">gnutls_record_get_state</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-state" title="gnutls_record_set_state ()">gnutls_record_set_state</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-range-split" title="gnutls_range_split ()">gnutls_range_split</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()">gnutls_record_send</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-send2" title="gnutls_record_send2 ()">gnutls_record_send2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-send-range" title="gnutls_record_send_range ()">gnutls_record_send_range</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-send-file" title="gnutls_record_send_file ()">gnutls_record_send_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()">gnutls_record_recv</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-recv-packet" title="gnutls_record_recv_packet ()">gnutls_record_recv_packet</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-packet-get" title="gnutls_packet_get ()">gnutls_packet_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-packet-deinit" title="gnutls_packet_deinit ()">gnutls_packet_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-recv-seq" title="gnutls_record_recv_seq ()">gnutls_record_recv_seq</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-overhead-size" title="gnutls_record_overhead_size ()">gnutls_record_overhead_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-est-record-overhead-size" title="gnutls_est_record_overhead_size ()">gnutls_est_record_overhead_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-max-empty-records" title="gnutls_record_set_max_empty_records()">gnutls_record_set_max_empty_records</a><span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-can-use-length-hiding" title="gnutls_record_can_use_length_hiding ()">gnutls_record_can_use_length_hiding</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-direction" title="gnutls_record_get_direction ()">gnutls_record_get_direction</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-max-size" title="gnutls_record_get_max_size ()">gnutls_record_get_max_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-max-size" title="gnutls_record_set_max_size ()">gnutls_record_set_max_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-max-recv-size" title="gnutls_record_set_max_recv_size ()">gnutls_record_set_max_recv_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-check-pending" title="gnutls_record_check_pending ()">gnutls_record_check_pending</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-check-corked" title="gnutls_record_check_corked ()">gnutls_record_check_corked</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">size_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-max-early-data-size" title="gnutls_record_get_max_early_data_size ()">gnutls_record_get_max_early_data_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-max-early-data-size" title="gnutls_record_set_max_early_data_size ()">gnutls_record_set_max_early_data_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-send-early-data" title="gnutls_record_send_early_data ()">gnutls_record_send_early_data</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-record-recv-early-data" title="gnutls_record_recv_early_data ()">gnutls_record_recv_early_data</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-force-valid" title="gnutls_session_force_valid ()">gnutls_session_force_valid</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-prf" title="gnutls_prf ()">gnutls_prf</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-prf-rfc5705" title="gnutls_prf_rfc5705 ()">gnutls_prf_rfc5705</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-prf-early" title="gnutls_prf_early ()">gnutls_prf_early</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-prf-raw" title="gnutls_prf_raw ()">gnutls_prf_raw</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-server-name-set" title="gnutls_server_name_set ()">gnutls_server_name_set</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-server-name-get" title="gnutls_server_name_get ()">gnutls_server_name_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">unsigned <span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-get-timeout" title="gnutls_heartbeat_get_timeout ()">gnutls_heartbeat_get_timeout</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-set-timeouts" title="gnutls_heartbeat_set_timeouts ()">gnutls_heartbeat_set_timeouts</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-enable" title="gnutls_heartbeat_enable ()">gnutls_heartbeat_enable</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-allowed" title="gnutls_heartbeat_allowed ()">gnutls_heartbeat_allowed</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-safe-renegotiation-status" title="gnutls_safe_renegotiation_status ()">gnutls_safe_renegotiation_status</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-ext-master-secret-status" title="gnutls_session_ext_master_secret_status ()">gnutls_session_ext_master_secret_status</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-etm-status" title="gnutls_session_etm_status ()">gnutls_session_etm_status</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-flags" title="gnutls_session_get_flags ()">gnutls_session_get_flags</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-ticket-key-generate" title="gnutls_session_ticket_key_generate ()">gnutls_session_ticket_key_generate</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-ticket-enable-client" title="gnutls_session_ticket_enable_client ()">gnutls_session_ticket_enable_client</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-ticket-enable-server" title="gnutls_session_ticket_enable_server ()">gnutls_session_ticket_enable_server</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-ticket-send" title="gnutls_session_ticket_send ()">gnutls_session_ticket_send</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-set-profile" title="gnutls_srtp_set_profile ()">gnutls_srtp_set_profile</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-set-profile-direct" title="gnutls_srtp_set_profile_direct ()">gnutls_srtp_set_profile_direct</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-get-selected-profile" title="gnutls_srtp_get_selected_profile ()">gnutls_srtp_get_selected_profile</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-get-profile-name" title="gnutls_srtp_get_profile_name ()">gnutls_srtp_get_profile_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-get-profile-id" title="gnutls_srtp_get_profile_id ()">gnutls_srtp_get_profile_id</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-get-keys" title="gnutls_srtp_get_keys ()">gnutls_srtp_get_keys</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-set-mki" title="gnutls_srtp_set_mki ()">gnutls_srtp_set_mki</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srtp-get-mki" title="gnutls_srtp_get_mki ()">gnutls_srtp_get_mki</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="returnvalue">gnutls_compression_method_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-compress-certificate-get-selected-method" title="gnutls_compress_certificate_get_selected_method ()">gnutls_compress_certificate_get_selected_method</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-compress-certificate-set-methods" title="gnutls_compress_certificate_set_methods ()">gnutls_compress_certificate_set_methods</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alpn-get-selected-protocol" title="gnutls_alpn_get_selected_protocol ()">gnutls_alpn_get_selected_protocol</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alpn-set-protocols" title="gnutls_alpn_set_protocols ()">gnutls_alpn_set_protocols</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-key-generate" title="gnutls_key_generate ()">gnutls_key_generate</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-init" title="gnutls_priority_init ()">gnutls_priority_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-init2" title="gnutls_priority_init2 ()">gnutls_priority_init2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-deinit" title="gnutls_priority_deinit ()">gnutls_priority_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-get-cipher-suite-index" title="gnutls_priority_get_cipher_suite_index ()">gnutls_priority_get_cipher_suite_index</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-string-list" title="gnutls_priority_string_list ()">gnutls_priority_string_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-set" title="gnutls_priority_set ()">gnutls_priority_set</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-set-direct" title="gnutls_priority_set_direct ()">gnutls_priority_set_direct</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-certificate-type-list" title="gnutls_priority_certificate_type_list ()">gnutls_priority_certificate_type_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-certificate-type-list2" title="gnutls_priority_certificate_type_list2 ()">gnutls_priority_certificate_type_list2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-sign-list" title="gnutls_priority_sign_list ()">gnutls_priority_sign_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-protocol-list" title="gnutls_priority_protocol_list ()">gnutls_priority_protocol_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-ecc-curve-list" title="gnutls_priority_ecc_curve_list ()">gnutls_priority_ecc_curve_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-group-list" title="gnutls_priority_group_list ()">gnutls_priority_group_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-kx-list" title="gnutls_priority_kx_list ()">gnutls_priority_kx_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-cipher-list" title="gnutls_priority_cipher_list ()">gnutls_priority_cipher_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-priority-mac-list" title="gnutls_priority_mac_list ()">gnutls_priority_mac_list</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-get-system-config-file" title="gnutls_get_system_config_file ()">gnutls_get_system_config_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-set-default-priority" title="gnutls_set_default_priority ()">gnutls_set_default_priority</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-set-default-priority-append" title="gnutls_set_default_priority_append ()">gnutls_set_default_priority_append</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-cipher-suite-get-name" title="gnutls_cipher_suite_get_name ()">gnutls_cipher_suite_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-protocol-get-name" title="gnutls_protocol_get_name ()">gnutls_protocol_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-data" title="gnutls_session_get_data ()">gnutls_session_get_data</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-data2" title="gnutls_session_get_data2 ()">gnutls_session_get_data2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-random" title="gnutls_session_get_random ()">gnutls_session_get_random</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-master-secret" title="gnutls_session_get_master_secret ()">gnutls_session_get_master_secret</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-desc" title="gnutls_session_get_desc ()">gnutls_session_get_desc</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-function" title="gnutls_session_set_verify_function ()">gnutls_session_set_verify_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-cert" title="gnutls_session_set_verify_cert ()">gnutls_session_set_verify_cert</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-cert2" title="gnutls_session_set_verify_cert2 ()">gnutls_session_set_verify_cert2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">unsigned <span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-verify-cert-status" title="gnutls_session_get_verify_cert_status ()">gnutls_session_get_verify_cert_status</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-premaster" title="gnutls_session_set_premaster ()">gnutls_session_set_premaster</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-id" title="gnutls_session_get_id ()">gnutls_session_get_id</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-id2" title="gnutls_session_get_id2 ()">gnutls_session_get_id2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-id" title="gnutls_session_set_id ()">gnutls_session_set_id</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-channel-binding" title="gnutls_session_channel_binding ()">gnutls_session_channel_binding</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-is-resumed" title="gnutls_session_is_resumed ()">gnutls_session_is_resumed</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-resumption-requested" title="gnutls_session_resumption_requested ()">gnutls_session_resumption_requested</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-db-store-func" title="gnutls_db_store_func ()">*gnutls_db_store_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-db-remove-func" title="gnutls_db_remove_func ()">*gnutls_db_remove_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="returnvalue">gnutls_datum_t</span></a> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-db-retr-func" title="gnutls_db_retr_func ()">*gnutls_db_retr_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-cache-expiration" title="gnutls_db_set_cache_expiration ()">gnutls_db_set_cache_expiration</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-get-default-cache-expiration" title="gnutls_db_get_default_cache_expiration ()">gnutls_db_get_default_cache_expiration</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-remove-session" title="gnutls_db_remove_session ()">gnutls_db_remove_session</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-retrieve-function" title="gnutls_db_set_retrieve_function ()">gnutls_db_set_retrieve_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-remove-function" title="gnutls_db_set_remove_function ()">gnutls_db_set_remove_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-store-function" title="gnutls_db_set_store_function ()">gnutls_db_set_store_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-ptr" title="gnutls_db_set_ptr ()">gnutls_db_set_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-get-ptr" title="gnutls_db_get_ptr ()">gnutls_db_get_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-check-entry" title="gnutls_db_check_entry ()">gnutls_db_check_entry</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">time_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-check-entry-time" title="gnutls_db_check_entry_time ()">gnutls_db_check_entry_time</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">time_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-db-check-entry-expire-time" title="gnutls_db_check_entry_expire_time ()">gnutls_db_check_entry_expire_time</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-handshake-hook-func" title="gnutls_handshake_hook_func ()">*gnutls_handshake_hook_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-hook-function" title="gnutls_handshake_set_hook_function ()">gnutls_handshake_set_hook_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-handshake-simple-hook-func" title="gnutls_handshake_simple_hook_func ()">*gnutls_handshake_simple_hook_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-post-client-hello-function" title="gnutls_handshake_set_post_client_hello_function ()">gnutls_handshake_set_post_client_hello_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-max-packet-length" title="gnutls_handshake_set_max_packet_length ()">gnutls_handshake_set_max_packet_length</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-check-version" title="gnutls_check_version ()">gnutls_check_version</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-credentials-set" title="gnutls_credentials_set ()">gnutls_credentials_set</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-credentials-get" title="gnutls_credentials_get ()">gnutls_credentials_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-free-server-credentials" title="gnutls_anon_free_server_credentials ()">gnutls_anon_free_server_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-allocate-server-credentials" title="gnutls_anon_allocate_server_credentials ()">gnutls_anon_allocate_server_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-set-server-dh-params" title="gnutls_anon_set_server_dh_params ()">gnutls_anon_set_server_dh_params</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-set-server-known-dh-params" title="gnutls_anon_set_server_known_dh_params ()">gnutls_anon_set_server_known_dh_params</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-set-server-params-function" title="gnutls_anon_set_server_params_function ()">gnutls_anon_set_server_params_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-free-client-credentials" title="gnutls_anon_free_client_credentials ()">gnutls_anon_free_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-allocate-client-credentials" title="gnutls_anon_allocate_client_credentials ()">gnutls_anon_allocate_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-free-credentials" title="gnutls_certificate_free_credentials ()">gnutls_certificate_free_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-allocate-credentials" title="gnutls_certificate_allocate_credentials ()">gnutls_certificate_allocate_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-issuer" title="gnutls_certificate_get_issuer ()">gnutls_certificate_get_issuer</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-crt-raw" title="gnutls_certificate_get_crt_raw ()">gnutls_certificate_get_crt_raw</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-free-keys" title="gnutls_certificate_free_keys ()">gnutls_certificate_free_keys</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-free-cas" title="gnutls_certificate_free_cas ()">gnutls_certificate_free_cas</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-free-ca-names" title="gnutls_certificate_free_ca_names ()">gnutls_certificate_free_ca_names</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-free-crls" title="gnutls_certificate_free_crls ()">gnutls_certificate_free_crls</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-dh-params" title="gnutls_certificate_set_dh_params ()">gnutls_certificate_set_dh_params</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-known-dh-params" title="gnutls_certificate_set_known_dh_params ()">gnutls_certificate_set_known_dh_params</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-flags" title="gnutls_certificate_set_verify_flags ()">gnutls_certificate_set_verify_flags</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">unsigned <span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-verify-flags" title="gnutls_certificate_get_verify_flags ()">gnutls_certificate_get_verify_flags</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()">gnutls_certificate_set_flags</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-limits" title="gnutls_certificate_set_verify_limits ()">gnutls_certificate_set_verify_limits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-system-trust" title="gnutls_certificate_set_x509_system_trust ()">gnutls_certificate_set_x509_system_trust</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-trust-file" title="gnutls_certificate_set_x509_trust_file ()">gnutls_certificate_set_x509_trust_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-trust-dir" title="gnutls_certificate_set_x509_trust_dir ()">gnutls_certificate_set_x509_trust_dir</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-trust-mem" title="gnutls_certificate_set_x509_trust_mem ()">gnutls_certificate_set_x509_trust_mem</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-crl-file" title="gnutls_certificate_set_x509_crl_file ()">gnutls_certificate_set_x509_crl_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-crl-mem" title="gnutls_certificate_set_x509_crl_mem ()">gnutls_certificate_set_x509_crl_mem</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-file" title="gnutls_certificate_set_x509_key_file ()">gnutls_certificate_set_x509_key_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-file2" title="gnutls_certificate_set_x509_key_file2 ()">gnutls_certificate_set_x509_key_file2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem" title="gnutls_certificate_set_x509_key_mem ()">gnutls_certificate_set_x509_key_mem</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem2" title="gnutls_certificate_set_x509_key_mem2 ()">gnutls_certificate_set_x509_key_mem2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-send-x509-rdn-sequence" title="gnutls_certificate_send_x509_rdn_sequence ()">gnutls_certificate_send_x509_rdn_sequence</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-simple-pkcs12-file" title="gnutls_certificate_set_x509_simple_pkcs12_file ()">gnutls_certificate_set_x509_simple_pkcs12_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-simple-pkcs12-mem" title="gnutls_certificate_set_x509_simple_pkcs12_mem ()">gnutls_certificate_set_x509_simple_pkcs12_mem</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key" title="gnutls_certificate_set_x509_key ()">gnutls_certificate_set_x509_key</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-trust" title="gnutls_certificate_set_x509_trust ()">gnutls_certificate_set_x509_trust</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-crl" title="gnutls_certificate_set_x509_crl ()">gnutls_certificate_set_x509_crl</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-x509-key" title="gnutls_certificate_get_x509_key ()">gnutls_certificate_get_x509_key</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-x509-crt" title="gnutls_certificate_get_x509_crt ()">gnutls_certificate_get_x509_crt</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-ocsp-status-request-function" title="gnutls_certificate_set_ocsp_status_request_function ()">gnutls_certificate_set_ocsp_status_request_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-ocsp-status-request-function2" title="gnutls_certificate_set_ocsp_status_request_function2 ()">gnutls_certificate_set_ocsp_status_request_function2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-ocsp-status-request-file" title="gnutls_certificate_set_ocsp_status_request_file ()">gnutls_certificate_set_ocsp_status_request_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-ocsp-status-request-file2" title="gnutls_certificate_set_ocsp_status_request_file2 ()">gnutls_certificate_set_ocsp_status_request_file2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-ocsp-status-request-mem" title="gnutls_certificate_set_ocsp_status_request_mem ()">gnutls_certificate_set_ocsp_status_request_mem</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">time_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-ocsp-expiration" title="gnutls_certificate_get_ocsp_expiration ()">gnutls_certificate_get_ocsp_expiration</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ocsp-status-request-enable-client" title="gnutls_ocsp_status_request_enable_client ()">gnutls_ocsp_status_request_enable_client</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ocsp-status-request-get" title="gnutls_ocsp_status_request_get ()">gnutls_ocsp_status_request_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ocsp-status-request-is-checked" title="gnutls_ocsp_status_request_is_checked ()">gnutls_ocsp_status_request_is_checked</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ocsp-status-request-get2" title="gnutls_ocsp_status_request_get2 ()">gnutls_ocsp_status_request_get2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-rawpk-key-mem" title="gnutls_certificate_set_rawpk_key_mem ()">gnutls_certificate_set_rawpk_key_mem</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-rawpk-key-file" title="gnutls_certificate_set_rawpk_key_file ()">gnutls_certificate_set_rawpk_key_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-init" title="gnutls_global_init ()">gnutls_global_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-deinit" title="gnutls_global_deinit ()">gnutls_global_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <a class="link" href="gnutls-gnutls.html#gnutls-library-config-st" title="gnutls_library_config_st"><span class="returnvalue">gnutls_library_config_st</span></a> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-get-library-config" title="gnutls_get_library_config ()">gnutls_get_library_config</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">time_t</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-time-func" title="gnutls_time_func ()">*gnutls_time_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#mutex-init-func" title="mutex_init_func ()">*mutex_init_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#mutex-lock-func" title="mutex_lock_func ()">*mutex_lock_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#mutex-unlock-func" title="mutex_unlock_func ()">*mutex_unlock_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#mutex-deinit-func" title="mutex_deinit_func ()">*mutex_deinit_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-set-mutex" title="gnutls_global_set_mutex ()">gnutls_global_set_mutex</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-alloc-function" title="gnutls_alloc_function ()">*gnutls_alloc_function</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-calloc-function" title="gnutls_calloc_function ()">*gnutls_calloc_function</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-is-secure-function" title="gnutls_is_secure_function ()">*gnutls_is_secure_function</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-free-function" title="gnutls_free_function ()">*gnutls_free_function</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-realloc-function" title="gnutls_realloc_function ()">*gnutls_realloc_function</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-set-time-function" title="gnutls_global_set_time_function ()">gnutls_global_set_time_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()">gnutls_free</a><span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-memset" title="gnutls_memset ()">gnutls_memset</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">if</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-memcmp" title="gnutls_memcmp ()">gnutls_memcmp</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-log-func" title="gnutls_log_func ()">*gnutls_log_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-audit-log-func" title="gnutls_audit_log_func ()">*gnutls_audit_log_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-set-log-function" title="gnutls_global_set_log_function ()">gnutls_global_set_log_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-set-audit-log-function" title="gnutls_global_set_audit_log_function ()">gnutls_global_set_audit_log_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-global-set-log-level" title="gnutls_global_set_log_level ()">gnutls_global_set_log_level</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-keylog-func" title="gnutls_keylog_func ()">*gnutls_keylog_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-keylog-func" title="gnutls_keylog_func ()"><span class="returnvalue">gnutls_keylog_func</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-keylog-function" title="gnutls_session_get_keylog_function ()">gnutls_session_get_keylog_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-keylog-function" title="gnutls_session_set_keylog_function ()">gnutls_session_set_keylog_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-init" title="gnutls_dh_params_init ()">gnutls_dh_params_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-deinit" title="gnutls_dh_params_deinit ()">gnutls_dh_params_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-import-raw" title="gnutls_dh_params_import_raw ()">gnutls_dh_params_import_raw</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-import-dsa" title="gnutls_dh_params_import_dsa ()">gnutls_dh_params_import_dsa</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-import-raw2" title="gnutls_dh_params_import_raw2 ()">gnutls_dh_params_import_raw2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-import-raw3" title="gnutls_dh_params_import_raw3 ()">gnutls_dh_params_import_raw3</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-import-pkcs3" title="gnutls_dh_params_import_pkcs3 ()">gnutls_dh_params_import_pkcs3</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-generate2" title="gnutls_dh_params_generate2 ()">gnutls_dh_params_generate2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-export-pkcs3" title="gnutls_dh_params_export_pkcs3 ()">gnutls_dh_params_export_pkcs3</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-export2-pkcs3" title="gnutls_dh_params_export2_pkcs3 ()">gnutls_dh_params_export2_pkcs3</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-export-raw" title="gnutls_dh_params_export_raw ()">gnutls_dh_params_export_raw</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-params-cpy" title="gnutls_dh_params_cpy ()">gnutls_dh_params_cpy</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-pull-func" title="gnutls_pull_func ()">*gnutls_pull_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-push-func" title="gnutls_push_func ()">*gnutls_push_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-system-recv-timeout" title="gnutls_system_recv_timeout ()">gnutls_system_recv_timeout</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-pull-timeout-func" title="gnutls_pull_timeout_func ()">*gnutls_pull_timeout_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">ssize_t</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-vec-push-func" title="gnutls_vec_push_func ()">*gnutls_vec_push_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-errno-func" title="gnutls_errno_func ()">*gnutls_errno_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-int" title="gnutls_transport_set_int ()">gnutls_transport_set_int</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-int2" title="gnutls_transport_set_int2 ()">gnutls_transport_set_int2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-get-int2" title="gnutls_transport_get_int2 ()">gnutls_transport_get_int2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-get-int" title="gnutls_transport_get_int ()">gnutls_transport_get_int</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-ptr" title="gnutls_transport_set_ptr ()">gnutls_transport_set_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-ptr2" title="gnutls_transport_set_ptr2 ()">gnutls_transport_set_ptr2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="returnvalue">gnutls_transport_ptr_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-get-ptr" title="gnutls_transport_get_ptr ()">gnutls_transport_get_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-get-ptr2" title="gnutls_transport_get_ptr2 ()">gnutls_transport_get_ptr2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-vec-push-function" title="gnutls_transport_set_vec_push_function ()">gnutls_transport_set_vec_push_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-push-function" title="gnutls_transport_set_push_function ()">gnutls_transport_set_push_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-function" title="gnutls_transport_set_pull_function ()">gnutls_transport_set_pull_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-timeout-function" title="gnutls_transport_set_pull_timeout_function ()">gnutls_transport_set_pull_timeout_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-errno-function" title="gnutls_transport_set_errno_function ()">gnutls_transport_set_errno_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-errno" title="gnutls_transport_set_errno ()">gnutls_transport_set_errno</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-ptr" title="gnutls_session_set_ptr ()">gnutls_session_set_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-ptr" title="gnutls_session_get_ptr ()">gnutls_session_get_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-openpgp-send-cert" title="gnutls_openpgp_send_cert ()">gnutls_openpgp_send_cert</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fingerprint" title="gnutls_fingerprint ()">gnutls_fingerprint</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-random-art" title="gnutls_random_art ()">gnutls_random_art</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-idna-map" title="gnutls_idna_map ()">gnutls_idna_map</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-idna-reverse-map" title="gnutls_idna_reverse_map ()">gnutls_idna_reverse_map</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-free-client-credentials" title="gnutls_srp_free_client_credentials ()">gnutls_srp_free_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-allocate-client-credentials" title="gnutls_srp_allocate_client_credentials ()">gnutls_srp_allocate_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-set-client-credentials" title="gnutls_srp_set_client_credentials ()">gnutls_srp_set_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-free-server-credentials" title="gnutls_srp_free_server_credentials ()">gnutls_srp_free_server_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-allocate-server-credentials" title="gnutls_srp_allocate_server_credentials ()">gnutls_srp_allocate_server_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-set-server-credentials-file" title="gnutls_srp_set_server_credentials_file ()">gnutls_srp_set_server_credentials_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-server-get-username" title="gnutls_srp_server_get_username ()">gnutls_srp_server_get_username</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-set-prime-bits" title="gnutls_srp_set_prime_bits ()">gnutls_srp_set_prime_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-verifier" title="gnutls_srp_verifier ()">gnutls_srp_verifier</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-set-server-credentials-function" title="gnutls_srp_set_server_credentials_function ()">gnutls_srp_set_server_credentials_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-set-client-credentials-function" title="gnutls_srp_set_client_credentials_function ()">gnutls_srp_set_client_credentials_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-base64-encode" title="gnutls_srp_base64_encode ()">gnutls_srp_base64_encode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-base64-encode2" title="gnutls_srp_base64_encode2 ()">gnutls_srp_base64_encode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-base64-decode" title="gnutls_srp_base64_decode ()">gnutls_srp_base64_decode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-base64-decode2" title="gnutls_srp_base64_decode2 ()">gnutls_srp_base64_decode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-srp-set-server-fake-salt-seed" title="gnutls_srp_set_server_fake_salt_seed ()">gnutls_srp_set_server_fake_salt_seed</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-free-client-credentials" title="gnutls_psk_free_client_credentials ()">gnutls_psk_free_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-allocate-client-credentials" title="gnutls_psk_allocate_client_credentials ()">gnutls_psk_allocate_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-client-credentials" title="gnutls_psk_set_client_credentials ()">gnutls_psk_set_client_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-client-credentials2" title="gnutls_psk_set_client_credentials2 ()">gnutls_psk_set_client_credentials2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-free-server-credentials" title="gnutls_psk_free_server_credentials ()">gnutls_psk_free_server_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-allocate-server-credentials" title="gnutls_psk_allocate_server_credentials ()">gnutls_psk_allocate_server_credentials</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-credentials-file" title="gnutls_psk_set_server_credentials_file ()">gnutls_psk_set_server_credentials_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-credentials-hint" title="gnutls_psk_set_server_credentials_hint ()">gnutls_psk_set_server_credentials_hint</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-server-get-username" title="gnutls_psk_server_get_username ()">gnutls_psk_server_get_username</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-server-get-username2" title="gnutls_psk_server_get_username2 ()">gnutls_psk_server_get_username2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-client-get-hint" title="gnutls_psk_client_get_hint ()">gnutls_psk_client_get_hint</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-credentials-function" title="gnutls_psk_set_server_credentials_function ()">gnutls_psk_set_server_credentials_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-credentials-function2" title="gnutls_psk_set_server_credentials_function2 ()">gnutls_psk_set_server_credentials_function2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-client-credentials-function" title="gnutls_psk_set_client_credentials_function ()">gnutls_psk_set_client_credentials_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-client-credentials-function2" title="gnutls_psk_set_client_credentials_function2 ()">gnutls_psk_set_client_credentials_function2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-hex-encode" title="gnutls_hex_encode ()">gnutls_hex_encode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-hex-decode" title="gnutls_hex_decode ()">gnutls_hex_decode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-hex-encode2" title="gnutls_hex_encode2 ()">gnutls_hex_encode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-hex-decode2" title="gnutls_hex_decode2 ()">gnutls_hex_decode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-dh-params" title="gnutls_psk_set_server_dh_params ()">gnutls_psk_set_server_dh_params</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-known-dh-params" title="gnutls_psk_set_server_known_dh_params ()">gnutls_psk_set_server_known_dh_params</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-params-function" title="gnutls_psk_set_server_params_function ()">gnutls_psk_set_server_params_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-set-prime-bits" title="gnutls_dh_set_prime_bits ()">gnutls_dh_set_prime_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-get-secret-bits" title="gnutls_dh_get_secret_bits ()">gnutls_dh_get_secret_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-get-peers-public-bits" title="gnutls_dh_get_peers_public_bits ()">gnutls_dh_get_peers_public_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-get-prime-bits" title="gnutls_dh_get_prime_bits ()">gnutls_dh_get_prime_bits</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-get-group" title="gnutls_dh_get_group ()">gnutls_dh_get_group</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-dh-get-pubkey" title="gnutls_dh_get_pubkey ()">gnutls_dh_get_pubkey</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-retrieve-function" title="gnutls_certificate_set_retrieve_function ()">gnutls_certificate_set_retrieve_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-function" title="gnutls_certificate_set_verify_function ()">gnutls_certificate_set_verify_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-server-set-request" title="gnutls_certificate_server_set_request ()">gnutls_certificate_server_set_request</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="returnvalue">gnutls_datum_t</span></a> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-peers" title="gnutls_certificate_get_peers ()">gnutls_certificate_get_peers</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="returnvalue">gnutls_datum_t</span></a> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-ours" title="gnutls_certificate_get_ours ()">gnutls_certificate_get_ours</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-peers-subkey-id" title="gnutls_certificate_get_peers_subkey_id ()">gnutls_certificate_get_peers_subkey_id</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">time_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-activation-time-peers" title="gnutls_certificate_activation_time_peers ()">gnutls_certificate_activation_time_peers</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">time_t</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-expiration-time-peers" title="gnutls_certificate_expiration_time_peers ()">gnutls_certificate_expiration_time_peers</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-client-get-request-status" title="gnutls_certificate_client_get_request_status ()">gnutls_certificate_client_get_request_status</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()">gnutls_certificate_verify_peers2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers3" title="gnutls_certificate_verify_peers3 ()">gnutls_certificate_verify_peers3</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers" title="gnutls_certificate_verify_peers ()">gnutls_certificate_verify_peers</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verification-status-print" title="gnutls_certificate_verification_status_print ()">gnutls_certificate_verification_status_print</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-encode" title="gnutls_pem_base64_encode ()">gnutls_pem_base64_encode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-decode" title="gnutls_pem_base64_decode ()">gnutls_pem_base64_decode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-encode2" title="gnutls_pem_base64_encode2 ()">gnutls_pem_base64_encode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-decode2" title="gnutls_pem_base64_decode2 ()">gnutls_pem_base64_decode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-base64-encode2" title="gnutls_base64_encode2 ()">gnutls_base64_encode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-base64-decode2" title="gnutls_base64_decode2 ()">gnutls_base64_decode2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-params-function" title="gnutls_certificate_set_params_function ()">gnutls_certificate_set_params_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anon-set-params-function" title="gnutls_anon_set_params_function ()">gnutls_anon_set_params_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-psk-set-params-function" title="gnutls_psk_set_params_function ()">gnutls_psk_set_params_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-hex2bin" title="gnutls_hex2bin ()">gnutls_hex2bin</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-tdb-store-func" title="gnutls_tdb_store_func ()">*gnutls_tdb_store_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-tdb-store-commitment-func" title="gnutls_tdb_store_commitment_func ()">*gnutls_tdb_store_commitment_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-tdb-verify-func" title="gnutls_tdb_verify_func ()">*gnutls_tdb_verify_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-tdb-init" title="gnutls_tdb_init ()">gnutls_tdb_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-tdb-set-store-func" title="gnutls_tdb_set_store_func ()">gnutls_tdb_set_store_func</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-tdb-set-store-commitment-func" title="gnutls_tdb_set_store_commitment_func ()">gnutls_tdb_set_store_commitment_func</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-tdb-set-verify-func" title="gnutls_tdb_set_verify_func ()">gnutls_tdb_set_verify_func</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-tdb-deinit" title="gnutls_tdb_deinit ()">gnutls_tdb_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-verify-stored-pubkey" title="gnutls_verify_stored_pubkey ()">gnutls_verify_stored_pubkey</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-store-commitment" title="gnutls_store_commitment ()">gnutls_store_commitment</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-store-pubkey" title="gnutls_store_pubkey ()">gnutls_store_pubkey</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-load-file" title="gnutls_load_file ()">gnutls_load_file</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-url-is-supported" title="gnutls_url_is_supported ()">gnutls_url_is_supported</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()">*gnutls_pin_callback_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-pin-function" title="gnutls_certificate_set_pin_function ()">gnutls_certificate_set_pin_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-buffer-append-data" title="gnutls_buffer_append_data ()">gnutls_buffer_append_data</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-utf8-password-normalize" title="gnutls_utf8_password_normalize ()">gnutls_utf8_password_normalize</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-set-data" title="gnutls_ext_set_data ()">gnutls_ext_set_data</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-get-data" title="gnutls_ext_get_data ()">gnutls_ext_get_data</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-get-current-msg" title="gnutls_ext_get_current_msg ()">gnutls_ext_get_current_msg</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-ext-recv-func" title="gnutls_ext_recv_func ()">*gnutls_ext_recv_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-ext-send-func" title="gnutls_ext_send_func ()">*gnutls_ext_send_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-ext-deinit-data-func" title="gnutls_ext_deinit_data_func ()">*gnutls_ext_deinit_data_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-ext-pack-func" title="gnutls_ext_pack_func ()">*gnutls_ext_pack_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-ext-unpack-func" title="gnutls_ext_unpack_func ()">*gnutls_ext_unpack_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-ext-raw-process-func" title="gnutls_ext_raw_process_func ()">*gnutls_ext_raw_process_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-raw-parse" title="gnutls_ext_raw_parse ()">gnutls_ext_raw_parse</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-register" title="gnutls_ext_register ()">gnutls_ext_register</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-ext-register" title="gnutls_session_ext_register ()">gnutls_session_ext_register</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-get-name" title="gnutls_ext_get_name ()">gnutls_ext_get_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-ext-get-name2" title="gnutls_ext_get_name2 ()">gnutls_ext_get_name2</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-supp-recv-func" title="gnutls_supp_recv_func ()">*gnutls_supp_recv_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-supp-send-func" title="gnutls_supp_send_func ()">*gnutls_supp_send_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-supplemental-register" title="gnutls_supplemental_register ()">gnutls_supplemental_register</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-session-supplemental-register" title="gnutls_session_supplemental_register ()">gnutls_session_supplemental_register</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-supplemental-recv" title="gnutls_supplemental_recv ()">gnutls_supplemental_recv</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-supplemental-send" title="gnutls_supplemental_send ()">gnutls_supplemental_send</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-init" title="gnutls_anti_replay_init ()">gnutls_anti_replay_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-deinit" title="gnutls_anti_replay_deinit ()">gnutls_anti_replay_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-set-window" title="gnutls_anti_replay_set_window ()">gnutls_anti_replay_set_window</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-enable" title="gnutls_anti_replay_enable ()">gnutls_anti_replay_enable</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-db-add-func" title="gnutls_db_add_func ()">*gnutls_db_add_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-set-add-function" title="gnutls_anti_replay_set_add_function ()">gnutls_anti_replay_set_add_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-set-ptr" title="gnutls_anti_replay_set_ptr ()">gnutls_anti_replay_set_ptr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-handshake-read-func" title="gnutls_handshake_read_func ()">*gnutls_handshake_read_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-read-function" title="gnutls_handshake_set_read_function ()">gnutls_handshake_set_read_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-write" title="gnutls_handshake_write ()">gnutls_handshake_write</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-handshake-secret-func" title="gnutls_handshake_secret_func ()">*gnutls_handshake_secret_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-secret-function" title="gnutls_handshake_set_secret_function ()">gnutls_handshake_set_secret_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="gnutls-gnutls.html#gnutls-alert-read-func" title="gnutls_alert_read_func ()">*gnutls_alert_read_func</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-alert-set-read-function" title="gnutls_alert_set_read_function ()">gnutls_alert_set_read_function</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">unsigned</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-mode-enabled" title="gnutls_fips140_mode_enabled ()">gnutls_fips140_mode_enabled</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-set-mode" title="gnutls_fips140_set_mode ()">gnutls_fips140_set_mode</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SET-LAX-MODE:CAPS" title="GNUTLS_FIPS140_SET_LAX_MODE">GNUTLS_FIPS140_SET_LAX_MODE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SET-STRICT-MODE:CAPS" title="GNUTLS_FIPS140_SET_STRICT_MODE">GNUTLS_FIPS140_SET_STRICT_MODE</a></td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-init" title="gnutls_fips140_context_init ()">gnutls_fips140_context_init</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-deinit" title="gnutls_fips140_context_deinit ()">gnutls_fips140_context_deinit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-operation-state-t" title="enum gnutls_fips140_operation_state_t"><span class="returnvalue">gnutls_fips140_operation_state_t</span></a> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-get-operation-state" title="gnutls_fips140_get_operation_state ()">gnutls_fips140_get_operation_state</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-push-context" title="gnutls_fips140_push_context ()">gnutls_fips140_push_context</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-pop-context" title="gnutls_fips140_pop_context ()">gnutls_fips140_pop_context</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-run-self-tests" title="gnutls_fips140_run_self_tests ()">gnutls_fips140_run_self_tests</a> <span class="c_punctuation">()</span> +</td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect1"> +<a name="gnutls-gnutls.other"></a><h2>Types and Values</h2> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="other_proto_type"> +<col class="other_proto_name"> +</colgroup> +<tbody> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-VERSION:CAPS" title="GNUTLS_VERSION">GNUTLS_VERSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-VERSION-MAJOR:CAPS" title="GNUTLS_VERSION_MAJOR">GNUTLS_VERSION_MAJOR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-VERSION-MINOR:CAPS" title="GNUTLS_VERSION_MINOR">GNUTLS_VERSION_MINOR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-VERSION-PATCH:CAPS" title="GNUTLS_VERSION_PATCH">GNUTLS_VERSION_PATCH</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-VERSION-NUMBER:CAPS" title="GNUTLS_VERSION_NUMBER">GNUTLS_VERSION_NUMBER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-CIPHER-RIJNDAEL-128-CBC:CAPS" title="GNUTLS_CIPHER_RIJNDAEL_128_CBC">GNUTLS_CIPHER_RIJNDAEL_128_CBC</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-CIPHER-RIJNDAEL-256-CBC:CAPS" title="GNUTLS_CIPHER_RIJNDAEL_256_CBC">GNUTLS_CIPHER_RIJNDAEL_256_CBC</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-CIPHER-RIJNDAEL-CBC:CAPS" title="GNUTLS_CIPHER_RIJNDAEL_CBC">GNUTLS_CIPHER_RIJNDAEL_CBC</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-CIPHER-ARCFOUR:CAPS" title="GNUTLS_CIPHER_ARCFOUR">GNUTLS_CIPHER_ARCFOUR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-SKIP-GLOBAL-INIT:CAPS" title="GNUTLS_SKIP_GLOBAL_INIT">GNUTLS_SKIP_GLOBAL_INIT</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t">gnutls_cipher_algorithm_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-kx-algorithm-t" title="enum gnutls_kx_algorithm_t">gnutls_kx_algorithm_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-params-type-t" title="enum gnutls_params_type_t">gnutls_params_type_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-credentials-type-t" title="enum gnutls_credentials_type_t">gnutls_credentials_type_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-MAC-SHA:CAPS" title="GNUTLS_MAC_SHA">GNUTLS_MAC_SHA</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-SHA:CAPS" title="GNUTLS_DIG_SHA">GNUTLS_DIG_SHA</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t">gnutls_mac_algorithm_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t">gnutls_digest_algorithm_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-MAX-ALGORITHM-NUM:CAPS" title="GNUTLS_MAX_ALGORITHM_NUM">GNUTLS_MAX_ALGORITHM_NUM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-MAX-SESSION-ID-SIZE:CAPS" title="GNUTLS_MAX_SESSION_ID_SIZE">GNUTLS_MAX_SESSION_ID_SIZE</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t">gnutls_compression_method_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-init-flags-t" title="enum gnutls_init_flags_t">gnutls_init_flags_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-SERVER:CAPS">GNUTLS_SERVER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-CLIENT:CAPS">GNUTLS_CLIENT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-DATAGRAM:CAPS">GNUTLS_DATAGRAM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-NONBLOCK:CAPS">GNUTLS_NONBLOCK</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-NO-EXTENSIONS:CAPS">GNUTLS_NO_EXTENSIONS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-NO-REPLAY-PROTECTION:CAPS">GNUTLS_NO_REPLAY_PROTECTION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-NO-SIGNAL:CAPS">GNUTLS_NO_SIGNAL</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-ALLOW-ID-CHANGE:CAPS">GNUTLS_ALLOW_ID_CHANGE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-ENABLE-FALSE-START:CAPS">GNUTLS_ENABLE_FALSE_START</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-FORCE-CLIENT-CERT:CAPS">GNUTLS_FORCE_CLIENT_CERT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-NO-TICKETS:CAPS">GNUTLS_NO_TICKETS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-ENABLE-CERT-TYPE-NEG:CAPS" title="GNUTLS_ENABLE_CERT_TYPE_NEG">GNUTLS_ENABLE_CERT_TYPE_NEG</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-alert-level-t" title="enum gnutls_alert_level_t">gnutls_alert_level_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t">gnutls_alert_description_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t">gnutls_handshake_description_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HANDSHAKE-ANY:CAPS" title="GNUTLS_HANDSHAKE_ANY">GNUTLS_HANDSHAKE_ANY</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-status-t" title="enum gnutls_certificate_status_t">gnutls_certificate_status_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-request-t" title="enum gnutls_certificate_request_t">gnutls_certificate_request_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-crt-status-t" title="enum gnutls_openpgp_crt_status_t">gnutls_openpgp_crt_status_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-close-request-t" title="enum gnutls_close_request_t">gnutls_close_request_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-protocol-t" title="enum gnutls_protocol_t">gnutls_protocol_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-CRT-RAW:CAPS" title="GNUTLS_CRT_RAW">GNUTLS_CRT_RAW</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t">gnutls_certificate_type_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t">gnutls_x509_crt_fmt_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-print-formats-t" title="enum gnutls_certificate_print_formats_t">gnutls_certificate_print_formats_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PK-ECC:CAPS" title="GNUTLS_PK_ECC">GNUTLS_PK_ECC</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PK-EC:CAPS" title="GNUTLS_PK_EC">GNUTLS_PK_EC</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PK-ECDHX:CAPS" title="GNUTLS_PK_ECDHX">GNUTLS_PK_ECDHX</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t">gnutls_pk_algorithm_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t">gnutls_sign_algorithm_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t">gnutls_ecc_curve_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-group-t" title="enum gnutls_group_t">gnutls_group_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t">gnutls_sec_param_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-SEC-PARAM-NORMAL:CAPS" title="GNUTLS_SEC_PARAM_NORMAL">GNUTLS_SEC_PARAM_NORMAL</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-channel-binding-t" title="enum gnutls_channel_binding_t">gnutls_channel_binding_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-gost-paramset-t" title="enum gnutls_gost_paramset_t">gnutls_gost_paramset_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-ctype-target-t" title="enum gnutls_ctype_target_t">gnutls_ctype_target_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t">gnutls_transport_ptr_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t">gnutls_session_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t">gnutls_dh_params_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-rsa-params-t" title="gnutls_rsa_params_t">gnutls_rsa_params_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t">gnutls_priority_t</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t">gnutls_datum_t</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-library-config-st" title="gnutls_library_config_st">gnutls_library_config_st</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-params-st" title="gnutls_params_st">gnutls_params_st</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-DEFAULT-HANDSHAKE-TIMEOUT:CAPS" title="GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT">GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-INDEFINITE-TIMEOUT:CAPS" title="GNUTLS_INDEFINITE_TIMEOUT">GNUTLS_INDEFINITE_TIMEOUT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KU-PEER:CAPS" title="GNUTLS_KU_PEER">GNUTLS_KU_PEER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HEARTBEAT-WAIT:CAPS" title="GNUTLS_HEARTBEAT_WAIT">GNUTLS_HEARTBEAT_WAIT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-RECORD-WAIT:CAPS" title="GNUTLS_RECORD_WAIT">GNUTLS_RECORD_WAIT</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-range-st" title="gnutls_range_st">gnutls_range_st</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-packet-t" title="gnutls_packet_t">gnutls_packet_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-read" title="gnutls_read">gnutls_read</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-write" title="gnutls_write">gnutls_write</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-server-name-type-t" title="enum gnutls_server_name_type_t">gnutls_server_name_type_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HB-PEER-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_PEER_ALLOWED_TO_SEND">GNUTLS_HB_PEER_ALLOWED_TO_SEND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HB-PEER-NOT-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_PEER_NOT_ALLOWED_TO_SEND">GNUTLS_HB_PEER_NOT_ALLOWED_TO_SEND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HB-LOCAL-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_LOCAL_ALLOWED_TO_SEND">GNUTLS_HB_LOCAL_ALLOWED_TO_SEND</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-session-flags-t" title="enum gnutls_session_flags_t">gnutls_session_flags_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-supplemental-data-format-type-t" title="enum gnutls_supplemental_data_format_type_t">gnutls_supplemental_data_format_type_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-srtp-profile-t" title="enum gnutls_srtp_profile_t">gnutls_srtp_profile_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-alpn-flags-t" title="enum gnutls_alpn_flags_t">gnutls_alpn_flags_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-ALPN-MAND:CAPS" title="GNUTLS_ALPN_MAND">GNUTLS_ALPN_MAND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-INIT-DEF-APPEND:CAPS" title="GNUTLS_PRIORITY_INIT_DEF_APPEND">GNUTLS_PRIORITY_INIT_DEF_APPEND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-LIST-INIT-KEYWORDS:CAPS" title="GNUTLS_PRIORITY_LIST_INIT_KEYWORDS">GNUTLS_PRIORITY_LIST_INIT_KEYWORDS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-LIST-SPECIAL:CAPS" title="GNUTLS_PRIORITY_LIST_SPECIAL">GNUTLS_PRIORITY_LIST_SPECIAL</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-vdata-types-t" title="enum gnutls_vdata_types_t">gnutls_vdata_types_t</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-typed-vdata-st" title="gnutls_typed_vdata_st">gnutls_typed_vdata_st</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-MAX-SESSION-ID:CAPS" title="GNUTLS_MAX_SESSION_ID">GNUTLS_MAX_SESSION_ID</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HOOK-POST:CAPS" title="GNUTLS_HOOK_POST">GNUTLS_HOOK_POST</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HOOK-PRE:CAPS" title="GNUTLS_HOOK_PRE">GNUTLS_HOOK_PRE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-HOOK-BOTH:CAPS" title="GNUTLS_HOOK_BOTH">GNUTLS_HOOK_BOTH</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-handshake-post-client-hello-func" title="gnutls_handshake_post_client_hello_func">gnutls_handshake_post_client_hello_func</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-cred-set" title="gnutls_cred_set">gnutls_cred_set</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pubkey-t" title="gnutls_pubkey_t">gnutls_pubkey_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-privkey-t" title="gnutls_privkey_t">gnutls_privkey_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t">gnutls_x509_privkey_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t">gnutls_x509_crl_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t">gnutls_x509_crt_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-t" title="gnutls_x509_crq_t">gnutls_x509_crq_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-keyring-t" title="gnutls_openpgp_keyring_t">gnutls_openpgp_keyring_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-flags" title="enum gnutls_certificate_flags">gnutls_certificate_flags</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-ocsp-data-st" title="gnutls_ocsp_data_st">gnutls_ocsp_data_st</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#giovec-t" title="giovec_t">giovec_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-random-art-t" title="enum gnutls_random_art_t">gnutls_random_art_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-IDNA-FORCE-2008:CAPS" title="GNUTLS_IDNA_FORCE_2008">GNUTLS_IDNA_FORCE_2008</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-srp-base64-encode-alloc" title="gnutls_srp_base64_encode_alloc">gnutls_srp_base64_encode_alloc</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-srp-base64-decode-alloc" title="gnutls_srp_base64_decode_alloc">gnutls_srp_base64_decode_alloc</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-psk-key-flags" title="enum gnutls_psk_key_flags">gnutls_psk_key_flags</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-subject-alt-name-t" title="enum gnutls_x509_subject_alt_name_t">gnutls_x509_subject_alt_name_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-crt-t" title="gnutls_openpgp_crt_t">gnutls_openpgp_crt_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-privkey-t" title="gnutls_openpgp_privkey_t">gnutls_openpgp_privkey_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t">gnutls_pkcs11_privkey_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-privkey-type-t" title="enum gnutls_privkey_type_t">gnutls_privkey_type_t</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-retr2-st" title="gnutls_retr2_st">gnutls_retr2_st</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-encode-alloc" title="gnutls_pem_base64_encode_alloc">gnutls_pem_base64_encode_alloc</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-decode-alloc" title="gnutls_pem_base64_decode_alloc">gnutls_pem_base64_decode_alloc</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DIGITAL-SIGNATURE:CAPS" title="GNUTLS_KEY_DIGITAL_SIGNATURE">GNUTLS_KEY_DIGITAL_SIGNATURE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-NON-REPUDIATION:CAPS" title="GNUTLS_KEY_NON_REPUDIATION">GNUTLS_KEY_NON_REPUDIATION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-ENCIPHERMENT:CAPS" title="GNUTLS_KEY_KEY_ENCIPHERMENT">GNUTLS_KEY_KEY_ENCIPHERMENT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DATA-ENCIPHERMENT:CAPS" title="GNUTLS_KEY_DATA_ENCIPHERMENT">GNUTLS_KEY_DATA_ENCIPHERMENT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-AGREEMENT:CAPS" title="GNUTLS_KEY_KEY_AGREEMENT">GNUTLS_KEY_KEY_AGREEMENT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-KEY-CERT-SIGN:CAPS" title="GNUTLS_KEY_KEY_CERT_SIGN">GNUTLS_KEY_KEY_CERT_SIGN</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-CRL-SIGN:CAPS" title="GNUTLS_KEY_CRL_SIGN">GNUTLS_KEY_CRL_SIGN</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-ENCIPHER-ONLY:CAPS" title="GNUTLS_KEY_ENCIPHER_ONLY">GNUTLS_KEY_ENCIPHER_ONLY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-KEY-DECIPHER-ONLY:CAPS" title="GNUTLS_KEY_DECIPHER_ONLY">GNUTLS_KEY_DECIPHER_ONLY</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t">gnutls_tdb_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-SCOMMIT-FLAG-ALLOW-BROKEN:CAPS" title="GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN">GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pin-flag-t" title="enum gnutls_pin_flag_t">gnutls_pin_flag_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PKCS11-PIN-USER:CAPS" title="GNUTLS_PKCS11_PIN_USER">GNUTLS_PKCS11_PIN_USER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PKCS11-PIN-SO:CAPS" title="GNUTLS_PKCS11_PIN_SO">GNUTLS_PKCS11_PIN_SO</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PKCS11-PIN-FINAL-TRY:CAPS" title="GNUTLS_PKCS11_PIN_FINAL_TRY">GNUTLS_PKCS11_PIN_FINAL_TRY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PKCS11-PIN-COUNT-LOW:CAPS" title="GNUTLS_PKCS11_PIN_COUNT_LOW">GNUTLS_PKCS11_PIN_COUNT_LOW</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PKCS11-PIN-CONTEXT-SPECIFIC:CAPS" title="GNUTLS_PKCS11_PIN_CONTEXT_SPECIFIC">GNUTLS_PKCS11_PIN_CONTEXT_SPECIFIC</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-PKCS11-PIN-WRONG:CAPS" title="GNUTLS_PKCS11_PIN_WRONG">GNUTLS_PKCS11_PIN_WRONG</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-buffer-t" title="gnutls_buffer_t">gnutls_buffer_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-UTF8-IGNORE-ERRS:CAPS" title="GNUTLS_UTF8_IGNORE_ERRS">GNUTLS_UTF8_IGNORE_ERRS</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-ext-priv-data-t" title="gnutls_ext_priv_data_t">gnutls_ext_priv_data_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-RAW-FLAG-TLS-CLIENT-HELLO:CAPS" title="GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO">GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-RAW-FLAG-DTLS-CLIENT-HELLO:CAPS" title="GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO">GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-ext-parse-type-t" title="enum gnutls_ext_parse_type_t">gnutls_ext_parse_type_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-ext-flags-t" title="enum gnutls_ext_flags_t">gnutls_ext_flags_t</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t">gnutls_anti_replay_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t">gnutls_record_encryption_level_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-fips-mode-t" title="enum gnutls_fips_mode_t">gnutls_fips_mode_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SET-MODE-THREAD:CAPS" title="GNUTLS_FIPS140_SET_MODE_THREAD">GNUTLS_FIPS140_SET_MODE_THREAD</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t">gnutls_fips140_context_t</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-fips140-operation-state-t" title="enum gnutls_fips140_operation_state_t">gnutls_fips140_operation_state_t</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS">GNUTLS_E_SUCCESS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-COMPRESSION-ALGORITHM:CAPS" title="GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM">GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-TYPE:CAPS" title="GNUTLS_E_UNKNOWN_CIPHER_TYPE">GNUTLS_E_UNKNOWN_CIPHER_TYPE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-LARGE-PACKET:CAPS" title="GNUTLS_E_LARGE_PACKET">GNUTLS_E_LARGE_PACKET</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNSUPPORTED-VERSION-PACKET:CAPS" title="GNUTLS_E_UNSUPPORTED_VERSION_PACKET">GNUTLS_E_UNSUPPORTED_VERSION_PACKET</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TLS-PACKET-DECODING-ERROR:CAPS" title="GNUTLS_E_TLS_PACKET_DECODING_ERROR">GNUTLS_E_TLS_PACKET_DECODING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-PACKET-LENGTH:CAPS" title="GNUTLS_E_UNEXPECTED_PACKET_LENGTH">GNUTLS_E_UNEXPECTED_PACKET_LENGTH</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-SESSION:CAPS" title="GNUTLS_E_INVALID_SESSION">GNUTLS_E_INVALID_SESSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-FATAL-ALERT-RECEIVED:CAPS" title="GNUTLS_E_FATAL_ALERT_RECEIVED">GNUTLS_E_FATAL_ALERT_RECEIVED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-PACKET:CAPS" title="GNUTLS_E_UNEXPECTED_PACKET">GNUTLS_E_UNEXPECTED_PACKET</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-WARNING-ALERT-RECEIVED:CAPS" title="GNUTLS_E_WARNING_ALERT_RECEIVED">GNUTLS_E_WARNING_ALERT_RECEIVED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ERROR-IN-FINISHED-PACKET:CAPS" title="GNUTLS_E_ERROR_IN_FINISHED_PACKET">GNUTLS_E_ERROR_IN_FINISHED_PACKET</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-HANDSHAKE-PACKET:CAPS" title="GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET">GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-SUITE:CAPS" title="GNUTLS_E_UNKNOWN_CIPHER_SUITE">GNUTLS_E_UNKNOWN_CIPHER_SUITE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNWANTED-ALGORITHM:CAPS" title="GNUTLS_E_UNWANTED_ALGORITHM">GNUTLS_E_UNWANTED_ALGORITHM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-MPI-SCAN-FAILED:CAPS" title="GNUTLS_E_MPI_SCAN_FAILED">GNUTLS_E_MPI_SCAN_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-DECRYPTION-FAILED:CAPS" title="GNUTLS_E_DECRYPTION_FAILED">GNUTLS_E_DECRYPTION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-MEMORY-ERROR:CAPS" title="GNUTLS_E_MEMORY_ERROR">GNUTLS_E_MEMORY_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-DECOMPRESSION-FAILED:CAPS" title="GNUTLS_E_DECOMPRESSION_FAILED">GNUTLS_E_DECOMPRESSION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-COMPRESSION-FAILED:CAPS" title="GNUTLS_E_COMPRESSION_FAILED">GNUTLS_E_COMPRESSION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN">GNUTLS_E_AGAIN</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS" title="GNUTLS_E_EXPIRED">GNUTLS_E_EXPIRED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-DB-ERROR:CAPS" title="GNUTLS_E_DB_ERROR">GNUTLS_E_DB_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SRP-PWD-ERROR:CAPS" title="GNUTLS_E_SRP_PWD_ERROR">GNUTLS_E_SRP_PWD_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-KEYFILE-ERROR:CAPS" title="GNUTLS_E_KEYFILE_ERROR">GNUTLS_E_KEYFILE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INSUFFICIENT-CREDENTIALS:CAPS" title="GNUTLS_E_INSUFFICIENT_CREDENTIALS">GNUTLS_E_INSUFFICIENT_CREDENTIALS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INSUFICIENT-CREDENTIALS:CAPS" title="GNUTLS_E_INSUFICIENT_CREDENTIALS">GNUTLS_E_INSUFICIENT_CREDENTIALS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INSUFFICIENT-CRED:CAPS" title="GNUTLS_E_INSUFFICIENT_CRED">GNUTLS_E_INSUFFICIENT_CRED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INSUFICIENT-CRED:CAPS" title="GNUTLS_E_INSUFICIENT_CRED">GNUTLS_E_INSUFICIENT_CRED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-HASH-FAILED:CAPS" title="GNUTLS_E_HASH_FAILED">GNUTLS_E_HASH_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-BASE64-DECODING-ERROR:CAPS" title="GNUTLS_E_BASE64_DECODING_ERROR">GNUTLS_E_BASE64_DECODING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-MPI-PRINT-FAILED:CAPS" title="GNUTLS_E_MPI_PRINT_FAILED">GNUTLS_E_MPI_PRINT_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE">GNUTLS_E_REHANDSHAKE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-GOT-APPLICATION-DATA:CAPS" title="GNUTLS_E_GOT_APPLICATION_DATA">GNUTLS_E_GOT_APPLICATION_DATA</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECORD-LIMIT-REACHED:CAPS" title="GNUTLS_E_RECORD_LIMIT_REACHED">GNUTLS_E_RECORD_LIMIT_REACHED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ENCRYPTION-FAILED:CAPS" title="GNUTLS_E_ENCRYPTION_FAILED">GNUTLS_E_ENCRYPTION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-ENCRYPTION-FAILED:CAPS" title="GNUTLS_E_PK_ENCRYPTION_FAILED">GNUTLS_E_PK_ENCRYPTION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-DECRYPTION-FAILED:CAPS" title="GNUTLS_E_PK_DECRYPTION_FAILED">GNUTLS_E_PK_DECRYPTION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-SIGN-FAILED:CAPS" title="GNUTLS_E_PK_SIGN_FAILED">GNUTLS_E_PK_SIGN_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-CRITICAL-EXTENSION:CAPS" title="GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION">GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-KEY-USAGE-VIOLATION:CAPS" title="GNUTLS_E_KEY_USAGE_VIOLATION">GNUTLS_E_KEY_USAGE_VIOLATION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-FOUND:CAPS" title="GNUTLS_E_NO_CERTIFICATE_FOUND">GNUTLS_E_NO_CERTIFICATE_FOUND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST">GNUTLS_E_INVALID_REQUEST</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER">GNUTLS_E_SHORT_MEMORY_BUFFER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED">GNUTLS_E_INTERRUPTED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PUSH-ERROR:CAPS" title="GNUTLS_E_PUSH_ERROR">GNUTLS_E_PUSH_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PULL-ERROR:CAPS" title="GNUTLS_E_PULL_ERROR">GNUTLS_E_PULL_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECEIVED-ILLEGAL-PARAMETER:CAPS" title="GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER">GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS1-WRONG-PAD:CAPS" title="GNUTLS_E_PKCS1_WRONG_PAD">GNUTLS_E_PKCS1_WRONG_PAD</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECEIVED-ILLEGAL-EXTENSION:CAPS" title="GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION">GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERNAL-ERROR:CAPS" title="GNUTLS_E_INTERNAL_ERROR">GNUTLS_E_INTERNAL_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-DH-PRIME-UNACCEPTABLE:CAPS" title="GNUTLS_E_DH_PRIME_UNACCEPTABLE">GNUTLS_E_DH_PRIME_UNACCEPTABLE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-FILE-ERROR:CAPS" title="GNUTLS_E_FILE_ERROR">GNUTLS_E_FILE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TOO-MANY-EMPTY-PACKETS:CAPS" title="GNUTLS_E_TOO_MANY_EMPTY_PACKETS">GNUTLS_E_TOO_MANY_EMPTY_PACKETS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-PK-ALGORITHM:CAPS" title="GNUTLS_E_UNKNOWN_PK_ALGORITHM">GNUTLS_E_UNKNOWN_PK_ALGORITHM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TOO-MANY-HANDSHAKE-PACKETS:CAPS" title="GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS">GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECEIVED-DISALLOWED-NAME:CAPS" title="GNUTLS_E_RECEIVED_DISALLOWED_NAME">GNUTLS_E_RECEIVED_DISALLOWED_NAME</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-REQUIRED:CAPS" title="GNUTLS_E_CERTIFICATE_REQUIRED">GNUTLS_E_CERTIFICATE_REQUIRED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-TEMPORARY-RSA-PARAMS:CAPS" title="GNUTLS_E_NO_TEMPORARY_RSA_PARAMS">GNUTLS_E_NO_TEMPORARY_RSA_PARAMS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-COMPRESSION-ALGORITHMS:CAPS" title="GNUTLS_E_NO_COMPRESSION_ALGORITHMS">GNUTLS_E_NO_COMPRESSION_ALGORITHMS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CIPHER-SUITES:CAPS" title="GNUTLS_E_NO_CIPHER_SUITES">GNUTLS_E_NO_CIPHER_SUITES</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OPENPGP-GETKEY-FAILED:CAPS" title="GNUTLS_E_OPENPGP_GETKEY_FAILED">GNUTLS_E_OPENPGP_GETKEY_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-SIG-VERIFY-FAILED:CAPS" title="GNUTLS_E_PK_SIG_VERIFY_FAILED">GNUTLS_E_PK_SIG_VERIFY_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ILLEGAL-SRP-USERNAME:CAPS" title="GNUTLS_E_ILLEGAL_SRP_USERNAME">GNUTLS_E_ILLEGAL_SRP_USERNAME</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SRP-PWD-PARSING-ERROR:CAPS" title="GNUTLS_E_SRP_PWD_PARSING_ERROR">GNUTLS_E_SRP_PWD_PARSING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-KEYFILE-PARSING-ERROR:CAPS" title="GNUTLS_E_KEYFILE_PARSING_ERROR">GNUTLS_E_KEYFILE_PARSING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-TEMPORARY-DH-PARAMS:CAPS" title="GNUTLS_E_NO_TEMPORARY_DH_PARAMS">GNUTLS_E_NO_TEMPORARY_DH_PARAMS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-ELEMENT-NOT-FOUND:CAPS" title="GNUTLS_E_ASN1_ELEMENT_NOT_FOUND">GNUTLS_E_ASN1_ELEMENT_NOT_FOUND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-IDENTIFIER-NOT-FOUND:CAPS" title="GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND">GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-DER-ERROR:CAPS" title="GNUTLS_E_ASN1_DER_ERROR">GNUTLS_E_ASN1_DER_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-VALUE-NOT-FOUND:CAPS" title="GNUTLS_E_ASN1_VALUE_NOT_FOUND">GNUTLS_E_ASN1_VALUE_NOT_FOUND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-GENERIC-ERROR:CAPS" title="GNUTLS_E_ASN1_GENERIC_ERROR">GNUTLS_E_ASN1_GENERIC_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-VALUE-NOT-VALID:CAPS" title="GNUTLS_E_ASN1_VALUE_NOT_VALID">GNUTLS_E_ASN1_VALUE_NOT_VALID</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-TAG-ERROR:CAPS" title="GNUTLS_E_ASN1_TAG_ERROR">GNUTLS_E_ASN1_TAG_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-TAG-IMPLICIT:CAPS" title="GNUTLS_E_ASN1_TAG_IMPLICIT">GNUTLS_E_ASN1_TAG_IMPLICIT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-TYPE-ANY-ERROR:CAPS" title="GNUTLS_E_ASN1_TYPE_ANY_ERROR">GNUTLS_E_ASN1_TYPE_ANY_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-SYNTAX-ERROR:CAPS" title="GNUTLS_E_ASN1_SYNTAX_ERROR">GNUTLS_E_ASN1_SYNTAX_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-DER-OVERFLOW:CAPS" title="GNUTLS_E_ASN1_DER_OVERFLOW">GNUTLS_E_ASN1_DER_OVERFLOW</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OPENPGP-UID-REVOKED:CAPS" title="GNUTLS_E_OPENPGP_UID_REVOKED">GNUTLS_E_OPENPGP_UID_REVOKED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-ERROR:CAPS" title="GNUTLS_E_CERTIFICATE_ERROR">GNUTLS_E_CERTIFICATE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-CERTIFICATE-ERROR:CAPS" title="GNUTLS_E_X509_CERTIFICATE_ERROR">GNUTLS_E_X509_CERTIFICATE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNSUPPORTED-CERTIFICATE-TYPE:CAPS" title="GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE">GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNKNOWN-SAN:CAPS" title="GNUTLS_E_X509_UNKNOWN_SAN">GNUTLS_E_X509_UNKNOWN_SAN</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OPENPGP-FINGERPRINT-UNSUPPORTED:CAPS" title="GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED">GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-ATTRIBUTE:CAPS" title="GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE">GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-HASH-ALGORITHM:CAPS" title="GNUTLS_E_UNKNOWN_HASH_ALGORITHM">GNUTLS_E_UNKNOWN_HASH_ALGORITHM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-PKCS-CONTENT-TYPE:CAPS" title="GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE">GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-PKCS-BAG-TYPE:CAPS" title="GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE">GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-PASSWORD:CAPS" title="GNUTLS_E_INVALID_PASSWORD">GNUTLS_E_INVALID_PASSWORD</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-MAC-VERIFY-FAILED:CAPS" title="GNUTLS_E_MAC_VERIFY_FAILED">GNUTLS_E_MAC_VERIFY_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CONSTRAINT-ERROR:CAPS" title="GNUTLS_E_CONSTRAINT_ERROR">GNUTLS_E_CONSTRAINT_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-WARNING-IA-IPHF-RECEIVED:CAPS" title="GNUTLS_E_WARNING_IA_IPHF_RECEIVED">GNUTLS_E_WARNING_IA_IPHF_RECEIVED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-WARNING-IA-FPHF-RECEIVED:CAPS" title="GNUTLS_E_WARNING_IA_FPHF_RECEIVED">GNUTLS_E_WARNING_IA_FPHF_RECEIVED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-IA-VERIFY-FAILED:CAPS" title="GNUTLS_E_IA_VERIFY_FAILED">GNUTLS_E_IA_VERIFY_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-ALGORITHM:CAPS" title="GNUTLS_E_UNKNOWN_ALGORITHM">GNUTLS_E_UNKNOWN_ALGORITHM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNSUPPORTED-SIGNATURE-ALGORITHM:CAPS" title="GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM">GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SAFE-RENEGOTIATION-FAILED:CAPS" title="GNUTLS_E_SAFE_RENEGOTIATION_FAILED">GNUTLS_E_SAFE_RENEGOTIATION_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNSAFE-RENEGOTIATION-DENIED:CAPS" title="GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED">GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-SRP-USERNAME:CAPS" title="GNUTLS_E_UNKNOWN_SRP_USERNAME">GNUTLS_E_UNKNOWN_SRP_USERNAME</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PREMATURE-TERMINATION:CAPS" title="GNUTLS_E_PREMATURE_TERMINATION">GNUTLS_E_PREMATURE_TERMINATION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-MALFORMED-CIDR:CAPS" title="GNUTLS_E_MALFORMED_CIDR">GNUTLS_E_MALFORMED_CIDR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-BASE64-ENCODING-ERROR:CAPS" title="GNUTLS_E_BASE64_ENCODING_ERROR">GNUTLS_E_BASE64_ENCODING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-GCRYPT-LIBRARY:CAPS" title="GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY">GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-CRYPTO-LIBRARY:CAPS" title="GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY">GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-LIBTASN1-LIBRARY:CAPS" title="GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY">GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OPENPGP-KEYRING-ERROR:CAPS" title="GNUTLS_E_OPENPGP_KEYRING_ERROR">GNUTLS_E_OPENPGP_KEYRING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-OID:CAPS" title="GNUTLS_E_X509_UNSUPPORTED_OID">GNUTLS_E_X509_UNSUPPORTED_OID</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RANDOM-FAILED:CAPS" title="GNUTLS_E_RANDOM_FAILED">GNUTLS_E_RANDOM_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-BASE64-UNEXPECTED-HEADER-ERROR:CAPS" title="GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR">GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OPENPGP-SUBKEY-ERROR:CAPS" title="GNUTLS_E_OPENPGP_SUBKEY_ERROR">GNUTLS_E_OPENPGP_SUBKEY_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CRYPTO-ALREADY-REGISTERED:CAPS" title="GNUTLS_E_CRYPTO_ALREADY_REGISTERED">GNUTLS_E_CRYPTO_ALREADY_REGISTERED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ALREADY-REGISTERED:CAPS" title="GNUTLS_E_ALREADY_REGISTERED">GNUTLS_E_ALREADY_REGISTERED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-HANDSHAKE-TOO-LARGE:CAPS" title="GNUTLS_E_HANDSHAKE_TOO_LARGE">GNUTLS_E_HANDSHAKE_TOO_LARGE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CRYPTODEV-IOCTL-ERROR:CAPS" title="GNUTLS_E_CRYPTODEV_IOCTL_ERROR">GNUTLS_E_CRYPTODEV_IOCTL_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CRYPTODEV-DEVICE-ERROR:CAPS" title="GNUTLS_E_CRYPTODEV_DEVICE_ERROR">GNUTLS_E_CRYPTODEV_DEVICE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CHANNEL-BINDING-NOT-AVAILABLE:CAPS" title="GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE">GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-BAD-COOKIE:CAPS" title="GNUTLS_E_BAD_COOKIE">GNUTLS_E_BAD_COOKIE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OPENPGP-PREFERRED-KEY-ERROR:CAPS" title="GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR">GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INCOMPAT-DSA-KEY-WITH-TLS-PROTOCOL:CAPS" title="GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL">GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INSUFFICIENT-SECURITY:CAPS" title="GNUTLS_E_INSUFFICIENT_SECURITY">GNUTLS_E_INSUFFICIENT_SECURITY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-HEARTBEAT-PONG-RECEIVED:CAPS" title="GNUTLS_E_HEARTBEAT_PONG_RECEIVED">GNUTLS_E_HEARTBEAT_PONG_RECEIVED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-HEARTBEAT-PING-RECEIVED:CAPS" title="GNUTLS_E_HEARTBEAT_PING_RECEIVED">GNUTLS_E_HEARTBEAT_PING_RECEIVED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNRECOGNIZED-NAME:CAPS" title="GNUTLS_E_UNRECOGNIZED_NAME">GNUTLS_E_UNRECOGNIZED_NAME</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-ERROR:CAPS" title="GNUTLS_E_PKCS11_ERROR">GNUTLS_E_PKCS11_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-LOAD-ERROR:CAPS" title="GNUTLS_E_PKCS11_LOAD_ERROR">GNUTLS_E_PKCS11_LOAD_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR">GNUTLS_E_PARSING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-PIN-ERROR:CAPS" title="GNUTLS_E_PKCS11_PIN_ERROR">GNUTLS_E_PKCS11_PIN_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-SLOT-ERROR:CAPS" title="GNUTLS_E_PKCS11_SLOT_ERROR">GNUTLS_E_PKCS11_SLOT_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-LOCKING-ERROR:CAPS" title="GNUTLS_E_LOCKING_ERROR">GNUTLS_E_LOCKING_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-ATTRIBUTE-ERROR:CAPS" title="GNUTLS_E_PKCS11_ATTRIBUTE_ERROR">GNUTLS_E_PKCS11_ATTRIBUTE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-DEVICE-ERROR:CAPS" title="GNUTLS_E_PKCS11_DEVICE_ERROR">GNUTLS_E_PKCS11_DEVICE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-DATA-ERROR:CAPS" title="GNUTLS_E_PKCS11_DATA_ERROR">GNUTLS_E_PKCS11_DATA_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-UNSUPPORTED-FEATURE-ERROR:CAPS" title="GNUTLS_E_PKCS11_UNSUPPORTED_FEATURE_ERROR">GNUTLS_E_PKCS11_UNSUPPORTED_FEATURE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-KEY-ERROR:CAPS" title="GNUTLS_E_PKCS11_KEY_ERROR">GNUTLS_E_PKCS11_KEY_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-PIN-EXPIRED:CAPS" title="GNUTLS_E_PKCS11_PIN_EXPIRED">GNUTLS_E_PKCS11_PIN_EXPIRED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-PIN-LOCKED:CAPS" title="GNUTLS_E_PKCS11_PIN_LOCKED">GNUTLS_E_PKCS11_PIN_LOCKED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-SESSION-ERROR:CAPS" title="GNUTLS_E_PKCS11_SESSION_ERROR">GNUTLS_E_PKCS11_SESSION_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-SIGNATURE-ERROR:CAPS" title="GNUTLS_E_PKCS11_SIGNATURE_ERROR">GNUTLS_E_PKCS11_SIGNATURE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-TOKEN-ERROR:CAPS" title="GNUTLS_E_PKCS11_TOKEN_ERROR">GNUTLS_E_PKCS11_TOKEN_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-USER-ERROR:CAPS" title="GNUTLS_E_PKCS11_USER_ERROR">GNUTLS_E_PKCS11_USER_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CRYPTO-INIT-FAILED:CAPS" title="GNUTLS_E_CRYPTO_INIT_FAILED">GNUTLS_E_CRYPTO_INIT_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TIMEDOUT:CAPS" title="GNUTLS_E_TIMEDOUT">GNUTLS_E_TIMEDOUT</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-USER-ERROR:CAPS" title="GNUTLS_E_USER_ERROR">GNUTLS_E_USER_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ECC-NO-SUPPORTED-CURVES:CAPS" title="GNUTLS_E_ECC_NO_SUPPORTED_CURVES">GNUTLS_E_ECC_NO_SUPPORTED_CURVES</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ECC-UNSUPPORTED-CURVE:CAPS" title="GNUTLS_E_ECC_UNSUPPORTED_CURVE">GNUTLS_E_ECC_UNSUPPORTED_CURVE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PKCS11-REQUESTED-OBJECT-NOT-AVAILBLE:CAPS" title="GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE">GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-LIST-UNSORTED:CAPS" title="GNUTLS_E_CERTIFICATE_LIST_UNSORTED">GNUTLS_E_CERTIFICATE_LIST_UNSORTED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ILLEGAL-PARAMETER:CAPS" title="GNUTLS_E_ILLEGAL_PARAMETER">GNUTLS_E_ILLEGAL_PARAMETER</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-PRIORITIES-WERE-SET:CAPS" title="GNUTLS_E_NO_PRIORITIES_WERE_SET">GNUTLS_E_NO_PRIORITIES_WERE_SET</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-UNSUPPORTED-EXTENSION:CAPS" title="GNUTLS_E_X509_UNSUPPORTED_EXTENSION">GNUTLS_E_X509_UNSUPPORTED_EXTENSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SESSION-EOF:CAPS" title="GNUTLS_E_SESSION_EOF">GNUTLS_E_SESSION_EOF</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-ERROR:CAPS" title="GNUTLS_E_TPM_ERROR">GNUTLS_E_TPM_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-KEY-PASSWORD-ERROR:CAPS" title="GNUTLS_E_TPM_KEY_PASSWORD_ERROR">GNUTLS_E_TPM_KEY_PASSWORD_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-SRK-PASSWORD-ERROR:CAPS" title="GNUTLS_E_TPM_SRK_PASSWORD_ERROR">GNUTLS_E_TPM_SRK_PASSWORD_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-SESSION-ERROR:CAPS" title="GNUTLS_E_TPM_SESSION_ERROR">GNUTLS_E_TPM_SESSION_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-KEY-NOT-FOUND:CAPS" title="GNUTLS_E_TPM_KEY_NOT_FOUND">GNUTLS_E_TPM_KEY_NOT_FOUND</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-UNINITIALIZED:CAPS" title="GNUTLS_E_TPM_UNINITIALIZED">GNUTLS_E_TPM_UNINITIALIZED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TPM-NO-LIB:CAPS" title="GNUTLS_E_TPM_NO_LIB">GNUTLS_E_TPM_NO_LIB</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-STATUS:CAPS" title="GNUTLS_E_NO_CERTIFICATE_STATUS">GNUTLS_E_NO_CERTIFICATE_STATUS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OCSP-RESPONSE-ERROR:CAPS" title="GNUTLS_E_OCSP_RESPONSE_ERROR">GNUTLS_E_OCSP_RESPONSE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RANDOM-DEVICE-ERROR:CAPS" title="GNUTLS_E_RANDOM_DEVICE_ERROR">GNUTLS_E_RANDOM_DEVICE_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-AUTH-ERROR:CAPS" title="GNUTLS_E_AUTH_ERROR">GNUTLS_E_AUTH_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-APPLICATION-PROTOCOL:CAPS" title="GNUTLS_E_NO_APPLICATION_PROTOCOL">GNUTLS_E_NO_APPLICATION_PROTOCOL</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SOCKETS-INIT-ERROR:CAPS" title="GNUTLS_E_SOCKETS_INIT_ERROR">GNUTLS_E_SOCKETS_INIT_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-KEY-IMPORT-FAILED:CAPS" title="GNUTLS_E_KEY_IMPORT_FAILED">GNUTLS_E_KEY_IMPORT_FAILED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INAPPROPRIATE-FALLBACK:CAPS" title="GNUTLS_E_INAPPROPRIATE_FALLBACK">GNUTLS_E_INAPPROPRIATE_FALLBACK</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-VERIFICATION-ERROR:CAPS" title="GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR">GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PRIVKEY-VERIFICATION-ERROR:CAPS" title="GNUTLS_E_PRIVKEY_VERIFICATION_ERROR">GNUTLS_E_PRIVKEY_VERIFICATION_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNEXPECTED-EXTENSIONS-LENGTH:CAPS" title="GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH">GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-EMBEDDED-NULL-IN-STRING:CAPS" title="GNUTLS_E_ASN1_EMBEDDED_NULL_IN_STRING">GNUTLS_E_ASN1_EMBEDDED_NULL_IN_STRING</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SELF-TEST-ERROR:CAPS" title="GNUTLS_E_SELF_TEST_ERROR">GNUTLS_E_SELF_TEST_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-SELF-TEST:CAPS" title="GNUTLS_E_NO_SELF_TEST">GNUTLS_E_NO_SELF_TEST</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-LIB-IN-ERROR-STATE:CAPS" title="GNUTLS_E_LIB_IN_ERROR_STATE">GNUTLS_E_LIB_IN_ERROR_STATE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-GENERATION-ERROR:CAPS" title="GNUTLS_E_PK_GENERATION_ERROR">GNUTLS_E_PK_GENERATION_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-IDNA-ERROR:CAPS" title="GNUTLS_E_IDNA_ERROR">GNUTLS_E_IDNA_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NEED-FALLBACK:CAPS" title="GNUTLS_E_NEED_FALLBACK">GNUTLS_E_NEED_FALLBACK</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-SESSION-USER-ID-CHANGED:CAPS" title="GNUTLS_E_SESSION_USER_ID_CHANGED">GNUTLS_E_SESSION_USER_ID_CHANGED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-HANDSHAKE-DURING-FALSE-START:CAPS" title="GNUTLS_E_HANDSHAKE_DURING_FALSE_START">GNUTLS_E_HANDSHAKE_DURING_FALSE_START</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNAVAILABLE-DURING-HANDSHAKE:CAPS" title="GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE">GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-INVALID-PUBKEY:CAPS" title="GNUTLS_E_PK_INVALID_PUBKEY">GNUTLS_E_PK_INVALID_PUBKEY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-INVALID-PRIVKEY:CAPS" title="GNUTLS_E_PK_INVALID_PRIVKEY">GNUTLS_E_PK_INVALID_PRIVKEY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NOT-YET-ACTIVATED:CAPS" title="GNUTLS_E_NOT_YET_ACTIVATED">GNUTLS_E_NOT_YET_ACTIVATED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-UTF8-STRING:CAPS" title="GNUTLS_E_INVALID_UTF8_STRING">GNUTLS_E_INVALID_UTF8_STRING</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-EMBEDDED-DATA:CAPS" title="GNUTLS_E_NO_EMBEDDED_DATA">GNUTLS_E_NO_EMBEDDED_DATA</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-UTF8-EMAIL:CAPS" title="GNUTLS_E_INVALID_UTF8_EMAIL">GNUTLS_E_INVALID_UTF8_EMAIL</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-PASSWORD-STRING:CAPS" title="GNUTLS_E_INVALID_PASSWORD_STRING">GNUTLS_E_INVALID_PASSWORD_STRING</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-TIME-ERROR:CAPS" title="GNUTLS_E_CERTIFICATE_TIME_ERROR">GNUTLS_E_CERTIFICATE_TIME_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECORD-OVERFLOW:CAPS" title="GNUTLS_E_RECORD_OVERFLOW">GNUTLS_E_RECORD_OVERFLOW</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-ASN1-TIME-ERROR:CAPS" title="GNUTLS_E_ASN1_TIME_ERROR">GNUTLS_E_ASN1_TIME_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INCOMPATIBLE-SIG-WITH-KEY:CAPS" title="GNUTLS_E_INCOMPATIBLE_SIG_WITH_KEY">GNUTLS_E_INCOMPATIBLE_SIG_WITH_KEY</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-INVALID-PUBKEY-PARAMS:CAPS" title="GNUTLS_E_PK_INVALID_PUBKEY_PARAMS">GNUTLS_E_PK_INVALID_PUBKEY_PARAMS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-PK-NO-VALIDATION-PARAMS:CAPS" title="GNUTLS_E_PK_NO_VALIDATION_PARAMS">GNUTLS_E_PK_NO_VALIDATION_PARAMS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-OCSP-MISMATCH-WITH-CERTS:CAPS" title="GNUTLS_E_OCSP_MISMATCH_WITH_CERTS">GNUTLS_E_OCSP_MISMATCH_WITH_CERTS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-COMMON-KEY-SHARE:CAPS" title="GNUTLS_E_NO_COMMON_KEY_SHARE">GNUTLS_E_NO_COMMON_KEY_SHARE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-REAUTH-REQUEST:CAPS" title="GNUTLS_E_REAUTH_REQUEST">GNUTLS_E_REAUTH_REQUEST</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-TOO-MANY-MATCHES:CAPS" title="GNUTLS_E_TOO_MANY_MATCHES">GNUTLS_E_TOO_MANY_MATCHES</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-CRL-VERIFICATION-ERROR:CAPS" title="GNUTLS_E_CRL_VERIFICATION_ERROR">GNUTLS_E_CRL_VERIFICATION_ERROR</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-MISSING-EXTENSION:CAPS" title="GNUTLS_E_MISSING_EXTENSION">GNUTLS_E_MISSING_EXTENSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-DB-ENTRY-EXISTS:CAPS" title="GNUTLS_E_DB_ENTRY_EXISTS">GNUTLS_E_DB_ENTRY_EXISTS</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-EARLY-DATA-REJECTED:CAPS" title="GNUTLS_E_EARLY_DATA_REJECTED">GNUTLS_E_EARLY_DATA_REJECTED</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-X509-DUPLICATE-EXTENSION:CAPS" title="GNUTLS_E_X509_DUPLICATE_EXTENSION">GNUTLS_E_X509_DUPLICATE_EXTENSION</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE">GNUTLS_E_UNIMPLEMENTED_FEATURE</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INT-RET-0:CAPS" title="GNUTLS_E_INT_RET_0">GNUTLS_E_INT_RET_0</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-INT-CHECK-AGAIN:CAPS" title="GNUTLS_E_INT_CHECK_AGAIN">GNUTLS_E_INT_CHECK_AGAIN</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-APPLICATION-ERROR-MAX:CAPS" title="GNUTLS_E_APPLICATION_ERROR_MAX">GNUTLS_E_APPLICATION_ERROR_MAX</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#GNUTLS-E-APPLICATION-ERROR-MIN:CAPS" title="GNUTLS_E_APPLICATION_ERROR_MIN">GNUTLS_E_APPLICATION_ERROR_MIN</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-credentials-st" title="struct gnutls_certificate_credentials_st">gnutls_certificate_credentials_st</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-int" title="struct gnutls_dh_params_int">gnutls_dh_params_int</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-crt-int" title="struct gnutls_openpgp_crt_int">gnutls_openpgp_crt_int</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-keyring-int" title="struct gnutls_openpgp_keyring_int">gnutls_openpgp_keyring_int</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-privkey-int" title="struct gnutls_openpgp_privkey_int">gnutls_openpgp_privkey_int</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-st" title="struct gnutls_pkcs11_privkey_st">gnutls_pkcs11_privkey_st</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-priority-st" title="struct gnutls_priority_st">gnutls_priority_st</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-privkey-st" title="struct gnutls_privkey_st">gnutls_privkey_st</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-pubkey-st" title="struct gnutls_pubkey_st">gnutls_pubkey_st</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-session-int" title="struct gnutls_session_int">gnutls_session_int</a></td> +</tr> +<tr> +<td class="datatype_keyword">struct</td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-tdb-int" title="struct gnutls_tdb_int">gnutls_tdb_int</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-int" title="gnutls_x509_crl_int">gnutls_x509_crl_int</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crq-int" title="gnutls_x509_crq_int">gnutls_x509_crq_int</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-int" title="gnutls_x509_crt_int">gnutls_x509_crt_int</a></td> +</tr> +<tr> +<td class="datatype_keyword"> </td> +<td class="function_name"><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-int" title="gnutls_x509_privkey_int">gnutls_x509_privkey_int</a></td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect1"> +<a name="gnutls-gnutls.description"></a><h2>Description</h2> +</div> +<div class="refsect1"> +<a name="gnutls-gnutls.functions_details"></a><h2>Functions</h2> +<div class="refsect2"> +<a name="gnutls-pk-algorithm-get-name"></a><h3>gnutls_pk_algorithm_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_pk_algorithm_get_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> algorithm</code></em>);</pre> +<p>Convert a <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> value to a string.</p> +<div class="refsect3"> +<a name="gnutls-pk-algorithm-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>algorithm</p></td> +<td class="parameter_description"><p>is a pk algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pk-algorithm-get-name.returns"></a><h4>Returns</h4> +<p> a string that contains the name of the specified public +key algorithm, or <code class="literal">NULL</code>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CURVE-TO-BITS:CAPS"></a><h3>GNUTLS_CURVE_TO_BITS()</h3> +<pre class="programlisting">#define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)(((unsigned int)1<<31)|((unsigned int)(curve))) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-BITS-TO-CURVE:CAPS"></a><h3>GNUTLS_BITS_TO_CURVE()</h3> +<pre class="programlisting">#define GNUTLS_BITS_TO_CURVE(bits) (((unsigned int)(bits)) & 0x7FFFFFFF) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-BITS-ARE-CURVE:CAPS"></a><h3>GNUTLS_BITS_ARE_CURVE()</h3> +<pre class="programlisting">#define GNUTLS_BITS_ARE_CURVE(bits) (((unsigned int)(bits)) & 0x80000000) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-init"></a><h3>gnutls_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> *session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function initializes the provided session. Every +session must be initialized before use, and must be deinitialized +after used by calling <a class="link" href="gnutls-gnutls.html#gnutls-deinit" title="gnutls_deinit ()"><code class="function">gnutls_deinit()</code></a>.</p> +<p><em class="parameter"><code>flags</code></em> + can be any combination of flags from <a class="link" href="gnutls-gnutls.html#gnutls-init-flags-t" title="enum gnutls_init_flags_t"><code class="literal">gnutls_init_flags_t</code></a>.</p> +<p>Note that since version 3.1.2 this function enables some common +TLS extensions such as session tickets and OCSP certificate status +request in client side by default. To prevent that use the <a class="link" href="gnutls-gnutls.html#GNUTLS-NO-EXTENSIONS:CAPS"><code class="literal">GNUTLS_NO_EXTENSIONS</code></a> +flag.</p> +<div class="refsect3"> +<a name="gnutls-init.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>indicate if this session is to be used for server or client.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-init.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-deinit"></a><h3>gnutls_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function clears all buffers associated with the <em class="parameter"><code>session</code></em> +. +This function will also remove session data from the session +database if the session was terminated abnormally.</p> +<div class="refsect3"> +<a name="gnutls-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-bye"></a><h3>gnutls_bye ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_bye (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-close-request-t" title="enum gnutls_close_request_t"><span class="type">gnutls_close_request_t</span></a> how</code></em>);</pre> +<p>Terminates the current TLS/SSL connection. The connection should +have been initiated using <a class="link" href="gnutls-gnutls.html#gnutls-handshake" title="gnutls_handshake ()"><code class="function">gnutls_handshake()</code></a>. <em class="parameter"><code>how</code></em> + should be one +of <a class="link" href="gnutls-gnutls.html#GNUTLS-SHUT-RDWR:CAPS"><code class="literal">GNUTLS_SHUT_RDWR</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-SHUT-WR:CAPS"><code class="literal">GNUTLS_SHUT_WR</code></a>.</p> +<p>In case of <a class="link" href="gnutls-gnutls.html#GNUTLS-SHUT-RDWR:CAPS"><code class="literal">GNUTLS_SHUT_RDWR</code></a> the TLS session gets +terminated and further receives and sends will be disallowed. If +the return value is zero you may continue using the underlying +transport layer. <a class="link" href="gnutls-gnutls.html#GNUTLS-SHUT-RDWR:CAPS"><code class="literal">GNUTLS_SHUT_RDWR</code></a> sends an alert containing a close +request and waits for the peer to reply with the same message.</p> +<p>In case of <a class="link" href="gnutls-gnutls.html#GNUTLS-SHUT-WR:CAPS"><code class="literal">GNUTLS_SHUT_WR</code></a> the TLS session gets terminated +and further sends will be disallowed. In order to reuse the +connection you should wait for an EOF from the peer. +<a class="link" href="gnutls-gnutls.html#GNUTLS-SHUT-WR:CAPS"><code class="literal">GNUTLS_SHUT_WR</code></a> sends an alert containing a close request.</p> +<p>Note that not all implementations will properly terminate a TLS +connection. Some of them, usually for performance reasons, will +terminate only the underlying transport layer, and thus not +distinguishing between a malicious party prematurely terminating +the connection and normal termination.</p> +<p>This function may also return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> or +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a>; cf. <a class="link" href="gnutls-gnutls.html#gnutls-record-get-direction" title="gnutls_record_get_direction ()"><code class="function">gnutls_record_get_direction()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-bye.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>how</p></td> +<td class="parameter_description"><p>is an integer</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-bye.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code, see +function documentation for entire semantics.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake"></a><h3>gnutls_handshake ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_handshake (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function performs the handshake of the TLS/SSL protocol, and +initializes the TLS session parameters.</p> +<p>The non-fatal errors expected by this function are: +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a>, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-WARNING-ALERT-RECEIVED:CAPS" title="GNUTLS_E_WARNING_ALERT_RECEIVED"><code class="literal">GNUTLS_E_WARNING_ALERT_RECEIVED</code></a>. When this function is called +for re-handshake under TLS 1.2 or earlier, the non-fatal error code +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-GOT-APPLICATION-DATA:CAPS" title="GNUTLS_E_GOT_APPLICATION_DATA"><code class="literal">GNUTLS_E_GOT_APPLICATION_DATA</code></a> may also be returned.</p> +<p>The former two interrupt the handshake procedure due to the transport +layer being interrupted, and the latter because of a "warning" alert that +was sent by the peer (it is always a good idea to check any +received alerts). On these non-fatal errors call this function again, +until it returns 0; cf. <a class="link" href="gnutls-gnutls.html#gnutls-record-get-direction" title="gnutls_record_get_direction ()"><code class="function">gnutls_record_get_direction()</code></a> and +<a class="link" href="gnutls-gnutls.html#gnutls-error-is-fatal" title="gnutls_error_is_fatal ()"><code class="function">gnutls_error_is_fatal()</code></a>. In DTLS sessions the non-fatal error +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-LARGE-PACKET:CAPS" title="GNUTLS_E_LARGE_PACKET"><code class="literal">GNUTLS_E_LARGE_PACKET</code></a> is also possible, and indicates that +the MTU should be adjusted.</p> +<p>When this function is called by a server after a rehandshake request +under TLS 1.2 or earlier the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-GOT-APPLICATION-DATA:CAPS" title="GNUTLS_E_GOT_APPLICATION_DATA"><code class="literal">GNUTLS_E_GOT_APPLICATION_DATA</code></a> error code indicates +that some data were pending prior to peer initiating the handshake. +Under TLS 1.3 this function when called after a successful handshake, is a no-op +and always succeeds in server side; in client side this function is +equivalent to <a class="link" href="gnutls-gnutls.html#gnutls-session-key-update" title="gnutls_session_key_update ()"><code class="function">gnutls_session_key_update()</code></a> with <a class="link" href="gnutls-gnutls.html#GNUTLS-KU-PEER:CAPS" title="GNUTLS_KU_PEER"><code class="literal">GNUTLS_KU_PEER</code></a> flag.</p> +<p>This function handles both full and abbreviated TLS handshakes (resumption). +For abbreviated handshakes, in client side, the <code class="function">gnutls_session_set_data()</code> +should be called prior to this function to set parameters from a previous session. +In server side, resumption is handled by either setting a DB back-end, or setting +up keys for session tickets.</p> +<div class="refsect3"> +<a name="gnutls-handshake.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on a successful handshake, otherwise a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-reauth"></a><h3>gnutls_reauth ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_reauth (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function performs the post-handshake authentication +for TLS 1.3. The post-handshake authentication is initiated by the server +by calling this function. Clients respond when <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REAUTH-REQUEST:CAPS" title="GNUTLS_E_REAUTH_REQUEST"><code class="literal">GNUTLS_E_REAUTH_REQUEST</code></a> +has been seen while receiving data.</p> +<p>The non-fatal errors expected by this function are: +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a>, as well as +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-GOT-APPLICATION-DATA:CAPS" title="GNUTLS_E_GOT_APPLICATION_DATA"><code class="literal">GNUTLS_E_GOT_APPLICATION_DATA</code></a> when called on server side.</p> +<p>The former two interrupt the authentication procedure due to the transport +layer being interrupted, and the latter because there were pending data prior +to peer initiating the re-authentication. The server should read/process that +data as unauthenticated and retry calling <a class="link" href="gnutls-gnutls.html#gnutls-reauth" title="gnutls_reauth ()"><code class="function">gnutls_reauth()</code></a>.</p> +<p>When this function is called under TLS1.2 or earlier or the peer didn't +advertise post-handshake auth, it always fails with +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>. The verification of the received peers certificate +is delegated to the session or credentials verification callbacks. A +server can check whether post handshake authentication is supported +by the client by checking the session flags with <a class="link" href="gnutls-gnutls.html#gnutls-session-get-flags" title="gnutls_session_get_flags ()"><code class="function">gnutls_session_get_flags()</code></a>.</p> +<p>Prior to calling this function in server side, the function +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-server-set-request" title="gnutls_certificate_server_set_request ()"><code class="function">gnutls_certificate_server_set_request()</code></a> must be called setting expectations +for the received certificate (request or require). If none are set +this function will return with <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<p>Note that post handshake authentication is available irrespective +of the initial negotiation type (PSK or certificate). In all cases +however, certificate credentials must be set to the session prior +to calling this function.</p> +<div class="refsect3"> +<a name="gnutls-reauth.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-reauth.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on a successful authentication, otherwise a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-timeout"></a><h3>gnutls_handshake_set_timeout ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_handshake_set_timeout (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> ms</code></em>);</pre> +<p>This function sets the timeout for the TLS handshake process +to the provided value. Use an <em class="parameter"><code>ms</code></em> + value of zero to disable +timeout, or <a class="link" href="gnutls-gnutls.html#GNUTLS-DEFAULT-HANDSHAKE-TIMEOUT:CAPS" title="GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT"><code class="literal">GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT</code></a> for a reasonable +default value. For the DTLS protocol, the more detailed +<a class="link" href="gnutls-dtls.html#gnutls-dtls-set-timeouts" title="gnutls_dtls_set_timeouts ()"><code class="function">gnutls_dtls_set_timeouts()</code></a> is provided.</p> +<p>This function requires to set a pull timeout callback. See +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-timeout-function" title="gnutls_transport_set_pull_timeout_function ()"><code class="function">gnutls_transport_set_pull_timeout_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-timeout.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ms</p></td> +<td class="parameter_description"><p>is a timeout value in milliseconds</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-rehandshake"></a><h3>gnutls_rehandshake ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_rehandshake (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function can only be called in server side, and +instructs a TLS 1.2 or earlier client to renegotiate +parameters (perform a handshake), by sending a +hello request message.</p> +<p>If this function succeeds, the calling application +should call <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> until <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE"><code class="literal">GNUTLS_E_REHANDSHAKE</code></a> +is returned to clear any pending data. If the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE"><code class="literal">GNUTLS_E_REHANDSHAKE</code></a> +error code is not seen, then the handshake request was +not followed by the peer (the TLS protocol does not require +the client to do, and such compliance should be handled +by the application protocol).</p> +<p>Once the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE"><code class="literal">GNUTLS_E_REHANDSHAKE</code></a> error code is seen, the +calling application should proceed to calling +<a class="link" href="gnutls-gnutls.html#gnutls-handshake" title="gnutls_handshake ()"><code class="function">gnutls_handshake()</code></a> to negotiate the new +parameters.</p> +<p>If the client does not wish to renegotiate parameters he +may reply with an alert message, and in that case the return code seen +by subsequent <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> will be +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-WARNING-ALERT-RECEIVED:CAPS" title="GNUTLS_E_WARNING_ALERT_RECEIVED"><code class="literal">GNUTLS_E_WARNING_ALERT_RECEIVED</code></a> with the specific alert being +<a class="link" href="gnutls-gnutls.html#GNUTLS-A-NO-RENEGOTIATION:CAPS"><code class="literal">GNUTLS_A_NO_RENEGOTIATION</code></a>. A client may also choose to ignore +this request.</p> +<p>Under TLS 1.3 this function is equivalent to <a class="link" href="gnutls-gnutls.html#gnutls-session-key-update" title="gnutls_session_key_update ()"><code class="function">gnutls_session_key_update()</code></a> +with the <a class="link" href="gnutls-gnutls.html#GNUTLS-KU-PEER:CAPS" title="GNUTLS_KU_PEER"><code class="literal">GNUTLS_KU_PEER</code></a> flag. In that case subsequent calls to +<a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> will not return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE"><code class="literal">GNUTLS_E_REHANDSHAKE</code></a>, and +calls to <a class="link" href="gnutls-gnutls.html#gnutls-handshake" title="gnutls_handshake ()"><code class="function">gnutls_handshake()</code></a> in server side are a no-op.</p> +<p>This function always fails with <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> when +called in client side.</p> +<div class="refsect3"> +<a name="gnutls-rehandshake.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-rehandshake.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-key-update"></a><h3>gnutls_session_key_update ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_key_update (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function will update/refresh the session keys when the +TLS protocol is 1.3 or better. The peer is notified of the +update by sending a message, so this function should be +treated similarly to <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a> --i.e., it may +return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a>.</p> +<p>When this flag <a class="link" href="gnutls-gnutls.html#GNUTLS-KU-PEER:CAPS" title="GNUTLS_KU_PEER"><code class="literal">GNUTLS_KU_PEER</code></a> is specified, this function +in addition to updating the local keys, will ask the peer to +refresh its keys too.</p> +<p>If the negotiated version is not TLS 1.3 or better this +function will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-key-update.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>zero of <a class="link" href="gnutls-gnutls.html#GNUTLS-KU-PEER:CAPS" title="GNUTLS_KU_PEER"><code class="literal">GNUTLS_KU_PEER</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-key-update.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-get"></a><h3>gnutls_alert_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="returnvalue">gnutls_alert_description_t</span></a> +gnutls_alert_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the last alert number received. This +function should be called when <a class="link" href="gnutls-gnutls.html#GNUTLS-E-WARNING-ALERT-RECEIVED:CAPS" title="GNUTLS_E_WARNING_ALERT_RECEIVED"><code class="literal">GNUTLS_E_WARNING_ALERT_RECEIVED</code></a> or +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-FATAL-ALERT-RECEIVED:CAPS" title="GNUTLS_E_FATAL_ALERT_RECEIVED"><code class="literal">GNUTLS_E_FATAL_ALERT_RECEIVED</code></a> errors are returned by a gnutls +function. The peer may send alerts if he encounters an error. +If no alert has been received the returned value is undefined.</p> +<div class="refsect3"> +<a name="gnutls-alert-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alert-get.returns"></a><h4>Returns</h4> +<p> the last alert received, a +<a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> value.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-send"></a><h3>gnutls_alert_send ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_alert_send (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-level-t" title="enum gnutls_alert_level_t"><span class="type">gnutls_alert_level_t</span></a> level</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> desc</code></em>);</pre> +<p>This function will send an alert to the peer in order to inform +him of something important (eg. his Certificate could not be verified). +If the alert level is Fatal then the peer is expected to close the +connection, otherwise he may ignore the alert and continue.</p> +<p>The error code of the underlying record send function will be +returned, so you may also receive <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> or +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> as well.</p> +<div class="refsect3"> +<a name="gnutls-alert-send.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>level</p></td> +<td class="parameter_description"><p>is the level of the alert</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>desc</p></td> +<td class="parameter_description"><p>is the alert description</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alert-send.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-send-appropriate"></a><h3>gnutls_alert_send_appropriate ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_alert_send_appropriate (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> err</code></em>);</pre> +<p>Sends an alert to the peer depending on the error code returned by +a gnutls function. This function will call <code class="function">gnutls_error_to_alert()</code> +to determine the appropriate alert to send.</p> +<p>This function may also return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a>, or +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a>.</p> +<p>This function historically was always sending an alert to the +peer, even if <em class="parameter"><code>err</code></em> + was inappropriate to respond with an alert +(e.g., <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a>). Since 3.6.6 this function returns +success without transmitting any data on error codes that +should not result to an alert.</p> +<div class="refsect3"> +<a name="gnutls-alert-send-appropriate.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err</p></td> +<td class="parameter_description"><p>is an error code returned by another GnuTLS function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alert-send-appropriate.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-get-name"></a><h3>gnutls_alert_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_alert_get_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> alert</code></em>);</pre> +<p>This function will return a string that describes the given alert +number, or <code class="literal">NULL</code>. See <a class="link" href="gnutls-gnutls.html#gnutls-alert-get" title="gnutls_alert_get ()"><code class="function">gnutls_alert_get()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-alert-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>alert</p></td> +<td class="parameter_description"><p>is an alert number.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alert-get-name.returns"></a><h4>Returns</h4> +<p> string corresponding to <a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> value.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-get-strname"></a><h3>gnutls_alert_get_strname ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_alert_get_strname (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> alert</code></em>);</pre> +<p>This function will return a string of the name of the alert.</p> +<div class="refsect3"> +<a name="gnutls-alert-get-strname.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>alert</p></td> +<td class="parameter_description"><p>is an alert number.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alert-get-strname.returns"></a><h4>Returns</h4> +<p> string corresponding to <a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> value.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pk-bits-to-sec-param"></a><h3>gnutls_pk_bits_to_sec_param ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="returnvalue">gnutls_sec_param_t</span></a> +gnutls_pk_bits_to_sec_param (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> algo</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>);</pre> +<p>This is the inverse of <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-to-pk-bits" title="gnutls_sec_param_to_pk_bits ()"><code class="function">gnutls_sec_param_to_pk_bits()</code></a>. Given an algorithm +and the number of bits, it will return the security parameter. This is +a rough indication.</p> +<div class="refsect3"> +<a name="gnutls-pk-bits-to-sec-param.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>algo</p></td> +<td class="parameter_description"><p>is a public key algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bits</p></td> +<td class="parameter_description"><p>is the number of bits</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pk-bits-to-sec-param.returns"></a><h4>Returns</h4> +<p> The security parameter.</p> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sec-param-get-name"></a><h3>gnutls_sec_param_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_sec_param_get_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="type">gnutls_sec_param_t</span></a> param</code></em>);</pre> +<p>Convert a <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="type">gnutls_sec_param_t</span></a> value to a string.</p> +<div class="refsect3"> +<a name="gnutls-sec-param-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>param</p></td> +<td class="parameter_description"><p>is a security parameter</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sec-param-get-name.returns"></a><h4>Returns</h4> +<p> a pointer to a string that contains the name of the +specified security level, or <code class="literal">NULL</code>.</p> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sec-param-to-pk-bits"></a><h3>gnutls_sec_param_to_pk_bits ()</h3> +<pre class="programlisting">unsigned <span class="returnvalue">int</span> +gnutls_sec_param_to_pk_bits (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> algo</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="type">gnutls_sec_param_t</span></a> param</code></em>);</pre> +<p>When generating private and public key pairs a difficult question +is which size of "bits" the modulus will be in RSA and the group size +in DSA. The easy answer is 1024, which is also wrong. This function +will convert a human understandable security parameter to an +appropriate size for the specific algorithm.</p> +<div class="refsect3"> +<a name="gnutls-sec-param-to-pk-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>algo</p></td> +<td class="parameter_description"><p>is a public key algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>param</p></td> +<td class="parameter_description"><p>is a security parameter</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sec-param-to-pk-bits.returns"></a><h4>Returns</h4> +<p> The number of bits, or (0).</p> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sec-param-to-symmetric-bits"></a><h3>gnutls_sec_param_to_symmetric_bits ()</h3> +<pre class="programlisting">unsigned <span class="returnvalue">int</span> +gnutls_sec_param_to_symmetric_bits ();</pre> +<p>This function will return the number of bits that correspond to +symmetric cipher strength for the given security parameter.</p> +<div class="refsect3"> +<a name="gnutls-sec-param-to-symmetric-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>algo</p></td> +<td class="parameter_description"><p>is a public key algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>param</p></td> +<td class="parameter_description"><p>is a security parameter</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sec-param-to-symmetric-bits.returns"></a><h4>Returns</h4> +<p> The number of bits, or (0).</p> +</div> +<p class="since">Since: 3.3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-group-get"></a><h3>gnutls_group_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-group-t" title="enum gnutls_group_t"><span class="returnvalue">gnutls_group_t</span></a> +gnutls_group_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Returns the currently used group for key exchange. Only valid +when using an elliptic curve or DH ciphersuite.</p> +<div class="refsect3"> +<a name="gnutls-group-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-group-get.returns"></a><h4>Returns</h4> +<p> the currently used group, a <a class="link" href="gnutls-gnutls.html#gnutls-group-t" title="enum gnutls_group_t"><span class="type">gnutls_group_t</span></a> +type.</p> +</div> +<p class="since">Since: 3.6.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-cipher-get"></a><h3>gnutls_cipher_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="returnvalue">gnutls_cipher_algorithm_t</span></a> +gnutls_cipher_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the currently used cipher.</p> +<div class="refsect3"> +<a name="gnutls-cipher-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-cipher-get.returns"></a><h4>Returns</h4> +<p> the currently used cipher, a <a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> +type.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-early-cipher-get"></a><h3>gnutls_early_cipher_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="returnvalue">gnutls_cipher_algorithm_t</span></a> +gnutls_early_cipher_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the cipher algorithm used for encrypting early data.</p> +<div class="refsect3"> +<a name="gnutls-early-cipher-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-early-cipher-get.returns"></a><h4>Returns</h4> +<p> the cipher used for early data, a +<a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> type.</p> +</div> +<p class="since">Since: 3.7.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-kx-get"></a><h3>gnutls_kx_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-kx-algorithm-t" title="enum gnutls_kx_algorithm_t"><span class="returnvalue">gnutls_kx_algorithm_t</span></a> +gnutls_kx_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the currently used key exchange algorithm.</p> +<p>This function will return <a class="link" href="gnutls-gnutls.html#GNUTLS-KX-ECDHE-RSA:CAPS"><code class="literal">GNUTLS_KX_ECDHE_RSA</code></a>, or <a class="link" href="gnutls-gnutls.html#GNUTLS-KX-DHE-RSA:CAPS"><code class="literal">GNUTLS_KX_DHE_RSA</code></a> +under TLS 1.3, to indicate an elliptic curve DH key exchange or +a finite field one. The precise group used is available +by calling <a class="link" href="gnutls-gnutls.html#gnutls-group-get" title="gnutls_group_get ()"><code class="function">gnutls_group_get()</code></a> instead.</p> +<div class="refsect3"> +<a name="gnutls-kx-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-kx-get.returns"></a><h4>Returns</h4> +<p> the key exchange algorithm used in the last handshake, a +<a class="link" href="gnutls-gnutls.html#gnutls-kx-algorithm-t" title="enum gnutls_kx_algorithm_t"><span class="type">gnutls_kx_algorithm_t</span></a> value.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-mac-get"></a><h3>gnutls_mac_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t"><span class="returnvalue">gnutls_mac_algorithm_t</span></a> +gnutls_mac_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the currently used MAC algorithm.</p> +<div class="refsect3"> +<a name="gnutls-mac-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-mac-get.returns"></a><h4>Returns</h4> +<p> the currently used mac algorithm, a +<a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t"><span class="type">gnutls_mac_algorithm_t</span></a> value.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-prf-hash-get"></a><h3>gnutls_prf_hash_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="returnvalue">gnutls_digest_algorithm_t</span></a> +gnutls_prf_hash_get (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the currently used hash algorithm. In TLS 1.3, the hash +algorithm is used for both the key derivation function and +handshake message authentication code. In TLS 1.2, it matches the +hash algorithm used for PRF.</p> +<div class="refsect3"> +<a name="gnutls-prf-hash-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-prf-hash-get.returns"></a><h4>Returns</h4> +<p> the currently used hash algorithm, a +<a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> value.</p> +</div> +<p class="since">Since: 3.6.13</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-early-prf-hash-get"></a><h3>gnutls_early_prf_hash_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="returnvalue">gnutls_digest_algorithm_t</span></a> +gnutls_early_prf_hash_get (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the hash algorithm used as a PRF to derive keys for encrypting +early data in TLS 1.3.</p> +<div class="refsect3"> +<a name="gnutls-early-prf-hash-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-early-prf-hash-get.returns"></a><h4>Returns</h4> +<p> the hash algorithm used for early data, a +<a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> value.</p> +</div> +<p class="since">Since: 3.7.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-type-get"></a><h3>gnutls_certificate_type_get ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="returnvalue">gnutls_certificate_type_t</span></a> +gnutls_certificate_type_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function returns the type of the certificate that is negotiated +for this side to send to the peer. The certificate type is by default +X.509, unless an alternative certificate type is enabled by +<a class="link" href="gnutls-gnutls.html#gnutls-init" title="gnutls_init ()"><code class="function">gnutls_init()</code></a> and negotiated during the session.</p> +<p>Resumed sessions will return the certificate type that was negotiated +and used in the original session.</p> +<p>As of version 3.6.4 it is recommended to use +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-get2" title="gnutls_certificate_type_get2 ()"><code class="function">gnutls_certificate_type_get2()</code></a> which is more fine-grained.</p> +<div class="refsect3"> +<a name="gnutls-certificate-type-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-type-get.returns"></a><h4>Returns</h4> +<p> the currently used <a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="type">gnutls_certificate_type_t</span></a> certificate +type as negotiated for 'our' side of the connection.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-type-get2"></a><h3>gnutls_certificate_type_get2 ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="returnvalue">gnutls_certificate_type_t</span></a> +gnutls_certificate_type_get2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ctype-target-t" title="enum gnutls_ctype_target_t"><span class="type">gnutls_ctype_target_t</span></a> target</code></em>);</pre> +<p>This function returns the type of the certificate that a side +is negotiated to use. The certificate type is by default X.509, +unless an alternative certificate type is enabled by <a class="link" href="gnutls-gnutls.html#gnutls-init" title="gnutls_init ()"><code class="function">gnutls_init()</code></a> and +negotiated during the session.</p> +<p>The <em class="parameter"><code>target</code></em> + parameter specifies whether to request the negotiated +certificate type for the client (<a class="link" href="gnutls-gnutls.html#GNUTLS-CTYPE-CLIENT:CAPS"><code class="literal">GNUTLS_CTYPE_CLIENT</code></a>), +or for the server (<a class="link" href="gnutls-gnutls.html#GNUTLS-CTYPE-SERVER:CAPS"><code class="literal">GNUTLS_CTYPE_SERVER</code></a>). Additionally, in P2P mode +connection set up where you don't know in advance who will be client +and who will be server you can use the flag (<a class="link" href="gnutls-gnutls.html#GNUTLS-CTYPE-OURS:CAPS"><code class="literal">GNUTLS_CTYPE_OURS</code></a>) and +(<a class="link" href="gnutls-gnutls.html#GNUTLS-CTYPE-PEERS:CAPS"><code class="literal">GNUTLS_CTYPE_PEERS</code></a>) to retrieve the corresponding certificate types.</p> +<p>Resumed sessions will return the certificate type that was negotiated +and used in the original session. That is, this function can be used +to reliably determine the type of the certificate returned by +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-peers" title="gnutls_certificate_get_peers ()"><code class="function">gnutls_certificate_get_peers()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-type-get2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>target</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-ctype-target-t" title="enum gnutls_ctype_target_t"><span class="type">gnutls_ctype_target_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-type-get2.returns"></a><h4>Returns</h4> +<p> the currently used <a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="type">gnutls_certificate_type_t</span></a> certificate +type for the client or the server.</p> +</div> +<p class="since">Since: 3.6.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sign-algorithm-get"></a><h3>gnutls_sign_algorithm_get ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_sign_algorithm_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Returns the signature algorithm that is (or will be) used in this +session by the server to sign data. This function should be +used only with TLS 1.2 or later.</p> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-get.returns"></a><h4>Returns</h4> +<p> The sign algorithm or <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p> +</div> +<p class="since">Since: 3.1.1</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sign-algorithm-get-client"></a><h3>gnutls_sign_algorithm_get_client ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_sign_algorithm_get_client (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Returns the signature algorithm that is (or will be) used in this +session by the client to sign data. This function should be +used only with TLS 1.2 or later.</p> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-get-client.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-get-client.returns"></a><h4>Returns</h4> +<p> The sign algorithm or <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-UNKNOWN:CAPS"><code class="literal">GNUTLS_SIGN_UNKNOWN</code></a>.</p> +</div> +<p class="since">Since: 3.1.11</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sign-algorithm-get-requested"></a><h3>gnutls_sign_algorithm_get_requested ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_sign_algorithm_get_requested (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> indx</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> *algo</code></em>);</pre> +<p>Returns the signature algorithm specified by index that was +requested by the peer. If the specified index has no data available +this function returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>. If +the negotiated TLS version does not support signature algorithms +then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be returned even +for the first index. The first index is 0.</p> +<p>This function is useful in the certificate callback functions +to assist in selecting the correct certificate.</p> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-get-requested.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>indx</p></td> +<td class="parameter_description"><p>is an index of the signature algorithm to return</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>algo</p></td> +<td class="parameter_description"><p>the returned certificate type will be stored there</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-get-requested.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 2.10.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-cipher-get-name"></a><h3>gnutls_cipher_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_cipher_get_name ();</pre> +<p>Convert a <a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> type to a string.</p> +<div class="refsect3"> +<a name="gnutls-cipher-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>algorithm</p></td> +<td class="parameter_description"><p>is an encryption algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-cipher-get-name.returns"></a><h4>Returns</h4> +<p> a pointer to a string that contains the name of the +specified cipher, or <code class="literal">NULL</code>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-oid-to-digest"></a><h3>gnutls_oid_to_digest ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="returnvalue">gnutls_digest_algorithm_t</span></a> +gnutls_oid_to_digest ();</pre> +<p>Converts a textual object identifier to a <a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> value.</p> +<div class="refsect3"> +<a name="gnutls-oid-to-digest.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>oid</p></td> +<td class="parameter_description"><p>is an object identifier</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-oid-to-digest.returns"></a><h4>Returns</h4> +<p> a <a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> id of the specified digest +algorithm, or <a class="link" href="gnutls-gnutls.html#GNUTLS-DIG-UNKNOWN:CAPS"><code class="literal">GNUTLS_DIG_UNKNOWN</code></a> on failure.</p> +</div> +<p class="since">Since: 3.4.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ecc-curve-set-enabled"></a><h3>gnutls_ecc_curve_set_enabled ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ecc_curve_set_enabled (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><span class="type">gnutls_ecc_curve_t</span></a> curve</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> enabled</code></em>);</pre> +<p>Modify the previous system wide setting that marked <em class="parameter"><code>curve</code></em> + as +enabled or disabled. Calling this fuction is allowed +only if allowlisting mode is set in the configuration file, +and only if the system-wide TLS priority string +has not been initialized yet. +The intended usage is to provide applications with a way +to expressly deviate from the distribution or site defaults +inherited from the configuration file. +The modification is composable with further modifications +performed through the priority string mechanism.</p> +<p>This function is not thread-safe and is intended to be called +in the main thread at the beginning of the process execution.</p> +<div class="refsect3"> +<a name="gnutls-ecc-curve-set-enabled.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>curve</p></td> +<td class="parameter_description"><p>is an ECC curve</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>enabled</p></td> +<td class="parameter_description"><p>whether to enable the curve</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ecc-curve-set-enabled.returns"></a><h4>Returns</h4> +<p> 0 on success or negative error code otherwise.</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sign-set-secure"></a><h3>gnutls_sign_set_secure ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_sign_set_secure (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> sign</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> secure</code></em>);</pre> +<p>Modify the previous system wide setting that marked <em class="parameter"><code>sign</code></em> + as secure +or insecure. Calling this function is allowed +only if allowlisting mode is set in the configuration file, +and only if the system-wide TLS priority string +has not been initialized yet. +The intended usage is to provide applications with a way +to expressly deviate from the distribution or site defaults +inherited from the configuration file. +The modification is composable with further modifications +performed through the priority string mechanism.</p> +<p>This function is not thread-safe and is intended to be called +in the main thread at the beginning of the process execution.</p> +<p>Even when <em class="parameter"><code>secure</code></em> + is true, <em class="parameter"><code>sign</code></em> + is not marked as secure for the +use in certificates. Use <a class="link" href="gnutls-gnutls.html#gnutls-sign-set-secure-for-certs" title="gnutls_sign_set_secure_for_certs ()"><code class="function">gnutls_sign_set_secure_for_certs()</code></a> to +mark it secure as well for certificates.</p> +<div class="refsect3"> +<a name="gnutls-sign-set-secure.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sign</p></td> +<td class="parameter_description"><p>the sign algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secure</p></td> +<td class="parameter_description"><p>whether to mark the sign algorithm secure</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sign-set-secure.returns"></a><h4>Returns</h4> +<p> 0 on success or negative error code otherwise.</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sign-set-secure-for-certs"></a><h3>gnutls_sign_set_secure_for_certs ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_sign_set_secure_for_certs (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sign-algorithm-t" title="enum gnutls_sign_algorithm_t"><span class="type">gnutls_sign_algorithm_t</span></a> sign</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> secure</code></em>);</pre> +<p>Modify the previous system wide setting that marked <em class="parameter"><code>sign</code></em> + as secure +or insecure for the use in certificates. Calling this fuction is allowed +only if allowlisting mode is set in the configuration file, +and only if the system-wide TLS priority string +has not been initialized yet. +The intended usage is to provide applications with a way +to expressly deviate from the distribution or site defaults +inherited from the configuration file. +The modification is composable with further modifications +performed through the priority string mechanism.</p> +<p>This function is not thread-safe and is intended to be called +in the main thread at the beginning of the process execution.</p> +<p>When <em class="parameter"><code>secure</code></em> + is true, <em class="parameter"><code>sign</code></em> + is marked as secure for any use unlike +<a class="link" href="gnutls-gnutls.html#gnutls-sign-set-secure" title="gnutls_sign_set_secure ()"><code class="function">gnutls_sign_set_secure()</code></a>. Otherwise, it is marked as insecure only +for the use in certificates. Use <a class="link" href="gnutls-gnutls.html#gnutls-sign-set-secure" title="gnutls_sign_set_secure ()"><code class="function">gnutls_sign_set_secure()</code></a> to mark +it insecure for any uses.</p> +<div class="refsect3"> +<a name="gnutls-sign-set-secure-for-certs.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sign</p></td> +<td class="parameter_description"><p>the sign algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secure</p></td> +<td class="parameter_description"><p>whether to mark the sign algorithm secure for certificates</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-sign-set-secure-for-certs.returns"></a><h4>Returns</h4> +<p> 0 on success or negative error code otherwise.</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-digest-set-secure"></a><h3>gnutls_digest_set_secure ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_digest_set_secure (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> dig</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> secure</code></em>);</pre> +<p>Modify the previous system wide setting that marked <em class="parameter"><code>dig</code></em> + as secure +or insecure. This only has effect when the algorithm is enabled +through the allowlisting mode in the configuration file, or when +the setting is modified with a prior call to this function.</p> +<div class="refsect3"> +<a name="gnutls-digest-set-secure.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dig</p></td> +<td class="parameter_description"><p>is a digest algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secure</p></td> +<td class="parameter_description"><p>whether to mark the digest algorithm secure</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-protocol-set-enabled"></a><h3>gnutls_protocol_set_enabled ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_protocol_set_enabled (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-protocol-t" title="enum gnutls_protocol_t"><span class="type">gnutls_protocol_t</span></a> version</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> enabled</code></em>);</pre> +<p>Control the previous system-wide setting that marked <em class="parameter"><code>version</code></em> + as +enabled or disabled. Calling this fuction is allowed +only if allowlisting mode is set in the configuration file, +and only if the system-wide TLS priority string +has not been initialized yet. +The intended usage is to provide applications with a way +to expressly deviate from the distribution or site defaults +inherited from the configuration file. +The modification is composable with further modifications +performed through the priority string mechanism.</p> +<p>This function is not thread-safe and is intended to be called +in the main thread at the beginning of the process execution.</p> +<div class="refsect3"> +<a name="gnutls-protocol-set-enabled.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>version</p></td> +<td class="parameter_description"><p>is a (gnutls) version number</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>enabled</p></td> +<td class="parameter_description"><p>whether to enable the protocol</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-protocol-set-enabled.returns"></a><h4>Returns</h4> +<p> 0 on success or negative error code otherwise.</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-error-is-fatal"></a><h3>gnutls_error_is_fatal ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_error_is_fatal ();</pre> +<p>If a GnuTLS function returns a negative error code you may feed that +value to this function to see if the error condition is fatal to +a TLS session (i.e., must be terminated).</p> +<p>Note that you may also want to check the error code manually, since some +non-fatal errors to the protocol (such as a warning alert or +a rehandshake request) may be fatal for your program.</p> +<p>This function is only useful if you are dealing with errors from +functions that relate to a TLS session (e.g., record layer or handshake +layer handling functions).</p> +<div class="refsect3"> +<a name="gnutls-error-is-fatal.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>error</p></td> +<td class="parameter_description"><p>is a GnuTLS error code, a negative error code</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-error-is-fatal.returns"></a><h4>Returns</h4> +<p> Non-zero value on fatal errors or zero on non-fatal.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-perror"></a><h3>gnutls_perror ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_perror (<em class="parameter"><code><span class="type">int</span> error</code></em>);</pre> +<p>This function is like <code class="function">perror()</code>. The only difference is that it +accepts an error number returned by a gnutls function.</p> +<div class="refsect3"> +<a name="gnutls-perror.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>error</p></td> +<td class="parameter_description"><p>is a GnuTLS error code, a negative error code</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-strerror"></a><h3>gnutls_strerror ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_strerror ();</pre> +<p>This function is similar to strerror. The difference is that it +accepts an error number returned by a gnutls function; In case of +an unknown error a descriptive string is sent instead of <code class="literal">NULL</code>.</p> +<p>Error codes are always a negative error code.</p> +<div class="refsect3"> +<a name="gnutls-strerror.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>error</p></td> +<td class="parameter_description"><p>is a GnuTLS error code, a negative error code</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-strerror.returns"></a><h4>Returns</h4> +<p> A string explaining the GnuTLS error message.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-random"></a><h3>gnutls_handshake_set_random ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_handshake_set_random (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *random</code></em>);</pre> +<p>This function will explicitly set the server or client hello +random value in the subsequent TLS handshake. The random value +should be a 32-byte value.</p> +<p>Note that this function should not normally be used as gnutls +will select automatically a random value for the handshake.</p> +<p>This function should not be used when resuming a session.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-random.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>random</p></td> +<td class="parameter_description"><p>a random value of 32-bytes</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake-set-random.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +<p>Since 3.1.9</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-get-last-out"></a><h3>gnutls_handshake_get_last_out ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><span class="returnvalue">gnutls_handshake_description_t</span></a> +gnutls_handshake_get_last_out (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function is only useful to check where the last performed +handshake failed. If the previous handshake succeed or was not +performed at all then no meaningful value will be returned.</p> +<p>Check <a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><code class="literal">gnutls_handshake_description_t</code></a> in gnutls.h for the +available handshake descriptions.</p> +<div class="refsect3"> +<a name="gnutls-handshake-get-last-out.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake-get-last-out.returns"></a><h4>Returns</h4> +<p> the last handshake message type sent, a +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><code class="literal">gnutls_handshake_description_t</code></a>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-get-last-in"></a><h3>gnutls_handshake_get_last_in ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><span class="returnvalue">gnutls_handshake_description_t</span></a> +gnutls_handshake_get_last_in (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function is only useful to check where the last performed +handshake failed. If the previous handshake succeed or was not +performed at all then no meaningful value will be returned.</p> +<p>Check <a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><code class="literal">gnutls_handshake_description_t</code></a> in gnutls.h for the +available handshake descriptions.</p> +<div class="refsect3"> +<a name="gnutls-handshake-get-last-in.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake-get-last-in.returns"></a><h4>Returns</h4> +<p> the last handshake message type received, a +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><code class="literal">gnutls_handshake_description_t</code></a>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-heartbeat-ping"></a><h3>gnutls_heartbeat_ping ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_heartbeat_ping (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> max_tries</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function sends a ping to the peer. If the <em class="parameter"><code>flags</code></em> + is set +to <a class="link" href="gnutls-gnutls.html#GNUTLS-HEARTBEAT-WAIT:CAPS" title="GNUTLS_HEARTBEAT_WAIT"><code class="literal">GNUTLS_HEARTBEAT_WAIT</code></a> then it waits for a reply from the peer.</p> +<p>Note that it is highly recommended to use this function with the +flag <a class="link" href="gnutls-gnutls.html#GNUTLS-HEARTBEAT-WAIT:CAPS" title="GNUTLS_HEARTBEAT_WAIT"><code class="literal">GNUTLS_HEARTBEAT_WAIT</code></a>, or you need to handle retransmissions +and timeouts manually.</p> +<p>The total TLS data transmitted as part of the ping message are given by +the following formula: MAX(16, <em class="parameter"><code>data_size</code></em> +)+<a class="link" href="gnutls-gnutls.html#gnutls-record-overhead-size" title="gnutls_record_overhead_size ()"><code class="function">gnutls_record_overhead_size()</code></a>+3.</p> +<div class="refsect3"> +<a name="gnutls-heartbeat-ping.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>is the length of the ping payload.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>max_tries</p></td> +<td class="parameter_description"><p>if flags is <a class="link" href="gnutls-gnutls.html#GNUTLS-HEARTBEAT-WAIT:CAPS" title="GNUTLS_HEARTBEAT_WAIT"><code class="literal">GNUTLS_HEARTBEAT_WAIT</code></a> then this sets the number of retransmissions. Use zero for indefinite (until timeout).</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>if <a class="link" href="gnutls-gnutls.html#GNUTLS-HEARTBEAT-WAIT:CAPS" title="GNUTLS_HEARTBEAT_WAIT"><code class="literal">GNUTLS_HEARTBEAT_WAIT</code></a> then wait for pong or timeout instead of returning immediately.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-heartbeat-ping.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.1.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-heartbeat-pong"></a><h3>gnutls_heartbeat_pong ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_heartbeat_pong (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function replies to a ping by sending a pong to the peer.</p> +<div class="refsect3"> +<a name="gnutls-heartbeat-pong.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-heartbeat-pong.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.1.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-set-timeout"></a><h3>gnutls_record_set_timeout ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_record_set_timeout (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> ms</code></em>);</pre> +<p>This function sets the receive timeout for the record layer +to the provided value. Use an <em class="parameter"><code>ms</code></em> + value of zero to disable +timeout (the default), or <a class="link" href="gnutls-gnutls.html#GNUTLS-INDEFINITE-TIMEOUT:CAPS" title="GNUTLS_INDEFINITE_TIMEOUT"><code class="literal">GNUTLS_INDEFINITE_TIMEOUT</code></a>, to +set an indefinite timeout.</p> +<p>This function requires to set a pull timeout callback. See +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-timeout-function" title="gnutls_transport_set_pull_timeout_function ()"><code class="function">gnutls_transport_set_pull_timeout_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-set-timeout.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ms</p></td> +<td class="parameter_description"><p>is a timeout value in milliseconds</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.7</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-disable-padding"></a><h3>gnutls_record_disable_padding ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_record_disable_padding (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Used to disabled padding in TLS 1.0 and above. Normally you do not +need to use this function, but there are buggy clients that +complain if a server pads the encrypted data. This of course will +disable protection against statistical attacks on the data.</p> +<p>This function is defunct since 3.1.7. Random padding is disabled +by default unless requested using <a class="link" href="gnutls-gnutls.html#gnutls-record-send-range" title="gnutls_record_send_range ()"><code class="function">gnutls_record_send_range()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-disable-padding.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-cork"></a><h3>gnutls_record_cork ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_record_cork (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>If called, <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a> will no longer send any records. +Any sent records will be cached until <a class="link" href="gnutls-gnutls.html#gnutls-record-uncork" title="gnutls_record_uncork ()"><code class="function">gnutls_record_uncork()</code></a> is called.</p> +<p>This function is safe to use with DTLS after GnuTLS 3.3.0.</p> +<div class="refsect3"> +<a name="gnutls-record-cork.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.1.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-uncork"></a><h3>gnutls_record_uncork ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_record_uncork (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This resets the effect of <a class="link" href="gnutls-gnutls.html#gnutls-record-cork" title="gnutls_record_cork ()"><code class="function">gnutls_record_cork()</code></a>, and flushes any pending +data. If the <a class="link" href="gnutls-gnutls.html#GNUTLS-RECORD-WAIT:CAPS" title="GNUTLS_RECORD_WAIT"><code class="literal">GNUTLS_RECORD_WAIT</code></a> flag is specified then this +function will block until the data is sent or a fatal error +occurs (i.e., the function will retry on <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> and +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a>).</p> +<p>If the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-RECORD-WAIT:CAPS" title="GNUTLS_RECORD_WAIT"><code class="literal">GNUTLS_RECORD_WAIT</code></a> is not specified and the function +is interrupted then the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> +errors will be returned. To obtain the data left in the corked +buffer use <a class="link" href="gnutls-gnutls.html#gnutls-record-check-corked" title="gnutls_record_check_corked ()"><code class="function">gnutls_record_check_corked()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-uncork.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>Could be zero or <a class="link" href="gnutls-gnutls.html#GNUTLS-RECORD-WAIT:CAPS" title="GNUTLS_RECORD_WAIT"><code class="literal">GNUTLS_RECORD_WAIT</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-uncork.returns"></a><h4>Returns</h4> +<p> On success the number of transmitted data is returned, or +otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.1.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-discard-queued"></a><h3>gnutls_record_discard_queued ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_record_discard_queued (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function discards all queued to be sent packets in a DTLS session. +These are the packets queued after an interrupted <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a>.</p> +<p>This function can only be used with transports where <code class="function">send()</code> is +an all-or-nothing operation (e.g., UDP). When partial writes are allowed +this function will cause session errors.</p> +<div class="refsect3"> +<a name="gnutls-record-discard-queued.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-discard-queued.returns"></a><h4>Returns</h4> +<p> The number of bytes discarded.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-get-state"></a><h3>gnutls_record_get_state ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_record_get_state (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> read</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *mac_key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *IV</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cipher_key</code></em>, + <em class="parameter"><code>unsigned <span class="type">char</span> seq_number[8]</code></em>);</pre> +<p>This function will return the parameters of the current record state. +These are only useful to be provided to an external off-loading device +or subsystem. The returned values should be considered constant +and valid for the lifetime of the session.</p> +<p>In that case, to sync the state back you must call <a class="link" href="gnutls-gnutls.html#gnutls-record-set-state" title="gnutls_record_set_state ()"><code class="function">gnutls_record_set_state()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-get-state.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>read</p></td> +<td class="parameter_description"><p>if non-zero the read parameters are returned, otherwise the write</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mac_key</p></td> +<td class="parameter_description"><p>the key used for MAC (if a MAC is used)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>IV</p></td> +<td class="parameter_description"><p>the initialization vector or nonce used</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cipher_key</p></td> +<td class="parameter_description"><p>the cipher key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seq_number</p></td> +<td class="parameter_description"><p>A 64-bit sequence number</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-get-state.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +<p>Since 3.4.0</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-set-state"></a><h3>gnutls_record_set_state ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_record_set_state (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> read</code></em>, + <em class="parameter"><code>const unsigned <span class="type">char</span> seq_number[8]</code></em>);</pre> +<p>This function will set the sequence number in the current record state. +This function is useful if sending and receiving are offloaded from +gnutls. That is, if <a class="link" href="gnutls-gnutls.html#gnutls-record-get-state" title="gnutls_record_get_state ()"><code class="function">gnutls_record_get_state()</code></a> was used.</p> +<div class="refsect3"> +<a name="gnutls-record-set-state.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>read</p></td> +<td class="parameter_description"><p>if non-zero the read parameters are returned, otherwise the write</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seq_number</p></td> +<td class="parameter_description"><p>A 64-bit sequence number</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-set-state.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +<p>Since 3.4.0</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-range-split"></a><h3>gnutls_range_split ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_range_split (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-range-st" title="gnutls_range_st"><span class="type">gnutls_range_st</span></a> *orig</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-range-st" title="gnutls_range_st"><span class="type">gnutls_range_st</span></a> *small_range</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-range-st" title="gnutls_range_st"><span class="type">gnutls_range_st</span></a> *rem_range</code></em>);</pre> +<p>This function should be used when it is required to hide the length +of very long data that cannot be directly provided to <a class="link" href="gnutls-gnutls.html#gnutls-record-send-range" title="gnutls_record_send_range ()"><code class="function">gnutls_record_send_range()</code></a>. +In that case this function should be called with the desired length +hiding range in <em class="parameter"><code>orig</code></em> +. The returned <em class="parameter"><code>next</code></em> + value should then be used in +the next call to <a class="link" href="gnutls-gnutls.html#gnutls-record-send-range" title="gnutls_record_send_range ()"><code class="function">gnutls_record_send_range()</code></a> with the partial data. +That process should be repeated until <em class="parameter"><code>remainder</code></em> + is (0,0).</p> +<div class="refsect3"> +<a name="gnutls-range-split.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>orig</p></td> +<td class="parameter_description"><p>is the original range provided by the user</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>next</p></td> +<td class="parameter_description"><p>is the returned range that can be conveyed in a TLS record</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>remainder</p></td> +<td class="parameter_description"><p>is the returned remaining range</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-range-split.returns"></a><h4>Returns</h4> +<p> 0 in case splitting succeeds, non zero in case of error. +Note that <em class="parameter"><code>orig</code></em> +is not changed, while the values of <em class="parameter"><code>next</code></em> +and <em class="parameter"><code>remainder</code></em> +are modified to store the resulting values.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-send"></a><h3>gnutls_record_send ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_send (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +<p>This function has the similar semantics with <code class="function">send()</code>. The only +difference is that it accepts a GnuTLS session, and uses different +error codes. +Note that if the send buffer is full, <code class="function">send()</code> will block this +function. See the <code class="function">send()</code> documentation for more information.</p> +<p>You can replace the default push function which is <code class="function">send()</code>, by using +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-push-function" title="gnutls_transport_set_push_function ()"><code class="function">gnutls_transport_set_push_function()</code></a>.</p> +<p>If the EINTR is returned by the internal push function +then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> will be returned. If +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> is returned, you must +call this function again with the exact same parameters, or provide a +<code class="literal">NULL</code> pointer for <em class="parameter"><code>data</code></em> + and 0 for <em class="parameter"><code>data_size</code></em> +, in order to write the +same data as before. If you wish to discard the previous data instead +of retrying, you must call <a class="link" href="gnutls-gnutls.html#gnutls-record-discard-queued" title="gnutls_record_discard_queued ()"><code class="function">gnutls_record_discard_queued()</code></a> before +calling this function with different parameters. Note that the latter +works only on special transports (e.g., UDP). +cf. <a class="link" href="gnutls-gnutls.html#gnutls-record-get-direction" title="gnutls_record_get_direction ()"><code class="function">gnutls_record_get_direction()</code></a>.</p> +<p>Note that in DTLS this function will return the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-LARGE-PACKET:CAPS" title="GNUTLS_E_LARGE_PACKET"><code class="literal">GNUTLS_E_LARGE_PACKET</code></a> +error code if the send data exceed the data MTU value - as returned +by <a class="link" href="gnutls-dtls.html#gnutls-dtls-get-data-mtu" title="gnutls_dtls_get_data_mtu ()"><code class="function">gnutls_dtls_get_data_mtu()</code></a>. The errno value EMSGSIZE +also maps to <a class="link" href="gnutls-gnutls.html#GNUTLS-E-LARGE-PACKET:CAPS" title="GNUTLS_E_LARGE_PACKET"><code class="literal">GNUTLS_E_LARGE_PACKET</code></a>. +Note that since 3.2.13 this function can be called under cork in DTLS +mode, and will refuse to send data over the MTU size by returning +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-LARGE-PACKET:CAPS" title="GNUTLS_E_LARGE_PACKET"><code class="literal">GNUTLS_E_LARGE_PACKET</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-send.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the data to send</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>is the length of the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-send.returns"></a><h4>Returns</h4> +<p> The number of bytes sent, or a negative error code. The +number of bytes sent might be less than <em class="parameter"><code>data_size</code></em> +. The maximum +number of bytes this function can send in a single call depends +on the negotiated maximum record size.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-send2"></a><h3>gnutls_record_send2 ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_send2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>, + <em class="parameter"><code><span class="type">size_t</span> pad</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function is identical to <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a> except that it +takes an extra argument to specify padding to be added the record. +To determine the maximum size of padding, use +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-max-size" title="gnutls_record_get_max_size ()"><code class="function">gnutls_record_get_max_size()</code></a> and <a class="link" href="gnutls-gnutls.html#gnutls-record-overhead-size" title="gnutls_record_overhead_size ()"><code class="function">gnutls_record_overhead_size()</code></a>.</p> +<p>Note that in order for GnuTLS to provide constant time processing +of padding and data in TLS1.3, the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-SAFE-PADDING-CHECK:CAPS"><code class="literal">GNUTLS_SAFE_PADDING_CHECK</code></a> +must be used in <a class="link" href="gnutls-gnutls.html#gnutls-init" title="gnutls_init ()"><code class="function">gnutls_init()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-send2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the data to send</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>is the length of the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pad</p></td> +<td class="parameter_description"><p>padding to be added to the record</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-send2.returns"></a><h4>Returns</h4> +<p> The number of bytes sent, or a negative error code. The +number of bytes sent might be less than <em class="parameter"><code>data_size</code></em> +. The maximum +number of bytes this function can send in a single call depends +on the negotiated maximum record size.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-send-range"></a><h3>gnutls_record_send_range ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_send_range (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-range-st" title="gnutls_range_st"><span class="type">gnutls_range_st</span></a> *range</code></em>);</pre> +<p>This function operates like <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a> but, while +<a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a> adds minimal padding to each TLS record, +this function uses the TLS extra-padding feature to conceal the real +data size within the range of lengths provided. +Some TLS sessions do not support extra padding (e.g. stream ciphers in standard +TLS or SSL3 sessions). To know whether the current session supports extra +padding, and hence length hiding, use the <a class="link" href="gnutls-gnutls.html#gnutls-record-can-use-length-hiding" title="gnutls_record_can_use_length_hiding ()"><code class="function">gnutls_record_can_use_length_hiding()</code></a> +function.</p> +<p>Note: This function currently is limited to blocking sockets.</p> +<div class="refsect3"> +<a name="gnutls-record-send-range.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the data to send.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>is the length of the data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>range</p></td> +<td class="parameter_description"><p>is the range of lengths in which the real data length must be hidden.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-send-range.returns"></a><h4>Returns</h4> +<p> The number of bytes sent (that is data_size in a successful invocation), +or a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-send-file"></a><h3>gnutls_record_send_file ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_send_file (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> fd</code></em>, + <em class="parameter"><code><span class="type">off_t</span> *offset</code></em>, + <em class="parameter"><code><span class="type">size_t</span> count</code></em>);</pre> +<p>This function sends data from <em class="parameter"><code>fd</code></em> +. If KTLS (kernel TLS) is enabled, it will +use the <code class="function">sendfile()</code> system call to avoid overhead of copying data between user +space and the kernel. Otherwise, this functionality is merely emulated by +calling <code class="function">read()</code> and <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a>. If this implementation is +suboptimal, check whether KTLS is enabled using +<code class="function">gnutls_transport_is_ktls_enabled()</code>.</p> +<p>If <em class="parameter"><code>offset</code></em> + is NULL then file offset is incremented by number of bytes send, +otherwise file offset remains unchanged.</p> +<div class="refsect3"> +<a name="gnutls-record-send-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>fd</p></td> +<td class="parameter_description"><p>file descriptor from which to read data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>offset</p></td> +<td class="parameter_description"><p>Is relative to file offset, denotes the starting location for +reading. after function returns, it point to position following +last read byte.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>count</p></td> +<td class="parameter_description"><p>is the length of the data in bytes to be read from file and send.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-send-file.returns"></a><h4>Returns</h4> +<p> The number of bytes sent, or a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-recv"></a><h3>gnutls_record_recv ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_recv (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +<p>This function has the similar semantics with <code class="function">recv()</code>. The only +difference is that it accepts a GnuTLS session, and uses different +error codes. +In the special case that the peer requests a renegotiation, the +caller will receive an error code of <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE"><code class="literal">GNUTLS_E_REHANDSHAKE</code></a>. In case +of a client, this message may be simply ignored, replied with an alert +<a class="link" href="gnutls-gnutls.html#GNUTLS-A-NO-RENEGOTIATION:CAPS"><code class="literal">GNUTLS_A_NO_RENEGOTIATION</code></a>, or replied with a new handshake, +depending on the client's will. A server receiving this error code +can only initiate a new handshake or terminate the session.</p> +<p>If <code class="literal">EINTR</code> is returned by the internal pull function (the default +is <code class="function">recv()</code>) then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> will be returned. If +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> is returned, you must +call this function again to get the data. See also +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-direction" title="gnutls_record_get_direction ()"><code class="function">gnutls_record_get_direction()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-recv.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the buffer that the data will be read into</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>the number of requested bytes</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-recv.returns"></a><h4>Returns</h4> +<p> The number of bytes received and zero on EOF (for stream +connections). A negative error code is returned in case of an error. +The number of bytes received might be less than the requested <em class="parameter"><code>data_size</code></em> +.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-recv-packet"></a><h3>gnutls_record_recv_packet ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_recv_packet (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-packet-t" title="gnutls_packet_t"><span class="type">gnutls_packet_t</span></a> *packet</code></em>);</pre> +<p>This is a lower-level function than <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> and allows +to directly receive the whole decrypted packet. That avoids a +memory copy, and is intended to be used by applications seeking high +performance.</p> +<p>The received packet is accessed using <a class="link" href="gnutls-gnutls.html#gnutls-packet-get" title="gnutls_packet_get ()"><code class="function">gnutls_packet_get()</code></a> and +must be deinitialized using <a class="link" href="gnutls-gnutls.html#gnutls-packet-deinit" title="gnutls_packet_deinit ()"><code class="function">gnutls_packet_deinit()</code></a>. The returned +packet will be <code class="literal">NULL</code> if the return value is zero (EOF).</p> +<div class="refsect3"> +<a name="gnutls-record-recv-packet.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>packet</p></td> +<td class="parameter_description"><p>the structure that will hold the packet data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-recv-packet.returns"></a><h4>Returns</h4> +<p> The number of bytes received and zero on EOF (for stream +connections). A negative error code is returned in case of an error.</p> +</div> +<p class="since">Since: 3.3.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-packet-get"></a><h3>gnutls_packet_get ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_packet_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-packet-t" title="gnutls_packet_t"><span class="type">gnutls_packet_t</span></a> packet</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code>unsigned <span class="type">char</span> *sequence</code></em>);</pre> +<p>This function returns the data and sequence number associated with +the received packet.</p> +<div class="refsect3"> +<a name="gnutls-packet-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>packet</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-packet-t" title="gnutls_packet_t"><span class="type">gnutls_packet_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>will contain the data present in the <em class="parameter"><code>packet</code></em> +structure (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>sequence</p></td> +<td class="parameter_description"><p>the 8-bytes of the packet sequence number (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.3.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-packet-deinit"></a><h3>gnutls_packet_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_packet_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-packet-t" title="gnutls_packet_t"><span class="type">gnutls_packet_t</span></a> packet</code></em>);</pre> +<p>This function will deinitialize all data associated with +the received packet.</p> +<div class="refsect3"> +<a name="gnutls-packet-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>packet</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_packet_st</span> structure.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.3.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-recv-seq"></a><h3>gnutls_record_recv_seq ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_recv_seq (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>, + <em class="parameter"><code>unsigned <span class="type">char</span> *seq</code></em>);</pre> +<p>This function is the same as <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a>, except that +it returns in addition to data, the sequence number of the data. +This is useful in DTLS where record packets might be received +out-of-order. The returned 8-byte sequence number is an +integer in big-endian format and should be +treated as a unique message identification.</p> +<div class="refsect3"> +<a name="gnutls-record-recv-seq.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the buffer that the data will be read into</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>the number of requested bytes</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seq</p></td> +<td class="parameter_description"><p>is the packet's 64-bit sequence number. Should have space for 8 bytes.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-recv-seq.returns"></a><h4>Returns</h4> +<p> The number of bytes received and zero on EOF. A negative +error code is returned in case of an error. The number of bytes +received might be less than <em class="parameter"><code>data_size</code></em> +.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-overhead-size"></a><h3>gnutls_record_overhead_size ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_record_overhead_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the size in bytes of the overhead +due to TLS (or DTLS) per record. On certain occasions +(e.g., CBC ciphers) the returned value is the maximum +possible overhead.</p> +<div class="refsect3"> +<a name="gnutls-record-overhead-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.2.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-est-record-overhead-size"></a><h3>gnutls_est_record_overhead_size ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_est_record_overhead_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-protocol-t" title="enum gnutls_protocol_t"><span class="type">gnutls_protocol_t</span></a> version</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> cipher</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t"><span class="type">gnutls_mac_algorithm_t</span></a> mac</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="type">gnutls_compression_method_t</span></a> comp</code></em>);</pre> +<p>This function will return the set size in bytes of the overhead +due to TLS (or DTLS) per record.</p> +<p>Note that this function may provide inaccurate values when TLS +extensions that modify the record format are negotiated. In these +cases a more accurate value can be obtained using <a class="link" href="gnutls-gnutls.html#gnutls-record-overhead-size" title="gnutls_record_overhead_size ()"><code class="function">gnutls_record_overhead_size()</code></a> +after a completed handshake.</p> +<div class="refsect3"> +<a name="gnutls-est-record-overhead-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>version</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-protocol-t" title="enum gnutls_protocol_t"><span class="type">gnutls_protocol_t</span></a> value</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cipher</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> value</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mac</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t"><span class="type">gnutls_mac_algorithm_t</span></a> value</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>comp</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="type">gnutls_compression_method_t</span></a> value (ignored)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.2.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-set-max-empty-records"></a><h3>gnutls_record_set_max_empty_records()</h3> +<pre class="programlisting">#define gnutls_record_set_max_empty_records(session, x) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-can-use-length-hiding"></a><h3>gnutls_record_can_use_length_hiding ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_record_can_use_length_hiding (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>If the session supports length-hiding padding, you can +invoke <a class="link" href="gnutls-gnutls.html#gnutls-record-send-range" title="gnutls_record_send_range ()"><code class="function">gnutls_record_send_range()</code></a> to send a message whose +length is hidden in the given range. If the session does not +support length hiding padding, you can use the standard +<a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a> function, or <a class="link" href="gnutls-gnutls.html#gnutls-record-send-range" title="gnutls_record_send_range ()"><code class="function">gnutls_record_send_range()</code></a> +making sure that the range is the same as the length of the +message you are trying to send.</p> +<div class="refsect3"> +<a name="gnutls-record-can-use-length-hiding.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-can-use-length-hiding.returns"></a><h4>Returns</h4> +<p> true (1) if the current session supports length-hiding +padding, false (0) if the current session does not.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-get-direction"></a><h3>gnutls_record_get_direction ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_record_get_direction (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function is useful to determine whether a GnuTLS function was interrupted +while sending or receiving, so that <code class="function">select()</code> or <code class="function">poll()</code> may be called appropriately.</p> +<p>It provides information about the internals of the record +protocol and is only useful if a prior gnutls function call, +e.g. <a class="link" href="gnutls-gnutls.html#gnutls-handshake" title="gnutls_handshake ()"><code class="function">gnutls_handshake()</code></a>, was interrupted and returned +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a>. After such an interrupt +applications may call <code class="function">select()</code> or <code class="function">poll()</code> before restoring the +interrupted GnuTLS function.</p> +<p>This function's output is unreliable if you are using the same +<em class="parameter"><code>session</code></em> + in different threads for sending and receiving.</p> +<div class="refsect3"> +<a name="gnutls-record-get-direction.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-get-direction.returns"></a><h4>Returns</h4> +<p> 0 if interrupted while trying to read data, or 1 while trying to write data.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-get-max-size"></a><h3>gnutls_record_get_max_size ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_record_get_max_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the record size. The maximum record size is negotiated by the +client after the first handshake message.</p> +<div class="refsect3"> +<a name="gnutls-record-get-max-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-get-max-size.returns"></a><h4>Returns</h4> +<p> The maximum record packet size in this connection.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-set-max-size"></a><h3>gnutls_record_set_max_size ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_set_max_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_record_set_max_size</code> is deprecated and should not be used in newly-written code.</p> +<p>if the client can assume that the 'record size limit' +extension is supported by the server, we recommend using +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-max-recv-size" title="gnutls_record_set_max_recv_size ()"><code class="function">gnutls_record_set_max_recv_size()</code></a> instead.</p> +</div> +<p>This function sets the maximum amount of plaintext sent and +received in a record in this connection.</p> +<p>Prior to 3.6.4, this function was implemented using a TLS extension +called 'max fragment length', which limits the acceptable values to +512(=2^9), 1024(=2^10), 2048(=2^11) and 4096(=2^12).</p> +<p>Since 3.6.4, the limit is also negotiated through a new TLS +extension called 'record size limit', which doesn't have the +limitation, as long as the value ranges between 512 and 16384. +Note that while the 'record size limit' extension is preferred, not +all TLS implementations use or even understand the extension.</p> +<div class="refsect3"> +<a name="gnutls-record-set-max-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>size</p></td> +<td class="parameter_description"><p>is the new size</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-set-max-size.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-set-max-recv-size"></a><h3>gnutls_record_set_max_recv_size ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_set_max_recv_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre> +<p>This function sets the maximum amount of plaintext received in a +record in this connection.</p> +<p>The limit is also negotiated through a TLS extension called 'record +size limit'. Note that while the 'record size limit' extension is +preferred, not all TLS implementations use or even understand the +extension.</p> +<div class="refsect3"> +<a name="gnutls-record-set-max-recv-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>size</p></td> +<td class="parameter_description"><p>is the new size</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-set-max-recv-size.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.6.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-check-pending"></a><h3>gnutls_record_check_pending ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_record_check_pending (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function checks if there are unread data +in the gnutls buffers. If the return value is +non-zero the next call to <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> +is guaranteed not to block.</p> +<div class="refsect3"> +<a name="gnutls-record-check-pending.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-check-pending.returns"></a><h4>Returns</h4> +<p> Returns the size of the data or zero.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-check-corked"></a><h3>gnutls_record_check_corked ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_record_check_corked (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function checks if there pending corked +data in the gnutls buffers --see <a class="link" href="gnutls-gnutls.html#gnutls-record-cork" title="gnutls_record_cork ()"><code class="function">gnutls_record_cork()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-check-corked.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-check-corked.returns"></a><h4>Returns</h4> +<p> Returns the size of the corked data or zero.</p> +</div> +<p class="since">Since: 3.2.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-get-max-early-data-size"></a><h3>gnutls_record_get_max_early_data_size ()</h3> +<pre class="programlisting"><span class="returnvalue">size_t</span> +gnutls_record_get_max_early_data_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function returns the maximum early data size in this connection. +This property can only be set to servers. The client may be +provided with the maximum allowed size through the "early_data" +extension of the NewSessionTicket handshake message.</p> +<div class="refsect3"> +<a name="gnutls-record-get-max-early-data-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-get-max-early-data-size.returns"></a><h4>Returns</h4> +<p> The maximum early data size in this connection.</p> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-set-max-early-data-size"></a><h3>gnutls_record_set_max_early_data_size ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_record_set_max_early_data_size (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre> +<p>This function sets the maximum early data size in this connection. +This property can only be set to servers. The client may be +provided with the maximum allowed size through the "early_data" +extension of the NewSessionTicket handshake message.</p> +<div class="refsect3"> +<a name="gnutls-record-set-max-early-data-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>size</p></td> +<td class="parameter_description"><p>is the new size</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-set-max-early-data-size.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.6.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-send-early-data"></a><h3>gnutls_record_send_early_data ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_send_early_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre> +<p>This function can be used by a client to send data early in the +handshake processes when resuming a session. This is used to +implement a zero-roundtrip (0-RTT) mode. It has the same semantics +as <a class="link" href="gnutls-gnutls.html#gnutls-record-send" title="gnutls_record_send ()"><code class="function">gnutls_record_send()</code></a>.</p> +<p>There may be a limit to the amount of data sent as early data. Use +<a class="link" href="gnutls-gnutls.html#gnutls-record-get-max-early-data-size" title="gnutls_record_get_max_early_data_size ()"><code class="function">gnutls_record_get_max_early_data_size()</code></a> to check the limit. If the +limit exceeds, this function returns +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECORD-LIMIT-REACHED:CAPS" title="GNUTLS_E_RECORD_LIMIT_REACHED"><code class="literal">GNUTLS_E_RECORD_LIMIT_REACHED</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-send-early-data.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the data to send</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>is the length of the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-send-early-data.returns"></a><h4>Returns</h4> +<p> The number of bytes sent, or a negative error code. The +number of bytes sent might be less than <em class="parameter"><code>data_size</code></em> +. The maximum +number of bytes this function can send in a single call depends +on the negotiated maximum record size.</p> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-recv-early-data"></a><h3>gnutls_record_recv_early_data ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +gnutls_record_recv_early_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +<p>This function can be used by a server to retrieve data sent early +in the handshake processes when resuming a session. This is used +to implement a zero-roundtrip (0-RTT) mode. It has the same +semantics as <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a>.</p> +<p>This function can be called either in a handshake hook, or after +the handshake is complete.</p> +<div class="refsect3"> +<a name="gnutls-record-recv-early-data.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the buffer that the data will be read into</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>the number of requested bytes</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-record-recv-early-data.returns"></a><h4>Returns</h4> +<p> The number of bytes received and zero when early data +reading is complete. A negative error code is returned in case of +an error. If no early data is received during the handshake, this +function returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a>. The +number of bytes received might be less than the requested +<em class="parameter"><code>data_size</code></em> +.</p> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-force-valid"></a><h3>gnutls_session_force_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_force_valid (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Clears the invalid flag in a session. That means +that sessions were corrupt or invalid data were received +can be re-used. Use only when debugging or experimenting +with the TLS protocol. Should not be used in typical +applications.</p> +<div class="refsect3"> +<a name="gnutls-session-force-valid.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-prf"></a><h3>gnutls_prf ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_prf (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> label_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *label</code></em>, + <em class="parameter"><code><span class="type">int</span> server_random_first</code></em>, + <em class="parameter"><code><span class="type">size_t</span> extra_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *extra</code></em>, + <em class="parameter"><code><span class="type">size_t</span> outsize</code></em>, + <em class="parameter"><code><span class="type">char</span> *out</code></em>);</pre> +<p>Applies the TLS Pseudo-Random-Function (PRF) on the master secret +and the provided data, seeded with the client and server random fields. +For the key expansion specified in RFC5705 see <a class="link" href="gnutls-gnutls.html#gnutls-prf-rfc5705" title="gnutls_prf_rfc5705 ()"><code class="function">gnutls_prf_rfc5705()</code></a>.</p> +<p>The <em class="parameter"><code>label</code></em> + variable usually contains a string denoting the purpose +for the generated data. The <em class="parameter"><code>server_random_first</code></em> + indicates whether +the client random field or the server random field should be first +in the seed. Non-zero indicates that the server random field is first, +0 that the client random field is first.</p> +<p>The <em class="parameter"><code>extra</code></em> + variable can be used to add more data to the seed, after +the random variables. It can be used to make sure the +generated output is strongly connected to some additional data +(e.g., a string used in user authentication).</p> +<p>The output is placed in <em class="parameter"><code>out</code></em> +, which must be pre-allocated.</p> +<p>Note: This function produces identical output with <a class="link" href="gnutls-gnutls.html#gnutls-prf-rfc5705" title="gnutls_prf_rfc5705 ()"><code class="function">gnutls_prf_rfc5705()</code></a> +when <em class="parameter"><code>server_random_first</code></em> + is set to 0 and <em class="parameter"><code>extra</code></em> + is <code class="literal">NULL</code>. Under TLS1.3 +this function will only operate when these conditions are true, or otherwise +return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-prf.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>label</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label</p></td> +<td class="parameter_description"><p>label used in PRF computation, typically a short string.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>server_random_first</p></td> +<td class="parameter_description"><p>non-zero if server random field should be first in seed</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>extra_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>extra</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>extra</p></td> +<td class="parameter_description"><p>optional extra data to seed the PRF with.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>outsize</p></td> +<td class="parameter_description"><p>size of pre-allocated output buffer to hold the output.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>pre-allocated buffer to hold the generated data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-prf.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-prf-rfc5705"></a><h3>gnutls_prf_rfc5705 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_prf_rfc5705 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> label_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *label</code></em>, + <em class="parameter"><code><span class="type">size_t</span> context_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *context</code></em>, + <em class="parameter"><code><span class="type">size_t</span> outsize</code></em>, + <em class="parameter"><code><span class="type">char</span> *out</code></em>);</pre> +<p>Exports keying material from TLS/DTLS session to an application, as +specified in RFC5705.</p> +<p>In the TLS versions prior to 1.3, it applies the TLS +Pseudo-Random-Function (PRF) on the master secret and the provided +data, seeded with the client and server random fields.</p> +<p>In TLS 1.3, it applies HKDF on the exporter master secret derived +from the master secret.</p> +<p>The <em class="parameter"><code>label</code></em> + variable usually contains a string denoting the purpose +for the generated data.</p> +<p>The <em class="parameter"><code>context</code></em> + variable can be used to add more data to the seed, after +the random variables. It can be used to make sure the +generated output is strongly connected to some additional data +(e.g., a string used in user authentication). </p> +<p>The output is placed in <em class="parameter"><code>out</code></em> +, which must be pre-allocated.</p> +<p>Note that, to provide the RFC5705 context, the <em class="parameter"><code>context</code></em> + variable +must be non-null.</p> +<div class="refsect3"> +<a name="gnutls-prf-rfc5705.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>label</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label</p></td> +<td class="parameter_description"><p>label used in PRF computation, typically a short string.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>context_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>extra</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>context</p></td> +<td class="parameter_description"><p>optional extra data to seed the PRF with.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>outsize</p></td> +<td class="parameter_description"><p>size of pre-allocated output buffer to hold the output.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>pre-allocated buffer to hold the generated data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-prf-rfc5705.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +<p class="since">Since: 3.4.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-prf-early"></a><h3>gnutls_prf_early ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_prf_early (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> label_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *label</code></em>, + <em class="parameter"><code><span class="type">size_t</span> context_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *context</code></em>, + <em class="parameter"><code><span class="type">size_t</span> outsize</code></em>, + <em class="parameter"><code><span class="type">char</span> *out</code></em>);</pre> +<p>This function is similar to <a class="link" href="gnutls-gnutls.html#gnutls-prf-rfc5705" title="gnutls_prf_rfc5705 ()"><code class="function">gnutls_prf_rfc5705()</code></a>, but only works in +TLS 1.3 or later to export early keying material.</p> +<p>Note that the keying material is only available after the +ClientHello message is processed and before the application traffic +keys are established. Therefore this function shall be called in a +handshake hook function for <a class="link" href="gnutls-gnutls.html#GNUTLS-HANDSHAKE-CLIENT-HELLO:CAPS"><code class="literal">GNUTLS_HANDSHAKE_CLIENT_HELLO</code></a>.</p> +<p>The <em class="parameter"><code>label</code></em> + variable usually contains a string denoting the purpose +for the generated data.</p> +<p>The <em class="parameter"><code>context</code></em> + variable can be used to add more data to the seed, after +the random variables. It can be used to make sure the +generated output is strongly connected to some additional data +(e.g., a string used in user authentication).</p> +<p>The output is placed in <em class="parameter"><code>out</code></em> +, which must be pre-allocated.</p> +<p>Note that, to provide the RFC5705 context, the <em class="parameter"><code>context</code></em> + variable +must be non-null.</p> +<div class="refsect3"> +<a name="gnutls-prf-early.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>label</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label</p></td> +<td class="parameter_description"><p>label used in PRF computation, typically a short string.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>context_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>extra</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>context</p></td> +<td class="parameter_description"><p>optional extra data to seed the PRF with.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>outsize</p></td> +<td class="parameter_description"><p>size of pre-allocated output buffer to hold the output.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>pre-allocated buffer to hold the generated data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-prf-early.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +<p class="since">Since: 3.6.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-prf-raw"></a><h3>gnutls_prf_raw ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_prf_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> label_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *label</code></em>, + <em class="parameter"><code><span class="type">size_t</span> seed_size</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *seed</code></em>, + <em class="parameter"><code><span class="type">size_t</span> outsize</code></em>, + <em class="parameter"><code><span class="type">char</span> *out</code></em>);</pre> +<p>Apply the TLS Pseudo-Random-Function (PRF) on the master secret +and the provided data.</p> +<p>The <em class="parameter"><code>label</code></em> + variable usually contains a string denoting the purpose +for the generated data. The <em class="parameter"><code>seed</code></em> + usually contains data such as the +client and server random, perhaps together with some additional +data that is added to guarantee uniqueness of the output for a +particular purpose.</p> +<p>Because the output is not guaranteed to be unique for a particular +session unless <em class="parameter"><code>seed</code></em> + includes the client random and server random +fields (the PRF would output the same data on another connection +resumed from the first one), it is not recommended to use this +function directly. The <a class="link" href="gnutls-gnutls.html#gnutls-prf" title="gnutls_prf ()"><code class="function">gnutls_prf()</code></a> function seeds the PRF with the +client and server random fields directly, and is recommended if you +want to generate pseudo random data unique for each session.</p> +<p>Note: This function will only operate under TLS versions prior to 1.3. +In TLS1.3 the use of PRF is replaced with HKDF and the generic +exporters like <a class="link" href="gnutls-gnutls.html#gnutls-prf-rfc5705" title="gnutls_prf_rfc5705 ()"><code class="function">gnutls_prf_rfc5705()</code></a> should be used instead. Under +TLS1.3 this function returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-prf-raw.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>label</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label</p></td> +<td class="parameter_description"><p>label used in PRF computation, typically a short string.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seed_size</p></td> +<td class="parameter_description"><p>length of the <em class="parameter"><code>seed</code></em> +variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seed</p></td> +<td class="parameter_description"><p>optional extra data to seed the PRF with.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>outsize</p></td> +<td class="parameter_description"><p>size of pre-allocated output buffer to hold the output.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>pre-allocated buffer to hold the generated data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-prf-raw.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-server-name-set"></a><h3>gnutls_server_name_set ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_server_name_set (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-server-name-type-t" title="enum gnutls_server_name_type_t"><span class="type">gnutls_server_name_type_t</span></a> type</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *name</code></em>, + <em class="parameter"><code><span class="type">size_t</span> name_length</code></em>);</pre> +<p>This function is to be used by clients that want to inform (via a +TLS extension mechanism) the server of the name they connected to. +This should be used by clients that connect to servers that do +virtual hosting.</p> +<p>The value of <em class="parameter"><code>name</code></em> + depends on the <em class="parameter"><code>type</code></em> + type. In case of +<a class="link" href="gnutls-gnutls.html#GNUTLS-NAME-DNS:CAPS"><code class="literal">GNUTLS_NAME_DNS</code></a>, a UTF-8 null-terminated domain name string, +without the trailing dot, is expected.</p> +<p>IPv4 or IPv6 addresses are not permitted to be set by this function. +If the function is called with a name of <em class="parameter"><code>name_length</code></em> + zero it will clear +all server names set.</p> +<div class="refsect3"> +<a name="gnutls-server-name-set.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>specifies the indicator type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>is a string that contains the server name.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>name_length</p></td> +<td class="parameter_description"><p>holds the length of name excluding the terminating null byte</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-server-name-set.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-server-name-get"></a><h3>gnutls_server_name_get ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_server_name_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *data_length</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *type</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> indx</code></em>);</pre> +<p>This function will allow you to get the name indication (if any), a +client has sent. The name indication may be any of the enumeration +gnutls_server_name_type_t.</p> +<p>If <em class="parameter"><code>type</code></em> + is GNUTLS_NAME_DNS, then this function is to be used by +servers that support virtual hosting, and the data will be a null +terminated IDNA ACE string (prior to GnuTLS 3.4.0 it was a UTF-8 string).</p> +<p>If <em class="parameter"><code>data</code></em> + has not enough size to hold the server name +GNUTLS_E_SHORT_MEMORY_BUFFER is returned, and <em class="parameter"><code>data_length</code></em> + will +hold the required size.</p> +<p><em class="parameter"><code>indx</code></em> + is used to retrieve more than one server names (if sent by +the client). The first server name has an index of 0, the second 1 +and so on. If no name with the given index exists +GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.</p> +<div class="refsect3"> +<a name="gnutls-server-name-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>will hold the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_length</p></td> +<td class="parameter_description"><p>will hold the data length. Must hold the maximum size of data.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>will hold the server name indicator type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>indx</p></td> +<td class="parameter_description"><p>is the index of the server_name</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-server-name-get.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, on UTF-8 +decoding error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-IDNA-ERROR:CAPS" title="GNUTLS_E_IDNA_ERROR"><code class="literal">GNUTLS_E_IDNA_ERROR</code></a> is returned, otherwise a negative +error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-heartbeat-get-timeout"></a><h3>gnutls_heartbeat_get_timeout ()</h3> +<pre class="programlisting">unsigned <span class="returnvalue">int</span> +gnutls_heartbeat_get_timeout (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the milliseconds remaining +for a retransmission of the previously sent ping +message. This function is useful when ping is used in +non-blocking mode, to estimate when to call <a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-ping" title="gnutls_heartbeat_ping ()"><code class="function">gnutls_heartbeat_ping()</code></a> +if no packets have been received.</p> +<div class="refsect3"> +<a name="gnutls-heartbeat-get-timeout.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-heartbeat-get-timeout.returns"></a><h4>Returns</h4> +<p> the remaining time in milliseconds.</p> +</div> +<p class="since">Since: 3.1.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-heartbeat-set-timeouts"></a><h3>gnutls_heartbeat_set_timeouts ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_heartbeat_set_timeouts (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> retrans_timeout</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> total_timeout</code></em>);</pre> +<p>This function will override the timeouts for the DTLS heartbeat +protocol. The retransmission timeout is the time after which a +message from the peer is not received, the previous request will +be retransmitted. The total timeout is the time after which the +handshake will be aborted with <a class="link" href="gnutls-gnutls.html#GNUTLS-E-TIMEDOUT:CAPS" title="GNUTLS_E_TIMEDOUT"><code class="literal">GNUTLS_E_TIMEDOUT</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-heartbeat-set-timeouts.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>retrans_timeout</p></td> +<td class="parameter_description"><p>The time at which a retransmission will occur in milliseconds</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>total_timeout</p></td> +<td class="parameter_description"><p>The time at which the connection will be aborted, in milliseconds.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-heartbeat-enable"></a><h3>gnutls_heartbeat_enable ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_heartbeat_enable (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> type</code></em>);</pre> +<p>If this function is called with the <a class="link" href="gnutls-gnutls.html#GNUTLS-HB-PEER-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_PEER_ALLOWED_TO_SEND"><code class="literal">GNUTLS_HB_PEER_ALLOWED_TO_SEND</code></a> +<em class="parameter"><code>type</code></em> +, GnuTLS will allow heartbeat messages to be received. Moreover it also +request the peer to accept heartbeat messages. This function +must be called prior to TLS handshake.</p> +<p>If the <em class="parameter"><code>type</code></em> + used is <a class="link" href="gnutls-gnutls.html#GNUTLS-HB-LOCAL-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_LOCAL_ALLOWED_TO_SEND"><code class="literal">GNUTLS_HB_LOCAL_ALLOWED_TO_SEND</code></a>, then the peer +will be asked to accept heartbeat messages but not send ones.</p> +<p>The function <a class="link" href="gnutls-gnutls.html#gnutls-heartbeat-allowed" title="gnutls_heartbeat_allowed ()"><code class="function">gnutls_heartbeat_allowed()</code></a> can be used to test Whether +locally generated heartbeat messages can be accepted by the peer.</p> +<div class="refsect3"> +<a name="gnutls-heartbeat-enable.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>one of the GNUTLS_HB_* flags</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-heartbeat-allowed"></a><h3>gnutls_heartbeat_allowed ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_heartbeat_allowed (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> type</code></em>);</pre> +<p>This function will check whether heartbeats are allowed +to be sent or received in this session.</p> +<div class="refsect3"> +<a name="gnutls-heartbeat-allowed.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>one of <a class="link" href="gnutls-gnutls.html#GNUTLS-HB-LOCAL-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_LOCAL_ALLOWED_TO_SEND"><code class="literal">GNUTLS_HB_LOCAL_ALLOWED_TO_SEND</code></a> and <a class="link" href="gnutls-gnutls.html#GNUTLS-HB-PEER-ALLOWED-TO-SEND:CAPS" title="GNUTLS_HB_PEER_ALLOWED_TO_SEND"><code class="literal">GNUTLS_HB_PEER_ALLOWED_TO_SEND</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-heartbeat-allowed.returns"></a><h4>Returns</h4> +<p> Non zero if heartbeats are allowed.</p> +</div> +<p class="since">Since: 3.1.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-safe-renegotiation-status"></a><h3>gnutls_safe_renegotiation_status ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_safe_renegotiation_status (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Can be used to check whether safe renegotiation is being used +in the current session.</p> +<div class="refsect3"> +<a name="gnutls-safe-renegotiation-status.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-safe-renegotiation-status.returns"></a><h4>Returns</h4> +<p> 0 when safe renegotiation is not used and non (0) when +safe renegotiation is used.</p> +</div> +<p class="since">Since: 2.10.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-ext-master-secret-status"></a><h3>gnutls_session_ext_master_secret_status ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_session_ext_master_secret_status + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the status of the extended master secret extension negotiation. +This is in accordance to RFC7627. That information is also +available to the more generic <a class="link" href="gnutls-gnutls.html#gnutls-session-get-flags" title="gnutls_session_get_flags ()"><code class="function">gnutls_session_get_flags()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-ext-master-secret-status.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-ext-master-secret-status.returns"></a><h4>Returns</h4> +<p> Non-zero if the negotiation was successful or zero otherwise.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-etm-status"></a><h3>gnutls_session_etm_status ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_session_etm_status (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the status of the encrypt-then-mac extension negotiation. +This is in accordance to rfc7366</p> +<div class="refsect3"> +<a name="gnutls-session-etm-status.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-etm-status.returns"></a><h4>Returns</h4> +<p> Non-zero if the negotiation was successful or zero otherwise.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-flags"></a><h3>gnutls_session_get_flags ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_session_get_flags (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return a series (ORed) of flags, applicable +for the current session.</p> +<p>This replaces individual informational functions such as +<a class="link" href="gnutls-gnutls.html#gnutls-safe-renegotiation-status" title="gnutls_safe_renegotiation_status ()"><code class="function">gnutls_safe_renegotiation_status()</code></a>, <a class="link" href="gnutls-gnutls.html#gnutls-session-ext-master-secret-status" title="gnutls_session_ext_master_secret_status ()"><code class="function">gnutls_session_ext_master_secret_status()</code></a>, +etc.</p> +<div class="refsect3"> +<a name="gnutls-session-get-flags.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-flags.returns"></a><h4>Returns</h4> +<p> An ORed sequence of flags (see <a class="link" href="gnutls-gnutls.html#gnutls-session-flags-t" title="enum gnutls_session_flags_t"><code class="literal">gnutls_session_flags_t</code></a>)</p> +</div> +<p class="since">Since: 3.5.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-ticket-key-generate"></a><h3>gnutls_session_ticket_key_generate ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_ticket_key_generate (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>);</pre> +<p>Generate a random key to encrypt security parameters within +SessionTicket.</p> +<div class="refsect3"> +<a name="gnutls-session-ticket-key-generate.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> which will contain a newly +created key.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-ticket-key-generate.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +<p class="since">Since: 2.10.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-ticket-enable-client"></a><h3>gnutls_session_ticket_enable_client ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_ticket_enable_client (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Request that the client should attempt session resumption using +SessionTicket. This call is typically unnecessary as session +tickets are enabled by default.</p> +<div class="refsect3"> +<a name="gnutls-session-ticket-enable-client.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-ticket-enable-client.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +<p class="since">Since: 2.10.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-ticket-enable-server"></a><h3>gnutls_session_ticket_enable_server ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_ticket_enable_server (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>);</pre> +<p>Request that the server should attempt session resumption using +session tickets, i.e., by delegating storage to the client. +<em class="parameter"><code>key</code></em> + must be initialized using <a class="link" href="gnutls-gnutls.html#gnutls-session-ticket-key-generate" title="gnutls_session_ticket_key_generate ()"><code class="function">gnutls_session_ticket_key_generate()</code></a>. +To avoid leaking that key, use <a class="link" href="gnutls-gnutls.html#gnutls-memset" title="gnutls_memset ()"><code class="function">gnutls_memset()</code></a> prior to +releasing it.</p> +<p>The default ticket expiration time can be overridden using +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-cache-expiration" title="gnutls_db_set_cache_expiration ()"><code class="function">gnutls_db_set_cache_expiration()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-ticket-enable-server.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>key to encrypt session parameters.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-ticket-enable-server.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +<p class="since">Since: 2.10.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-ticket-send"></a><h3>gnutls_session_ticket_send ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_ticket_send (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> nr</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>Sends a fresh session ticket to the peer. This is relevant only +in server side under TLS1.3. This function may also return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> +or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> and in that case it must be called again.</p> +<div class="refsect3"> +<a name="gnutls-session-ticket-send.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>nr</p></td> +<td class="parameter_description"><p>the number of tickets to send</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-ticket-send.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-set-profile"></a><h3>gnutls_srtp_set_profile ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_set_profile (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-srtp-profile-t" title="enum gnutls_srtp_profile_t"><span class="type">gnutls_srtp_profile_t</span></a> profile</code></em>);</pre> +<p>This function is to be used by both clients and servers, to declare +what SRTP profiles they support, to negotiate with the peer.</p> +<div class="refsect3"> +<a name="gnutls-srtp-set-profile.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>profile</p></td> +<td class="parameter_description"><p>is the profile id to add.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-set-profile.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-set-profile-direct"></a><h3>gnutls_srtp_set_profile_direct ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_set_profile_direct (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *profiles</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **err_pos</code></em>);</pre> +<p>This function is to be used by both clients and servers, to declare +what SRTP profiles they support, to negotiate with the peer.</p> +<div class="refsect3"> +<a name="gnutls-srtp-set-profile-direct.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>profiles</p></td> +<td class="parameter_description"><p>is a string that contains the supported SRTP profiles, +separated by colons.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err_pos</p></td> +<td class="parameter_description"><p>In case of an error this will have the position in the string the error occurred, may be NULL.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-set-profile-direct.returns"></a><h4>Returns</h4> +<p> On syntax error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> is returned, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-get-selected-profile"></a><h3>gnutls_srtp_get_selected_profile ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_get_selected_profile (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-srtp-profile-t" title="enum gnutls_srtp_profile_t"><span class="type">gnutls_srtp_profile_t</span></a> *profile</code></em>);</pre> +<p>This function allows you to get the negotiated SRTP profile.</p> +<div class="refsect3"> +<a name="gnutls-srtp-get-selected-profile.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>profile</p></td> +<td class="parameter_description"><p>will hold the profile</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-get-selected-profile.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-get-profile-name"></a><h3>gnutls_srtp_get_profile_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_srtp_get_profile_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-srtp-profile-t" title="enum gnutls_srtp_profile_t"><span class="type">gnutls_srtp_profile_t</span></a> profile</code></em>);</pre> +<p>This function allows you to get the corresponding name for a +SRTP protection profile.</p> +<div class="refsect3"> +<a name="gnutls-srtp-get-profile-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>profile</p></td> +<td class="parameter_description"><p>The profile to look up a string for</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-get-profile-name.returns"></a><h4>Returns</h4> +<p> On success, the name of a SRTP profile as a string, +otherwise NULL.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-get-profile-id"></a><h3>gnutls_srtp_get_profile_id ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_get_profile_id (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-srtp-profile-t" title="enum gnutls_srtp_profile_t"><span class="type">gnutls_srtp_profile_t</span></a> *profile</code></em>);</pre> +<p>This function allows you to look up a profile based on a string.</p> +<div class="refsect3"> +<a name="gnutls-srtp-get-profile-id.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>The name of the profile to look up</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>profile</p></td> +<td class="parameter_description"><p>Will hold the profile id</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-get-profile-id.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-get-keys"></a><h3>gnutls_srtp_get_keys ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_get_keys (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *key_material</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> key_material_size</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *client_key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *client_salt</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *server_key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *server_salt</code></em>);</pre> +<p>This is a helper function to generate the keying material for SRTP. +It requires the space of the key material to be pre-allocated (should be at least +2x the maximum key size and salt size). The <em class="parameter"><code>client_key</code></em> +, <em class="parameter"><code>client_salt</code></em> +, <em class="parameter"><code>server_key</code></em> + +and <em class="parameter"><code>server_salt</code></em> + are convenience datums that point inside the key material. They may +be <code class="literal">NULL</code>.</p> +<div class="refsect3"> +<a name="gnutls-srtp-get-keys.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_material</p></td> +<td class="parameter_description"><p>Space to hold the generated key material</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_material_size</p></td> +<td class="parameter_description"><p>The maximum size of the key material</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>client_key</p></td> +<td class="parameter_description"><p>The master client write key, pointing inside the key material</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>server_key</p></td> +<td class="parameter_description"><p>The master server write key, pointing inside the key material</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>client_salt</p></td> +<td class="parameter_description"><p>The master client write salt, pointing inside the key material</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>server_salt</p></td> +<td class="parameter_description"><p>The master server write salt, pointing inside the key material</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-get-keys.returns"></a><h4>Returns</h4> +<p> On success the size of the key material is returned, +otherwise, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the buffer given is not +sufficient, or a negative error code.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-set-mki"></a><h3>gnutls_srtp_set_mki ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_set_mki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *mki</code></em>);</pre> +<p>This function sets the Master Key Identifier, to be +used by this session (if any).</p> +<div class="refsect3"> +<a name="gnutls-srtp-set-mki.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mki</p></td> +<td class="parameter_description"><p>holds the MKI</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-set-mki.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-get-mki"></a><h3>gnutls_srtp_get_mki ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srtp_get_mki (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *mki</code></em>);</pre> +<p>This function exports the negotiated Master Key Identifier, +received by the peer if any. The returned value in <em class="parameter"><code>mki</code></em> + should be +treated as constant and valid only during the session's lifetime.</p> +<div class="refsect3"> +<a name="gnutls-srtp-get-mki.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mki</p></td> +<td class="parameter_description"><p>will hold the MKI</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srtp-get-mki.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.1.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-compress-certificate-get-selected-method"></a><h3>gnutls_compress_certificate_get_selected_method ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="returnvalue">gnutls_compression_method_t</span></a> +gnutls_compress_certificate_get_selected_method + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function returns the certificate compression method that has been +selected to compress the certificate before sending it to the peer. +The selection is done based on the local list of supported compression +methods and the peer's requested compression methods.</p> +<div class="refsect3"> +<a name="gnutls-compress-certificate-get-selected-method.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-compress-certificate-get-selected-method.returns"></a><h4>Returns</h4> +<p> selected certificate compression method.</p> +<p>Since 3.7.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-compress-certificate-set-methods"></a><h3>gnutls_compress_certificate_set_methods ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_compress_certificate_set_methods + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="type">gnutls_compression_method_t</span></a> *methods</code></em>, + <em class="parameter"><code><span class="type">size_t</span> methods_len</code></em>);</pre> +<p>This function sets the supported compression methods for certificate compression +for the given session. The list of supported compression methods will be used +for a) requesting the compression of peer's certificate and b) selecting the +method to compress the local certificate before sending it to the peer. +The order of compression methods inside the list does matter as the method +that appears earlier in the list will be preffered before the later ones. +Note that even if you set the list of supported compression methods, the +compression might not be used if the peer does not support any of your chosen +compression methods.</p> +<p>The list of supported compression methods must meet the following criteria: +Argument <em class="parameter"><code>methods</code></em> + must be an array of valid compression methods of type +<a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="type">gnutls_compression_method_t</span></a>. Argument <em class="parameter"><code>methods_len</code></em> + must contain the number of +compression methods stored in the <em class="parameter"><code>methods</code></em> + array and must be within range <1, 127>. +The length constraints are defined by <code class="literal">MIN_COMPRESS_CERTIFICATE_METHODS</code> +and <code class="literal">MAX_COMPRESS_CERTIFICATE_METHODS</code> macros located in the header file +compress_certificate.h.</p> +<p>If either <em class="parameter"><code>methods</code></em> + or <em class="parameter"><code>methods_len</code></em> + is equal to 0, current list of supported +compression methods will be unset.</p> +<div class="refsect3"> +<a name="gnutls-compress-certificate-set-methods.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>methods</p></td> +<td class="parameter_description"><p>is a list of supported compression methods.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>methods_len</p></td> +<td class="parameter_description"><p>number of compression methods in <em class="parameter"><code>methods</code></em> +</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-compress-certificate-set-methods.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +<p>Since 3.7.4</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alpn-get-selected-protocol"></a><h3>gnutls_alpn_get_selected_protocol ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_alpn_get_selected_protocol (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *protocol</code></em>);</pre> +<p>This function allows you to get the negotiated protocol name. The +returned protocol should be treated as opaque, constant value and +only valid during the session life.</p> +<p>The selected protocol is the first supported by the list sent +by the client.</p> +<div class="refsect3"> +<a name="gnutls-alpn-get-selected-protocol.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>protocol</p></td> +<td class="parameter_description"><p>will hold the protocol name</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alpn-get-selected-protocol.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.2.0</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alpn-set-protocols"></a><h3>gnutls_alpn_set_protocols ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_alpn_set_protocols (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *protocols</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> protocols_size</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function is to be used by both clients and servers, to declare +the supported ALPN protocols, which are used during negotiation with peer.</p> +<p>See <a class="link" href="gnutls-gnutls.html#gnutls-alpn-flags-t" title="enum gnutls_alpn_flags_t"><code class="literal">gnutls_alpn_flags_t</code></a> description for the documentation of available +flags.</p> +<div class="refsect3"> +<a name="gnutls-alpn-set-protocols.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>protocols</p></td> +<td class="parameter_description"><p>is the protocol names to add.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>protocols_size</p></td> +<td class="parameter_description"><p>the number of protocols to add.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>zero or a sequence of <a class="link" href="gnutls-gnutls.html#gnutls-alpn-flags-t" title="enum gnutls_alpn_flags_t"><code class="literal">gnutls_alpn_flags_t</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alpn-set-protocols.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +<p>Since 3.2.0</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-key-generate"></a><h3>gnutls_key_generate ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_key_generate (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> key_size</code></em>);</pre> +<p>Generates a random key of <em class="parameter"><code>key_size</code></em> + bytes.</p> +<div class="refsect3"> +<a name="gnutls-key-generate.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> which will contain a newly +created key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_size</p></td> +<td class="parameter_description"><p>the number of bytes of the key</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-key-generate.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-init"></a><h3>gnutls_priority_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> *priority_cache</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *priorities</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **err_pos</code></em>);</pre> +<p>For applications that do not modify their crypto settings per release, consider +using <a class="link" href="gnutls-gnutls.html#gnutls-priority-init2" title="gnutls_priority_init2 ()"><code class="function">gnutls_priority_init2()</code></a> with <a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-INIT-DEF-APPEND:CAPS" title="GNUTLS_PRIORITY_INIT_DEF_APPEND"><code class="literal">GNUTLS_PRIORITY_INIT_DEF_APPEND</code></a> flag +instead. We suggest to use centralized crypto settings handled by the GnuTLS +library, and applications modifying the default settings to their needs.</p> +<p>This function is identical to <a class="link" href="gnutls-gnutls.html#gnutls-priority-init2" title="gnutls_priority_init2 ()"><code class="function">gnutls_priority_init2()</code></a> with zero +flags.</p> +<p>A <code class="literal">NULL</code> <em class="parameter"><code>priorities</code></em> + string indicates the default priorities to be +used (this is available since GnuTLS 3.3.0).</p> +<div class="refsect3"> +<a name="gnutls-priority-init.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>priority_cache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>priorities</p></td> +<td class="parameter_description"><p>is a string describing priorities (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err_pos</p></td> +<td class="parameter_description"><p>In case of an error this will have the position in the string the error occurred</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-init.returns"></a><h4>Returns</h4> +<p> On syntax error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> is returned, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-init2"></a><h3>gnutls_priority_init2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_init2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> *priority_cache</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *priorities</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **err_pos</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>Sets priorities for the ciphers, key exchange methods, and macs. +The <em class="parameter"><code>priority_cache</code></em> + should be deinitialized +using <a class="link" href="gnutls-gnutls.html#gnutls-priority-deinit" title="gnutls_priority_deinit ()"><code class="function">gnutls_priority_deinit()</code></a>.</p> +<p>The <span class="type">priorities</span> option allows you to specify a colon +separated list of the cipher priorities to enable. +Some keywords are defined to provide quick access +to common preferences.</p> +<p>When <em class="parameter"><code>flags</code></em> + is set to <a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-INIT-DEF-APPEND:CAPS" title="GNUTLS_PRIORITY_INIT_DEF_APPEND"><code class="literal">GNUTLS_PRIORITY_INIT_DEF_APPEND</code></a> then the <em class="parameter"><code>priorities</code></em> + +specified will be appended to the default options.</p> +<p>Unless there is a special need, use the "NORMAL" keyword to +apply a reasonable security level, or "NORMAL:%<code class="literal">COMPAT</code>" for compatibility.</p> +<p>"PERFORMANCE" means all the "secure" ciphersuites are enabled, +limited to 128 bit ciphers and sorted by terms of speed +performance.</p> +<p>"LEGACY" the NORMAL settings for GnuTLS 3.2.x or earlier. There is +no verification profile set, and the allowed DH primes are considered +weak today.</p> +<p>"NORMAL" means all "secure" ciphersuites. The 256-bit ciphers are +included as a fallback only. The ciphers are sorted by security +margin.</p> +<p>"PFS" means all "secure" ciphersuites that support perfect forward secrecy. +The 256-bit ciphers are included as a fallback only. +The ciphers are sorted by security margin.</p> +<p>"SECURE128" means all "secure" ciphersuites of security level 128-bit +or more.</p> +<p>"SECURE192" means all "secure" ciphersuites of security level 192-bit +or more.</p> +<p>"SUITEB128" means all the NSA SuiteB ciphersuites with security level +of 128.</p> +<p>"SUITEB192" means all the NSA SuiteB ciphersuites with security level +of 192.</p> +<p>"NONE" means nothing is enabled. This disables everything, including protocols.</p> +<p>"@<em class="parameter"><code>KEYWORD1</code></em> +,KEYWORD2,..." The system administrator imposed settings. +The provided keyword(s) will be expanded from a configuration-time +provided file - default is: /etc/gnutls/config. +Any attributes that follow it, will be appended to the expanded +string. If multiple keywords are provided, separated by commas, +then the first keyword that exists in the configuration file +will be used. At least one of the keywords must exist, or this +function will return an error. Typical usage would be to specify +an application specified keyword first, followed by "SYSTEM" as +a default fallback. e.g., "<em class="parameter"><code>LIBVIRT</code></em> +,SYSTEM:!-VERS-SSL3.0" will +first try to find a config file entry matching "LIBVIRT", but if +that does not exist will use the entry for "SYSTEM". If "SYSTEM" +does not exist either, an error will be returned. In all cases, +the SSL3.0 protocol will be disabled. The system priority file +entries should be formatted as "KEYWORD=VALUE", e.g., +"SYSTEM=NORMAL:+ARCFOUR-128".</p> +<p>Special keywords are "!", "-" and "+". +"!" or "-" appended with an algorithm will remove this algorithm. +"+" appended with an algorithm will add this algorithm.</p> +<p>Check the GnuTLS manual section "Priority strings" for detailed +information.</p> +<p>Examples:</p> +<p>"NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL"</p> +<p>"NORMAL:+ARCFOUR-128" means normal ciphers plus ARCFOUR-128.</p> +<p>"SECURE128:-VERS-SSL3.0" means that only secure ciphers are +and enabled, SSL3.0 is disabled.</p> +<p>"NONE:+VERS-TLS-ALL:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL:+SIGN-RSA-SHA1",</p> +<p>"NONE:+VERS-TLS-ALL:+AES-128-CBC:+ECDHE-RSA:+SHA1:+COMP-NULL:+SIGN-RSA-SHA1:+CURVE-SECP256R1",</p> +<p>"SECURE256:+SECURE128",</p> +<p>Note that "NORMAL:%<code class="literal">COMPAT</code>" is the most compatible mode.</p> +<p>A <code class="literal">NULL</code> <em class="parameter"><code>priorities</code></em> + string indicates the default priorities to be +used (this is available since GnuTLS 3.3.0).</p> +<div class="refsect3"> +<a name="gnutls-priority-init2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>priority_cache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>priorities</p></td> +<td class="parameter_description"><p>is a string describing priorities (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err_pos</p></td> +<td class="parameter_description"><p>In case of an error this will have the position in the string the error occurred</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>zero or <a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-INIT-DEF-APPEND:CAPS" title="GNUTLS_PRIORITY_INIT_DEF_APPEND"><code class="literal">GNUTLS_PRIORITY_INIT_DEF_APPEND</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-init2.returns"></a><h4>Returns</h4> +<p> On syntax error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> is returned, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-deinit"></a><h3>gnutls_priority_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_priority_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> priority_cache</code></em>);</pre> +<p>Deinitializes the priority cache.</p> +<div class="refsect3"> +<a name="gnutls-priority-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>priority_cache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-get-cipher-suite-index"></a><h3>gnutls_priority_get_cipher_suite_index ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_get_cipher_suite_index + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> idx</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *sidx</code></em>);</pre> +<p>Provides the internal ciphersuite index to be used with +<code class="function">gnutls_cipher_suite_info()</code>. The index <em class="parameter"><code>idx</code></em> + provided is an +index kept at the priorities structure. It might be that a valid +priorities index does not correspond to a ciphersuite and in +that case <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNKNOWN-CIPHER-SUITE:CAPS" title="GNUTLS_E_UNKNOWN_CIPHER_SUITE"><code class="literal">GNUTLS_E_UNKNOWN_CIPHER_SUITE</code></a> will be returned. +Once the last available index is crossed then +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> will be returned.</p> +<div class="refsect3"> +<a name="gnutls-priority-get-cipher-suite-index.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>is an index number.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>sidx</p></td> +<td class="parameter_description"><p>internal index of cipher suite to get information about.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-get-cipher-suite-index.returns"></a><h4>Returns</h4> +<p> On success it returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0), or a negative error value otherwise.</p> +</div> +<p class="since">Since: 3.0.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-string-list"></a><h3>gnutls_priority_string_list ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_priority_string_list (<em class="parameter"><code><span class="type">unsigned </span> iter</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>Can be used to iterate all available priority strings. +Due to internal implementation details, there are cases where this +function can return the empty string. In that case that string should be ignored. +When no strings are available it returns <code class="literal">NULL</code>.</p> +<div class="refsect3"> +<a name="gnutls-priority-string-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>iter</p></td> +<td class="parameter_description"><p>an integer counter starting from zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>one of <a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-LIST-INIT-KEYWORDS:CAPS" title="GNUTLS_PRIORITY_LIST_INIT_KEYWORDS"><code class="literal">GNUTLS_PRIORITY_LIST_INIT_KEYWORDS</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-PRIORITY-LIST-SPECIAL:CAPS" title="GNUTLS_PRIORITY_LIST_SPECIAL"><code class="literal">GNUTLS_PRIORITY_LIST_SPECIAL</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-string-list.returns"></a><h4>Returns</h4> +<p> a priority string</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-set"></a><h3>gnutls_priority_set ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_set (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> priority</code></em>);</pre> +<p>Sets the priorities to use on the ciphers, key exchange methods, +and macs. Note that this function is expected to be called once +per session; when called multiple times (e.g., before a re-handshake, +the caller should make sure that any new settings are not incompatible +with the original session).</p> +<div class="refsect3"> +<a name="gnutls-priority-set.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>priority</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-set.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-set-direct"></a><h3>gnutls_priority_set_direct ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_set_direct (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *priorities</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **err_pos</code></em>);</pre> +<p>Sets the priorities to use on the ciphers, key exchange methods, +and macs. This function avoids keeping a +priority cache and is used to directly set string priorities to a +TLS session. For documentation check the <a class="link" href="gnutls-gnutls.html#gnutls-priority-init" title="gnutls_priority_init ()"><code class="function">gnutls_priority_init()</code></a>.</p> +<p>To use a reasonable default, consider using <a class="link" href="gnutls-gnutls.html#gnutls-set-default-priority" title="gnutls_set_default_priority ()"><code class="function">gnutls_set_default_priority()</code></a>, +or <a class="link" href="gnutls-gnutls.html#gnutls-set-default-priority-append" title="gnutls_set_default_priority_append ()"><code class="function">gnutls_set_default_priority_append()</code></a> instead of this function.</p> +<div class="refsect3"> +<a name="gnutls-priority-set-direct.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>priorities</p></td> +<td class="parameter_description"><p>is a string describing priorities</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err_pos</p></td> +<td class="parameter_description"><p>In case of an error this will have the position in the string the error occurred</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-set-direct.returns"></a><h4>Returns</h4> +<p> On syntax error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> is returned, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-certificate-type-list"></a><h3>gnutls_priority_certificate_type_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_certificate_type_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available certificate types in the priority +structure.</p> +<p>As of version 3.6.4 this function is an alias for +gnutls_priority_certificate_type_list2 with the target parameter +set to:</p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p>GNUTLS_CTYPE_SERVER, if the <code class="literal">SERVER_PRECEDENCE</code> option is set</p></li> +<li class="listitem"><p>GNUTLS_CTYPE_CLIENT, otherwise.</p></li> +</ul></div> +<div class="refsect3"> +<a name="gnutls-priority-certificate-type-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-certificate-type-list.returns"></a><h4>Returns</h4> +<p> the number of certificate types, or an error code.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-certificate-type-list2"></a><h3>gnutls_priority_certificate_type_list2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_certificate_type_list2 + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ctype-target-t" title="enum gnutls_ctype_target_t"><span class="type">gnutls_ctype_target_t</span></a> target</code></em>);</pre> +<p>Get a list of available certificate types for the given target +in the priority structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-certificate-type-list2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>target</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-ctype-target-t" title="enum gnutls_ctype_target_t"><span class="type">gnutls_ctype_target_t</span></a> type. Valid arguments are +GNUTLS_CTYPE_CLIENT and GNUTLS_CTYPE_SERVER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-certificate-type-list2.returns"></a><h4>Returns</h4> +<p> the number of certificate types, or an error code.</p> +</div> +<p class="since">Since: 3.6.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-sign-list"></a><h3>gnutls_priority_sign_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_sign_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available signature algorithms in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-sign-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-sign-list.returns"></a><h4>Returns</h4> +<p> the number of algorithms, or an error code.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-protocol-list"></a><h3>gnutls_priority_protocol_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_protocol_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available TLS version numbers in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-protocol-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-protocol-list.returns"></a><h4>Returns</h4> +<p> the number of protocols, or an error code.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-ecc-curve-list"></a><h3>gnutls_priority_ecc_curve_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_ecc_curve_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_priority_ecc_curve_list</code> is deprecated and should not be used in newly-written code.</p> +<p>This function has been replaced by +<a class="link" href="gnutls-gnutls.html#gnutls-priority-group-list" title="gnutls_priority_group_list ()"><code class="function">gnutls_priority_group_list()</code></a> since 3.6.0.</p> +</div> +<p>Get a list of available elliptic curves in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-ecc-curve-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-ecc-curve-list.returns"></a><h4>Returns</h4> +<p> the number of items, or an error code.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-group-list"></a><h3>gnutls_priority_group_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_group_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available groups in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-group-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-group-list.returns"></a><h4>Returns</h4> +<p> the number of items, or an error code.</p> +</div> +<p class="since">Since: 3.6.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-kx-list"></a><h3>gnutls_priority_kx_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_kx_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available key exchange methods in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-kx-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-kx-list.returns"></a><h4>Returns</h4> +<p> the number of items, or an error code.</p> +</div> +<p class="since">Since: 3.2.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-cipher-list"></a><h3>gnutls_priority_cipher_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_cipher_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available ciphers in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-cipher-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-cipher-list.returns"></a><h4>Returns</h4> +<p> the number of items, or an error code.</p> +</div> +<p class="since">Since: 3.2.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-mac-list"></a><h3>gnutls_priority_mac_list ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_priority_mac_list (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> pcache</code></em>, + <em class="parameter"><code>const unsigned <span class="type">int</span> **list</code></em>);</pre> +<p>Get a list of available MAC algorithms in the priority +structure.</p> +<div class="refsect3"> +<a name="gnutls-priority-mac-list.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>pcache</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-priority-t" title="gnutls_priority_t"><span class="type">gnutls_priority_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list</p></td> +<td class="parameter_description"><p>will point to an integer list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-priority-mac-list.returns"></a><h4>Returns</h4> +<p> the number of items, or an error code.</p> +</div> +<p class="since">Since: 3.2.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-get-system-config-file"></a><h3>gnutls_get_system_config_file ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_get_system_config_file (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Returns the filename of the system wide configuration +file to be loaded by the library.</p> +<div class="refsect3"> +<a name="gnutls-get-system-config-file.returns"></a><h4>Returns</h4> +<p> a constant pointer to the config file path</p> +</div> +<p class="since">Since: 3.6.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-set-default-priority"></a><h3>gnutls_set_default_priority ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_set_default_priority (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Sets the default priority on the ciphers, key exchange methods, +and macs. This is the recommended method of +setting the defaults, in order to promote consistency between applications +using GnuTLS, and to allow GnuTLS using applications to update settings +in par with the library. For client applications which require +maximum compatibility consider calling <code class="function">gnutls_session_enable_compatibility_mode()</code> +after this function.</p> +<p>For an application to specify additional options to priority string +consider using <a class="link" href="gnutls-gnutls.html#gnutls-set-default-priority-append" title="gnutls_set_default_priority_append ()"><code class="function">gnutls_set_default_priority_append()</code></a>.</p> +<p>To allow a user to override the defaults (e.g., when a user interface +or configuration file is available), the functions +<a class="link" href="gnutls-gnutls.html#gnutls-priority-set-direct" title="gnutls_priority_set_direct ()"><code class="function">gnutls_priority_set_direct()</code></a> or <a class="link" href="gnutls-gnutls.html#gnutls-priority-set" title="gnutls_priority_set ()"><code class="function">gnutls_priority_set()</code></a> can +be used.</p> +<div class="refsect3"> +<a name="gnutls-set-default-priority.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-set-default-priority.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +<p class="since">Since: 2.1.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-set-default-priority-append"></a><h3>gnutls_set_default_priority_append ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_set_default_priority_append (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *add_prio</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **err_pos</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>Sets the default priority on the ciphers, key exchange methods, +and macs with the additional options in <em class="parameter"><code>add_prio</code></em> +. This is the recommended method of +setting the defaults when only few additional options are to be added. This promotes +consistency between applications using GnuTLS, and allows GnuTLS using applications +to update settings in par with the library.</p> +<p>The <em class="parameter"><code>add_prio</code></em> + string should start as a normal priority string, e.g., +'-VERS-TLS-ALL:+VERS-TLS1.3:%<code class="literal">COMPAT</code>' or '%<code class="literal">FORCE_ETM</code>'. That is, it must not start +with ':'.</p> +<p>To allow a user to override the defaults (e.g., when a user interface +or configuration file is available), the functions +<a class="link" href="gnutls-gnutls.html#gnutls-priority-set-direct" title="gnutls_priority_set_direct ()"><code class="function">gnutls_priority_set_direct()</code></a> or <a class="link" href="gnutls-gnutls.html#gnutls-priority-set" title="gnutls_priority_set ()"><code class="function">gnutls_priority_set()</code></a> can +be used.</p> +<div class="refsect3"> +<a name="gnutls-set-default-priority-append.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>add_prio</p></td> +<td class="parameter_description"><p>is a string describing priorities to be appended to default</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err_pos</p></td> +<td class="parameter_description"><p>In case of an error this will have the position in the string the error occurred</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-set-default-priority-append.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-cipher-suite-get-name"></a><h3>gnutls_cipher_suite_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_cipher_suite_get_name (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-kx-algorithm-t" title="enum gnutls_kx_algorithm_t"><span class="type">gnutls_kx_algorithm_t</span></a> kx_algorithm</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> cipher_algorithm</code></em>);</pre> +<p>This function returns the ciphersuite name under TLS1.2 or earlier +versions when provided with individual algorithms. The full cipher suite +name must be prepended by TLS or SSL depending of the protocol in use.</p> +<p>To get a description of the current ciphersuite across versions, it +is recommended to use <a class="link" href="gnutls-gnutls.html#gnutls-session-get-desc" title="gnutls_session_get_desc ()"><code class="function">gnutls_session_get_desc()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-cipher-suite-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>kx_algorithm</p></td> +<td class="parameter_description"><p>is a Key exchange algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cipher_algorithm</p></td> +<td class="parameter_description"><p>is a cipher algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mac_algorithm</p></td> +<td class="parameter_description"><p>is a MAC algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-cipher-suite-get-name.returns"></a><h4>Returns</h4> +<p> a string that contains the name of a TLS cipher suite, +specified by the given algorithms, or <code class="literal">NULL</code>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-protocol-get-name"></a><h3>gnutls_protocol_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_protocol_get_name ();</pre> +<p>Convert a <a class="link" href="gnutls-gnutls.html#gnutls-protocol-t" title="enum gnutls_protocol_t"><span class="type">gnutls_protocol_t</span></a> value to a string.</p> +<div class="refsect3"> +<a name="gnutls-protocol-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>version</p></td> +<td class="parameter_description"><p>is a (gnutls) version number</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-protocol-get-name.returns"></a><h4>Returns</h4> +<p> a string that contains the name of the specified TLS +version (e.g., "TLS1.0"), or <code class="literal">NULL</code>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-data"></a><h3>gnutls_session_get_data ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_get_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *session_data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *session_data_size</code></em>);</pre> +<p>Returns all session parameters needed to be stored to support resumption, +in a pre-allocated buffer.</p> +<p>See <a class="link" href="gnutls-gnutls.html#gnutls-session-get-data2" title="gnutls_session_get_data2 ()"><code class="function">gnutls_session_get_data2()</code></a> for more information.</p> +<div class="refsect3"> +<a name="gnutls-session-get-data.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_data</p></td> +<td class="parameter_description"><p>is a pointer to space to hold the session.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_data_size</p></td> +<td class="parameter_description"><p>is the session_data's size, or it will be set by the function.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-data.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-data2"></a><h3>gnutls_session_get_data2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_get_data2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre> +<p>Returns necessary parameters to support resumption. The client +should call this function and store the returned session data. A session +can be resumed later by calling <code class="function">gnutls_session_set_data()</code> with the returned +data. Note that under TLS 1.3, it is recommended for clients to use +session parameters only once, to prevent passive-observers from correlating +the different connections.</p> +<p>The returned <em class="parameter"><code>data</code></em> + are allocated and must be released using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> +<p>This function will fail if called prior to handshake completion. In +case of false start TLS, the handshake completes only after data have +been successfully received from the peer.</p> +<p>Under TLS1.3 session resumption is possible only after a session ticket +is received by the client. To ensure that such a ticket has been received use +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-flags" title="gnutls_session_get_flags ()"><code class="function">gnutls_session_get_flags()</code></a> and check for flag <a class="link" href="gnutls-gnutls.html#GNUTLS-SFLAGS-SESSION-TICKET:CAPS"><code class="literal">GNUTLS_SFLAGS_SESSION_TICKET</code></a>; +if this flag is not set, this function will wait for a new ticket within +an estimated roundtrip, and if not received will return dummy data which +cannot lead to resumption.</p> +<p>To get notified when new tickets are received by the server +use <a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-hook-function" title="gnutls_handshake_set_hook_function ()"><code class="function">gnutls_handshake_set_hook_function()</code></a> to wait for <a class="link" href="gnutls-gnutls.html#GNUTLS-HANDSHAKE-NEW-SESSION-TICKET:CAPS"><code class="literal">GNUTLS_HANDSHAKE_NEW_SESSION_TICKET</code></a> +messages. Each call of <a class="link" href="gnutls-gnutls.html#gnutls-session-get-data2" title="gnutls_session_get_data2 ()"><code class="function">gnutls_session_get_data2()</code></a> after a ticket is +received, will return session resumption data corresponding to the last +received ticket.</p> +<p>Note that this function under TLS1.3 requires a callback to be set with +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-timeout-function" title="gnutls_transport_set_pull_timeout_function ()"><code class="function">gnutls_transport_set_pull_timeout_function()</code></a> for successful operation. There +was a bug before 3.6.10 which could make this function fail if that callback +was not set. On later versions if not set, the function will return a successful +error code, but will return dummy data that cannot lead to a resumption.</p> +<div class="refsect3"> +<a name="gnutls-session-get-data2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>is a pointer to a datum that will hold the session.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-data2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-random"></a><h3>gnutls_session_get_random ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_get_random (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *client</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *server</code></em>);</pre> +<p>This function returns pointers to the client and server +random fields used in the TLS handshake. The pointers are +not to be modified or deallocated.</p> +<p>If a client random value has not yet been established, the output +will be garbage.</p> +<div class="refsect3"> +<a name="gnutls-session-get-random.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>client</p></td> +<td class="parameter_description"><p>the client part of the random</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>server</p></td> +<td class="parameter_description"><p>the server part of the random</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-master-secret"></a><h3>gnutls_session_get_master_secret ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_get_master_secret (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *secret</code></em>);</pre> +<p>This function returns pointers to the master secret +used in the TLS session. The pointers are not to be modified or deallocated.</p> +<p>This function is only applicable under TLS 1.2 or earlier versions.</p> +<div class="refsect3"> +<a name="gnutls-session-get-master-secret.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secret</p></td> +<td class="parameter_description"><p>the session's master secret</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.5.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-desc"></a><h3>gnutls_session_get_desc ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> * +gnutls_session_get_desc (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function returns a string describing the current session. +The string is null terminated and allocated using <code class="function">gnutls_malloc()</code>.</p> +<p>If initial negotiation is not complete when this function is called, +<code class="literal">NULL</code> will be returned.</p> +<div class="refsect3"> +<a name="gnutls-session-get-desc.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-desc.returns"></a><h4>Returns</h4> +<p> a description of the protocols and algorithms in the current session.</p> +</div> +<p class="since">Since: 3.1.10</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-verify-function"></a><h3>gnutls_session_set_verify_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_set_verify_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">gnutls_certificate_verify_function</span> *func</code></em>);</pre> +<p>This function sets a callback to be called when peer's certificate +has been received in order to verify it on receipt rather than +doing after the handshake is completed. This overrides any callback +set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-function" title="gnutls_certificate_set_verify_function ()"><code class="function">gnutls_certificate_set_verify_function()</code></a>.</p> +<p>The callback's function prototype is: +int (*callback)(gnutls_session_t);</p> +<p>If the callback function is provided then gnutls will call it, in the +handshake, just after the certificate message has been received. +To verify or obtain the certificate the <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-get" title="gnutls_certificate_type_get ()"><code class="function">gnutls_certificate_type_get()</code></a>, <a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-peers" title="gnutls_certificate_get_peers ()"><code class="function">gnutls_certificate_get_peers()</code></a> functions +can be used.</p> +<p>The callback function should return 0 for the handshake to continue +or non-zero to terminate.</p> +<div class="refsect3"> +<a name="gnutls-session-set-verify-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-verify-cert"></a><h3>gnutls_session_set_verify_cert ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_set_verify_cert (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *hostname</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function instructs GnuTLS to verify the peer's certificate +using the provided hostname. If the verification fails the handshake +will also fail with <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-VERIFICATION-ERROR:CAPS" title="GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR"><code class="literal">GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR</code></a>. In that +case the verification result can be obtained using <a class="link" href="gnutls-gnutls.html#gnutls-session-get-verify-cert-status" title="gnutls_session_get_verify_cert_status ()"><code class="function">gnutls_session_get_verify_cert_status()</code></a>.</p> +<p>The <em class="parameter"><code>hostname</code></em> + pointer provided must remain valid for the lifetime +of the session. More precisely it should be available during any subsequent +handshakes. If no hostname is provided, no hostname verification +will be performed. For a more advanced verification function check +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-cert2" title="gnutls_session_set_verify_cert2 ()"><code class="function">gnutls_session_set_verify_cert2()</code></a>.</p> +<p>If <em class="parameter"><code>flags</code></em> + is provided which contain a profile, this function should be +called after any session priority setting functions.</p> +<p>The <a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-cert" title="gnutls_session_set_verify_cert ()"><code class="function">gnutls_session_set_verify_cert()</code></a> function is intended to be used by TLS +clients to verify the server's certificate.</p> +<div class="refsect3"> +<a name="gnutls-session-set-verify-cert.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>hostname</p></td> +<td class="parameter_description"><p>is the expected name of the peer; may be <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>flags for certificate verification -- <a class="link" href="gnutls-x509.html#gnutls-certificate-verify-flags" title="enum gnutls_certificate_verify_flags"><span class="type">gnutls_certificate_verify_flags</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-verify-cert2"></a><h3>gnutls_session_set_verify_cert2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_set_verify_cert2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-typed-vdata-st" title="gnutls_typed_vdata_st"><span class="type">gnutls_typed_vdata_st</span></a> *data</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> elements</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function instructs GnuTLS to verify the peer's certificate +using the provided typed data information. If the verification fails the handshake +will also fail with <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-VERIFICATION-ERROR:CAPS" title="GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR"><code class="literal">GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR</code></a>. In that +case the verification result can be obtained using <a class="link" href="gnutls-gnutls.html#gnutls-session-get-verify-cert-status" title="gnutls_session_get_verify_cert_status ()"><code class="function">gnutls_session_get_verify_cert_status()</code></a>.</p> +<p>The acceptable typed data are the same as in <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers" title="gnutls_certificate_verify_peers ()"><code class="function">gnutls_certificate_verify_peers()</code></a>, +and once set must remain valid for the lifetime of the session. More precisely +they should be available during any subsequent handshakes.</p> +<p>If <em class="parameter"><code>flags</code></em> + is provided which contain a profile, this function should be +called after any session priority setting functions.</p> +<div class="refsect3"> +<a name="gnutls-session-set-verify-cert2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>an array of typed data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>elements</p></td> +<td class="parameter_description"><p>the number of data elements</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>flags for certificate verification -- <a class="link" href="gnutls-x509.html#gnutls-certificate-verify-flags" title="enum gnutls_certificate_verify_flags"><span class="type">gnutls_certificate_verify_flags</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-verify-cert-status"></a><h3>gnutls_session_get_verify_cert_status ()</h3> +<pre class="programlisting">unsigned <span class="returnvalue">int</span> +gnutls_session_get_verify_cert_status (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> Param1</code></em>);</pre> +<p>This function returns the status of the verification when initiated +via auto-verification, i.e., by <a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-cert2" title="gnutls_session_set_verify_cert2 ()"><code class="function">gnutls_session_set_verify_cert2()</code></a> or +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-verify-cert" title="gnutls_session_set_verify_cert ()"><code class="function">gnutls_session_set_verify_cert()</code></a>. If no certificate verification +was occurred then the return value would be set to ((unsigned int)-1).</p> +<p>The certificate verification status is the same as in <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers" title="gnutls_certificate_verify_peers ()"><code class="function">gnutls_certificate_verify_peers()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-get-verify-cert-status.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-verify-cert-status.returns"></a><h4>Returns</h4> +<p> the certificate verification status.</p> +</div> +<p class="since">Since: 3.4.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-premaster"></a><h3>gnutls_session_set_premaster ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_set_premaster (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> entity</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-protocol-t" title="enum gnutls_protocol_t"><span class="type">gnutls_protocol_t</span></a> version</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-kx-algorithm-t" title="enum gnutls_kx_algorithm_t"><span class="type">gnutls_kx_algorithm_t</span></a> kx</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-cipher-algorithm-t" title="enum gnutls_cipher_algorithm_t"><span class="type">gnutls_cipher_algorithm_t</span></a> cipher</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-mac-algorithm-t" title="enum gnutls_mac_algorithm_t"><span class="type">gnutls_mac_algorithm_t</span></a> mac</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-compression-method-t" title="enum gnutls_compression_method_t"><span class="type">gnutls_compression_method_t</span></a> comp</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *master</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *session_id</code></em>);</pre> +<p>This function sets the premaster secret in a session. This is +a function intended for exceptional uses. Do not use this +function unless you are implementing a legacy protocol. +Use <code class="function">gnutls_session_set_data()</code> instead.</p> +<div class="refsect3"> +<a name="gnutls-session-set-premaster.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>entity</p></td> +<td class="parameter_description"><p>GNUTLS_SERVER or GNUTLS_CLIENT</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>version</p></td> +<td class="parameter_description"><p>the TLS protocol version</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>kx</p></td> +<td class="parameter_description"><p>the key exchange method</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cipher</p></td> +<td class="parameter_description"><p>the cipher</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>mac</p></td> +<td class="parameter_description"><p>the MAC algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>comp</p></td> +<td class="parameter_description"><p>the compression method (ignored)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>master</p></td> +<td class="parameter_description"><p>the master key to use</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_id</p></td> +<td class="parameter_description"><p>the session identifier</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-set-premaster.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-id"></a><h3>gnutls_session_get_id ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_get_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *session_id</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *session_id_size</code></em>);</pre> +<p>Returns the TLS session identifier. The session ID is selected by the +server, and in older versions of TLS was a unique identifier shared +between client and server which was persistent across resumption. +In the latest version of TLS (1.3) or TLS with session tickets, the +notion of session identifiers is undefined and cannot be relied for uniquely +identifying sessions across client and server.</p> +<p>In client side this function returns the identifier returned by the +server, and cannot be assumed to have any relation to session resumption. +In server side this function is guaranteed to return a persistent +identifier of the session since GnuTLS 3.6.4, which may not necessarily +map into the TLS session ID value. Prior to that version the value +could only be considered a persistent identifier, under TLS1.2 or earlier +and when no session tickets were in use.</p> +<p>The session identifier value returned is always less than +<a class="link" href="gnutls-gnutls.html#GNUTLS-MAX-SESSION-ID-SIZE:CAPS" title="GNUTLS_MAX_SESSION_ID_SIZE"><code class="literal">GNUTLS_MAX_SESSION_ID_SIZE</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-get-id.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_id</p></td> +<td class="parameter_description"><p>is a pointer to space to hold the session id.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_id_size</p></td> +<td class="parameter_description"><p>initially should contain the maximum <em class="parameter"><code>session_id</code></em> +size and will be updated.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-id.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-id2"></a><h3>gnutls_session_get_id2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_get_id2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *session_id</code></em>);</pre> +<p>Returns the TLS session identifier. The session ID is selected by the +server, and in older versions of TLS was a unique identifier shared +between client and server which was persistent across resumption. +In the latest version of TLS (1.3) or TLS 1.2 with session tickets, the +notion of session identifiers is undefined and cannot be relied for uniquely +identifying sessions across client and server.</p> +<p>In client side this function returns the identifier returned by the +server, and cannot be assumed to have any relation to session resumption. +In server side this function is guaranteed to return a persistent +identifier of the session since GnuTLS 3.6.4, which may not necessarily +map into the TLS session ID value. Prior to that version the value +could only be considered a persistent identifier, under TLS1.2 or earlier +and when no session tickets were in use.</p> +<p>The session identifier value returned is always less than +<a class="link" href="gnutls-gnutls.html#GNUTLS-MAX-SESSION-ID-SIZE:CAPS" title="GNUTLS_MAX_SESSION_ID_SIZE"><code class="literal">GNUTLS_MAX_SESSION_ID_SIZE</code></a> and should be treated as constant.</p> +<div class="refsect3"> +<a name="gnutls-session-get-id2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_id</p></td> +<td class="parameter_description"><p>will point to the session ID.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-id2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 3.1.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-id"></a><h3>gnutls_session_set_id ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_set_id (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *sid</code></em>);</pre> +<p>This function sets the session ID to be used in a client hello. +This is a function intended for exceptional uses. Do not use this +function unless you are implementing a custom protocol.</p> +<p>To set session resumption parameters use <code class="function">gnutls_session_set_data()</code> instead.</p> +<div class="refsect3"> +<a name="gnutls-session-set-id.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>sid</p></td> +<td class="parameter_description"><p>the session identifier</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-set-id.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 3.2.1</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-channel-binding"></a><h3>gnutls_session_channel_binding ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_channel_binding (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-channel-binding-t" title="enum gnutls_channel_binding_t"><span class="type">gnutls_channel_binding_t</span></a> cbtype</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cb</code></em>);</pre> +<p>Extract given channel binding data of the <em class="parameter"><code>cbtype</code></em> + (e.g., +<a class="link" href="gnutls-gnutls.html#GNUTLS-CB-TLS-UNIQUE:CAPS"><code class="literal">GNUTLS_CB_TLS_UNIQUE</code></a>) type.</p> +<div class="refsect3"> +<a name="gnutls-session-channel-binding.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cbtype</p></td> +<td class="parameter_description"><p>an <a class="link" href="gnutls-gnutls.html#gnutls-channel-binding-t" title="enum gnutls_channel_binding_t"><span class="type">gnutls_channel_binding_t</span></a> enumeration type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cb</p></td> +<td class="parameter_description"><p>output buffer array with data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-channel-binding.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE"><code class="literal">GNUTLS_E_UNIMPLEMENTED_FEATURE</code></a> if the <em class="parameter"><code>cbtype</code></em> +is unsupported, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-CHANNEL-BINDING-NOT-AVAILABLE:CAPS" title="GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE"><code class="literal">GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE</code></a> if the data is not +currently available, or an error code.</p> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-is-resumed"></a><h3>gnutls_session_is_resumed ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_is_resumed (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Checks whether session is resumed or not. This is functional +for both server and client side.</p> +<div class="refsect3"> +<a name="gnutls-session-is-resumed.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-is-resumed.returns"></a><h4>Returns</h4> +<p> non zero if this session is resumed, or a zero if this is +a new session.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-resumption-requested"></a><h3>gnutls_session_resumption_requested ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_resumption_requested (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Check whether the client has asked for session resumption. +This function is valid only on server side.</p> +<div class="refsect3"> +<a name="gnutls-session-resumption-requested.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-resumption-requested.returns"></a><h4>Returns</h4> +<p> non zero if session resumption was asked, or a zero if not.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-store-func"></a><h3>gnutls_db_store_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_db_store_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *Param1</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> data</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-remove-func"></a><h3>gnutls_db_remove_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_db_remove_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *Param1</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> key</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-retr-func"></a><h3>gnutls_db_retr_func ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="returnvalue">gnutls_datum_t</span></a> +<span class="c_punctuation">(</span>*gnutls_db_retr_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *Param1</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> key</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-set-cache-expiration"></a><h3>gnutls_db_set_cache_expiration ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_db_set_cache_expiration (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> seconds</code></em>);</pre> +<p>Set the expiration time for resumed sessions. The default is 21600 +(6 hours) at the time of writing.</p> +<p>The maximum value that can be set using this function is 604800 +(7 days).</p> +<div class="refsect3"> +<a name="gnutls-db-set-cache-expiration.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seconds</p></td> +<td class="parameter_description"><p>is the number of seconds.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-get-default-cache-expiration"></a><h3>gnutls_db_get_default_cache_expiration ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_db_get_default_cache_expiration + (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Returns the expiration time (in seconds) of stored sessions for resumption.</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-remove-session"></a><h3>gnutls_db_remove_session ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_db_remove_session (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will remove the current session data from the +session database. This will prevent future handshakes reusing +these session data. This function should be called if a session +was terminated abnormally, and before <a class="link" href="gnutls-gnutls.html#gnutls-deinit" title="gnutls_deinit ()"><code class="function">gnutls_deinit()</code></a> is called.</p> +<p>Normally <a class="link" href="gnutls-gnutls.html#gnutls-deinit" title="gnutls_deinit ()"><code class="function">gnutls_deinit()</code></a> will remove abnormally terminated +sessions.</p> +<div class="refsect3"> +<a name="gnutls-db-remove-session.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-set-retrieve-function"></a><h3>gnutls_db_set_retrieve_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_db_set_retrieve_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-db-retr-func" title="gnutls_db_retr_func ()"><span class="type">gnutls_db_retr_func</span></a> retr_func</code></em>);</pre> +<p>Sets the function that will be used to retrieve data from the +resumed sessions database. This function must return a +gnutls_datum_t containing the data on success, or a gnutls_datum_t +containing null and 0 on failure.</p> +<p>The datum's data must be allocated using the function +<code class="function">gnutls_malloc()</code>.</p> +<p>The first argument to <em class="parameter"><code>retr_func</code></em> + will be null unless +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-ptr" title="gnutls_db_set_ptr ()"><code class="function">gnutls_db_set_ptr()</code></a> has been called.</p> +<div class="refsect3"> +<a name="gnutls-db-set-retrieve-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>retr_func</p></td> +<td class="parameter_description"><p>is the function.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-set-remove-function"></a><h3>gnutls_db_set_remove_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_db_set_remove_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-db-remove-func" title="gnutls_db_remove_func ()"><span class="type">gnutls_db_remove_func</span></a> rem_func</code></em>);</pre> +<p>Sets the function that will be used to remove data from the +resumed sessions database. This function must return 0 on success.</p> +<p>The first argument to <em class="parameter"><code>rem_func</code></em> + will be null unless +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-ptr" title="gnutls_db_set_ptr ()"><code class="function">gnutls_db_set_ptr()</code></a> has been called.</p> +<div class="refsect3"> +<a name="gnutls-db-set-remove-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>rem_func</p></td> +<td class="parameter_description"><p>is the function.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-set-store-function"></a><h3>gnutls_db_set_store_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_db_set_store_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-db-store-func" title="gnutls_db_store_func ()"><span class="type">gnutls_db_store_func</span></a> store_func</code></em>);</pre> +<p>Sets the function that will be used to store data in the resumed +sessions database. This function must return 0 on success.</p> +<p>The first argument to <em class="parameter"><code>store_func</code></em> + will be null unless +<a class="link" href="gnutls-gnutls.html#gnutls-db-set-ptr" title="gnutls_db_set_ptr ()"><code class="function">gnutls_db_set_ptr()</code></a> has been called.</p> +<div class="refsect3"> +<a name="gnutls-db-set-store-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>store_func</p></td> +<td class="parameter_description"><p>is the function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-set-ptr"></a><h3>gnutls_db_set_ptr ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_db_set_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre> +<p>Sets the pointer that will be provided to db store, retrieve and +delete functions, as the first argument.</p> +<div class="refsect3"> +<a name="gnutls-db-set-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>is the pointer</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-get-ptr"></a><h3>gnutls_db_get_ptr ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +gnutls_db_get_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get db function pointer.</p> +<div class="refsect3"> +<a name="gnutls-db-get-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-db-get-ptr.returns"></a><h4>Returns</h4> +<p> the pointer that will be sent to db store, retrieve and +delete functions, as the first argument.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-check-entry"></a><h3>gnutls_db_check_entry ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_db_check_entry (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> session_entry</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_db_check_entry</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is deprecated.</p> +</div> +<p>This function has no effect.</p> +<div class="refsect3"> +<a name="gnutls-db-check-entry.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session_entry</p></td> +<td class="parameter_description"><p>is the session data (not key)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-db-check-entry.returns"></a><h4>Returns</h4> +<p> Returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS" title="GNUTLS_E_EXPIRED"><code class="literal">GNUTLS_E_EXPIRED</code></a>, if the database entry has +expired or 0 otherwise.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-check-entry-time"></a><h3>gnutls_db_check_entry_time ()</h3> +<pre class="programlisting"><span class="returnvalue">time_t</span> +gnutls_db_check_entry_time (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *entry</code></em>);</pre> +<p>This function returns the time that this entry was active. +It can be used for database entry expiration.</p> +<div class="refsect3"> +<a name="gnutls-db-check-entry-time.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>entry</p></td> +<td class="parameter_description"><p>is a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-db-check-entry-time.returns"></a><h4>Returns</h4> +<p> The time this entry was created, or zero on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-check-entry-expire-time"></a><h3>gnutls_db_check_entry_expire_time ()</h3> +<pre class="programlisting"><span class="returnvalue">time_t</span> +gnutls_db_check_entry_expire_time (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *entry</code></em>);</pre> +<p>This function returns the time that this entry will expire. +It can be used for database entry expiration.</p> +<div class="refsect3"> +<a name="gnutls-db-check-entry-expire-time.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>entry</p></td> +<td class="parameter_description"><p>is a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-db-check-entry-expire-time.returns"></a><h4>Returns</h4> +<p> The time this entry will expire, or zero on error.</p> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-hook-func"></a><h3>gnutls_handshake_hook_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_handshake_hook_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> Param1</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> htype</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> when</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> incoming</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *msg</code></em>);</pre> +<p>Function prototype for handshake hooks. It is set using +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-hook-function" title="gnutls_handshake_set_hook_function ()"><code class="function">gnutls_handshake_set_hook_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-handshake-hook-func.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the current session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>htype</p></td> +<td class="parameter_description"><p>the type of the handshake message (<a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><code class="literal">gnutls_handshake_description_t</code></a>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>when</p></td> +<td class="parameter_description"><p>non zero if this is a post-process/generation call and zero otherwise</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>incoming</p></td> +<td class="parameter_description"><p>non zero if this is an incoming message and zero if this is an outgoing message</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>msg</p></td> +<td class="parameter_description"><p>the (const) data of the handshake message without the handshake headers.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake-hook-func.returns"></a><h4>Returns</h4> +<p> Non zero on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-hook-function"></a><h3>gnutls_handshake_set_hook_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_handshake_set_hook_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> htype</code></em>, + <em class="parameter"><code><span class="type">int</span> when</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-handshake-hook-func" title="gnutls_handshake_hook_func ()"><span class="type">gnutls_handshake_hook_func</span></a> func</code></em>);</pre> +<p>This function will set a callback to be called after or before the specified +handshake message has been received or generated. This is a +generalization of <a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-post-client-hello-function" title="gnutls_handshake_set_post_client_hello_function ()"><code class="function">gnutls_handshake_set_post_client_hello_function()</code></a>.</p> +<p>To call the hook function prior to the message being generated or processed +use <a class="link" href="gnutls-gnutls.html#GNUTLS-HOOK-PRE:CAPS" title="GNUTLS_HOOK_PRE"><code class="literal">GNUTLS_HOOK_PRE</code></a> as <em class="parameter"><code>when</code></em> + parameter, <a class="link" href="gnutls-gnutls.html#GNUTLS-HOOK-POST:CAPS" title="GNUTLS_HOOK_POST"><code class="literal">GNUTLS_HOOK_POST</code></a> to call +after, and <a class="link" href="gnutls-gnutls.html#GNUTLS-HOOK-BOTH:CAPS" title="GNUTLS_HOOK_BOTH"><code class="literal">GNUTLS_HOOK_BOTH</code></a> for both cases.</p> +<p>This callback must return 0 on success or a gnutls error code to +terminate the handshake.</p> +<p>To hook at all handshake messages use an <em class="parameter"><code>htype</code></em> + of <a class="link" href="gnutls-gnutls.html#GNUTLS-HANDSHAKE-ANY:CAPS" title="GNUTLS_HANDSHAKE_ANY"><code class="literal">GNUTLS_HANDSHAKE_ANY</code></a>.</p> +<p>Warning: You should not use this function to terminate the +handshake based on client input unless you know what you are +doing. Before the handshake is finished there is no way to know if +there is a man-in-the-middle attack being performed.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-hook-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>htype</p></td> +<td class="parameter_description"><p>the <a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><code class="literal">gnutls_handshake_description_t</code></a> of the message to hook at</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>when</p></td> +<td class="parameter_description"><p><code class="literal">GNUTLS_HOOK_</code>* depending on when the hook function should be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-simple-hook-func"></a><h3>gnutls_handshake_simple_hook_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_handshake_simple_hook_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> Param1</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-post-client-hello-function"></a><h3>gnutls_handshake_set_post_client_hello_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_handshake_set_post_client_hello_function + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-handshake-simple-hook-func" title="gnutls_handshake_simple_hook_func ()"><span class="type">gnutls_handshake_simple_hook_func</span></a> func</code></em>);</pre> +<p>This function will set a callback to be called after the client +hello has been received (callback valid in server side only). This +allows the server to adjust settings based on received extensions.</p> +<p>Those settings could be ciphersuites, requesting certificate, or +anything else except for version negotiation (this is done before +the hello message is parsed).</p> +<p>This callback must return 0 on success or a gnutls error code to +terminate the handshake.</p> +<p>Since GnuTLS 3.3.5 the callback is +allowed to return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-AGAIN:CAPS" title="GNUTLS_E_AGAIN"><code class="literal">GNUTLS_E_AGAIN</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> to +put the handshake on hold. In that case <a class="link" href="gnutls-gnutls.html#gnutls-handshake" title="gnutls_handshake ()"><code class="function">gnutls_handshake()</code></a> +will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INTERRUPTED:CAPS" title="GNUTLS_E_INTERRUPTED"><code class="literal">GNUTLS_E_INTERRUPTED</code></a> and can be resumed when needed.</p> +<p>Warning: You should not use this function to terminate the +handshake based on client input unless you know what you are +doing. Before the handshake is finished there is no way to know if +there is a man-in-the-middle attack being performed.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-post-client-hello-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-max-packet-length"></a><h3>gnutls_handshake_set_max_packet_length ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_handshake_set_max_packet_length + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">size_t</span> max</code></em>);</pre> +<p>This function will set the maximum size of all handshake messages. +Handshakes over this size are rejected with +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-HANDSHAKE-TOO-LARGE:CAPS" title="GNUTLS_E_HANDSHAKE_TOO_LARGE"><code class="literal">GNUTLS_E_HANDSHAKE_TOO_LARGE</code></a> error code. The default value is +128kb which is typically large enough. Set this to 0 if you do not +want to set an upper limit.</p> +<p>The reason for restricting the handshake message sizes are to +limit Denial of Service attacks.</p> +<p>Note that the maximum handshake size was increased to 128kb +from 48kb in GnuTLS 3.5.5.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-max-packet-length.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>max</p></td> +<td class="parameter_description"><p>is the maximum number.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-check-version"></a><h3>gnutls_check_version ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_check_version ();</pre> +<p>Check the GnuTLS Library version against the provided string. +See <a class="link" href="gnutls-gnutls.html#GNUTLS-VERSION:CAPS" title="GNUTLS_VERSION"><code class="literal">GNUTLS_VERSION</code></a> for a suitable <em class="parameter"><code>req_version</code></em> + string.</p> +<p>See also <code class="function">gnutls_check_version_numeric()</code>, which provides this +functionality as a macro.</p> +<div class="refsect3"> +<a name="gnutls-check-version.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>req_version</p></td> +<td class="parameter_description"><p>version string to compare with, or <code class="literal">NULL</code>.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-check-version.returns"></a><h4>Returns</h4> +<p> Check that the version of the library is at +minimum the one given as a string in <em class="parameter"><code>req_version</code></em> +and return the +actual version string of the library; return <code class="literal">NULL</code> if the +condition is not met. If <code class="literal">NULL</code> is passed to this function no +check is done and only the version string is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-credentials-set"></a><h3>gnutls_credentials_set ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_credentials_set (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-credentials-type-t" title="enum gnutls_credentials_type_t"><span class="type">gnutls_credentials_type_t</span></a> type</code></em>, + <em class="parameter"><code><span class="type">void</span> *cred</code></em>);</pre> +<p>Sets the needed credentials for the specified type. E.g. username, +password - or public and private keys etc. The <em class="parameter"><code>cred</code></em> + parameter is +a structure that depends on the specified type and on the current +session (client or server).</p> +<p>In order to minimize memory usage, and share credentials between +several threads gnutls keeps a pointer to cred, and not the whole +cred structure. Thus you will have to keep the structure allocated +until you call <a class="link" href="gnutls-gnutls.html#gnutls-deinit" title="gnutls_deinit ()"><code class="function">gnutls_deinit()</code></a>.</p> +<p>For <a class="link" href="gnutls-gnutls.html#GNUTLS-CRD-ANON:CAPS"><code class="literal">GNUTLS_CRD_ANON</code></a>, <em class="parameter"><code>cred</code></em> + should be +<span class="type">gnutls_anon_client_credentials_t</span> in case of a client. In case of +a server it should be <span class="type">gnutls_anon_server_credentials_t</span>.</p> +<p>For <a class="link" href="gnutls-gnutls.html#GNUTLS-CRD-SRP:CAPS"><code class="literal">GNUTLS_CRD_SRP</code></a>, <em class="parameter"><code>cred</code></em> + should be <span class="type">gnutls_srp_client_credentials_t</span> +in case of a client, and <span class="type">gnutls_srp_server_credentials_t</span>, in case +of a server.</p> +<p>For <a class="link" href="gnutls-gnutls.html#GNUTLS-CRD-CERTIFICATE:CAPS"><code class="literal">GNUTLS_CRD_CERTIFICATE</code></a>, <em class="parameter"><code>cred</code></em> + should be +<span class="type">gnutls_certificate_credentials_t</span>.</p> +<div class="refsect3"> +<a name="gnutls-credentials-set.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is the type of the credentials</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>the credentials to set</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-credentials-set.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-credentials-get"></a><h3>gnutls_credentials_get ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_credentials_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-credentials-type-t" title="enum gnutls_credentials_type_t"><span class="type">gnutls_credentials_type_t</span></a> type</code></em>, + <em class="parameter"><code><span class="type">void</span> **cred</code></em>);</pre> +<p>Returns the previously provided credentials structures.</p> +<p>For <a class="link" href="gnutls-gnutls.html#GNUTLS-CRD-ANON:CAPS"><code class="literal">GNUTLS_CRD_ANON</code></a>, <em class="parameter"><code>cred</code></em> + will be +<span class="type">gnutls_anon_client_credentials_t</span> in case of a client. In case of +a server it should be <span class="type">gnutls_anon_server_credentials_t</span>.</p> +<p>For <a class="link" href="gnutls-gnutls.html#GNUTLS-CRD-SRP:CAPS"><code class="literal">GNUTLS_CRD_SRP</code></a>, <em class="parameter"><code>cred</code></em> + will be <span class="type">gnutls_srp_client_credentials_t</span> +in case of a client, and <span class="type">gnutls_srp_server_credentials_t</span>, in case +of a server.</p> +<p>For <a class="link" href="gnutls-gnutls.html#GNUTLS-CRD-CERTIFICATE:CAPS"><code class="literal">GNUTLS_CRD_CERTIFICATE</code></a>, <em class="parameter"><code>cred</code></em> + will be +<span class="type">gnutls_certificate_credentials_t</span>.</p> +<div class="refsect3"> +<a name="gnutls-credentials-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is the type of the credentials to return</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>will contain the credentials.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-credentials-get.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.3.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-free-server-credentials"></a><h3>gnutls_anon_free_server_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anon_free_server_credentials (<em class="parameter"><code><span class="type">gnutls_anon_server_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_anon_server_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-anon-free-server-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_anon_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-allocate-server-credentials"></a><h3>gnutls_anon_allocate_server_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_anon_allocate_server_credentials + (<em class="parameter"><code><span class="type">gnutls_anon_server_credentials_t</span> *sc</code></em>);</pre> +<p>Allocate a gnutls_anon_server_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-anon-allocate-server-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_anon_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-anon-allocate-server-credentials.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-set-server-dh-params"></a><h3>gnutls_anon_set_server_dh_params ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anon_set_server_dh_params (<em class="parameter"><code><span class="type">gnutls_anon_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_anon_set_server_dh_params</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set the Diffie-Hellman parameters for an +anonymous server to use. These parameters will be used in +Anonymous Diffie-Hellman cipher suites.</p> +<div class="refsect3"> +<a name="gnutls-anon-set-server-dh-params.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_anon_server_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The Diffie-Hellman parameters.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-set-server-known-dh-params"></a><h3>gnutls_anon_set_server_known_dh_params ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_anon_set_server_known_dh_params + (<em class="parameter"><code><span class="type">gnutls_anon_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="type">gnutls_sec_param_t</span></a> sec_param</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_anon_set_server_known_dh_params</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set the Diffie-Hellman parameters for an +anonymous server to use. These parameters will be used in +Anonymous Diffie-Hellman cipher suites and will be selected from +the FFDHE set of RFC7919 according to the security level provided.</p> +<div class="refsect3"> +<a name="gnutls-anon-set-server-known-dh-params.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_anon_server_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>sec_param</p></td> +<td class="parameter_description"><p>is an option of the <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><code class="literal">gnutls_sec_param_t</code></a> enumeration</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-anon-set-server-known-dh-params.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.5.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-set-server-params-function"></a><h3>gnutls_anon_set_server_params_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anon_set_server_params_function + (<em class="parameter"><code><span class="type">gnutls_anon_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">gnutls_params_function</span> *func</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_anon_set_server_params_function</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set a callback in order for the server to get +the Diffie-Hellman parameters for anonymous authentication. The +callback should return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> +<div class="refsect3"> +<a name="gnutls-anon-set-server-params-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-free-client-credentials"></a><h3>gnutls_anon_free_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anon_free_client_credentials (<em class="parameter"><code><span class="type">gnutls_anon_client_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_anon_client_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-anon-free-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_anon_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-allocate-client-credentials"></a><h3>gnutls_anon_allocate_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_anon_allocate_client_credentials + (<em class="parameter"><code><span class="type">gnutls_anon_client_credentials_t</span> *sc</code></em>);</pre> +<p>Allocate a gnutls_anon_client_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-anon-allocate-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_anon_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-anon-allocate-client-credentials.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-free-credentials"></a><h3>gnutls_certificate_free_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_free_credentials (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_certificate_credentials_t structure.</p> +<p>This function does not free any temporary parameters associated +with this structure (ie RSA and DH parameters are not freed by this +function).</p> +<div class="refsect3"> +<a name="gnutls-certificate-free-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-allocate-credentials"></a><h3>gnutls_certificate_allocate_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_allocate_credentials + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> *res</code></em>);</pre> +<p>Allocate a gnutls_certificate_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-certificate-allocate-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-allocate-credentials.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-issuer"></a><h3>gnutls_certificate_get_issuer ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_get_issuer (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *issuer</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will return the issuer of a given certificate. +If the flag <a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a> is specified a copy of the issuer +will be returned which must be freed using <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>. +In that case the provided <em class="parameter"><code>issuer</code></em> + must not be initialized.</p> +<p>As with <a class="link" href="gnutls-x509.html#gnutls-x509-trust-list-get-issuer" title="gnutls_x509_trust_list_get_issuer ()"><code class="function">gnutls_x509_trust_list_get_issuer()</code></a> this function requires +the <a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a> flag in order to operate with PKCS<span class="type">11</span> trust +lists in a thread-safe way.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-issuer.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert</p></td> +<td class="parameter_description"><p>is the certificate to find issuer for</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>issuer</p></td> +<td class="parameter_description"><p>Will hold the issuer if any. Should be treated as constant.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>Use zero or <a class="link" href="gnutls-x509.html#GNUTLS-TL-GET-COPY:CAPS"><code class="literal">GNUTLS_TL_GET_COPY</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-issuer.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-crt-raw"></a><h3>gnutls_certificate_get_crt_raw ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_get_crt_raw (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx1</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx2</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cert</code></em>);</pre> +<p>This function will return the DER encoded certificate of the +server or any other certificate on its certificate chain (based on <em class="parameter"><code>idx2</code></em> +). +The returned data should be treated as constant and only accessible during the lifetime +of <em class="parameter"><code>sc</code></em> +. The <em class="parameter"><code>idx1</code></em> + matches the value <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key" title="gnutls_certificate_set_x509_key ()"><code class="function">gnutls_certificate_set_x509_key()</code></a> and friends +functions.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-crt-raw.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx1</p></td> +<td class="parameter_description"><p>the index of the certificate chain if multiple are present</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx2</p></td> +<td class="parameter_description"><p>the index of the certificate in the chain. Zero gives the server's certificate.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert</p></td> +<td class="parameter_description"><p>Will hold the DER encoded certificate.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-crt-raw.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value. In case the indexes are out of bounds <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> +is returned.</p> +</div> +<p class="since">Since: 3.2.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-free-keys"></a><h3>gnutls_certificate_free_keys ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_free_keys (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>);</pre> +<p>This function will delete all the keys and the certificates associated +with the given credentials. This function must not be called when a +TLS negotiation that uses the credentials is in progress.</p> +<div class="refsect3"> +<a name="gnutls-certificate-free-keys.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-free-cas"></a><h3>gnutls_certificate_free_cas ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_free_cas (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>);</pre> +<p>This function was operational on very early versions of gnutls. +Due to internal refactorings and the fact that this was hardly ever +used, it is currently a no-op.</p> +<div class="refsect3"> +<a name="gnutls-certificate-free-cas.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-free-ca-names"></a><h3>gnutls_certificate_free_ca_names ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_free_ca_names (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>);</pre> +<p>This function will delete all the CA name in the given +credentials. Clients may call this to save some memory since in +client side the CA names are not used. Servers might want to use +this function if a large list of trusted CAs is present and +sending the names of it would just consume bandwidth without providing +information to client.</p> +<p>CA names are used by servers to advertise the CAs they support to +clients.</p> +<div class="refsect3"> +<a name="gnutls-certificate-free-ca-names.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-free-crls"></a><h3>gnutls_certificate_free_crls ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_free_crls (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>);</pre> +<p>This function will delete all the CRLs associated +with the given credentials.</p> +<div class="refsect3"> +<a name="gnutls-certificate-free-crls.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-dh-params"></a><h3>gnutls_certificate_set_dh_params ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_dh_params (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_certificate_set_dh_params</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set the Diffie-Hellman parameters for a +certificate server to use. These parameters will be used in +Ephemeral Diffie-Hellman cipher suites. Note that only a pointer +to the parameters are stored in the certificate handle, so you +must not deallocate the parameters before the certificate is deallocated.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-dh-params.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>the Diffie-Hellman parameters.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-known-dh-params"></a><h3>gnutls_certificate_set_known_dh_params ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_known_dh_params + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="type">gnutls_sec_param_t</span></a> sec_param</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_certificate_set_known_dh_params</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set the Diffie-Hellman parameters for a +certificate server to use. These parameters will be used in +Ephemeral Diffie-Hellman cipher suites and will be selected from +the FFDHE set of RFC7919 according to the security level provided.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-known-dh-params.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>sec_param</p></td> +<td class="parameter_description"><p>is an option of the <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><code class="literal">gnutls_sec_param_t</code></a> enumeration</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-known-dh-params.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.5.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-verify-flags"></a><h3>gnutls_certificate_set_verify_flags ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_verify_flags (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will set the flags to be used for verification +of certificates and override any defaults. The provided flags must be an OR of the +<a class="link" href="gnutls-x509.html#gnutls-certificate-verify-flags" title="enum gnutls_certificate_verify_flags"><span class="type">gnutls_certificate_verify_flags</span></a> enumerations.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-verify-flags.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>are the flags</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-verify-flags"></a><h3>gnutls_certificate_get_verify_flags ()</h3> +<pre class="programlisting">unsigned <span class="returnvalue">int</span> +gnutls_certificate_get_verify_flags (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>);</pre> +<p>Returns the verification flags set with +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-flags" title="gnutls_certificate_set_verify_flags ()"><code class="function">gnutls_certificate_set_verify_flags()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-verify-flags.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-verify-flags.returns"></a><h4>Returns</h4> +<p> The certificate verification flags used by <em class="parameter"><code>res</code></em> +.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-flags"></a><h3>gnutls_certificate_set_flags ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_flags (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> Param1</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function will set flags to tweak the operation of +the credentials structure. See the <a class="link" href="gnutls-gnutls.html#gnutls-certificate-flags" title="enum gnutls_certificate_flags"><span class="type">gnutls_certificate_flags</span></a> enumerations +for more information on the available flags.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-flags.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>are the flags of <a class="link" href="gnutls-gnutls.html#gnutls-certificate-flags" title="enum gnutls_certificate_flags"><span class="type">gnutls_certificate_flags</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.7</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-verify-limits"></a><h3>gnutls_certificate_set_verify_limits ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_verify_limits (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> max_bits</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> max_depth</code></em>);</pre> +<p>This function will set some upper limits for the default +verification function, <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>, to avoid +denial of service attacks. You can set them to zero to disable +limits.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-verify-limits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>max_bits</p></td> +<td class="parameter_description"><p>is the number of bits of an acceptable certificate (default 8200)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>max_depth</p></td> +<td class="parameter_description"><p>is maximum depth of the verification of a certificate chain (default 5)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-system-trust"></a><h3>gnutls_certificate_set_x509_system_trust ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_system_trust + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>);</pre> +<p>This function adds the system's default trusted CAs in order to +verify client or server certificates.</p> +<p>In the case the system is currently unsupported <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE"><code class="literal">GNUTLS_E_UNIMPLEMENTED_FEATURE</code></a> +is returned.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-system-trust.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-system-trust.returns"></a><h4>Returns</h4> +<p> the number of certificates processed or a negative error code +on error.</p> +</div> +<p class="since">Since: 3.0.20</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-trust-file"></a><h3>gnutls_certificate_set_x509_trust_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_trust_file + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *cafile</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function adds the trusted CAs in order to verify client or +server certificates. In case of a client this is not required to +be called if the certificates are not verified using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>. This function may be called +multiple times.</p> +<p>In case of a server the names of the CAs set here will be sent to +the client if a certificate request is sent. This can be disabled +using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-send-x509-rdn-sequence" title="gnutls_certificate_send_x509_rdn_sequence ()"><code class="function">gnutls_certificate_send_x509_rdn_sequence()</code></a>.</p> +<p>This function can also accept URLs. In that case it +will import all certificates that are marked as trusted. Note +that the supported URLs are the ones indicated by <a class="link" href="gnutls-gnutls.html#gnutls-url-is-supported" title="gnutls_url_is_supported ()"><code class="function">gnutls_url_is_supported()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cafile</p></td> +<td class="parameter_description"><p>is a file containing the list of trusted CAs (DER or PEM list)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust-file.returns"></a><h4>Returns</h4> +<p> the number of certificates processed</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-trust-dir"></a><h3>gnutls_certificate_set_x509_trust_dir ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_trust_dir (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *ca_dir</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function adds the trusted CAs present in the directory in order to +verify client or server certificates. This function is identical +to <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-trust-file" title="gnutls_certificate_set_x509_trust_file ()"><code class="function">gnutls_certificate_set_x509_trust_file()</code></a> but loads all certificates +in a directory.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust-dir.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ca_dir</p></td> +<td class="parameter_description"><p>is a directory containing the list of trusted CAs (DER or PEM list)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust-dir.returns"></a><h4>Returns</h4> +<p> the number of certificates processed</p> +</div> +<p class="since">Since: 3.3.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-trust-mem"></a><h3>gnutls_certificate_set_x509_trust_mem ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_trust_mem (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *ca</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function adds the trusted CAs in order to verify client or +server certificates. In case of a client this is not required to be +called if the certificates are not verified using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>. This function may be called +multiple times.</p> +<p>In case of a server the CAs set here will be sent to the client if +a certificate request is sent. This can be disabled using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-send-x509-rdn-sequence" title="gnutls_certificate_send_x509_rdn_sequence ()"><code class="function">gnutls_certificate_send_x509_rdn_sequence()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust-mem.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ca</p></td> +<td class="parameter_description"><p>is a list of trusted CAs or a DER certificate</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is DER or PEM</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust-mem.returns"></a><h4>Returns</h4> +<p> the number of certificates processed or a negative error code +on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-crl-file"></a><h3>gnutls_certificate_set_x509_crl_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_crl_file (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *crlfile</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function adds the trusted CRLs in order to verify client or server +certificates. In case of a client this is not required +to be called if the certificates are not verified using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>. +This function may be called multiple times.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-crl-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>crlfile</p></td> +<td class="parameter_description"><p>is a file containing the list of verified CRLs (DER or PEM list)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-crl-file.returns"></a><h4>Returns</h4> +<p> number of CRLs processed or a negative error code on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-crl-mem"></a><h3>gnutls_certificate_set_x509_crl_mem ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_crl_mem (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *CRL</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function adds the trusted CRLs in order to verify client or +server certificates. In case of a client this is not required to +be called if the certificates are not verified using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>. This function may be called +multiple times.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-crl-mem.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>CRL</p></td> +<td class="parameter_description"><p>is a list of trusted CRLs. They should have been verified before.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is DER or PEM</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-crl-mem.returns"></a><h4>Returns</h4> +<p> number of CRLs processed, or a negative error code on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-key-file"></a><h3>gnutls_certificate_set_x509_key_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_key_file (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *certfile</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *keyfile</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function sets a certificate/private key pair in the +gnutls_certificate_credentials_t type. This function may be +called more than once, in case multiple keys/certificates exist for +the server. For clients that need to send more than its own end +entity certificate, e.g., also an intermediate CA cert, then the +<em class="parameter"><code>certfile</code></em> + must contain the ordered certificate chain.</p> +<p>Note that the names in the certificate provided will be considered +when selecting the appropriate certificate to use (in case of multiple +certificate/key pairs).</p> +<p>This function can also accept URLs at <em class="parameter"><code>keyfile</code></em> + and <em class="parameter"><code>certfile</code></em> +. In that case it +will use the private key and certificate indicated by the URLs. Note +that the supported URLs are the ones indicated by <a class="link" href="gnutls-gnutls.html#gnutls-url-is-supported" title="gnutls_url_is_supported ()"><code class="function">gnutls_url_is_supported()</code></a>.</p> +<p>In case the <em class="parameter"><code>certfile</code></em> + is provided as a PKCS <span class="type">11</span> URL, then the certificate, and its +present issuers in the token are imported (i.e., forming the required trust chain).</p> +<p>If that function fails to load the <em class="parameter"><code>res</code></em> + structure is at an undefined state, it must +not be reused to load other keys or certificates.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>certfile</p></td> +<td class="parameter_description"><p>is a file that containing the certificate list (path) for +the specified private key, in PKCS7 format, or a list of certificates</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>keyfile</p></td> +<td class="parameter_description"><p>is a file that contains the private key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-file.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +<p class="since">Since: 3.1.11</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-key-file2"></a><h3>gnutls_certificate_set_x509_key_file2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_key_file2 (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *certfile</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *keyfile</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *pass</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function sets a certificate/private key pair in the +gnutls_certificate_credentials_t type. This function may be +called more than once, in case multiple keys/certificates exist for +the server. For clients that need to send more than its own end +entity certificate, e.g., also an intermediate CA cert, then the +<em class="parameter"><code>certfile</code></em> + must contain the ordered certificate chain.</p> +<p>Note that the names in the certificate provided will be considered +when selecting the appropriate certificate to use (in case of multiple +certificate/key pairs).</p> +<p>This function can also accept URLs at <em class="parameter"><code>keyfile</code></em> + and <em class="parameter"><code>certfile</code></em> +. In that case it +will use the private key and certificate indicated by the URLs. Note +that the supported URLs are the ones indicated by <a class="link" href="gnutls-gnutls.html#gnutls-url-is-supported" title="gnutls_url_is_supported ()"><code class="function">gnutls_url_is_supported()</code></a>. +Before GnuTLS 3.4.0 when a URL was specified, the <em class="parameter"><code>pass</code></em> + part was ignored and a +PIN callback had to be registered, this is no longer the case in current releases.</p> +<p>In case the <em class="parameter"><code>certfile</code></em> + is provided as a PKCS <span class="type">11</span> URL, then the certificate, and its +present issuers in the token are imported (i.e., forming the required trust chain).</p> +<p>If that function fails to load the <em class="parameter"><code>res</code></em> + structure is at an undefined state, it must +not be reused to load other keys or certificates.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-file2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>certfile</p></td> +<td class="parameter_description"><p>is a file that containing the certificate list (path) for +the specified private key, in PKCS7 format, or a list of certificates</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>keyfile</p></td> +<td class="parameter_description"><p>is a file that contains the private key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pass</p></td> +<td class="parameter_description"><p>is the password of the key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>an ORed sequence of gnutls_pkcs_encrypt_flags_t</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-file2.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-key-mem"></a><h3>gnutls_certificate_set_x509_key_mem ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_key_mem (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cert</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>);</pre> +<p>This function sets a certificate/private key pair in the +gnutls_certificate_credentials_t type. This function may be called +more than once, in case multiple keys/certificates exist for the +server.</p> +<p>Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates +is supported. This means that certificates intended for signing cannot +be used for ciphersuites that require encryption.</p> +<p>If the certificate and the private key are given in PEM encoding +then the strings that hold their values must be null terminated.</p> +<p>The <em class="parameter"><code>key</code></em> + may be <code class="literal">NULL</code> if you are using a sign callback, see +<code class="function">gnutls_sign_callback_set()</code>.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-mem.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert</p></td> +<td class="parameter_description"><p>contains a certificate list (path) for the specified private key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is the private key, or <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-mem.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-key-mem2"></a><h3>gnutls_certificate_set_x509_key_mem2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_key_mem2 (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cert</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *pass</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function sets a certificate/private key pair in the +gnutls_certificate_credentials_t type. This function may be called +more than once, in case multiple keys/certificates exist for the +server.</p> +<p>Note that the keyUsage (2.5.29.15) PKIX extension in X.509 certificates +is supported. This means that certificates intended for signing cannot +be used for ciphersuites that require encryption.</p> +<p>If the certificate and the private key are given in PEM encoding +then the strings that hold their values must be null terminated.</p> +<p>The <em class="parameter"><code>key</code></em> + may be <code class="literal">NULL</code> if you are using a sign callback, see +<code class="function">gnutls_sign_callback_set()</code>.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-mem2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert</p></td> +<td class="parameter_description"><p>contains a certificate list (path) for the specified private key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is the private key, or <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pass</p></td> +<td class="parameter_description"><p>is the key's password</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>an ORed sequence of gnutls_pkcs_encrypt_flags_t</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key-mem2.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-send-x509-rdn-sequence"></a><h3>gnutls_certificate_send_x509_rdn_sequence ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_send_x509_rdn_sequence + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> status</code></em>);</pre> +<p>If status is non zero, this function will order gnutls not to send +the rdnSequence in the certificate request message. That is the +server will not advertise its trusted CAs to the peer. If status +is zero then the default behaviour will take effect, which is to +advertise the server's trusted CAs.</p> +<p>This function has no effect in clients, and in authentication +methods other than certificate with X.509 certificates.</p> +<div class="refsect3"> +<a name="gnutls-certificate-send-x509-rdn-sequence.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>status</p></td> +<td class="parameter_description"><p>is 0 or 1</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-simple-pkcs12-file"></a><h3>gnutls_certificate_set_x509_simple_pkcs12_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_simple_pkcs12_file + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *pkcs12file</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre> +<p>This function sets a certificate/private key pair and/or a CRL in +the gnutls_certificate_credentials_t type. This function may +be called more than once (in case multiple keys/certificates exist +for the server).</p> +<p>PKCS<span class="type">12</span> files with a MAC, encrypted bags and PKCS #8 +private keys are supported. However, +only password based security, and the same password for all +operations, are supported.</p> +<p>PKCS<span class="type">12</span> file may contain many keys and/or certificates, and this +function will try to auto-detect based on the key ID the certificate +and key pair to use. If the PKCS<span class="type">12</span> file contain the issuer of +the selected certificate, it will be appended to the certificate +to form a chain.</p> +<p>If more than one private keys are stored in the PKCS<span class="type">12</span> file, +then only one key will be read (and it is undefined which one).</p> +<p>It is believed that the limitations of this function is acceptable +for most usage, and that any more flexibility would introduce +complexity that would make it harder to use this functionality at +all.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-simple-pkcs12-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pkcs12file</p></td> +<td class="parameter_description"><p>filename of file containing PKCS<span class="type">12</span> blob.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER of the <em class="parameter"><code>pkcs12file</code></em> +.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password</p></td> +<td class="parameter_description"><p>optional password used to decrypt PKCS<span class="type">12</span> file, bags and keys.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-simple-pkcs12-file.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-simple-pkcs12-mem"></a><h3>gnutls_certificate_set_x509_simple_pkcs12_mem ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_simple_pkcs12_mem + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *p12blob</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> type</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre> +<p>This function sets a certificate/private key pair and/or a CRL in +the gnutls_certificate_credentials_t type. This function may +be called more than once (in case multiple keys/certificates exist +for the server).</p> +<p>Encrypted PKCS<span class="type">12</span> bags and PKCS#8 private keys are supported. However, +only password based security, and the same password for all +operations, are supported.</p> +<p>PKCS<span class="type">12</span> file may contain many keys and/or certificates, and this +function will try to auto-detect based on the key ID the certificate +and key pair to use. If the PKCS<span class="type">12</span> file contain the issuer of +the selected certificate, it will be appended to the certificate +to form a chain.</p> +<p>If more than one private keys are stored in the PKCS<span class="type">12</span> file, +then only one key will be read (and it is undefined which one).</p> +<p>It is believed that the limitations of this function is acceptable +for most usage, and that any more flexibility would introduce +complexity that would make it harder to use this functionality at +all.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-simple-pkcs12-mem.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>p12blob</p></td> +<td class="parameter_description"><p>the PKCS<span class="type">12</span> blob.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>is PEM or DER of the <em class="parameter"><code>pkcs12file</code></em> +.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password</p></td> +<td class="parameter_description"><p>optional password used to decrypt PKCS<span class="type">12</span> file, bags and keys.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-simple-pkcs12-mem.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +<p class="since">Since: 2.8.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-key"></a><h3>gnutls_certificate_set_x509_key ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_key (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *cert_list</code></em>, + <em class="parameter"><code><span class="type">int</span> cert_list_size</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre> +<p>This function sets a certificate/private key pair in the +gnutls_certificate_credentials_t type. This function may be +called more than once, in case multiple keys/certificates exist for +the server. For clients that wants to send more than their own end +entity certificate (e.g., also an intermediate CA cert) then put +the certificate chain in <em class="parameter"><code>cert_list</code></em> +.</p> +<p>Note that the certificates and keys provided, can be safely deinitialized +after this function is called.</p> +<p>If that function fails to load the <em class="parameter"><code>res</code></em> + type is at an undefined state, it must +not be reused to load other keys or certificates.</p> +<p>Note that, this function by default returns zero on success and a negative value on error. +Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +it returns an index (greater or equal to zero). That index can be used to other functions to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert_list</p></td> +<td class="parameter_description"><p>contains a certificate list (path) for the specified private key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert_list_size</p></td> +<td class="parameter_description"><p>holds the size of the certificate list</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-key.returns"></a><h4>Returns</h4> +<p> On success this functions returns zero, and otherwise a negative value on error (see above for modifying that behavior).</p> +</div> +<p class="since">Since: 2.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-trust"></a><h3>gnutls_certificate_set_x509_trust ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_trust (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *ca_list</code></em>, + <em class="parameter"><code><span class="type">int</span> ca_list_size</code></em>);</pre> +<p>This function adds the trusted CAs in order to verify client +or server certificates. In case of a client this is not required +to be called if the certificates are not verified using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>. +This function may be called multiple times.</p> +<p>In case of a server the CAs set here will be sent to the client if +a certificate request is sent. This can be disabled using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-send-x509-rdn-sequence" title="gnutls_certificate_send_x509_rdn_sequence ()"><code class="function">gnutls_certificate_send_x509_rdn_sequence()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ca_list</p></td> +<td class="parameter_description"><p>is a list of trusted CAs</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ca_list_size</p></td> +<td class="parameter_description"><p>holds the size of the CA list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-trust.returns"></a><h4>Returns</h4> +<p> the number of certificates processed or a negative error code +on error.</p> +</div> +<p class="since">Since: 2.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-x509-crl"></a><h3>gnutls_certificate_set_x509_crl ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_x509_crl (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crl-t" title="gnutls_x509_crl_t"><span class="type">gnutls_x509_crl_t</span></a> *crl_list</code></em>, + <em class="parameter"><code><span class="type">int</span> crl_list_size</code></em>);</pre> +<p>This function adds the trusted CRLs in order to verify client or +server certificates. In case of a client this is not required to +be called if the certificates are not verified using +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>. This function may be called +multiple times.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-crl.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>crl_list</p></td> +<td class="parameter_description"><p>is a list of trusted CRLs. They should have been verified before.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>crl_list_size</p></td> +<td class="parameter_description"><p>holds the size of the crl_list</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-x509-crl.returns"></a><h4>Returns</h4> +<p> number of CRLs processed, or a negative error code on error.</p> +</div> +<p class="since">Since: 2.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-x509-key"></a><h3>gnutls_certificate_get_x509_key ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_get_x509_key (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> index</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> *key</code></em>);</pre> +<p>Obtains a X.509 private key that has been stored in <em class="parameter"><code>res</code></em> + with one of +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key" title="gnutls_certificate_set_x509_key ()"><code class="function">gnutls_certificate_set_x509_key()</code></a>, <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-file" title="gnutls_certificate_set_x509_key_file ()"><code class="function">gnutls_certificate_set_x509_key_file()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-file2" title="gnutls_certificate_set_x509_key_file2 ()"><code class="function">gnutls_certificate_set_x509_key_file2()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem" title="gnutls_certificate_set_x509_key_mem ()"><code class="function">gnutls_certificate_set_x509_key_mem()</code></a>, or +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem2" title="gnutls_certificate_set_x509_key_mem2 ()"><code class="function">gnutls_certificate_set_x509_key_mem2()</code></a>. The returned key must be deallocated +with <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-deinit" title="gnutls_x509_privkey_deinit ()"><code class="function">gnutls_x509_privkey_deinit()</code></a> when no longer needed.</p> +<p>The <em class="parameter"><code>index</code></em> + matches the return value of <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key" title="gnutls_certificate_set_x509_key ()"><code class="function">gnutls_certificate_set_x509_key()</code></a> and friends +functions, when the <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> flag is set.</p> +<p>If there is no key with the given index, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned. If the key with the +given index is not a X.509 key, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> is returned.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-x509-key.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>index</p></td> +<td class="parameter_description"><p>The index of the key to obtain.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>Location to store the key.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-x509-key.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success, or a negative error code.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-x509-crt"></a><h3>gnutls_certificate_get_x509_crt ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_get_x509_crt (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> index</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> **crt_list</code></em>, + <em class="parameter"><code><span class="type">unsigned</span> *crt_list_size</code></em>);</pre> +<p>Obtains a X.509 certificate list that has been stored in <em class="parameter"><code>res</code></em> + with one of +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key" title="gnutls_certificate_set_x509_key ()"><code class="function">gnutls_certificate_set_x509_key()</code></a>, <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-file" title="gnutls_certificate_set_x509_key_file ()"><code class="function">gnutls_certificate_set_x509_key_file()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-file2" title="gnutls_certificate_set_x509_key_file2 ()"><code class="function">gnutls_certificate_set_x509_key_file2()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem" title="gnutls_certificate_set_x509_key_mem ()"><code class="function">gnutls_certificate_set_x509_key_mem()</code></a>, or +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key-mem2" title="gnutls_certificate_set_x509_key_mem2 ()"><code class="function">gnutls_certificate_set_x509_key_mem2()</code></a>. Each certificate in the returned +certificate list must be deallocated with <a class="link" href="gnutls-x509.html#gnutls-x509-crt-deinit" title="gnutls_x509_crt_deinit ()"><code class="function">gnutls_x509_crt_deinit()</code></a>, and the +list itself must be freed with <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> +<p>The <em class="parameter"><code>index</code></em> + matches the return value of <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-x509-key" title="gnutls_certificate_set_x509_key ()"><code class="function">gnutls_certificate_set_x509_key()</code></a> and friends +functions, when the <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> flag is set.</p> +<p>If there is no certificate with the given index, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned. If the certificate +with the given index is not a X.509 certificate, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> +is returned. The returned certificates must be deinitialized after +use, and the <em class="parameter"><code>crt_list</code></em> + pointer must be freed using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-x509-crt.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>index</p></td> +<td class="parameter_description"><p>The index of the certificate list to obtain.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>crt_list</p></td> +<td class="parameter_description"><p>Where to store the certificate list.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>crt_list_size</p></td> +<td class="parameter_description"><p>Will hold the number of certificates.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-x509-crt.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success, or a negative error code.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-ocsp-status-request-function"></a><h3>gnutls_certificate_set_ocsp_status_request_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_ocsp_status_request_function + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">gnutls_status_request_ocsp_func</span> ocsp_func</code></em>, + <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre> +<p>This function is to be used by server to register a callback to +handle OCSP status requests from the client. The callback will be +invoked if the client supplied a status-request OCSP extension. +The callback function prototype is:</p> +<p>typedef int (*gnutls_status_request_ocsp_func) + (gnutls_session_t session, void *ptr, gnutls_datum_t *ocsp_response);</p> +<p>The callback will be invoked if the client requests an OCSP certificate +status. The callback may return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-STATUS:CAPS" title="GNUTLS_E_NO_CERTIFICATE_STATUS"><code class="literal">GNUTLS_E_NO_CERTIFICATE_STATUS</code></a>, if +there is no recent OCSP response. If the callback returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a>, +it is expected to have the <em class="parameter"><code>ocsp_response</code></em> + field set with a valid (DER-encoded) +OCSP response. The response must be a value allocated using <code class="function">gnutls_malloc()</code>, +and will be deinitialized by the caller.</p> +<p>It is possible to set a specific callback for each provided certificate +using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-ocsp-status-request-function2" title="gnutls_certificate_set_ocsp_status_request_function2 ()"><code class="function">gnutls_certificate_set_ocsp_status_request_function2()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ocsp_func</p></td> +<td class="parameter_description"><p>function pointer to OCSP status request callback.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>opaque pointer passed to callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-ocsp-status-request-function2"></a><h3>gnutls_certificate_set_ocsp_status_request_function2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_ocsp_status_request_function2 + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>, + <em class="parameter"><code><span class="type">gnutls_status_request_ocsp_func</span> ocsp_func</code></em>, + <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre> +<p>This function is to be used by server to register a callback to +provide OCSP status requests that correspond to the indexed certificate chain +from the client. The callback will be invoked if the client supplied a +status-request OCSP extension.</p> +<p>The callback function prototype is:</p> +<p>typedef int (*gnutls_status_request_ocsp_func) + (gnutls_session_t session, void *ptr, gnutls_datum_t *ocsp_response);</p> +<p>The callback will be invoked if the client requests an OCSP certificate +status. The callback may return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-STATUS:CAPS" title="GNUTLS_E_NO_CERTIFICATE_STATUS"><code class="literal">GNUTLS_E_NO_CERTIFICATE_STATUS</code></a>, if +there is no recent OCSP response. If the callback returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a>, +it is expected to have the <em class="parameter"><code>ocsp_response</code></em> + field set with a valid (DER-encoded) +OCSP response. The response must be a value allocated using <code class="function">gnutls_malloc()</code>, +and will be deinitialized by the caller.</p> +<p>Note: the ability to set multiple OCSP responses per credential +structure via the index <em class="parameter"><code>idx</code></em> + was added in version 3.5.6. To keep +backwards compatibility, it requires using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +with the <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> flag to make the set certificate +functions return an index usable by this function.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-function2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>is a certificate index as returned by <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a> and friends</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ocsp_func</p></td> +<td class="parameter_description"><p>function pointer to OCSP status request callback.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>opaque pointer passed to callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-function2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.5.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-ocsp-status-request-file"></a><h3>gnutls_certificate_set_ocsp_status_request_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_ocsp_status_request_file + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *response_file</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>);</pre> +<p>This function loads the provided OCSP response. It will be +sent to the client if requests an OCSP certificate status for +the certificate chain specified by <em class="parameter"><code>idx</code></em> +.</p> +<p>Note: the ability to set multiple OCSP responses per credential +structure via the index <em class="parameter"><code>idx</code></em> + was added in version 3.5.6. To keep +backwards compatibility, it requires using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +with the <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> flag to make the set certificate +functions return an index usable by this function.</p> +<p>This function can be called multiple times since GnuTLS 3.6.3 +when multiple responses which apply to the chain are available. +If the response provided does not match any certificates present +in the chain, the code <a class="link" href="gnutls-gnutls.html#GNUTLS-E-OCSP-MISMATCH-WITH-CERTS:CAPS" title="GNUTLS_E_OCSP_MISMATCH_WITH_CERTS"><code class="literal">GNUTLS_E_OCSP_MISMATCH_WITH_CERTS</code></a> is returned. +To revert to the previous behavior set the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-SKIP-OCSP-RESPONSE-CHECK:CAPS"><code class="literal">GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK</code></a> +in the certificate credentials structure. In that case, only the +end-certificate's OCSP response can be set. +If the response is already expired at the time of loading the code +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS" title="GNUTLS_E_EXPIRED"><code class="literal">GNUTLS_E_EXPIRED</code></a> is returned.</p> +<p>To revert to the previous behavior of this function which does not return +any errors, set the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-SKIP-OCSP-RESPONSE-CHECK:CAPS"><code class="literal">GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK</code></a></p> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a credentials structure.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>response_file</p></td> +<td class="parameter_description"><p>a filename of the OCSP response</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>is a certificate index as returned by <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a> and friends</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-file.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-ocsp-status-request-file2"></a><h3>gnutls_certificate_set_ocsp_status_request_file2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_ocsp_status_request_file2 + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *response_file</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>);</pre> +<p>This function loads the OCSP responses to be sent to the +peer for the certificate chain specified by <em class="parameter"><code>idx</code></em> +. When <em class="parameter"><code>fmt</code></em> + is +set to PEM, multiple responses can be loaded.</p> +<p>This function must be called after setting any certificates, and +cannot be used for certificates that are provided via a callback -- +that is when <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-retrieve-function" title="gnutls_certificate_set_retrieve_function ()"><code class="function">gnutls_certificate_set_retrieve_function()</code></a> is used. In +that case consider using <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-retrieve-function3" title="gnutls_certificate_set_retrieve_function3 ()"><code class="function">gnutls_certificate_set_retrieve_function3()</code></a>.</p> +<p>This function can be called multiple times when multiple responses +applicable to the certificate chain are available. +If the response provided does not match any certificates present +in the chain, the code <a class="link" href="gnutls-gnutls.html#GNUTLS-E-OCSP-MISMATCH-WITH-CERTS:CAPS" title="GNUTLS_E_OCSP_MISMATCH_WITH_CERTS"><code class="literal">GNUTLS_E_OCSP_MISMATCH_WITH_CERTS</code></a> is returned. +If the response is already expired at the time of loading the code +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS" title="GNUTLS_E_EXPIRED"><code class="literal">GNUTLS_E_EXPIRED</code></a> is returned.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-file2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a credentials structure.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>response_file</p></td> +<td class="parameter_description"><p>a filename of the OCSP response</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>is a certificate index as returned by <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a> and friends</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>fmt</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-file2.returns"></a><h4>Returns</h4> +<p> On success, the number of loaded responses is returned, +otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-ocsp-status-request-mem"></a><h3>gnutls_certificate_set_ocsp_status_request_mem ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_ocsp_status_request_mem + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *resp</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>);</pre> +<p>This function sets the OCSP responses to be sent to the +peer for the certificate chain specified by <em class="parameter"><code>idx</code></em> +. When <em class="parameter"><code>fmt</code></em> + is set +to PEM, multiple responses can be loaded.</p> +<p>Note: the ability to set multiple OCSP responses per credential +structure via the index <em class="parameter"><code>idx</code></em> + was added in version 3.5.6. To keep +backwards compatibility, it requires using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> +with the <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> flag to make the set certificate +functions return an index usable by this function.</p> +<p>This function must be called after setting any certificates, and +cannot be used for certificates that are provided via a callback -- +that is when <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-retrieve-function" title="gnutls_certificate_set_retrieve_function ()"><code class="function">gnutls_certificate_set_retrieve_function()</code></a> is used.</p> +<p>This function can be called multiple times when multiple responses which +apply to the certificate chain are available. +If the response provided does not match any certificates present +in the chain, the code <a class="link" href="gnutls-gnutls.html#GNUTLS-E-OCSP-MISMATCH-WITH-CERTS:CAPS" title="GNUTLS_E_OCSP_MISMATCH_WITH_CERTS"><code class="literal">GNUTLS_E_OCSP_MISMATCH_WITH_CERTS</code></a> is returned. +If the response is already expired at the time of loading the code +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-EXPIRED:CAPS" title="GNUTLS_E_EXPIRED"><code class="literal">GNUTLS_E_EXPIRED</code></a> is returned.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-mem.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a credentials structure.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>resp_data</p></td> +<td class="parameter_description"><p>a memory buffer holding an OCSP response</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>is a certificate index as returned by <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a> and friends</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>fmt</p></td> +<td class="parameter_description"><p>is PEM or DER</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-ocsp-status-request-mem.returns"></a><h4>Returns</h4> +<p> On success, the number of loaded responses is returned, +otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-ocsp-expiration"></a><h3>gnutls_certificate_get_ocsp_expiration ()</h3> +<pre class="programlisting"><span class="returnvalue">time_t</span> +gnutls_certificate_get_ocsp_expiration + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> sc</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>, + <em class="parameter"><code><span class="type">int</span> oidx</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function returns the validity of the loaded OCSP responses, +to provide information on when to reload/refresh them.</p> +<p>Note that the credentials structure should be read-only when in +use, thus when reloading, either the credentials structure must not +be in use by any sessions, or a new credentials structure should be +allocated for new sessions.</p> +<p>When <em class="parameter"><code>oidx</code></em> + is (-1) then the minimum refresh time for all responses +is returned. Otherwise the index specifies the response corresponding +to the <em class="parameter"><code>odix</code></em> + certificate in the certificate chain.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-ocsp-expiration.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a credentials structure.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>is a certificate chain index as returned by <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-key" title="gnutls_certificate_set_key ()"><code class="function">gnutls_certificate_set_key()</code></a> and friends</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>oidx</p></td> +<td class="parameter_description"><p>is an OCSP response index</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-ocsp-expiration.returns"></a><h4>Returns</h4> +<p> On success, the expiration time of the OCSP response. Otherwise +(time_t)(-1) on error, or (time_t)-2 on out of bounds.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ocsp-status-request-enable-client"></a><h3>gnutls_ocsp_status_request_enable_client ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ocsp_status_request_enable_client + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *responder_id</code></em>, + <em class="parameter"><code><span class="type">size_t</span> responder_id_size</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *request_extensions</code></em>);</pre> +<p>This function is to be used by clients to request OCSP response +from the server, using the "status_request" TLS extension. Only +OCSP status type is supported.</p> +<p>Previous versions of GnuTLS supported setting <em class="parameter"><code>responder_id</code></em> + and +<em class="parameter"><code>extensions</code></em> + fields, but due to the difficult semantics of the +parameter usage, and other issues, this support was removed +since 3.6.0 and these parameters must be set to <code class="literal">NULL</code>.</p> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-enable-client.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>responder_id</p></td> +<td class="parameter_description"><p>ignored, must be <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>responder_id_size</p></td> +<td class="parameter_description"><p>ignored, must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>extensions</p></td> +<td class="parameter_description"><p>ignored, must be <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-enable-client.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ocsp-status-request-get"></a><h3>gnutls_ocsp_status_request_get ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ocsp_status_request_get (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *response</code></em>);</pre> +<p>This function returns the OCSP status response received +from the TLS server. The <em class="parameter"><code>response</code></em> + should be treated as +constant. If no OCSP response is available then +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> is returned.</p> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>response</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> with DER encoded OCSP response</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-get.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ocsp-status-request-is-checked"></a><h3>gnutls_ocsp_status_request_is_checked ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_ocsp_status_request_is_checked (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>When flags are zero this function returns non-zero if a valid OCSP status +response was included in the TLS handshake. That is, an OCSP status response +which is not too old, superseded or marks the certificate as revoked. +It returns zero otherwise.</p> +<p>When the flag <code class="literal">GNUTLS_OCSP_SR_IS_AVAIL</code> is specified, the function +returns non-zero if an OCSP status response was included in the handshake +even if it was invalid. Otherwise, if no OCSP status response was included, +it returns zero. The <code class="literal">GNUTLS_OCSP_SR_IS_AVAIL</code> flag was introduced in GnuTLS 3.4.0.</p> +<p>This is a helper function when needing to decide whether to perform an +explicit OCSP validity check on the peer's certificate. Should be called after +any of gnutls_certificate_verify_peers*() are called.</p> +<p>This function is always usable on client side, but on server side only +under TLS 1.3, which is the first version of TLS that allows cliend-side OCSP +responses.</p> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-is-checked.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero or <code class="literal">GNUTLS_OCSP_SR_IS_AVAIL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-is-checked.returns"></a><h4>Returns</h4> +<p> Non-zero if the response was valid, or a zero if it wasn't sent, +or sent and was invalid.</p> +</div> +<p class="since">Since: 3.1.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ocsp-status-request-get2"></a><h3>gnutls_ocsp_status_request_get2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ocsp_status_request_get2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> idx</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *response</code></em>);</pre> +<p>This function returns the OCSP status response received +from the TLS server for the certificate index provided. +The index corresponds to certificates as returned by +gnutls_certificate_get_peers. When index is zero this +function operates identically to <a class="link" href="gnutls-gnutls.html#gnutls-ocsp-status-request-get" title="gnutls_ocsp_status_request_get ()"><code class="function">gnutls_ocsp_status_request_get()</code></a>.</p> +<p>The returned <em class="parameter"><code>response</code></em> + should be treated as +constant. If no OCSP response is available for the +given index then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> +is returned.</p> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-get2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>idx</p></td> +<td class="parameter_description"><p>the index of peer's certificate</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>response</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> with DER encoded OCSP response</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ocsp-status-request-get2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-rawpk-key-mem"></a><h3>gnutls_certificate_set_rawpk_key_mem ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_rawpk_key_mem (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *spki</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pkey</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *pass</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **names</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> names_length</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function sets a public/private keypair in the +<span class="type">gnutls_certificate_credentials_t</span> type to be used for authentication +and/or encryption. <em class="parameter"><code>spki</code></em> + and <em class="parameter"><code>privkey</code></em> + should match otherwise set +signatures cannot be validated. In case of no match this function +returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH"><code class="literal">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</code></a>. This function should +be called once for the client because there is currently no mechanism +to determine which raw public-key to select for the peer when there +are multiple present. Multiple raw public keys for the server can be +distinghuished by setting the <em class="parameter"><code>names</code></em> +.</p> +<p>Note here that <em class="parameter"><code>spki</code></em> + is a raw public-key as defined +in RFC7250. It means that there is no surrounding certificate that +holds the public key and that there is therefore no direct mechanism +to prove the authenticity of this key. The keypair can be used during +a TLS handshake but its authenticity should be established via a +different mechanism (e.g. TOFU or known fingerprint).</p> +<p>The supported formats are basic unencrypted key, PKCS8, PKCS12, +and the openssl format and will be autodetected.</p> +<p>If the raw public-key and the private key are given in PEM encoding +then the strings that hold their values must be null terminated.</p> +<p>Key usage (as defined by X.509 extension (2.5.29.15)) can be explicitly +set because there is no certificate structure around the key to define +this value. See for more info <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-key-usage" title="gnutls_x509_crt_get_key_usage ()"><code class="function">gnutls_x509_crt_get_key_usage()</code></a>.</p> +<p>Note that, this function by default returns zero on success and a +negative value on error. Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> +is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> it returns an index +(greater or equal to zero). That index can be used in other functions +to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-rawpk-key-mem.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>spki</p></td> +<td class="parameter_description"><p>contains a raw public key in +PKIX.SubjectPublicKeyInfo format.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pkey</p></td> +<td class="parameter_description"><p>contains a raw private key.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>format</p></td> +<td class="parameter_description"><p>encoding of the keys. DER or PEM.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pass</p></td> +<td class="parameter_description"><p>an optional password to unlock the private key pkey.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_usage</p></td> +<td class="parameter_description"><p>An ORed sequence of <code class="literal">GNUTLS_KEY_</code>* flags.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>names</p></td> +<td class="parameter_description"><p>is an array of DNS names belonging to the public-key (NULL if none).</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>names_length</p></td> +<td class="parameter_description"><p>holds the length of the names list.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>an ORed sequence of <a class="link" href="gnutls-x509.html#gnutls-pkcs-encrypt-flags-t" title="enum gnutls_pkcs_encrypt_flags_t"><span class="type">gnutls_pkcs_encrypt_flags_t</span></a>. +These apply to the private key pkey.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-rawpk-key-mem.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, in case the +key pair does not match <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH"><code class="literal">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</code></a> is returned, +in other erroneous cases a different negative error code is returned.</p> +</div> +<p class="since">Since: 3.6.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-rawpk-key-file"></a><h3>gnutls_certificate_set_rawpk_key_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_set_rawpk_key_file (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *rawpkfile</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *privkeyfile</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *pass</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, + <em class="parameter"><code>const <span class="type">char</span> **names</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> names_length</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> privkey_flags</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> pkcs11_flags</code></em>);</pre> +<p>This function sets a public/private keypair read from file in the +<span class="type">gnutls_certificate_credentials_t</span> type to be used for authentication +and/or encryption. <em class="parameter"><code>spki</code></em> + and <em class="parameter"><code>privkey</code></em> + should match otherwise set +signatures cannot be validated. In case of no match this function +returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH"><code class="literal">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</code></a>. This function should +be called once for the client because there is currently no mechanism +to determine which raw public-key to select for the peer when there +are multiple present. Multiple raw public keys for the server can be +distinghuished by setting the <em class="parameter"><code>names</code></em> +.</p> +<p>Note here that <em class="parameter"><code>spki</code></em> + is a raw public-key as defined +in RFC7250. It means that there is no surrounding certificate that +holds the public key and that there is therefore no direct mechanism +to prove the authenticity of this key. The keypair can be used during +a TLS handshake but its authenticity should be established via a +different mechanism (e.g. TOFU or known fingerprint).</p> +<p>The supported formats are basic unencrypted key, PKCS8, PKCS12, +and the openssl format and will be autodetected.</p> +<p>If the raw public-key and the private key are given in PEM encoding +then the strings that hold their values must be null terminated.</p> +<p>Key usage (as defined by X.509 extension (2.5.29.15)) can be explicitly +set because there is no certificate structure around the key to define +this value. See for more info <a class="link" href="gnutls-x509.html#gnutls-x509-crt-get-key-usage" title="gnutls_x509_crt_get_key_usage ()"><code class="function">gnutls_x509_crt_get_key_usage()</code></a>.</p> +<p>Note that, this function by default returns zero on success and a +negative value on error. Since 3.5.6, when the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-CERTIFICATE-API-V2:CAPS"><code class="literal">GNUTLS_CERTIFICATE_API_V2</code></a> +is set using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-flags" title="gnutls_certificate_set_flags ()"><code class="function">gnutls_certificate_set_flags()</code></a> it returns an index +(greater or equal to zero). That index can be used in other functions +to refer to the added key-pair.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-rawpk-key-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>rawpkfile</p></td> +<td class="parameter_description"><p>contains a raw public key in +PKIX.SubjectPublicKeyInfo format.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>privkeyfile</p></td> +<td class="parameter_description"><p>contains a file path to a private key.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>format</p></td> +<td class="parameter_description"><p>encoding of the keys. DER or PEM.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pass</p></td> +<td class="parameter_description"><p>an optional password to unlock the private key privkeyfile.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_usage</p></td> +<td class="parameter_description"><p>an ORed sequence of <code class="literal">GNUTLS_KEY_</code>* flags.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>names</p></td> +<td class="parameter_description"><p>is an array of DNS names belonging to the public-key (NULL if none).</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>names_length</p></td> +<td class="parameter_description"><p>holds the length of the names list.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>privkey_flags</p></td> +<td class="parameter_description"><p>an ORed sequence of <a class="link" href="gnutls-x509.html#gnutls-pkcs-encrypt-flags-t" title="enum gnutls_pkcs_encrypt_flags_t"><span class="type">gnutls_pkcs_encrypt_flags_t</span></a>. +These apply to the private key pkey.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pkcs11_flags</p></td> +<td class="parameter_description"><p>one of gnutls_pkcs11_obj_flags. These apply to URLs.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-set-rawpk-key-file.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, in case the +key pair does not match <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH"><code class="literal">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</code></a> is returned, +in other erroneous cases a different negative error code is returned.</p> +</div> +<p class="since">Since: 3.6.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-init"></a><h3>gnutls_global_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_global_init (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly +called. To disable the implicit call (in a library constructor) of this +function set the environment variable <code class="literal">GNUTLS_NO_IMPLICIT_INIT</code> to 1.</p> +<p>This function performs any required precalculations, detects +the supported CPU capabilities and initializes the underlying +cryptographic backend. In order to free any resources +taken by this call you should <a class="link" href="gnutls-gnutls.html#gnutls-global-deinit" title="gnutls_global_deinit ()"><code class="function">gnutls_global_deinit()</code></a> +when gnutls usage is no longer needed.</p> +<p>This function increments a global counter, so that +<a class="link" href="gnutls-gnutls.html#gnutls-global-deinit" title="gnutls_global_deinit ()"><code class="function">gnutls_global_deinit()</code></a> only releases resources when it has been +called as many times as <a class="link" href="gnutls-gnutls.html#gnutls-global-init" title="gnutls_global_init ()"><code class="function">gnutls_global_init()</code></a>. This is useful when +GnuTLS is used by more than one library in an application. This +function can be called many times, but will only do something the +first time. It is thread safe since GnuTLS 3.3.0.</p> +<p>A subsequent call of this function if the initial has failed will +return the same error code.</p> +<div class="refsect3"> +<a name="gnutls-global-init.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-deinit"></a><h3>gnutls_global_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_global_deinit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>This function deinitializes the global data, that were initialized +using <a class="link" href="gnutls-gnutls.html#gnutls-global-init" title="gnutls_global_init ()"><code class="function">gnutls_global_init()</code></a>.</p> +<p>Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly +called. GnuTLS will automatically deinitialize on library destructor. See +<a class="link" href="gnutls-gnutls.html#gnutls-global-init" title="gnutls_global_init ()"><code class="function">gnutls_global_init()</code></a> for disabling the implicit initialization/deinitialization.</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-get-library-config"></a><h3>gnutls_get_library_config ()</h3> +<pre class="programlisting">const <a class="link" href="gnutls-gnutls.html#gnutls-library-config-st" title="gnutls_library_config_st"><span class="returnvalue">gnutls_library_config_st</span></a> * +gnutls_get_library_config (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Returns the library configuration as key value pairs. +Currently defined keys are:</p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p>fips-module-name: the name of the FIPS140 module</p></li> +<li class="listitem"><p>fips-module-version: the version of the FIPS140 module</p></li> +<li class="listitem"><p>libgnutls-soname: the SONAME of the library itself</p></li> +<li class="listitem"><p>libnettle-soname: the library SONAME of linked libnettle</p></li> +<li class="listitem"><p>libhogweed-soname: the library SONAME of linked libhogweed</p></li> +<li class="listitem"><p>libgmp-soname: the library SONAME of linked libgmp</p></li> +<li class="listitem"><p>hardware-features: enabled hardware support features</p></li> +<li class="listitem"><p>tls-features: enabled TLS protocol features</p></li> +</ul></div> +<div class="refsect3"> +<a name="gnutls-get-library-config.returns"></a><h4>Returns</h4> +<p> a NUL-terminated <a class="link" href="gnutls-gnutls.html#gnutls-library-config-st" title="gnutls_library_config_st"><code class="literal">gnutls_library_config_st</code></a> array</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-time-func"></a><h3>gnutls_time_func ()</h3> +<pre class="programlisting"><span class="returnvalue">time_t</span> +<span class="c_punctuation">(</span>*gnutls_time_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">time_t</span> *t</code></em>);</pre> +<p>Function prototype for <code class="function">time()</code>-like function. Set with +<a class="link" href="gnutls-gnutls.html#gnutls-global-set-time-function" title="gnutls_global_set_time_function ()"><code class="function">gnutls_global_set_time_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-time-func.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>t</p></td> +<td class="parameter_description"><p>where to store time.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-time-func.returns"></a><h4>Returns</h4> +<p> Number of seconds since the epoch, or (time_t)-1 on errors.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="mutex-init-func"></a><h3>mutex_init_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*mutex_init_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> **mutex</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="mutex-lock-func"></a><h3>mutex_lock_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*mutex_lock_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> **mutex</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="mutex-unlock-func"></a><h3>mutex_unlock_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*mutex_unlock_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> **mutex</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="mutex-deinit-func"></a><h3>mutex_deinit_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*mutex_deinit_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> **mutex</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-set-mutex"></a><h3>gnutls_global_set_mutex ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_global_set_mutex (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#mutex-init-func" title="mutex_init_func ()"><span class="type">mutex_init_func</span></a> init</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#mutex-deinit-func" title="mutex_deinit_func ()"><span class="type">mutex_deinit_func</span></a> deinit</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#mutex-lock-func" title="mutex_lock_func ()"><span class="type">mutex_lock_func</span></a> lock</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#mutex-unlock-func" title="mutex_unlock_func ()"><span class="type">mutex_unlock_func</span></a> unlock</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_global_set_mutex</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is discouraged on GnuTLS 3.7.3 or later.</p> +</div> +<p>With this function you are allowed to override the default mutex +locks used in some parts of gnutls and dependent libraries. This function +should be used if you have complete control of your program and libraries. +Do not call this function from a library, or preferably from any application +unless really needed to. GnuTLS will use the appropriate locks for the running +system.</p> +<p>This function must be called prior to any other GnuTLS function; otherwise +the behavior is undefined.</p> +<div class="refsect3"> +<a name="gnutls-global-set-mutex.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>init</p></td> +<td class="parameter_description"><p>mutex initialization function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>deinit</p></td> +<td class="parameter_description"><p>mutex deinitialization function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>lock</p></td> +<td class="parameter_description"><p>mutex locking function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>unlock</p></td> +<td class="parameter_description"><p>mutex unlocking function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alloc-function"></a><h3>gnutls_alloc_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +<span class="c_punctuation">(</span>*gnutls_alloc_function<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">size_t</span> Param1</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-calloc-function"></a><h3>gnutls_calloc_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +<span class="c_punctuation">(</span>*gnutls_calloc_function<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">size_t</span> Param1</code></em>, + <em class="parameter"><code><span class="type">size_t</span> Param2</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-is-secure-function"></a><h3>gnutls_is_secure_function ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_is_secure_function<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">void</span> *Param1</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-free-function"></a><h3>gnutls_free_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +<span class="c_punctuation">(</span>*gnutls_free_function<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *Param1</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-realloc-function"></a><h3>gnutls_realloc_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +<span class="c_punctuation">(</span>*gnutls_realloc_function<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *Param1</code></em>, + <em class="parameter"><code><span class="type">size_t</span> Param2</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-set-time-function"></a><h3>gnutls_global_set_time_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_global_set_time_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-time-func" title="gnutls_time_func ()"><span class="type">gnutls_time_func</span></a> time_func</code></em>);</pre> +<p>This is the function where you can override the default system time +function. The application provided function should behave the same +as the standard function.</p> +<div class="refsect3"> +<a name="gnutls-global-set-time-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>time_func</p></td> +<td class="parameter_description"><p>it's the system time function, a <a class="link" href="gnutls-gnutls.html#gnutls-time-func" title="gnutls_time_func ()"><code class="function">gnutls_time_func()</code></a> callback.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-free"></a><h3>gnutls_free()</h3> +<pre class="programlisting">#define gnutls_free(a) gnutls_free((void *) (a)), a=NULL +</pre> +<p>This function will free data pointed by ptr.</p> +<p>The deallocation function used is the one set by +<code class="function">gnutls_global_set_mem_functions()</code>.</p> +<div class="refsect3"> +<a name="gnutls-free.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>pointer to memory</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-memset"></a><h3>gnutls_memset ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_memset (<em class="parameter"><code><span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">int</span> c</code></em>, + <em class="parameter"><code><span class="type">size_t</span> size</code></em>);</pre> +<p>This function will operate similarly to <code class="function">memset()</code>, but will +not be optimized out by the compiler.</p> +<div class="refsect3"> +<a name="gnutls-memset.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the memory to set</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>c</p></td> +<td class="parameter_description"><p>the constant byte to fill the memory with</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>size</p></td> +<td class="parameter_description"><p>the size of memory</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-memcmp"></a><h3>gnutls_memcmp ()</h3> +<pre class="programlisting"><span class="returnvalue">if</span> +gnutls_memcmp ();</pre> +<p>This function will operate similarly to <code class="function">memcmp()</code>, but will operate +on time that depends only on the size of the string. That is will +not return early if the strings don't match on the first byte.</p> +<div class="refsect3"> +<a name="gnutls-memcmp.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>s1</p></td> +<td class="parameter_description"><p>the first address to compare</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>s2</p></td> +<td class="parameter_description"><p>the second address to compare</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>n</p></td> +<td class="parameter_description"><p>the size of memory to compare</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-memcmp.returns"></a><h4>Returns</h4> +<p> non zero on difference and zero if the buffers are identical.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-log-func"></a><h3>gnutls_log_func ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +<span class="c_punctuation">(</span>*gnutls_log_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">int</span> Param1</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *Param2</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-audit-log-func"></a><h3>gnutls_audit_log_func ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +<span class="c_punctuation">(</span>*gnutls_audit_log_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> Param1</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *Param2</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-set-log-function"></a><h3>gnutls_global_set_log_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_global_set_log_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-log-func" title="gnutls_log_func ()"><span class="type">gnutls_log_func</span></a> log_func</code></em>);</pre> +<p>This is the function where you set the logging function gnutls is +going to use. This function only accepts a character array. +Normally you may not use this function since it is only used for +debugging purposes.</p> +<p><em class="parameter"><code>gnutls_log_func</code></em> + is of the form, +void (*gnutls_log_func)( int level, const char*);</p> +<div class="refsect3"> +<a name="gnutls-global-set-log-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>log_func</p></td> +<td class="parameter_description"><p>it's a log function</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-set-audit-log-function"></a><h3>gnutls_global_set_audit_log_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_global_set_audit_log_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-audit-log-func" title="gnutls_audit_log_func ()"><span class="type">gnutls_audit_log_func</span></a> log_func</code></em>);</pre> +<p>This is the function to set the audit logging function. This +is a function to report important issues, such as possible +attacks in the protocol. This is different from <a class="link" href="gnutls-gnutls.html#gnutls-global-set-log-function" title="gnutls_global_set_log_function ()"><code class="function">gnutls_global_set_log_function()</code></a> +because it will report also session-specific events. The session +parameter will be null if there is no corresponding TLS session.</p> +<p><em class="parameter"><code>gnutls_audit_log_func</code></em> + is of the form, +void (*gnutls_audit_log_func)( gnutls_session_t, const char*);</p> +<div class="refsect3"> +<a name="gnutls-global-set-audit-log-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>log_func</p></td> +<td class="parameter_description"><p>it is the audit log function</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-global-set-log-level"></a><h3>gnutls_global_set_log_level ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_global_set_log_level (<em class="parameter"><code><span class="type">int</span> level</code></em>);</pre> +<p>This is the function that allows you to set the log level. The +level is an integer between 0 and 9. Higher values mean more +verbosity. The default value is 0. Larger values should only be +used with care, since they may reveal sensitive information.</p> +<p>Use a log level over 10 to enable all debugging options.</p> +<div class="refsect3"> +<a name="gnutls-global-set-log-level.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>level</p></td> +<td class="parameter_description"><p>it's an integer from 0 to 99.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-keylog-func"></a><h3>gnutls_keylog_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_keylog_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *label</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *secret</code></em>);</pre> +<p>Function prototype for keylog hooks. It is set using +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-keylog-function" title="gnutls_session_set_keylog_function ()"><code class="function">gnutls_session_set_keylog_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-keylog-func.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the current session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>label</p></td> +<td class="parameter_description"><p>the keylog label</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secret</p></td> +<td class="parameter_description"><p>the (const) data of the derived secret.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-keylog-func.returns"></a><h4>Returns</h4> +<p> Non zero on error.</p> +</div> +<p class="since">Since: 3.6.13</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-keylog-function"></a><h3>gnutls_session_get_keylog_function ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-keylog-func" title="gnutls_keylog_func ()"><span class="returnvalue">gnutls_keylog_func</span></a> +gnutls_session_get_keylog_function (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the callback function set using +<a class="link" href="gnutls-gnutls.html#gnutls-session-set-keylog-function" title="gnutls_session_set_keylog_function ()"><code class="function">gnutls_session_set_keylog_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-get-keylog-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-keylog-function.returns"></a><h4>Returns</h4> +<p> The function set or <code class="literal">NULL</code> otherwise.</p> +</div> +<p class="since">Since: 3.6.13</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-keylog-function"></a><h3>gnutls_session_set_keylog_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_set_keylog_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-keylog-func" title="gnutls_keylog_func ()"><span class="type">gnutls_keylog_func</span></a> func</code></em>);</pre> +<p>This function will set a callback to be called when a new secret is +derived and installed during handshake.</p> +<div class="refsect3"> +<a name="gnutls-session-set-keylog-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.6.13</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-init"></a><h3>gnutls_dh_params_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> *dh_params</code></em>);</pre> +<p>This function will initialize the DH parameters type.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-init.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-init.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-deinit"></a><h3>gnutls_dh_params_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_dh_params_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>);</pre> +<p>This function will deinitialize the DH parameters type.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-import-raw"></a><h3>gnutls_dh_params_import_raw ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_import_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *prime</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *generator</code></em>);</pre> +<p>This function will replace the pair of prime and generator for use +in the Diffie-Hellman key exchange. The new parameters should be +stored in the appropriate gnutls_datum.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-import-raw.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>prime</p></td> +<td class="parameter_description"><p>holds the new prime</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>generator</p></td> +<td class="parameter_description"><p>holds the new generator</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-import-raw.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-import-dsa"></a><h3>gnutls_dh_params_import_dsa ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_import_dsa (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>);</pre> +<p>This function will import the prime and generator of the DSA key for use +in the Diffie-Hellman key exchange.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-import-dsa.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>holds a DSA private key</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-import-dsa.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-import-raw2"></a><h3>gnutls_dh_params_import_raw2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_import_raw2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *prime</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *generator</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> key_bits</code></em>);</pre> +<p>This function will replace the pair of prime and generator for use +in the Diffie-Hellman key exchange. The new parameters should be +stored in the appropriate gnutls_datum.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-import-raw2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>prime</p></td> +<td class="parameter_description"><p>holds the new prime</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>generator</p></td> +<td class="parameter_description"><p>holds the new generator</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_bits</p></td> +<td class="parameter_description"><p>the private key bits (set to zero when unknown)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-import-raw2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-import-raw3"></a><h3>gnutls_dh_params_import_raw3 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_import_raw3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *prime</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *q</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *generator</code></em>);</pre> +<p>This function will replace the pair of prime and generator for use +in the Diffie-Hellman key exchange. The new parameters should be +stored in the appropriate gnutls_datum.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-import-raw3.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>prime</p></td> +<td class="parameter_description"><p>holds the new prime</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>q</p></td> +<td class="parameter_description"><p>holds the subgroup if available, otherwise NULL</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>generator</p></td> +<td class="parameter_description"><p>holds the new generator</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-import-raw3.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-import-pkcs3"></a><h3>gnutls_dh_params_import_pkcs3 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_import_pkcs3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> params</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pkcs3_params</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>);</pre> +<p>This function will extract the DHParams found in a PKCS3 formatted +structure. This is the format generated by "openssl dhparam" tool.</p> +<p>If the structure is PEM encoded, it should have a header +of "BEGIN DH PARAMETERS".</p> +<div class="refsect3"> +<a name="gnutls-dh-params-import-pkcs3.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>params</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pkcs3_params</p></td> +<td class="parameter_description"><p>should contain a PKCS3 DHParams structure PEM or DER encoded</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>format</p></td> +<td class="parameter_description"><p>the format of params. PEM or DER.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-import-pkcs3.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-generate2"></a><h3>gnutls_dh_params_generate2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_generate2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> params</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>);</pre> +<p>This function will generate a new pair of prime and generator for use in +the Diffie-Hellman key exchange. This may take long time.</p> +<p>It is recommended not to set the number of bits directly, but +use <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-to-pk-bits" title="gnutls_sec_param_to_pk_bits ()"><code class="function">gnutls_sec_param_to_pk_bits()</code></a> instead.</p> +<p>Also note that the DH parameters are only useful to servers. +Since clients use the parameters sent by the server, it's of +no use to call this in client side.</p> +<p>The parameters generated are of the DSA form. It also is possible +to generate provable parameters (following the Shawe-Taylor +algorithm), using <a class="link" href="gnutls-x509.html#gnutls-x509-privkey-generate2" title="gnutls_x509_privkey_generate2 ()"><code class="function">gnutls_x509_privkey_generate2()</code></a> with DSA option +and the <a class="link" href="gnutls-abstract.html#GNUTLS-PRIVKEY-FLAG-PROVABLE:CAPS"><code class="literal">GNUTLS_PRIVKEY_FLAG_PROVABLE</code></a> flag set. These can the +be imported with <a class="link" href="gnutls-gnutls.html#gnutls-dh-params-import-dsa" title="gnutls_dh_params_import_dsa ()"><code class="function">gnutls_dh_params_import_dsa()</code></a>.</p> +<p>It is no longer recommended for applications to generate parameters. +See the "Parameter generation" section in the manual.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-generate2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dparams</p></td> +<td class="parameter_description"><p>The parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bits</p></td> +<td class="parameter_description"><p>is the prime's number of bits</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-generate2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-export-pkcs3"></a><h3>gnutls_dh_params_export_pkcs3 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_export_pkcs3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> params</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>, + <em class="parameter"><code>unsigned <span class="type">char</span> *params_data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *params_data_size</code></em>);</pre> +<p>This function will export the given dh parameters to a PKCS3 +DHParams structure. This is the format generated by "openssl dhparam" tool. +If the buffer provided is not long enough to hold the output, then +GNUTLS_E_SHORT_MEMORY_BUFFER will be returned.</p> +<p>If the structure is PEM encoded, it will have a header +of "BEGIN DH PARAMETERS".</p> +<div class="refsect3"> +<a name="gnutls-dh-params-export-pkcs3.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>params</p></td> +<td class="parameter_description"><p>Holds the DH parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>format</p></td> +<td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>params_data</p></td> +<td class="parameter_description"><p>will contain a PKCS3 DHParams structure PEM or DER encoded</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>params_data_size</p></td> +<td class="parameter_description"><p>holds the size of params_data (and will be replaced by the actual size of parameters)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-export-pkcs3.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-export2-pkcs3"></a><h3>gnutls_dh_params_export2_pkcs3 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_export2_pkcs3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> params</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> format</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre> +<p>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 <em class="parameter"><code>out</code></em> + will be allocated using <code class="function">gnutls_malloc()</code>.</p> +<p>If the structure is PEM encoded, it will have a header +of "BEGIN DH PARAMETERS".</p> +<div class="refsect3"> +<a name="gnutls-dh-params-export2-pkcs3.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>params</p></td> +<td class="parameter_description"><p>Holds the DH parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>format</p></td> +<td class="parameter_description"><p>the format of output params. One of PEM or DER.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>will contain a PKCS3 DHParams structure PEM or DER encoded</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-export2-pkcs3.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-export-raw"></a><h3>gnutls_dh_params_export_raw ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_export_raw (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> params</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *prime</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *generator</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *bits</code></em>);</pre> +<p>This function will export the pair of prime and generator for use +in the Diffie-Hellman key exchange. The new parameters will be +allocated using <code class="function">gnutls_malloc()</code> and will be stored in the +appropriate datum.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-export-raw.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>params</p></td> +<td class="parameter_description"><p>Holds the DH parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>prime</p></td> +<td class="parameter_description"><p>will hold the new prime</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>generator</p></td> +<td class="parameter_description"><p>will hold the new generator</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bits</p></td> +<td class="parameter_description"><p>if non null will hold the secret key's number of bits</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-export-raw.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-cpy"></a><h3>gnutls_dh_params_cpy ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_params_cpy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dst</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> src</code></em>);</pre> +<p>This function will copy the DH parameters structure from source +to destination. The destination should be already initialized.</p> +<div class="refsect3"> +<a name="gnutls-dh-params-cpy.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dst</p></td> +<td class="parameter_description"><p>Is the destination parameters, which should be initialized.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>src</p></td> +<td class="parameter_description"><p>Is the source parameters</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-params-cpy.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +otherwise a negative error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pull-func"></a><h3>gnutls_pull_func ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +<span class="c_punctuation">(</span>*gnutls_pull_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> Param1</code></em>, + <em class="parameter"><code><span class="type">void</span> *Param2</code></em>, + <em class="parameter"><code><span class="type">size_t</span> Param3</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-push-func"></a><h3>gnutls_push_func ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +<span class="c_punctuation">(</span>*gnutls_push_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> Param1</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *Param2</code></em>, + <em class="parameter"><code><span class="type">size_t</span> Param3</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-system-recv-timeout"></a><h3>gnutls_system_recv_timeout ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_system_recv_timeout (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> ptr</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> ms</code></em>);</pre> +<p>Wait for data to be received from the provided socket (<em class="parameter"><code>ptr</code></em> +) within a +timeout period in milliseconds, using <code class="function">select()</code> on the provided <em class="parameter"><code>ptr</code></em> +.</p> +<p>This function is provided as a helper for constructing custom +callbacks for <a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-timeout-function" title="gnutls_transport_set_pull_timeout_function ()"><code class="function">gnutls_transport_set_pull_timeout_function()</code></a>, +which can be used if you rely on socket file descriptors.</p> +<p>Returns -1 on error, 0 on timeout, positive value if data are available for reading.</p> +<div class="refsect3"> +<a name="gnutls-system-recv-timeout.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>A file descriptor (wrapped in a gnutls_transport_ptr_t pointer)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ms</p></td> +<td class="parameter_description"><p>The number of milliseconds to wait.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pull-timeout-func"></a><h3>gnutls_pull_timeout_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_pull_timeout_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> Param1</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> ms</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-vec-push-func"></a><h3>gnutls_vec_push_func ()</h3> +<pre class="programlisting"><span class="returnvalue">ssize_t</span> +<span class="c_punctuation">(</span>*gnutls_vec_push_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> Param1</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#giovec-t" title="giovec_t"><span class="type">giovec_t</span></a> *iov</code></em>, + <em class="parameter"><code><span class="type">int</span> iovcnt</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-errno-func"></a><h3>gnutls_errno_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_errno_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> Param1</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-int"></a><h3>gnutls_transport_set_int ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_int (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> r</code></em>);</pre> +<p>This function sets the first argument of the transport function, such +as <code class="function">send()</code> and <code class="function">recv()</code> for the default callbacks using the +system's socket API.</p> +<p>This function is equivalent to calling <a class="link" href="gnutls-gnutls.html#gnutls-transport-set-ptr" title="gnutls_transport_set_ptr ()"><code class="function">gnutls_transport_set_ptr()</code></a> +with the descriptor, but requires no casts.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-int.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>fd</p></td> +<td class="parameter_description"><p>is the socket descriptor for the connection.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-int2"></a><h3>gnutls_transport_set_int2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_int2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> r</code></em>, + <em class="parameter"><code><span class="type">int</span> s</code></em>);</pre> +<p>This function sets the first argument of the transport functions, +such as <code class="function">send()</code> and <code class="function">recv()</code> for the default callbacks using the +system's socket API. With this function you can set two different +descriptors for receiving and sending.</p> +<p>This function is equivalent to calling <a class="link" href="gnutls-gnutls.html#gnutls-transport-set-ptr2" title="gnutls_transport_set_ptr2 ()"><code class="function">gnutls_transport_set_ptr2()</code></a> +with the descriptors, but requires no casts.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-int2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_fd</p></td> +<td class="parameter_description"><p>is socket descriptor for the pull function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_fd</p></td> +<td class="parameter_description"><p>is socket descriptor for the push function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-get-int2"></a><h3>gnutls_transport_get_int2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_get_int2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> *r</code></em>, + <em class="parameter"><code><span class="type">int</span> *s</code></em>);</pre> +<p>Used to get the arguments of the transport functions (like PUSH +and PULL). These should have been set using +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-int2" title="gnutls_transport_set_int2 ()"><code class="function">gnutls_transport_set_int2()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-transport-get-int2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_int</p></td> +<td class="parameter_description"><p>will hold the value for the pull function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_int</p></td> +<td class="parameter_description"><p>will hold the value for the push function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.1.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-get-int"></a><h3>gnutls_transport_get_int ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_transport_get_int (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Used to get the first argument of the transport function (like +PUSH and PULL). This must have been set using +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-int" title="gnutls_transport_set_int ()"><code class="function">gnutls_transport_set_int()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-transport-get-int.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-transport-get-int.returns"></a><h4>Returns</h4> +<p> The first argument of the transport function.</p> +</div> +<p class="since">Since: 3.1.9</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-ptr"></a><h3>gnutls_transport_set_ptr ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> ptr</code></em>);</pre> +<p>Used to set the first argument of the transport function (for push +and pull callbacks). In berkeley style sockets this function will set the +connection descriptor.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>is the value.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-ptr2"></a><h3>gnutls_transport_set_ptr2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_ptr2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> recv_ptr</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> send_ptr</code></em>);</pre> +<p>Used to set the first argument of the transport function (for push +and pull callbacks). In berkeley style sockets this function will set the +connection descriptor. With this function you can use two different +pointers for receiving and sending.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-ptr2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_ptr</p></td> +<td class="parameter_description"><p>is the value for the pull function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_ptr</p></td> +<td class="parameter_description"><p>is the value for the push function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-get-ptr"></a><h3>gnutls_transport_get_ptr ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="returnvalue">gnutls_transport_ptr_t</span></a> +gnutls_transport_get_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Used to get the first argument of the transport function (like +PUSH and PULL). This must have been set using +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-ptr" title="gnutls_transport_set_ptr ()"><code class="function">gnutls_transport_set_ptr()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-transport-get-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-transport-get-ptr.returns"></a><h4>Returns</h4> +<p> The first argument of the transport function.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-get-ptr2"></a><h3>gnutls_transport_get_ptr2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_get_ptr2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> *recv_ptr</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-transport-ptr-t" title="gnutls_transport_ptr_t"><span class="type">gnutls_transport_ptr_t</span></a> *send_ptr</code></em>);</pre> +<p>Used to get the arguments of the transport functions (like PUSH +and PULL). These should have been set using +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-ptr2" title="gnutls_transport_set_ptr2 ()"><code class="function">gnutls_transport_set_ptr2()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-transport-get-ptr2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_ptr</p></td> +<td class="parameter_description"><p>will hold the value for the pull function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_ptr</p></td> +<td class="parameter_description"><p>will hold the value for the push function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-vec-push-function"></a><h3>gnutls_transport_set_vec_push_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_vec_push_function + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-vec-push-func" title="gnutls_vec_push_func ()"><span class="type">gnutls_vec_push_func</span></a> vec_func</code></em>);</pre> +<p>Using this function you can override the default writev(2) +function for gnutls to send data. Setting this callback +instead of <a class="link" href="gnutls-gnutls.html#gnutls-transport-set-push-function" title="gnutls_transport_set_push_function ()"><code class="function">gnutls_transport_set_push_function()</code></a> is recommended +since it introduces less overhead in the TLS handshake process.</p> +<p><em class="parameter"><code>vec_func</code></em> + is of the form, +ssize_t (*gnutls_vec_push_func) (gnutls_transport_ptr_t, const giovec_t * iov, int iovcnt);</p> +<div class="refsect3"> +<a name="gnutls-transport-set-vec-push-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>vec_func</p></td> +<td class="parameter_description"><p>a callback function similar to <code class="function">writev()</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-push-function"></a><h3>gnutls_transport_set_push_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_push_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-push-func" title="gnutls_push_func ()"><span class="type">gnutls_push_func</span></a> push_func</code></em>);</pre> +<p>This is the function where you set a push function for gnutls to +use in order to send data. If you are going to use berkeley style +sockets, you do not need to use this function since the default +send(2) will probably be ok. Otherwise you should specify this +function for gnutls to be able to send data. +The callback should return a positive number indicating the +bytes sent, and -1 on error.</p> +<p><em class="parameter"><code>push_func</code></em> + is of the form, +ssize_t (*gnutls_push_func)(gnutls_transport_ptr_t, const void*, size_t);</p> +<div class="refsect3"> +<a name="gnutls-transport-set-push-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>push_func</p></td> +<td class="parameter_description"><p>a callback function similar to <code class="function">write()</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-pull-function"></a><h3>gnutls_transport_set_pull_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_pull_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pull-func" title="gnutls_pull_func ()"><span class="type">gnutls_pull_func</span></a> pull_func</code></em>);</pre> +<p>This is the function where you set a function for gnutls to receive +data. Normally, if you use berkeley style sockets, do not need to +use this function since the default recv(2) will probably be ok. +The callback should return 0 on connection termination, a positive +number indicating the number of bytes received, and -1 on error.</p> +<p><em class="parameter"><code>gnutls_pull_func</code></em> + is of the form, +ssize_t (*gnutls_pull_func)(gnutls_transport_ptr_t, void*, size_t);</p> +<div class="refsect3"> +<a name="gnutls-transport-set-pull-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pull_func</p></td> +<td class="parameter_description"><p>a callback function similar to <code class="function">read()</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-pull-timeout-function"></a><h3>gnutls_transport_set_pull_timeout_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_pull_timeout_function + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pull-timeout-func" title="gnutls_pull_timeout_func ()"><span class="type">gnutls_pull_timeout_func</span></a> func</code></em>);</pre> +<p>This is the function where you set a function for gnutls to know +whether data are ready to be received. It should wait for data a +given time frame in milliseconds. The callback should return 0 on +timeout, a positive number if data can be received, and -1 on error. +You'll need to override this function if <code class="function">select()</code> is not suitable +for the provided transport calls.</p> +<p>As with <code class="function">select()</code>, if the timeout value is zero the callback should return +zero if no data are immediately available. The special value +<a class="link" href="gnutls-gnutls.html#GNUTLS-INDEFINITE-TIMEOUT:CAPS" title="GNUTLS_INDEFINITE_TIMEOUT"><code class="literal">GNUTLS_INDEFINITE_TIMEOUT</code></a> indicates that the callback should wait indefinitely +for data.</p> +<p><em class="parameter"><code>gnutls_pull_timeout_func</code></em> + is of the form, +int (*gnutls_pull_timeout_func)(gnutls_transport_ptr_t, unsigned int ms);</p> +<p>This callback is necessary when <a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-timeout" title="gnutls_handshake_set_timeout ()"><code class="function">gnutls_handshake_set_timeout()</code></a> or +<a class="link" href="gnutls-gnutls.html#gnutls-record-set-timeout" title="gnutls_record_set_timeout ()"><code class="function">gnutls_record_set_timeout()</code></a> are set, under TLS1.3 and for enforcing the DTLS +mode timeouts when in blocking mode.</p> +<p>For compatibility with future GnuTLS versions this callback must be set when +a custom pull function is registered. The callback will not be used when the +session is in TLS mode with non-blocking sockets. That is, when <a class="link" href="gnutls-gnutls.html#GNUTLS-NONBLOCK:CAPS"><code class="literal">GNUTLS_NONBLOCK</code></a> +is specified for a TLS session in <a class="link" href="gnutls-gnutls.html#gnutls-init" title="gnutls_init ()"><code class="function">gnutls_init()</code></a>.</p> +<p>The helper function <a class="link" href="gnutls-gnutls.html#gnutls-system-recv-timeout" title="gnutls_system_recv_timeout ()"><code class="function">gnutls_system_recv_timeout()</code></a> is provided to +simplify writing callbacks.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-pull-timeout-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>a callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-errno-function"></a><h3>gnutls_transport_set_errno_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_errno_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-errno-func" title="gnutls_errno_func ()"><span class="type">gnutls_errno_func</span></a> errno_func</code></em>);</pre> +<p>This is the function where you set a function to retrieve errno +after a failed push or pull operation.</p> +<p><em class="parameter"><code>errno_func</code></em> + is of the form, +int (*gnutls_errno_func)(gnutls_transport_ptr_t); +and should return the errno.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-errno-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>errno_func</p></td> +<td class="parameter_description"><p>a callback function similar to <code class="function">write()</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-set-errno"></a><h3>gnutls_transport_set_errno ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_transport_set_errno (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">int</span> err</code></em>);</pre> +<p>Store <em class="parameter"><code>err</code></em> + in the session-specific errno variable. Useful values +for <em class="parameter"><code>err</code></em> + are EINTR, EAGAIN and EMSGSIZE, other values are treated will be +treated as real errors in the push/pull function.</p> +<p>This function is useful in replacement push and pull functions set by +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-push-function" title="gnutls_transport_set_push_function ()"><code class="function">gnutls_transport_set_push_function()</code></a> and +<a class="link" href="gnutls-gnutls.html#gnutls-transport-set-pull-function" title="gnutls_transport_set_pull_function ()"><code class="function">gnutls_transport_set_pull_function()</code></a> under Windows, where the +replacements may not have access to the same <em class="parameter"><code>errno</code></em> + +variable that is used by GnuTLS (e.g., the application is linked to +msvcr71.dll and gnutls is linked to msvcrt.dll).</p> +<p>This function is unreliable if you are using the same +<em class="parameter"><code>session</code></em> + in different threads for sending and receiving.</p> +<div class="refsect3"> +<a name="gnutls-transport-set-errno.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>err</p></td> +<td class="parameter_description"><p>error value to store in session-specific errno variable.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-set-ptr"></a><h3>gnutls_session_set_ptr ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_session_set_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre> +<p>This function will set (associate) the user given pointer <em class="parameter"><code>ptr</code></em> + to +the session structure. This pointer can be accessed with +<a class="link" href="gnutls-gnutls.html#gnutls-session-get-ptr" title="gnutls_session_get_ptr ()"><code class="function">gnutls_session_get_ptr()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-set-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>is the user pointer</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-get-ptr"></a><h3>gnutls_session_get_ptr ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +gnutls_session_get_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get user pointer for session. Useful in callbacks. This is the + pointer set with <a class="link" href="gnutls-gnutls.html#gnutls-session-set-ptr" title="gnutls_session_set_ptr ()"><code class="function">gnutls_session_set_ptr()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-session-get-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-get-ptr.returns"></a><h4>Returns</h4> +<p> the user given pointer from the session structure, or +<code class="literal">NULL</code> if it was never set.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-send-cert"></a><h3>gnutls_openpgp_send_cert ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_openpgp_send_cert (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-openpgp-crt-status-t" title="enum gnutls_openpgp_crt_status_t"><span class="type">gnutls_openpgp_crt_status_t</span></a> status</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fingerprint"></a><h3>gnutls_fingerprint ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_fingerprint (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> algo</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><span class="type">void</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will calculate a fingerprint (actually a hash), of +the given data. The result is not printable data. You should +convert it to hex, or to something else printable.</p> +<p>This is the usual way to calculate a fingerprint of an X.509 DER +encoded certificate. Note however that the fingerprint of an +OpenPGP certificate is not just a hash and cannot be calculated with this +function.</p> +<div class="refsect3"> +<a name="gnutls-fingerprint.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>algo</p></td> +<td class="parameter_description"><p>is a digest algorithm</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>is the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>is the place where the result will be copied (may be null).</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>should hold the size of the result. The actual size +of the returned result will also be copied there.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-fingerprint.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-random-art"></a><h3>gnutls_random_art ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_random_art (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-random-art-t" title="enum gnutls_random_art_t"><span class="type">gnutls_random_art_t</span></a> type</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *key_type</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> key_size</code></em>, + <em class="parameter"><code><span class="type">void</span> *fpr</code></em>, + <em class="parameter"><code><span class="type">size_t</span> fpr_size</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *art</code></em>);</pre> +<p>This function will convert a given fingerprint to an "artistic" +image. The returned image is allocated using <code class="function">gnutls_malloc()</code>, is +null-terminated but art->size will not account the terminating null.</p> +<div class="refsect3"> +<a name="gnutls-random-art.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>The type of the random art (for now only <a class="link" href="gnutls-gnutls.html#GNUTLS-RANDOM-ART-OPENSSH:CAPS"><code class="literal">GNUTLS_RANDOM_ART_OPENSSH</code></a> is supported)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_type</p></td> +<td class="parameter_description"><p>The type of the key (RSA, DSA etc.)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key_size</p></td> +<td class="parameter_description"><p>The size of the key in bits</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>fpr</p></td> +<td class="parameter_description"><p>The fingerprint of the key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>fpr_size</p></td> +<td class="parameter_description"><p>The size of the fingerprint</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>art</p></td> +<td class="parameter_description"><p>The returned random art</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-random-art.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-idna-map"></a><h3>gnutls_idna_map ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_idna_map (<em class="parameter"><code>const <span class="type">char</span> *input</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> ilen</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function will convert the provided UTF-8 domain name, to +its IDNA mapping in an allocated variable. Note that depending on the flags the used gnutls +library was compiled with, the output of this function may vary (i.e., +may be IDNA2008, or IDNA2003).</p> +<p>To force IDNA2008 specify the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-IDNA-FORCE-2008:CAPS" title="GNUTLS_IDNA_FORCE_2008"><code class="literal">GNUTLS_IDNA_FORCE_2008</code></a>. In +the case GnuTLS is not compiled with the necessary dependencies, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE"><code class="literal">GNUTLS_E_UNIMPLEMENTED_FEATURE</code></a> will be returned to indicate that +gnutls is unable to perform the requested conversion.</p> +<p>Note also, that this function will return an empty string if an +empty string is provided as input.</p> +<div class="refsect3"> +<a name="gnutls-idna-map.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>input</p></td> +<td class="parameter_description"><p>contain the UTF-8 formatted domain name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ilen</p></td> +<td class="parameter_description"><p>the length of the provided string</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>the result in an null-terminated allocated string</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-idna-map.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-UTF8-STRING:CAPS" title="GNUTLS_E_INVALID_UTF8_STRING"><code class="literal">GNUTLS_E_INVALID_UTF8_STRING</code></a> on invalid UTF-8 data, or 0 on success.</p> +</div> +<p class="since">Since: 3.5.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-idna-reverse-map"></a><h3>gnutls_idna_reverse_map ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_idna_reverse_map (<em class="parameter"><code>const <span class="type">char</span> *input</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> ilen</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function will convert an ACE (ASCII-encoded) domain name to a UTF-8 domain name.</p> +<p>If GnuTLS is compiled without IDNA support, then this function +will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE"><code class="literal">GNUTLS_E_UNIMPLEMENTED_FEATURE</code></a>.</p> +<p>Note also, that this function will return an empty string if an +empty string is provided as input.</p> +<div class="refsect3"> +<a name="gnutls-idna-reverse-map.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>input</p></td> +<td class="parameter_description"><p>contain the ACE (IDNA) formatted domain name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ilen</p></td> +<td class="parameter_description"><p>the length of the provided string</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>the result in an null-terminated allocated UTF-8 string</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-idna-reverse-map.returns"></a><h4>Returns</h4> +<p> A negative error code on error, or 0 on success.</p> +</div> +<p class="since">Since: 3.5.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-free-client-credentials"></a><h3>gnutls_srp_free_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_srp_free_client_credentials (<em class="parameter"><code><span class="type">gnutls_srp_client_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_srp_client_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-srp-free-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-allocate-client-credentials"></a><h3>gnutls_srp_allocate_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_allocate_client_credentials + (<em class="parameter"><code><span class="type">gnutls_srp_client_credentials_t</span> *sc</code></em>);</pre> +<p>Allocate a gnutls_srp_client_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-srp-allocate-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_srp_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-allocate-client-credentials.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-set-client-credentials"></a><h3>gnutls_srp_set_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_set_client_credentials (<em class="parameter"><code><span class="type">gnutls_srp_client_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *username</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password</code></em>);</pre> +<p>This function sets the username and password, in a +<span class="type">gnutls_srp_client_credentials_t</span> type. Those will be used in +SRP authentication. <em class="parameter"><code>username</code></em> + should be an ASCII string or UTF-8 +string. In case of a UTF-8 string it is recommended to be following +the PRECIS framework for usernames (rfc8265). The password can +be in ASCII format, or normalized using <a class="link" href="gnutls-gnutls.html#gnutls-utf8-password-normalize" title="gnutls_utf8_password_normalize ()"><code class="function">gnutls_utf8_password_normalize()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-srp-set-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>username</p></td> +<td class="parameter_description"><p>is the user's userid</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password</p></td> +<td class="parameter_description"><p>is the user's password</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-set-client-credentials.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-free-server-credentials"></a><h3>gnutls_srp_free_server_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_srp_free_server_credentials (<em class="parameter"><code><span class="type">gnutls_srp_server_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_srp_server_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-srp-free-server-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-allocate-server-credentials"></a><h3>gnutls_srp_allocate_server_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_allocate_server_credentials + (<em class="parameter"><code><span class="type">gnutls_srp_server_credentials_t</span> *sc</code></em>);</pre> +<p>Allocate a gnutls_srp_server_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-srp-allocate-server-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_srp_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-allocate-server-credentials.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-set-server-credentials-file"></a><h3>gnutls_srp_set_server_credentials_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_set_server_credentials_file + (<em class="parameter"><code><span class="type">gnutls_srp_server_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password_file</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password_conf_file</code></em>);</pre> +<p>This function sets the password files, in a +<span class="type">gnutls_srp_server_credentials_t</span> type. Those password files +hold usernames and verifiers and will be used for SRP +authentication.</p> +<div class="refsect3"> +<a name="gnutls-srp-set-server-credentials-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password_file</p></td> +<td class="parameter_description"><p>is the SRP password file (tpasswd)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password_conf_file</p></td> +<td class="parameter_description"><p>is the SRP password conf file (tpasswd.conf)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-set-server-credentials-file.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-server-get-username"></a><h3>gnutls_srp_server_get_username ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_srp_server_get_username (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the username of the peer. This should +only be called in case of SRP authentication and in case of a +server. Returns NULL in case of an error.</p> +<div class="refsect3"> +<a name="gnutls-srp-server-get-username.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-server-get-username.returns"></a><h4>Returns</h4> +<p> SRP username of the peer, or NULL in case of error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-set-prime-bits"></a><h3>gnutls_srp_set_prime_bits ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_srp_set_prime_bits (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>);</pre> +<p>This function sets the minimum accepted number of bits, for use in +an SRP key exchange. If zero, the default 2048 bits will be used.</p> +<p>In the client side it sets the minimum accepted number of bits. If +a server sends a prime with less bits than that +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-RECEIVED-ILLEGAL-PARAMETER:CAPS" title="GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER"><code class="literal">GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER</code></a> will be returned by the +handshake.</p> +<p>This function has no effect in server side.</p> +<div class="refsect3"> +<a name="gnutls-srp-set-prime-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bits</p></td> +<td class="parameter_description"><p>is the number of bits</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 2.6.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-verifier"></a><h3>gnutls_srp_verifier ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_verifier (<em class="parameter"><code>const <span class="type">char</span> *username</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *salt</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *generator</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *prime</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *res</code></em>);</pre> +<p>This function will create an SRP verifier, as specified in +RFC2945. The <em class="parameter"><code>prime</code></em> + and <em class="parameter"><code>generator</code></em> + should be one of the static +parameters defined in gnutls/gnutls.h or may be generated.</p> +<p>The verifier will be allocated with <em class="parameter"><code><code class="function">gnutls_malloc()</code></code></em> + and will be stored in +<em class="parameter"><code>res</code></em> + using binary format.</p> +<div class="refsect3"> +<a name="gnutls-srp-verifier.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>username</p></td> +<td class="parameter_description"><p>is the user's name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password</p></td> +<td class="parameter_description"><p>is the user's password</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>salt</p></td> +<td class="parameter_description"><p>should be some randomly generated bytes</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>generator</p></td> +<td class="parameter_description"><p>is the generator of the group</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>prime</p></td> +<td class="parameter_description"><p>is the group's prime</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>where the verifier will be stored.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-verifier.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, or an +error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-set-server-credentials-function"></a><h3>gnutls_srp_set_server_credentials_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_srp_set_server_credentials_function + (<em class="parameter"><code><span class="type">gnutls_srp_server_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_srp_server_credentials_function</span> *func</code></em>);</pre> +<p>This function can be used to set a callback to retrieve the user's +SRP credentials. The callback's function form is:</p> +<p>int (*callback)(gnutls_session_t, const char* username, + gnutls_datum_t *salt, gnutls_datum_t *verifier, gnutls_datum_t *generator, + gnutls_datum_t *prime);</p> +<p><em class="parameter"><code>username</code></em> + contains the actual username. +The <em class="parameter"><code>salt</code></em> +, <em class="parameter"><code>verifier</code></em> +, <em class="parameter"><code>generator</code></em> + and <em class="parameter"><code>prime</code></em> + must be filled +in using the <code class="function">gnutls_malloc()</code>. For convenience <em class="parameter"><code>prime</code></em> + and <em class="parameter"><code>generator</code></em> + +may also be one of the static parameters defined in gnutls.h.</p> +<p>Initially, the data field is NULL in every <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> +structure that the callback has to fill in. When the +callback is done GnuTLS deallocates all of those buffers +which are non-NULL, regardless of the return value.</p> +<p>In order to prevent attackers from guessing valid usernames, +if a user does not exist, g and n values should be filled in +using a random user's parameters. In that case the callback must +return the special value (1). +See <a class="link" href="gnutls-gnutls.html#gnutls-srp-set-server-fake-salt-seed" title="gnutls_srp_set_server_fake_salt_seed ()"><span class="type">gnutls_srp_set_server_fake_salt_seed</span></a> too. +If this is not required for your application, return a negative +number from the callback to abort the handshake.</p> +<p>The callback function will only be called once per handshake. +The callback function should return 0 on success, while +-1 indicates an error.</p> +<div class="refsect3"> +<a name="gnutls-srp-set-server-credentials-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-set-client-credentials-function"></a><h3>gnutls_srp_set_client_credentials_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_srp_set_client_credentials_function + (<em class="parameter"><code><span class="type">gnutls_srp_client_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_srp_client_credentials_function</span> *func</code></em>);</pre> +<p>This function can be used to set a callback to retrieve the +username and password for client SRP authentication. The +callback's function form is:</p> +<p>int (*callback)(gnutls_session_t, char** username, char**password);</p> +<p>The <em class="parameter"><code>username</code></em> + and <em class="parameter"><code>password</code></em> + must be allocated using +<code class="function">gnutls_malloc()</code>.</p> +<p>The <em class="parameter"><code>username</code></em> + should be an ASCII string or UTF-8 +string. In case of a UTF-8 string it is recommended to be following +the PRECIS framework for usernames (rfc8265). The password can +be in ASCII format, or normalized using <a class="link" href="gnutls-gnutls.html#gnutls-utf8-password-normalize" title="gnutls_utf8_password_normalize ()"><code class="function">gnutls_utf8_password_normalize()</code></a>.</p> +<p>The callback function will be called once per handshake before the +initial hello message is sent.</p> +<p>The callback should not return a negative error code the second +time called, since the handshake procedure will be aborted.</p> +<p>The callback function should return 0 on success. +-1 indicates an error.</p> +<div class="refsect3"> +<a name="gnutls-srp-set-client-credentials-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-base64-encode"></a><h3>gnutls_srp_base64_encode ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_base64_encode (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><span class="type">char</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the base64 encoding, as used in the libsrp. This is the encoding +used in SRP password files. If the provided buffer is not long +enough GNUTLS_E_SHORT_MEMORY_BUFFER is returned.</p> +<p>Warning! This base64 encoding is not the "standard" encoding, so +do not use it for non-SRP purposes.</p> +<div class="refsect3"> +<a name="gnutls-srp-base64-encode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contain the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where base64 data will be copied</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>holds the size of the result</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-base64-encode.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the buffer given is not +long enough, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-base64-encode2"></a><h3>gnutls_srp_base64_encode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_base64_encode2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the base64 encoding. This is the encoding used in SRP password +files. This function will allocate the required memory to hold +the encoded data.</p> +<p>You should use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> to free the returned data.</p> +<p>Warning! This base64 encoding is not the "standard" encoding, so +do not use it for non-SRP purposes.</p> +<div class="refsect3"> +<a name="gnutls-srp-base64-encode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>will hold the newly allocated encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-base64-encode2.returns"></a><h4>Returns</h4> +<p> 0 on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-base64-decode"></a><h3>gnutls_srp_base64_decode ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_base64_decode (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *b64_data</code></em>, + <em class="parameter"><code><span class="type">char</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will decode the given encoded data, using the base64 +encoding found in libsrp.</p> +<p>Note that <em class="parameter"><code>b64_data</code></em> + should be null terminated.</p> +<p>Warning! This base64 encoding is not the "standard" encoding, so +do not use it for non-SRP purposes.</p> +<div class="refsect3"> +<a name="gnutls-srp-base64-decode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>b64_data</p></td> +<td class="parameter_description"><p>contain the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where decoded data will be copied</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>holds the size of the result</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-base64-decode.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the buffer given is not +long enough, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-base64-decode2"></a><h3>gnutls_srp_base64_decode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_srp_base64_decode2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *b64_data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will decode the given encoded data. The decoded data +will be allocated, and stored into result. It will decode using +the base64 algorithm as used in libsrp.</p> +<p>You should use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> to free the returned data.</p> +<p>Warning! This base64 encoding is not the "standard" encoding, so +do not use it for non-SRP purposes.</p> +<div class="refsect3"> +<a name="gnutls-srp-base64-decode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>b64_data</p></td> +<td class="parameter_description"><p>contains the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where decoded data lie</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-srp-base64-decode2.returns"></a><h4>Returns</h4> +<p> 0 on success, or an error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-set-server-fake-salt-seed"></a><h3>gnutls_srp_set_server_fake_salt_seed ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_srp_set_server_fake_salt_seed (<em class="parameter"><code><span class="type">gnutls_srp_server_credentials_t</span> sc</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *seed</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> salt_length</code></em>);</pre> +<p>This function sets the seed that is used to generate salts for +invalid (non-existent) usernames.</p> +<p>In order to prevent attackers from guessing valid usernames, +when a user does not exist gnutls generates a salt and a verifier +and proceeds with the protocol as usual. +The authentication will ultimately fail, but the client cannot tell +whether the username is valid (exists) or invalid.</p> +<p>If an attacker learns the seed, given a salt (which is part of the +handshake) which was generated when the seed was in use, it can tell +whether or not the authentication failed because of an unknown username. +This seed cannot be used to reveal application data or passwords.</p> +<p><em class="parameter"><code>salt_length</code></em> + should represent the salt length your application uses. +Generating fake salts longer than 20 bytes is not supported.</p> +<p>By default the seed is a random value, different each time a +<span class="type">gnutls_srp_server_credentials_t</span> is allocated and fake salts are +16 bytes long.</p> +<div class="refsect3"> +<a name="gnutls-srp-set-server-fake-salt-seed.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_srp_server_credentials_t</span> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>seed</p></td> +<td class="parameter_description"><p>is the seed data, only needs to be valid until the function +returns; size of the seed must be greater than zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>salt_length</p></td> +<td class="parameter_description"><p>is the length of the generated fake salts</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-free-client-credentials"></a><h3>gnutls_psk_free_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_free_client_credentials (<em class="parameter"><code><span class="type">gnutls_psk_client_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_psk_client_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-psk-free-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-allocate-client-credentials"></a><h3>gnutls_psk_allocate_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_allocate_client_credentials + (<em class="parameter"><code><span class="type">gnutls_psk_client_credentials_t</span> *sc</code></em>);</pre> +<p>Allocate a gnutls_psk_client_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-psk-allocate-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-allocate-client-credentials.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-client-credentials"></a><h3>gnutls_psk_set_client_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_set_client_credentials (<em class="parameter"><code><span class="type">gnutls_psk_client_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *username</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-psk-key-flags" title="enum gnutls_psk_key_flags"><span class="type">gnutls_psk_key_flags</span></a> flags</code></em>);</pre> +<p>This function sets the username and password, in a +gnutls_psk_client_credentials_t type. Those will be used in +PSK authentication. <em class="parameter"><code>username</code></em> + should be an ASCII string or UTF-8 +string. In case of a UTF-8 string it is recommended to be following +the PRECIS framework for usernames (rfc8265). The key can be either +in raw byte format or in Hex format (without the 0x prefix).</p> +<div class="refsect3"> +<a name="gnutls-psk-set-client-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>username</p></td> +<td class="parameter_description"><p>is the user's zero-terminated userid</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is the user's key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>indicate the format of the key, either +<a class="link" href="gnutls-gnutls.html#GNUTLS-PSK-KEY-RAW:CAPS"><code class="literal">GNUTLS_PSK_KEY_RAW</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-PSK-KEY-HEX:CAPS"><code class="literal">GNUTLS_PSK_KEY_HEX</code></a>.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-set-client-credentials.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-client-credentials2"></a><h3>gnutls_psk_set_client_credentials2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_set_client_credentials2 (<em class="parameter"><code><span class="type">gnutls_psk_client_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *username</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-psk-key-flags" title="enum gnutls_psk_key_flags"><span class="type">gnutls_psk_key_flags</span></a> flags</code></em>);</pre> +<p>This function is identical to <a class="link" href="gnutls-gnutls.html#gnutls-psk-set-client-credentials" title="gnutls_psk_set_client_credentials ()"><code class="function">gnutls_psk_set_client_credentials()</code></a>, +except that it allows a non-null-terminated username to be introduced.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-client-credentials2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_client_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>username</p></td> +<td class="parameter_description"><p>is the userid</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>is the user's key</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>indicate the format of the key, either +<a class="link" href="gnutls-gnutls.html#GNUTLS-PSK-KEY-RAW:CAPS"><code class="literal">GNUTLS_PSK_KEY_RAW</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-PSK-KEY-HEX:CAPS"><code class="literal">GNUTLS_PSK_KEY_HEX</code></a>.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-set-client-credentials2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-free-server-credentials"></a><h3>gnutls_psk_free_server_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_free_server_credentials (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> sc</code></em>);</pre> +<p>Free a gnutls_psk_server_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-psk-free-server-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-allocate-server-credentials"></a><h3>gnutls_psk_allocate_server_credentials ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_allocate_server_credentials + (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> *sc</code></em>);</pre> +<p>Allocate a gnutls_psk_server_credentials_t structure.</p> +<div class="refsect3"> +<a name="gnutls-psk-allocate-server-credentials.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>sc</p></td> +<td class="parameter_description"><p>is a pointer to a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-allocate-server-credentials.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-credentials-file"></a><h3>gnutls_psk_set_server_credentials_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_set_server_credentials_file + (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *password_file</code></em>);</pre> +<p>This function sets the password file, in a +<span class="type">gnutls_psk_server_credentials_t</span> type. This password file +holds usernames and keys and will be used for PSK authentication.</p> +<p>Each entry in the file consists of a username, followed by a colon +(':') and a hex-encoded key. If the username contains a colon or +any other special character, it can be hex-encoded preceded by a +'#'.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-credentials-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>password_file</p></td> +<td class="parameter_description"><p>is the PSK password file (passwd.psk)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-set-server-credentials-file.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-credentials-hint"></a><h3>gnutls_psk_set_server_credentials_hint ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_set_server_credentials_hint + (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> res</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *hint</code></em>);</pre> +<p>This function sets the identity hint, in a +<span class="type">gnutls_psk_server_credentials_t</span> type. This hint is sent to +the client to help it chose a good PSK credential (i.e., username +and password).</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-credentials-hint.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>hint</p></td> +<td class="parameter_description"><p>is the PSK identity hint string</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-set-server-credentials-hint.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 2.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-server-get-username"></a><h3>gnutls_psk_server_get_username ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_psk_server_get_username (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This should only be called in case of PSK authentication and in +case of a server.</p> +<p>The returned pointer should be considered constant (do not free) and valid +for the lifetime of the session.</p> +<p>This function will return <code class="literal">NULL</code> if the username has embedded NULL bytes. +In that case, <a class="link" href="gnutls-gnutls.html#gnutls-psk-server-get-username2" title="gnutls_psk_server_get_username2 ()"><code class="function">gnutls_psk_server_get_username2()</code></a> should be used to retrieve the username.</p> +<div class="refsect3"> +<a name="gnutls-psk-server-get-username.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-server-get-username.returns"></a><h4>Returns</h4> +<p> the username of the peer, or <code class="literal">NULL</code> in case of an error, +or if the username has embedded NULLs.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-server-get-username2"></a><h3>gnutls_psk_server_get_username2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_server_get_username2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre> +<p>Return a pointer to the username of the peer in the supplied datum. Does not +need to be null-terminated.</p> +<p>This should only be called in case of PSK authentication and in +case of a server.</p> +<p>The returned pointer should be considered constant (do not free) and valid +for the lifetime of the session.</p> +<div class="refsect3"> +<a name="gnutls-psk-server-get-username2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>username</p></td> +<td class="parameter_description"><p>a datum that will be filled in by this function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-server-get-username2.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a>, or a negative value in case of an error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-client-get-hint"></a><h3>gnutls_psk_client_get_hint ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_psk_client_get_hint (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>The PSK identity hint may give the client help in deciding which +username to use. This should only be called in case of PSK +authentication and in case of a client.</p> +<p>Note: there is no hint in TLS 1.3, so this function will return <code class="literal">NULL</code> +if TLS 1.3 has been negotiated.</p> +<div class="refsect3"> +<a name="gnutls-psk-client-get-hint.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-client-get-hint.returns"></a><h4>Returns</h4> +<p> the identity hint of the peer, or <code class="literal">NULL</code> in case of an error or if TLS 1.3 is being used.</p> +</div> +<p class="since">Since: 2.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-credentials-function"></a><h3>gnutls_psk_set_server_credentials_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_server_credentials_function + (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_psk_server_credentials_function</span> *func</code></em>);</pre> +<p>This function can be used to set a callback to retrieve the user's PSK credentials. +The callback's function form is: +int (*callback)(gnutls_session_t, const char* username, + gnutls_datum_t* key);</p> +<p><em class="parameter"><code>username</code></em> + contains the actual username. +The <em class="parameter"><code>key</code></em> + must be filled in using the <code class="function">gnutls_malloc()</code>.</p> +<p>In case the callback returned a negative number then gnutls will +assume that the username does not exist.</p> +<p>The callback function will only be called once per handshake. The +callback function should return 0 on success, while -1 indicates +an error.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-credentials-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-credentials-function2"></a><h3>gnutls_psk_set_server_credentials_function2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_server_credentials_function2 + (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_psk_server_credentials_function2</span> *func</code></em>);</pre> +<p>This function can be used to set a callback to retrieve the user's PSK credentials. +The callback's function form is: +int (*callback)(gnutls_session_t, const gnutls_datum_t* username, + gnutls_datum_t* key);</p> +<p>This callback function has the same semantics as that of <a class="link" href="gnutls-gnutls.html#gnutls-psk-set-server-credentials-function" title="gnutls_psk_set_server_credentials_function ()"><code class="function">gnutls_psk_set_server_credentials_function()</code></a>, +but it allows non-string usernames to be used.</p> +<p><em class="parameter"><code>username</code></em> + contains the actual username. +The <em class="parameter"><code>key</code></em> + must be filled in using the <code class="function">gnutls_malloc()</code>.</p> +<p>In case the callback returned a negative number then gnutls will +assume that the username does not exist.</p> +<p>The callback function will only be called once per handshake. The +callback function should return 0 on success, while -1 indicates +an error.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-credentials-function2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-client-credentials-function"></a><h3>gnutls_psk_set_client_credentials_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_client_credentials_function + (<em class="parameter"><code><span class="type">gnutls_psk_client_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_psk_client_credentials_function</span> *func</code></em>);</pre> +<p>This function can be used to set a callback to retrieve the username and +password for client PSK authentication. +The callback's function form is: +int (*callback)(gnutls_session_t, char** username, + gnutls_datum_t* key);</p> +<p>The <em class="parameter"><code>username</code></em> + and <em class="parameter"><code>key->data</code></em> + must be allocated using <code class="function">gnutls_malloc()</code>. +The <em class="parameter"><code>username</code></em> + should be an ASCII string or UTF-8 +string. In case of a UTF-8 string it is recommended to be following +the PRECIS framework for usernames (rfc8265).</p> +<p>The callback function will be called once per handshake.</p> +<p>The callback function should return 0 on success. +-1 indicates an error.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-client-credentials-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-client-credentials-function2"></a><h3>gnutls_psk_set_client_credentials_function2 ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_client_credentials_function2 + (<em class="parameter"><code><span class="type">gnutls_psk_client_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_psk_client_credentials_function2</span> *func</code></em>);</pre> +<p>This function can be used to set a callback to retrieve the username and +password for client PSK authentication. +The callback's function form is: +int (*callback)(gnutls_session_t, gnutls_datum_t* username, + gnutls_datum_t* key);</p> +<p>This callback function has the same semantics as that of <a class="link" href="gnutls-gnutls.html#gnutls-psk-set-client-credentials-function" title="gnutls_psk_set_client_credentials_function ()"><code class="function">gnutls_psk_set_client_credentials_function()</code></a>, +but it allows non-string usernames to be used.</p> +<p>The <em class="parameter"><code>username</code></em> + and <em class="parameter"><code>key->data</code></em> + must be allocated using <code class="function">gnutls_malloc()</code>. +The <em class="parameter"><code>username</code></em> + should be an ASCII string or UTF-8 +string. In case of a UTF-8 string it is recommended to be following +the PRECIS framework for usernames (rfc8265).</p> +<p>The callback function will be called once per handshake.</p> +<p>The callback function should return 0 on success. +-1 indicates an error.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-client-credentials-function2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_psk_server_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-hex-encode"></a><h3>gnutls_hex_encode ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_hex_encode (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><span class="type">char</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the hex encoding, as used in the PSK password files.</p> +<p>Note that the size of the result includes the null terminator.</p> +<div class="refsect3"> +<a name="gnutls-hex-encode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contain the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where hex data will be copied</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>holds the size of the result</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-hex-encode.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the buffer given is not +long enough, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-hex-decode"></a><h3>gnutls_hex_decode ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_hex_decode (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *hex_data</code></em>, + <em class="parameter"><code><span class="type">void</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will decode the given encoded data, using the hex +encoding used by PSK password files.</p> +<p>Initially <em class="parameter"><code>result_size</code></em> + must hold the maximum size available in +<em class="parameter"><code>result</code></em> +, and on return it will contain the number of bytes written.</p> +<div class="refsect3"> +<a name="gnutls-hex-decode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>hex_data</p></td> +<td class="parameter_description"><p>contain the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where decoded data will be copied</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>holds the size of the result</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-hex-decode.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> if the buffer given is not +long enough, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR"><code class="literal">GNUTLS_E_PARSING_ERROR</code></a> on invalid hex data, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-hex-encode2"></a><h3>gnutls_hex_encode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_hex_encode2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the hex encoding, as used in the PSK password files.</p> +<p>Note that the size of the result does NOT include the null terminator.</p> +<div class="refsect3"> +<a name="gnutls-hex-encode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contain the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the result in an allocated string</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-hex-encode2.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-hex-decode2"></a><h3>gnutls_hex_decode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_hex_decode2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will decode the given encoded data, using the hex +encoding used by PSK password files.</p> +<div class="refsect3"> +<a name="gnutls-hex-decode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>hex_data</p></td> +<td class="parameter_description"><p>contain the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the result in an allocated string</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-hex-decode2.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-PARSING-ERROR:CAPS" title="GNUTLS_E_PARSING_ERROR"><code class="literal">GNUTLS_E_PARSING_ERROR</code></a> on invalid hex data, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-dh-params"></a><h3>gnutls_psk_set_server_dh_params ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_server_dh_params (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-dh-params-t" title="gnutls_dh_params_t"><span class="type">gnutls_dh_params_t</span></a> dh_params</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_psk_set_server_dh_params</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set the Diffie-Hellman parameters for an +anonymous server to use. These parameters will be used in +Diffie-Hellman exchange with PSK cipher suites.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-dh-params.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_psk_server_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>dh_params</p></td> +<td class="parameter_description"><p>is a structure that holds Diffie-Hellman parameters.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-known-dh-params"></a><h3>gnutls_psk_set_server_known_dh_params ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_psk_set_server_known_dh_params (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><span class="type">gnutls_sec_param_t</span></a> sec_param</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_psk_set_server_known_dh_params</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set the Diffie-Hellman parameters for a +PSK server to use. These parameters will be used in +Ephemeral Diffie-Hellman cipher suites and will be selected from +the FFDHE set of RFC7919 according to the security level provided.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-known-dh-params.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_psk_server_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>sec_param</p></td> +<td class="parameter_description"><p>is an option of the <a class="link" href="gnutls-gnutls.html#gnutls-sec-param-t" title="enum gnutls_sec_param_t"><code class="literal">gnutls_sec_param_t</code></a> enumeration</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-psk-set-server-known-dh-params.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.5.6</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-server-params-function"></a><h3>gnutls_psk_set_server_params_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_server_params_function (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">gnutls_params_function</span> *func</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_psk_set_server_params_function</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set a callback in order for the server to get +the Diffie-Hellman parameters for PSK authentication. The callback +should return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-server-params-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-set-prime-bits"></a><h3>gnutls_dh_set_prime_bits ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_dh_set_prime_bits (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>);</pre> +<p>This function sets the number of bits, for use in a Diffie-Hellman +key exchange. This is used both in DH ephemeral and DH anonymous +cipher suites. This will set the minimum size of the prime that +will be used for the handshake.</p> +<p>In the client side it sets the minimum accepted number of bits. If +a server sends a prime with less bits than that +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-DH-PRIME-UNACCEPTABLE:CAPS" title="GNUTLS_E_DH_PRIME_UNACCEPTABLE"><code class="literal">GNUTLS_E_DH_PRIME_UNACCEPTABLE</code></a> will be returned by the handshake.</p> +<p>Note that this function will warn via the audit log for value that +are believed to be weak.</p> +<p>The function has no effect in server side.</p> +<p>Note that since 3.1.7 this function is deprecated. The minimum +number of bits is set by the priority string level. +Also this function must be called after <a class="link" href="gnutls-gnutls.html#gnutls-priority-set-direct" title="gnutls_priority_set_direct ()"><code class="function">gnutls_priority_set_direct()</code></a> +or the set value may be overridden by the selected priority options.</p> +<div class="refsect3"> +<a name="gnutls-dh-set-prime-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bits</p></td> +<td class="parameter_description"><p>is the number of bits</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-get-secret-bits"></a><h3>gnutls_dh_get_secret_bits ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_get_secret_bits (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the bits used in the last Diffie-Hellman +key exchange with the peer. Should be used for both anonymous and +ephemeral Diffie-Hellman.</p> +<div class="refsect3"> +<a name="gnutls-dh-get-secret-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-get-secret-bits.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-get-peers-public-bits"></a><h3>gnutls_dh_get_peers_public_bits ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_get_peers_public_bits (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get the Diffie-Hellman public key bit size. Can be used for both +anonymous and ephemeral Diffie-Hellman.</p> +<div class="refsect3"> +<a name="gnutls-dh-get-peers-public-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-get-peers-public-bits.returns"></a><h4>Returns</h4> +<p> The public key bit size used in the last Diffie-Hellman +key exchange with the peer, or a negative error code in case of error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-get-prime-bits"></a><h3>gnutls_dh_get_prime_bits ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_get_prime_bits (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function will return the bits of the prime used in the last +Diffie-Hellman key exchange with the peer. Should be used for both +anonymous and ephemeral Diffie-Hellman. Note that some ciphers, +like RSA and DSA without DHE, do not use a Diffie-Hellman key +exchange, and then this function will return 0.</p> +<div class="refsect3"> +<a name="gnutls-dh-get-prime-bits.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-get-prime-bits.returns"></a><h4>Returns</h4> +<p> The Diffie-Hellman bit strength is returned, or 0 if no +Diffie-Hellman key exchange was done, or a negative error code on +failure.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-get-group"></a><h3>gnutls_dh_get_group ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_get_group (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *raw_gen</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *raw_prime</code></em>);</pre> +<p>This function will return the group parameters used in the last +Diffie-Hellman key exchange with the peer. These are the prime and +the generator used. This function should be used for both +anonymous and ephemeral Diffie-Hellman. The output parameters must +be freed with <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> +<p>Note, that the prime and generator are exported as non-negative +integers and may include a leading zero byte.</p> +<div class="refsect3"> +<a name="gnutls-dh-get-group.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>raw_gen</p></td> +<td class="parameter_description"><p>will hold the generator.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>raw_prime</p></td> +<td class="parameter_description"><p>will hold the prime.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-get-group.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-get-pubkey"></a><h3>gnutls_dh_get_pubkey ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_dh_get_pubkey (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *raw_key</code></em>);</pre> +<p>This function will return the peer's public key used in the last +Diffie-Hellman key exchange. This function should be used for both +anonymous and ephemeral Diffie-Hellman. The output parameters must +be freed with <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> +<p>Note, that public key is exported as non-negative +integer and may include a leading zero byte.</p> +<div class="refsect3"> +<a name="gnutls-dh-get-pubkey.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>raw_key</p></td> +<td class="parameter_description"><p>will hold the public key.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-dh-get-pubkey.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-retrieve-function"></a><h3>gnutls_certificate_set_retrieve_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_retrieve_function + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_certificate_retrieve_function</span> *func</code></em>);</pre> +<p>This function sets a callback to be called in order to retrieve the +certificate to be used in the handshake. The callback will take control +only if a certificate is requested by the peer. You are advised +to use <a class="link" href="gnutls-abstract.html#gnutls-certificate-set-retrieve-function2" title="gnutls_certificate_set_retrieve_function2 ()"><code class="function">gnutls_certificate_set_retrieve_function2()</code></a> because it +is much more efficient in the processing it requires from gnutls.</p> +<p>The callback's function prototype is: +int (*callback)(gnutls_session_t, const gnutls_datum_t* req_ca_dn, int nreqs, +const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_retr2_st* st);</p> +<p><em class="parameter"><code>req_ca_dn</code></em> + is only used in X.509 certificates. +Contains a list with the CA names that the server considers trusted. +This is a hint and typically the client should send a certificate that is signed +by one of these CAs. These names, when available, are DER encoded. To get a more +meaningful value use the function <a class="link" href="gnutls-x509.html#gnutls-x509-rdn-get" title="gnutls_x509_rdn_get ()"><code class="function">gnutls_x509_rdn_get()</code></a>.</p> +<p><em class="parameter"><code>pk_algos</code></em> + contains a list with server's acceptable public key algorithms. +The certificate returned should support the server's given algorithms.</p> +<p><em class="parameter"><code>st</code></em> + should contain the certificates and private keys.</p> +<p>If the callback function is provided then gnutls will call it, in the +handshake, after the certificate request message has been received.</p> +<p>In server side pk_algos and req_ca_dn are NULL.</p> +<p>The callback function should set the certificate list to be sent, +and return 0 on success. If no certificate was selected then the +number of certificates should be set to zero. The value (-1) +indicates error and the handshake will be terminated. If both certificates +are set in the credentials and a callback is available, the callback +takes predence.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-retrieve-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-verify-function"></a><h3>gnutls_certificate_set_verify_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_verify_function + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> cred</code></em>, + <em class="parameter"><code><span class="type">gnutls_certificate_verify_function</span> *func</code></em>);</pre> +<p>This function sets a callback to be called when peer's certificate +has been received in order to verify it on receipt rather than +doing after the handshake is completed.</p> +<p>The callback's function prototype is: +int (*callback)(gnutls_session_t);</p> +<p>If the callback function is provided then gnutls will call it, in the +handshake, just after the certificate message has been received. +To verify or obtain the certificate the <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a>, +<a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-get" title="gnutls_certificate_type_get ()"><code class="function">gnutls_certificate_type_get()</code></a>, <a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-peers" title="gnutls_certificate_get_peers ()"><code class="function">gnutls_certificate_get_peers()</code></a> functions +can be used.</p> +<p>The callback function should return 0 for the handshake to continue +or non-zero to terminate.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-verify-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>cred</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_certificate_credentials_t</span> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 2.10.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-server-set-request"></a><h3>gnutls_certificate_server_set_request ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_server_set_request (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-request-t" title="enum gnutls_certificate_request_t"><span class="type">gnutls_certificate_request_t</span></a> req</code></em>);</pre> +<p>This function specifies if we (in case of a server) are going to +send a certificate request message to the client. If <em class="parameter"><code>req</code></em> + is +GNUTLS_CERT_REQUIRE then the server will return the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-FOUND:CAPS" title="GNUTLS_E_NO_CERTIFICATE_FOUND"><code class="literal">GNUTLS_E_NO_CERTIFICATE_FOUND</code></a> +error if the peer does not provide a certificate. If you do not call this +function then the client will not be asked to send a certificate. Invoking +the function with <em class="parameter"><code>req</code></em> + GNUTLS_CERT_IGNORE has the same effect.</p> +<div class="refsect3"> +<a name="gnutls-certificate-server-set-request.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>req</p></td> +<td class="parameter_description"><p>is one of GNUTLS_CERT_REQUEST, GNUTLS_CERT_REQUIRE, GNUTLS_CERT_IGNORE</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-peers"></a><h3>gnutls_certificate_get_peers ()</h3> +<pre class="programlisting">const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="returnvalue">gnutls_datum_t</span></a> * +gnutls_certificate_get_peers (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *list_size</code></em>);</pre> +<p>Get the peer's raw certificate (chain) as sent by the peer. These +certificates are in raw format (DER encoded for X.509). In case of +a X.509 then a certificate list may be present. The list +is provided as sent by the server; the server must send as first +certificate in the list its own certificate, following the +issuer's certificate, then the issuer's issuer etc. However, there +are servers which violate this principle and thus on certain +occasions this may be an unsorted list.</p> +<p>In resumed sessions, this function will return the peer's certificate +list as used in the first/original session.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-peers.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>list_size</p></td> +<td class="parameter_description"><p>is the length of the certificate list (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-peers.returns"></a><h4>Returns</h4> +<p> a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> containing the peer's +certificates, or <code class="literal">NULL</code> in case of an error or if no certificate +was used.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-ours"></a><h3>gnutls_certificate_get_ours ()</h3> +<pre class="programlisting">const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="returnvalue">gnutls_datum_t</span></a> * +gnutls_certificate_get_ours (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Gets the certificate as sent to the peer in the last handshake. +The certificate is in raw (DER) format. No certificate +list is being returned. Only the first certificate.</p> +<p>This function returns the certificate that was sent in the current +handshake. In subsequent resumed sessions this function will return +<code class="literal">NULL</code>. That differs from <a class="link" href="gnutls-gnutls.html#gnutls-certificate-get-peers" title="gnutls_certificate_get_peers ()"><code class="function">gnutls_certificate_get_peers()</code></a> which always +returns the peer's certificate used in the original session.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-ours.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-ours.returns"></a><h4>Returns</h4> +<p> a pointer to a <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> containing our +certificate, or <code class="literal">NULL</code> in case of an error or if no certificate +was used.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-get-peers-subkey-id"></a><h3>gnutls_certificate_get_peers_subkey_id ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_get_peers_subkey_id + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *id</code></em>);</pre> +<p>This function is no-op.</p> +<div class="refsect3"> +<a name="gnutls-certificate-get-peers-subkey-id.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>id</p></td> +<td class="parameter_description"><p>will contain the ID</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-get-peers-subkey-id.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS" title="GNUTLS_E_UNIMPLEMENTED_FEATURE"><code class="literal">GNUTLS_E_UNIMPLEMENTED_FEATURE</code></a>.</p> +</div> +<p class="since">Since: 3.1.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-activation-time-peers"></a><h3>gnutls_certificate_activation_time_peers ()</h3> +<pre class="programlisting"><span class="returnvalue">time_t</span> +gnutls_certificate_activation_time_peers + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_certificate_activation_time_peers</code> is deprecated and should not be used in newly-written code.</p> +<p>gnutls_certificate_verify_peers2() now verifies activation times.</p> +</div> +<p>This function will return the peer's certificate activation time.</p> +<div class="refsect3"> +<a name="gnutls-certificate-activation-time-peers.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-activation-time-peers.returns"></a><h4>Returns</h4> +<p> (time_t)-1 on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-expiration-time-peers"></a><h3>gnutls_certificate_expiration_time_peers ()</h3> +<pre class="programlisting"><span class="returnvalue">time_t</span> +gnutls_certificate_expiration_time_peers + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_certificate_expiration_time_peers</code> is deprecated and should not be used in newly-written code.</p> +<p>gnutls_certificate_verify_peers2() now verifies expiration times.</p> +</div> +<p>This function will return the peer's certificate expiration time.</p> +<div class="refsect3"> +<a name="gnutls-certificate-expiration-time-peers.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-expiration-time-peers.returns"></a><h4>Returns</h4> +<p> (time_t)-1 on error.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-client-get-request-status"></a><h3>gnutls_certificate_client_get_request_status ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_certificate_client_get_request_status + (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>Get whether client certificate was requested on the last +handshake or not.</p> +<div class="refsect3"> +<a name="gnutls-certificate-client-get-request-status.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-client-get-request-status.returns"></a><h4>Returns</h4> +<p> 0 if the peer (server) did not request client +authentication or 1 otherwise.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-verify-peers2"></a><h3>gnutls_certificate_verify_peers2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_verify_peers2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *status</code></em>);</pre> +<p>This function will verify the peer's certificate and store +the status in the <em class="parameter"><code>status</code></em> + variable as a bitwise OR of gnutls_certificate_status_t +values or zero if the certificate is trusted. Note that value in <em class="parameter"><code>status</code></em> + +is set only when the return value of this function is success (i.e, failure +to trust a certificate does not imply a negative return value). +The default verification flags used by this function can be overridden +using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-flags" title="gnutls_certificate_set_verify_flags ()"><code class="function">gnutls_certificate_set_verify_flags()</code></a>.</p> +<p>This function will take into account the stapled OCSP responses sent by the server, +as well as the following X.509 certificate extensions: Name Constraints, +Key Usage, and Basic Constraints (pathlen).</p> +<p>Note that you must also check the peer's name in order to check if +the verified certificate belongs to the actual peer, see <a class="link" href="gnutls-x509.html#gnutls-x509-crt-check-hostname" title="gnutls_x509_crt_check_hostname ()"><code class="function">gnutls_x509_crt_check_hostname()</code></a>, +or use <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers3" title="gnutls_certificate_verify_peers3 ()"><code class="function">gnutls_certificate_verify_peers3()</code></a>.</p> +<p>To avoid denial of service attacks some +default upper limits regarding the certificate key size and chain +size are set. To override them use <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-limits" title="gnutls_certificate_set_verify_limits ()"><code class="function">gnutls_certificate_set_verify_limits()</code></a>.</p> +<p>Note that when using raw public-keys verification will not work because there is +no corresponding certificate body belonging to the raw key that can be verified. In that +case this function will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-verify-peers2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>status</p></td> +<td class="parameter_description"><p>is the output of the verification</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-verify-peers2.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) when the validation is performed, or a negative error code otherwise. +A successful error code means that the <em class="parameter"><code>status</code></em> +parameter must be checked to obtain the validation status.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-verify-peers3"></a><h3>gnutls_certificate_verify_peers3 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_verify_peers3 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *hostname</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *status</code></em>);</pre> +<p>This function will verify the peer's certificate and store the +the status in the <em class="parameter"><code>status</code></em> + variable as a bitwise OR of gnutls_certificate_status_t +values or zero if the certificate is trusted. Note that value in <em class="parameter"><code>status</code></em> + +is set only when the return value of this function is success (i.e, failure +to trust a certificate does not imply a negative return value). +The default verification flags used by this function can be overridden +using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-flags" title="gnutls_certificate_set_verify_flags ()"><code class="function">gnutls_certificate_set_verify_flags()</code></a>. See the documentation +of <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a> for details in the verification process.</p> +<p>This function will take into account the stapled OCSP responses sent by the server, +as well as the following X.509 certificate extensions: Name Constraints, +Key Usage, and Basic Constraints (pathlen).</p> +<p>If the <em class="parameter"><code>hostname</code></em> + provided is non-NULL then this function will compare +the hostname in the certificate against it. The comparison will follow +the RFC6125 recommendations. If names do not match the +<a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-UNEXPECTED-OWNER:CAPS"><code class="literal">GNUTLS_CERT_UNEXPECTED_OWNER</code></a> status flag will be set.</p> +<p>In order to verify the purpose of the end-certificate (by checking the extended +key usage), use <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers" title="gnutls_certificate_verify_peers ()"><code class="function">gnutls_certificate_verify_peers()</code></a>.</p> +<p>To avoid denial of service attacks some +default upper limits regarding the certificate key size and chain +size are set. To override them use <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-limits" title="gnutls_certificate_set_verify_limits ()"><code class="function">gnutls_certificate_set_verify_limits()</code></a>.</p> +<p>Note that when using raw public-keys verification will not work because there is +no corresponding certificate body belonging to the raw key that can be verified. In that +case this function will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-verify-peers3.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>hostname</p></td> +<td class="parameter_description"><p>is the expected name of the peer; may be <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>status</p></td> +<td class="parameter_description"><p>is the output of the verification</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-verify-peers3.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) when the validation is performed, or a negative error code otherwise. +A successful error code means that the <em class="parameter"><code>status</code></em> +parameter must be checked to obtain the validation status.</p> +</div> +<p class="since">Since: 3.1.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-verify-peers"></a><h3>gnutls_certificate_verify_peers ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_verify_peers (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-typed-vdata-st" title="gnutls_typed_vdata_st"><span class="type">gnutls_typed_vdata_st</span></a> *data</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> elements</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> *status</code></em>);</pre> +<p>This function will verify the peer's certificate and store the +the status in the <em class="parameter"><code>status</code></em> + variable as a bitwise OR of gnutls_certificate_status_t +values or zero if the certificate is trusted. Note that value in <em class="parameter"><code>status</code></em> + +is set only when the return value of this function is success (i.e, failure +to trust a certificate does not imply a negative return value). +The default verification flags used by this function can be overridden +using <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-flags" title="gnutls_certificate_set_verify_flags ()"><code class="function">gnutls_certificate_set_verify_flags()</code></a>. See the documentation +of <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers2" title="gnutls_certificate_verify_peers2 ()"><code class="function">gnutls_certificate_verify_peers2()</code></a> for details in the verification process.</p> +<p>This function will take into account the stapled OCSP responses sent by the server, +as well as the following X.509 certificate extensions: Name Constraints, +Key Usage, and Basic Constraints (pathlen).</p> +<p>The acceptable <em class="parameter"><code>data</code></em> + types are <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-DNS-HOSTNAME:CAPS"><code class="literal">GNUTLS_DT_DNS_HOSTNAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-RFC822NAME:CAPS"><code class="literal">GNUTLS_DT_RFC822NAME</code></a> and <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-KEY-PURPOSE-OID:CAPS"><code class="literal">GNUTLS_DT_KEY_PURPOSE_OID</code></a>. +The former two accept as data a null-terminated hostname or email address, and the latter a null-terminated +object identifier (e.g., <a class="link" href="gnutls-x509.html#GNUTLS-KP-TLS-WWW-SERVER:CAPS" title="GNUTLS_KP_TLS_WWW_SERVER"><code class="literal">GNUTLS_KP_TLS_WWW_SERVER</code></a>).</p> +<p>If a DNS hostname is provided then this function will compare +the hostname in the certificate against the given. If names do not match the +<a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-UNEXPECTED-OWNER:CAPS"><code class="literal">GNUTLS_CERT_UNEXPECTED_OWNER</code></a> status flag will be set. +If a key purpose OID is provided and the end-certificate contains the extended key +usage PKIX extension, it will be required to be have the provided key purpose +or be marked for any purpose, otherwise verification status will have the +<a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-SIGNER-CONSTRAINTS-FAILURE:CAPS"><code class="literal">GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE</code></a> flag set.</p> +<p>To avoid denial of service attacks some +default upper limits regarding the certificate key size and chain +size are set. To override them use <a class="link" href="gnutls-gnutls.html#gnutls-certificate-set-verify-limits" title="gnutls_certificate_set_verify_limits ()"><code class="function">gnutls_certificate_set_verify_limits()</code></a>.</p> +<p>Note that when using raw public-keys verification will not work because there is +no corresponding certificate body belonging to the raw key that can be verified. In that +case this function will return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-verify-peers.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a gnutls session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>an array of typed data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>elements</p></td> +<td class="parameter_description"><p>the number of data elements</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>status</p></td> +<td class="parameter_description"><p>is the output of the verification</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-verify-peers.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) when the validation is performed, or a negative error code otherwise. +A successful error code means that the <em class="parameter"><code>status</code></em> +parameter must be checked to obtain the validation status.</p> +</div> +<p class="since">Since: 3.3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-verification-status-print"></a><h3>gnutls_certificate_verification_status_print ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_certificate_verification_status_print + (<em class="parameter"><code>unsigned <span class="type">int</span> status</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="type">gnutls_certificate_type_t</span></a> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will pretty print the status of a verification +process -- eg. the one obtained by <a class="link" href="gnutls-gnutls.html#gnutls-certificate-verify-peers3" title="gnutls_certificate_verify_peers3 ()"><code class="function">gnutls_certificate_verify_peers3()</code></a>.</p> +<p>The output <em class="parameter"><code>out</code></em> + needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-certificate-verification-status-print.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>status</p></td> +<td class="parameter_description"><p>The status flags to be printed</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>The certificate type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>Newly allocated datum with (0) terminated string.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-certificate-verification-status-print.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.1.4</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pem-base64-encode"></a><h3>gnutls_pem_base64_encode ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_pem_base64_encode (<em class="parameter"><code>const <span class="type">char</span> *msg</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><span class="type">char</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the base64 encoding. This is the encoding used in PEM messages.</p> +<p>The output string will be null terminated, although the output size will +not include the terminating null.</p> +<div class="refsect3"> +<a name="gnutls-pem-base64-encode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>msg</p></td> +<td class="parameter_description"><p>is a message to be put in the header (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contain the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where base64 data will be copied</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>holds the size of the result</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pem-base64-encode.returns"></a><h4>Returns</h4> +<p> On success <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> is returned if the buffer given is +not long enough, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pem-base64-decode"></a><h3>gnutls_pem_base64_decode ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_pem_base64_decode (<em class="parameter"><code>const <span class="type">char</span> *header</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *b64_data</code></em>, + <em class="parameter"><code>unsigned <span class="type">char</span> *result</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *result_size</code></em>);</pre> +<p>This function will decode the given encoded data. If the header +given is non <code class="literal">NULL</code> this function will search for "-----BEGIN header" +and decode only this part. Otherwise it will decode the first PEM +packet found.</p> +<div class="refsect3"> +<a name="gnutls-pem-base64-decode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>header</p></td> +<td class="parameter_description"><p>A null terminated string with the PEM header (eg. CERTIFICATE)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>b64_data</p></td> +<td class="parameter_description"><p>contain the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the place where decoded data will be copied</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result_size</p></td> +<td class="parameter_description"><p>holds the size of the result</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pem-base64-decode.returns"></a><h4>Returns</h4> +<p> On success <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a> is returned if the buffer given is +not long enough, or 0 on success.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pem-base64-encode2"></a><h3>gnutls_pem_base64_encode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_pem_base64_encode2 (<em class="parameter"><code>const <span class="type">char</span> *msg</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the base64 encoding. This is the encoding used in PEM messages. +This function will allocate the required memory to hold the encoded +data.</p> +<p>You should use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> to free the returned data.</p> +<p>Note, that prior to GnuTLS 3.4.0 this function was available +under the name <a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-encode-alloc" title="gnutls_pem_base64_encode_alloc"><code class="function">gnutls_pem_base64_encode_alloc()</code></a>. There is +compatibility macro pointing to this function.</p> +<div class="refsect3"> +<a name="gnutls-pem-base64-encode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>header</p></td> +<td class="parameter_description"><p>is a message to be put in the encoded header (may be <code class="literal">NULL</code>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>will hold the newly allocated encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pem-base64-encode2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pem-base64-decode2"></a><h3>gnutls_pem_base64_decode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_pem_base64_decode2 (<em class="parameter"><code>const <span class="type">char</span> *header</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *b64_data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will decode the given encoded data. The decoded data +will be allocated, and stored into result. If the header given is +non null this function will search for "-----BEGIN header" and +decode only this part. Otherwise it will decode the first PEM +packet found.</p> +<p>You should use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> to free the returned data.</p> +<p>Note, that prior to GnuTLS 3.4.0 this function was available +under the name <a class="link" href="gnutls-gnutls.html#gnutls-pem-base64-decode-alloc" title="gnutls_pem_base64_decode_alloc"><code class="function">gnutls_pem_base64_decode_alloc()</code></a>. There is +compatibility macro pointing to this function.</p> +<div class="refsect3"> +<a name="gnutls-pem-base64-decode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>header</p></td> +<td class="parameter_description"><p>The PEM header (eg. CERTIFICATE)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>b64_data</p></td> +<td class="parameter_description"><p>contains the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the location of decoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pem-base64-decode2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-base64-encode2"></a><h3>gnutls_base64_encode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_base64_encode2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will convert the given data to printable data, using +the base64 encoding. This function will allocate the required +memory to hold the encoded data.</p> +<p>You should use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> to free the returned data.</p> +<div class="refsect3"> +<a name="gnutls-base64-encode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>contains the raw data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>will hold the newly allocated encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-base64-encode2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 3.6.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-base64-decode2"></a><h3>gnutls_base64_decode2 ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_base64_decode2 (<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *b64_data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *result</code></em>);</pre> +<p>This function will decode the given base64 encoded data. The decoded data +will be allocated, and stored into result.</p> +<p>You should use <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a> to free the returned data.</p> +<div class="refsect3"> +<a name="gnutls-base64-decode2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>base64</p></td> +<td class="parameter_description"><p>contains the encoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>result</p></td> +<td class="parameter_description"><p>the location of decoded data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-base64-decode2.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +</div> +<p class="since">Since: 3.6.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-params-function"></a><h3>gnutls_certificate_set_params_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_params_function + (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">gnutls_params_function</span> *func</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_certificate_set_params_function</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set a callback in order for the server to get +the Diffie-Hellman or RSA parameters for certificate +authentication. The callback should return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> +<div class="refsect3"> +<a name="gnutls-certificate-set-params-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_certificate_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anon-set-params-function"></a><h3>gnutls_anon_set_params_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anon_set_params_function (<em class="parameter"><code><span class="type">gnutls_anon_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">gnutls_params_function</span> *func</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_anon_set_params_function</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set a callback in order for the server to get +the Diffie-Hellman or RSA parameters for anonymous authentication. +The callback should return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> +<div class="refsect3"> +<a name="gnutls-anon-set-params-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_anon_server_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-set-params-function"></a><h3>gnutls_psk_set_params_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_psk_set_params_function (<em class="parameter"><code><span class="type">gnutls_psk_server_credentials_t</span> res</code></em>, + <em class="parameter"><code><span class="type">gnutls_params_function</span> *func</code></em>);</pre> +<div class="warning"> +<p><code class="literal">gnutls_psk_set_params_function</code> is deprecated and should not be used in newly-written code.</p> +<p>This function is unnecessary and discouraged on GnuTLS 3.6.0 +or later. Since 3.6.0, DH parameters are negotiated +following RFC7919.</p> +</div> +<p>This function will set a callback in order for the server to get +the Diffie-Hellman or RSA parameters for PSK authentication. The +callback should return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> +<div class="refsect3"> +<a name="gnutls-psk-set-params-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>res</p></td> +<td class="parameter_description"><p>is a gnutls_psk_server_credentials_t type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-hex2bin"></a><h3>gnutls_hex2bin ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_hex2bin (<em class="parameter"><code>const <span class="type">char</span> *hex_data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> hex_size</code></em>, + <em class="parameter"><code><span class="type">void</span> *bin_data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> *bin_size</code></em>);</pre> +<p>Convert a buffer with hex data to binary data. This function +unlike <a class="link" href="gnutls-gnutls.html#gnutls-hex-decode" title="gnutls_hex_decode ()"><code class="function">gnutls_hex_decode()</code></a> can parse hex data with separators +between numbers. That is, it ignores any non-hex characters.</p> +<div class="refsect3"> +<a name="gnutls-hex2bin.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>hex_data</p></td> +<td class="parameter_description"><p>string with data in hex format</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>hex_size</p></td> +<td class="parameter_description"><p>size of hex data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bin_data</p></td> +<td class="parameter_description"><p>output array with binary data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>bin_size</p></td> +<td class="parameter_description"><p>when calling should hold maximum size of <em class="parameter"><code>bin_data</code></em> +, +on return will hold actual length of <em class="parameter"><code>bin_data</code></em> +.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-hex2bin.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 2.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-store-func"></a><h3>gnutls_tdb_store_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_tdb_store_func<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *db_name</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *host</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *service</code></em>, + <em class="parameter"><code><span class="type">time_t</span> expiration</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pubkey</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-store-commitment-func"></a><h3>gnutls_tdb_store_commitment_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_tdb_store_commitment_func<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *db_name</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *host</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *service</code></em>, + <em class="parameter"><code><span class="type">time_t</span> expiration</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> hash_algo</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *hash</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-verify-func"></a><h3>gnutls_tdb_verify_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_tdb_verify_func<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *db_name</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *host</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *service</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pubkey</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-init"></a><h3>gnutls_tdb_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_tdb_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> *tdb</code></em>);</pre> +<p>This function will initialize a public key trust storage structure.</p> +<div class="refsect3"> +<a name="gnutls-tdb-init.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>tdb</p></td> +<td class="parameter_description"><p>A pointer to the type to be initialized</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-tdb-init.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-set-store-func"></a><h3>gnutls_tdb_set_store_func ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_tdb_set_store_func (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-store-func" title="gnutls_tdb_store_func ()"><span class="type">gnutls_tdb_store_func</span></a> store</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-set-store-commitment-func"></a><h3>gnutls_tdb_set_store_commitment_func ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_tdb_set_store_commitment_func (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-store-commitment-func" title="gnutls_tdb_store_commitment_func ()"><span class="type">gnutls_tdb_store_commitment_func</span></a> cstore</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-set-verify-func"></a><h3>gnutls_tdb_set_verify_func ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_tdb_set_verify_func (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-verify-func" title="gnutls_tdb_verify_func ()"><span class="type">gnutls_tdb_verify_func</span></a> verify</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-deinit"></a><h3>gnutls_tdb_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_tdb_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>);</pre> +<p>This function will deinitialize a public key trust storage structure.</p> +<div class="refsect3"> +<a name="gnutls-tdb-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>tdb</p></td> +<td class="parameter_description"><p>The structure to be deinitialized</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-verify-stored-pubkey"></a><h3>gnutls_verify_stored_pubkey ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_verify_stored_pubkey (<em class="parameter"><code>const <span class="type">char</span> *db_name</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *host</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *service</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="type">gnutls_certificate_type_t</span></a> cert_type</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cert</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will try to verify a raw public-key or a public-key provided via +a raw (DER-encoded) certificate using a list of stored public keys. +The <em class="parameter"><code>service</code></em> + field if non-NULL should be a port number.</p> +<p>The <em class="parameter"><code>db_name</code></em> + variable if non-null specifies a custom backend for +the retrieval of entries. If it is NULL then the +default file backend will be used. In POSIX-like systems the +file backend uses the $HOME/.gnutls/known_hosts file.</p> +<p>Note that if the custom storage backend is provided the +retrieval function should return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH"><code class="literal">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</code></a> +if the host/service pair is found but key doesn't match, +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-FOUND:CAPS" title="GNUTLS_E_NO_CERTIFICATE_FOUND"><code class="literal">GNUTLS_E_NO_CERTIFICATE_FOUND</code></a> if no such host/service with +the given key is found, and 0 if it was found. The storage +function should return 0 on success.</p> +<p>As of GnuTLS 3.6.6 this function also verifies raw public keys.</p> +<div class="refsect3"> +<a name="gnutls-verify-stored-pubkey.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>db_name</p></td> +<td class="parameter_description"><p>A file specifying the stored keys (use NULL for the default)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>tdb</p></td> +<td class="parameter_description"><p>A storage structure or NULL to use the default</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>host</p></td> +<td class="parameter_description"><p>The peer's name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>service</p></td> +<td class="parameter_description"><p>non-NULL if this key is specific to a service (e.g. http)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert_type</p></td> +<td class="parameter_description"><p>The type of the certificate</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert</p></td> +<td class="parameter_description"><p>The raw (der) data of the certificate</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be 0.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-verify-stored-pubkey.returns"></a><h4>Returns</h4> +<p> If no associated public key is found +then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-NO-CERTIFICATE-FOUND:CAPS" title="GNUTLS_E_NO_CERTIFICATE_FOUND"><code class="literal">GNUTLS_E_NO_CERTIFICATE_FOUND</code></a> will be returned. If a key +is found but does not match <a class="link" href="gnutls-gnutls.html#GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS" title="GNUTLS_E_CERTIFICATE_KEY_MISMATCH"><code class="literal">GNUTLS_E_CERTIFICATE_KEY_MISMATCH</code></a> +is returned. On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, +or a negative error value on other errors.</p> +</div> +<p class="since">Since: 3.0.13</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-store-commitment"></a><h3>gnutls_store_commitment ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_store_commitment (<em class="parameter"><code>const <span class="type">char</span> *db_name</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *host</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *service</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-digest-algorithm-t" title="enum gnutls_digest_algorithm_t"><span class="type">gnutls_digest_algorithm_t</span></a> hash_algo</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *hash</code></em>, + <em class="parameter"><code><span class="type">time_t</span> expiration</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will store the provided hash commitment to +the list of stored public keys. The key with the given +hash will be considered valid until the provided expiration time.</p> +<p>The <em class="parameter"><code>tdb</code></em> + variable if non-null specifies a custom backend for +the storage of entries. If it is NULL then the +default file backend will be used.</p> +<p>Note that this function is not thread safe with the default backend.</p> +<div class="refsect3"> +<a name="gnutls-store-commitment.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>db_name</p></td> +<td class="parameter_description"><p>A file specifying the stored keys (use NULL for the default)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>tdb</p></td> +<td class="parameter_description"><p>A storage structure or NULL to use the default</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>host</p></td> +<td class="parameter_description"><p>The peer's name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>service</p></td> +<td class="parameter_description"><p>non-NULL if this key is specific to a service (e.g. http)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>hash_algo</p></td> +<td class="parameter_description"><p>The hash algorithm type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>hash</p></td> +<td class="parameter_description"><p>The raw hash</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>expiration</p></td> +<td class="parameter_description"><p>The expiration time (use 0 to disable expiration)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be 0 or <a class="link" href="gnutls-gnutls.html#GNUTLS-SCOMMIT-FLAG-ALLOW-BROKEN:CAPS" title="GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN"><code class="literal">GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN</code></a>.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-store-commitment.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-store-pubkey"></a><h3>gnutls_store_pubkey ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_store_pubkey (<em class="parameter"><code>const <span class="type">char</span> *db_name</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-tdb-t" title="gnutls_tdb_t"><span class="type">gnutls_tdb_t</span></a> tdb</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *host</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *service</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-certificate-type-t" title="enum gnutls_certificate_type_t"><span class="type">gnutls_certificate_type_t</span></a> cert_type</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cert</code></em>, + <em class="parameter"><code><span class="type">time_t</span> expiration</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will store a raw public-key or a public-key provided via +a raw (DER-encoded) certificate to the list of stored public keys. The key +will be considered valid until the provided expiration time.</p> +<p>The <em class="parameter"><code>tdb</code></em> + variable if non-null specifies a custom backend for +the storage of entries. If it is NULL then the +default file backend will be used.</p> +<p>Unless an alternative <em class="parameter"><code>tdb</code></em> + is provided, the storage format is a textual format +consisting of a line for each host with fields separated by '|'. The contents of +the fields are a format-identifier which is set to 'g0', the hostname that the +rest of the data applies to, the numeric port or host name, the expiration +time in seconds since the epoch (0 for no expiration), and a base64 +encoding of the raw (DER) public key information (SPKI) of the peer.</p> +<p>As of GnuTLS 3.6.6 this function also accepts raw public keys.</p> +<div class="refsect3"> +<a name="gnutls-store-pubkey.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>db_name</p></td> +<td class="parameter_description"><p>A file specifying the stored keys (use NULL for the default)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>tdb</p></td> +<td class="parameter_description"><p>A storage structure or NULL to use the default</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>host</p></td> +<td class="parameter_description"><p>The peer's name</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>service</p></td> +<td class="parameter_description"><p>non-NULL if this key is specific to a service (e.g. http)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert_type</p></td> +<td class="parameter_description"><p>The type of the certificate</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cert</p></td> +<td class="parameter_description"><p>The data of the certificate</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>expiration</p></td> +<td class="parameter_description"><p>The expiration time (use 0 to disable expiration)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be 0.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-store-pubkey.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a +negative error value.</p> +</div> +<p class="since">Since: 3.0.13</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-load-file"></a><h3>gnutls_load_file ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_load_file (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre> +<p>This function will load a file into a datum. The data are +zero terminated but the terminating null is not included in length. +The returned data are allocated using <code class="function">gnutls_malloc()</code>.</p> +<p>Note that this function is not designed for reading sensitive materials, +such as private keys, on practical applications. When the reading fails +in the middle, the partially loaded content might remain on memory.</p> +<div class="refsect3"> +<a name="gnutls-load-file.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>filename</p></td> +<td class="parameter_description"><p>the name of the file to load</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>Where the file will be stored</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-load-file.returns"></a><h4>Returns</h4> +<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise +an error code is returned.</p> +<p>Since 3.1.0</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-url-is-supported"></a><h3>gnutls_url_is_supported ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_url_is_supported (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>);</pre> +<p>Check whether the provided <em class="parameter"><code>url</code></em> + is supported. Depending on the system libraries +GnuTLS may support pkcs11, tpmkey or other URLs.</p> +<div class="refsect3"> +<a name="gnutls-url-is-supported.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>url</p></td> +<td class="parameter_description"><p>A URI to be tested</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-url-is-supported.returns"></a><h4>Returns</h4> +<p> return non-zero if the given URL is supported, and zero if +it is not known.</p> +</div> +<p class="since">Since: 3.1.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pin-callback-t"></a><h3>gnutls_pin_callback_t ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_pin_callback_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *userdata</code></em>, + <em class="parameter"><code><span class="type">int</span> attempt</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *token_label</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>, + <em class="parameter"><code><span class="type">char</span> *pin</code></em>, + <em class="parameter"><code><span class="type">size_t</span> pin_max</code></em>);</pre> +<p>Callback function type for PKCS<span class="type">11</span> or TPM PIN entry. It is set by +functions like <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p> +<p>The callback should provides the PIN code to unlock the token with +label <em class="parameter"><code>token_label</code></em> +, specified by the URL <em class="parameter"><code>token_url</code></em> +.</p> +<p>The PIN code, as a NUL-terminated ASCII string, should be copied +into the <em class="parameter"><code>pin</code></em> + buffer (of maximum size <em class="parameter"><code>pin_max</code></em> +), and return 0 to +indicate success. Alternatively, the callback may return a +negative gnutls error code to indicate failure and cancel PIN entry +(in which case, the contents of the <em class="parameter"><code>pin</code></em> + parameter are ignored).</p> +<p>When a PIN is required, the callback will be invoked repeatedly +(and indefinitely) until either the returned PIN code is correct, +the callback returns failure, or the token refuses login (e.g. when +the token is locked due to too many incorrect PINs!). For the +first such invocation, the <em class="parameter"><code>attempt</code></em> + counter will have value zero; +it will increase by one for each subsequent attempt.</p> +<div class="refsect3"> +<a name="gnutls-pin-callback-t.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>userdata</p></td> +<td class="parameter_description"><p>user-controlled data from <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>attempt</p></td> +<td class="parameter_description"><p>pin-attempt counter, initially 0.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>token_url</p></td> +<td class="parameter_description"><p>URL of token.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>token_label</p></td> +<td class="parameter_description"><p>label of token.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-pin-flag-t" title="enum gnutls_pin_flag_t"><span class="type">gnutls_pin_flag_t</span></a> flag.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pin</p></td> +<td class="parameter_description"><p>buffer to hold PIN, of size <em class="parameter"><code>pin_max</code></em> +.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pin_max</p></td> +<td class="parameter_description"><p>size of <em class="parameter"><code>pin</code></em> +buffer.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-pin-callback-t.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> +</div> +<p class="since">Since: 2.12.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-set-pin-function"></a><h3>gnutls_certificate_set_pin_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_certificate_set_pin_function (<em class="parameter"><code><span class="type">gnutls_certificate_credentials_t</span> Param1</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> fn</code></em>, + <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-buffer-append-data"></a><h3>gnutls_buffer_append_data ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_buffer_append_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-buffer-t" title="gnutls_buffer_t"><span class="type">gnutls_buffer_t</span></a> Param1</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +<p>Appends the provided <em class="parameter"><code>data</code></em> + to the destination buffer.</p> +<div class="refsect3"> +<a name="gnutls-buffer-append-data.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>dest</p></td> +<td class="parameter_description"><p>the buffer to append to</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>the size of <em class="parameter"><code>data</code></em> +</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-buffer-append-data.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-utf8-password-normalize"></a><h3>gnutls_utf8_password_normalize ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_utf8_password_normalize (<em class="parameter"><code>const <span class="type">uint8_t</span> *password</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> password_len</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function will convert the provided UTF-8 password according +to the normalization rules in RFC7613.</p> +<p>If the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-UTF8-IGNORE-ERRS:CAPS" title="GNUTLS_UTF8_IGNORE_ERRS"><code class="literal">GNUTLS_UTF8_IGNORE_ERRS</code></a> is specified, any UTF-8 encoding +errors will be ignored, and in that case the output will be a copy of the input.</p> +<div class="refsect3"> +<a name="gnutls-utf8-password-normalize.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>password</p></td> +<td class="parameter_description"><p>contain the UTF-8 formatted password</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>plen</p></td> +<td class="parameter_description"><p>the length of the provided password</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>out</p></td> +<td class="parameter_description"><p>the result in an null-terminated allocated string</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-utf8-password-normalize.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-UTF8-STRING:CAPS" title="GNUTLS_E_INVALID_UTF8_STRING"><code class="literal">GNUTLS_E_INVALID_UTF8_STRING</code></a> on invalid UTF-8 data, or 0 on success.</p> +</div> +<p class="since">Since: 3.5.7</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-set-data"></a><h3>gnutls_ext_set_data ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_ext_set_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-priv-data-t" title="gnutls_ext_priv_data_t"><span class="type">gnutls_ext_priv_data_t</span></a> Param3</code></em>);</pre> +<p>This function allows an extension handler to store data in the current session +and retrieve them later on. The set data will be deallocated using +the gnutls_ext_deinit_data_func.</p> +<div class="refsect3"> +<a name="gnutls-ext-set-data.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> opaque pointer</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>tls_id</p></td> +<td class="parameter_description"><p>the numeric id of the extension</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the private data to set</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-get-data"></a><h3>gnutls_ext_get_data ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ext_get_data (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-priv-data-t" title="gnutls_ext_priv_data_t"><span class="type">gnutls_ext_priv_data_t</span></a> *Param3</code></em>);</pre> +<p>This function retrieves any data previously stored with <a class="link" href="gnutls-gnutls.html#gnutls-ext-set-data" title="gnutls_ext_set_data ()"><code class="function">gnutls_ext_set_data()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-ext-get-data.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> opaque pointer</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>tls_id</p></td> +<td class="parameter_description"><p>the numeric id of the extension</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>a pointer to the private data to retrieve</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ext-get-data.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-get-current-msg"></a><h3>gnutls_ext_get_current_msg ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_ext_get_current_msg (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>);</pre> +<p>This function allows an extension handler to obtain the message +this extension is being called from. The returned value is a single +entry of the <a class="link" href="gnutls-gnutls.html#gnutls-ext-flags-t" title="enum gnutls_ext_flags_t"><code class="literal">gnutls_ext_flags_t</code></a> enumeration. That is, if an +extension was registered with the <a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-FLAG-HRR:CAPS"><code class="literal">GNUTLS_EXT_FLAG_HRR</code></a> and +<a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-FLAG-EE:CAPS"><code class="literal">GNUTLS_EXT_FLAG_EE</code></a> flags, the value when called during parsing of the +encrypted extensions message will be <a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-FLAG-EE:CAPS"><code class="literal">GNUTLS_EXT_FLAG_EE</code></a>.</p> +<p>If not called under an extension handler, its value is undefined.</p> +<div class="refsect3"> +<a name="gnutls-ext-get-current-msg.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> opaque pointer</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-recv-func"></a><h3>gnutls_ext_recv_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_ext_recv_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const unsigned <span class="type">char</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-send-func"></a><h3>gnutls_ext_send_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_ext_send_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-buffer-t" title="gnutls_buffer_t"><span class="type">gnutls_buffer_t</span></a> extdata</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-deinit-data-func"></a><h3>gnutls_ext_deinit_data_func ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +<span class="c_punctuation">(</span>*gnutls_ext_deinit_data_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-priv-data-t" title="gnutls_ext_priv_data_t"><span class="type">gnutls_ext_priv_data_t</span></a> data</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-pack-func"></a><h3>gnutls_ext_pack_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_ext_pack_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-priv-data-t" title="gnutls_ext_priv_data_t"><span class="type">gnutls_ext_priv_data_t</span></a> data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-buffer-t" title="gnutls_buffer_t"><span class="type">gnutls_buffer_t</span></a> packed_data</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-unpack-func"></a><h3>gnutls_ext_unpack_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_ext_unpack_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-buffer-t" title="gnutls_buffer_t"><span class="type">gnutls_buffer_t</span></a> packed_data</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-priv-data-t" title="gnutls_ext_priv_data_t"><span class="type">gnutls_ext_priv_data_t</span></a> *data</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-raw-process-func"></a><h3>gnutls_ext_raw_process_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_ext_raw_process_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *ctx</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> tls_id</code></em>, + <em class="parameter"><code>const unsigned <span class="type">char</span> *data</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> data_size</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-raw-parse"></a><h3>gnutls_ext_raw_parse ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ext_raw_parse (<em class="parameter"><code><span class="type">void</span> *ctx</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-raw-process-func" title="gnutls_ext_raw_process_func ()"><span class="type">gnutls_ext_raw_process_func</span></a> cb</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function iterates through the TLS extensions as passed in +<em class="parameter"><code>data</code></em> +, passing the individual extension data to callback. The +<em class="parameter"><code>data</code></em> + must conform to Extension extensions<0..2^16-1> format.</p> +<p>If flags is <code class="literal">GNUTLS_EXT_RAW_TLS_FLAG_CLIENT_HELLO</code> then this function +will parse the extension data from the position, as if the packet in +<em class="parameter"><code>data</code></em> + is a client hello (without record or handshake headers) - +as provided by <a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-hook-function" title="gnutls_handshake_set_hook_function ()"><code class="function">gnutls_handshake_set_hook_function()</code></a>.</p> +<p>The return value of the callback will be propagated.</p> +<div class="refsect3"> +<a name="gnutls-ext-raw-parse.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>ctx</p></td> +<td class="parameter_description"><p>a pointer to pass to callback function</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>cb</p></td> +<td class="parameter_description"><p>callback function to process each extension found</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>TLS extension data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero or <a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-RAW-FLAG-TLS-CLIENT-HELLO:CAPS" title="GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO"><code class="literal">GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-RAW-FLAG-DTLS-CLIENT-HELLO:CAPS" title="GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO"><code class="literal">GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ext-raw-parse.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, or an error code. On unknown +flags it returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +</div> +<p class="since">Since: 3.6.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-register"></a><h3>gnutls_ext_register ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_ext_register (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>, + <em class="parameter"><code><span class="type">int</span> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-parse-type-t" title="enum gnutls_ext_parse_type_t"><span class="type">gnutls_ext_parse_type_t</span></a> parse_point</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-recv-func" title="gnutls_ext_recv_func ()"><span class="type">gnutls_ext_recv_func</span></a> recv_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-send-func" title="gnutls_ext_send_func ()"><span class="type">gnutls_ext_send_func</span></a> send_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-deinit-data-func" title="gnutls_ext_deinit_data_func ()"><span class="type">gnutls_ext_deinit_data_func</span></a> deinit_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-pack-func" title="gnutls_ext_pack_func ()"><span class="type">gnutls_ext_pack_func</span></a> pack_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-unpack-func" title="gnutls_ext_unpack_func ()"><span class="type">gnutls_ext_unpack_func</span></a> unpack_func</code></em>);</pre> +<p>This function will register a new extension type. The extension will remain +registered until <a class="link" href="gnutls-gnutls.html#gnutls-global-deinit" title="gnutls_global_deinit ()"><code class="function">gnutls_global_deinit()</code></a> is called. If the extension type +is already registered then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-ALREADY-REGISTERED:CAPS" title="GNUTLS_E_ALREADY_REGISTERED"><code class="literal">GNUTLS_E_ALREADY_REGISTERED</code></a> will be returned.</p> +<p>Each registered extension can store temporary data into the gnutls_session_t +structure using <a class="link" href="gnutls-gnutls.html#gnutls-ext-set-data" title="gnutls_ext_set_data ()"><code class="function">gnutls_ext_set_data()</code></a>, and they can be retrieved using +<a class="link" href="gnutls-gnutls.html#gnutls-ext-get-data" title="gnutls_ext_get_data ()"><code class="function">gnutls_ext_get_data()</code></a>.</p> +<p>Any extensions registered with this function are valid for the client +and TLS1.2 server hello (or encrypted extensions for TLS1.3).</p> +<p>This function is not thread safe.</p> +<div class="refsect3"> +<a name="gnutls-ext-register.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>the name of the extension to register</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>id</p></td> +<td class="parameter_description"><p>the numeric TLS id of the extension</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>parse_point</p></td> +<td class="parameter_description"><p>the parse type of the extension (see gnutls_ext_parse_type_t)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_func</p></td> +<td class="parameter_description"><p>a function to receive the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_func</p></td> +<td class="parameter_description"><p>a function to send the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>deinit_func</p></td> +<td class="parameter_description"><p>a function deinitialize any private data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pack_func</p></td> +<td class="parameter_description"><p>a function which serializes the extension's private data (used on session packing for resumption)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>unpack_func</p></td> +<td class="parameter_description"><p>a function which will deserialize the extension's private data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ext-register.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-ext-register"></a><h3>gnutls_session_ext_register ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_ext_register (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> Param1</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, + <em class="parameter"><code><span class="type">int</span> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-parse-type-t" title="enum gnutls_ext_parse_type_t"><span class="type">gnutls_ext_parse_type_t</span></a> parse_point</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-recv-func" title="gnutls_ext_recv_func ()"><span class="type">gnutls_ext_recv_func</span></a> recv_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-send-func" title="gnutls_ext_send_func ()"><span class="type">gnutls_ext_send_func</span></a> send_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-deinit-data-func" title="gnutls_ext_deinit_data_func ()"><span class="type">gnutls_ext_deinit_data_func</span></a> deinit_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-pack-func" title="gnutls_ext_pack_func ()"><span class="type">gnutls_ext_pack_func</span></a> pack_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-unpack-func" title="gnutls_ext_unpack_func ()"><span class="type">gnutls_ext_unpack_func</span></a> unpack_func</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>This function will register a new extension type. The extension will be +only usable within the registered session. If the extension type +is already registered then <a class="link" href="gnutls-gnutls.html#GNUTLS-E-ALREADY-REGISTERED:CAPS" title="GNUTLS_E_ALREADY_REGISTERED"><code class="literal">GNUTLS_E_ALREADY_REGISTERED</code></a> will be returned, +unless the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-EXT-FLAG-OVERRIDE-INTERNAL:CAPS"><code class="literal">GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL</code></a> is specified. The latter +flag when specified can be used to override certain extensions introduced +after 3.6.0. It is expected to be used by applications which handle +custom extensions that are not currently supported in GnuTLS, but direct +support for them may be added in the future.</p> +<p>Each registered extension can store temporary data into the gnutls_session_t +structure using <a class="link" href="gnutls-gnutls.html#gnutls-ext-set-data" title="gnutls_ext_set_data ()"><code class="function">gnutls_ext_set_data()</code></a>, and they can be retrieved using +<a class="link" href="gnutls-gnutls.html#gnutls-ext-get-data" title="gnutls_ext_get_data ()"><code class="function">gnutls_ext_get_data()</code></a>.</p> +<p>The validity of the extension registered can be given by the appropriate flags +of <a class="link" href="gnutls-gnutls.html#gnutls-ext-flags-t" title="enum gnutls_ext_flags_t"><code class="literal">gnutls_ext_flags_t</code></a>. If no validity is given, then the registered extension +will be valid for client and TLS1.2 server hello (or encrypted extensions for TLS1.3).</p> +<div class="refsect3"> +<a name="gnutls-session-ext-register.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the session for which this extension will be set</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>the name of the extension to register</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>id</p></td> +<td class="parameter_description"><p>the numeric id of the extension</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>parse_point</p></td> +<td class="parameter_description"><p>the parse type of the extension (see gnutls_ext_parse_type_t)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_func</p></td> +<td class="parameter_description"><p>a function to receive the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_func</p></td> +<td class="parameter_description"><p>a function to send the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>deinit_func</p></td> +<td class="parameter_description"><p>a function deinitialize any private data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>pack_func</p></td> +<td class="parameter_description"><p>a function which serializes the extension's private data (used on session packing for resumption)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>unpack_func</p></td> +<td class="parameter_description"><p>a function which will deserialize the extension's private data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero or flags from <a class="link" href="gnutls-gnutls.html#gnutls-ext-flags-t" title="enum gnutls_ext_flags_t"><code class="literal">gnutls_ext_flags_t</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-ext-register.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.5.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-get-name"></a><h3>gnutls_ext_get_name ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_ext_get_name (<em class="parameter"><code>unsigned <span class="type">int</span> ext</code></em>);</pre> +<p>Convert a TLS extension numeric ID to a printable string.</p> +<div class="refsect3"> +<a name="gnutls-ext-get-name.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>ext</p></td> +<td class="parameter_description"><p>is a TLS extension numeric ID</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ext-get-name.returns"></a><h4>Returns</h4> +<p> a pointer to a string that contains the name of the +specified cipher, or <code class="literal">NULL</code>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-get-name2"></a><h3>gnutls_ext_get_name2 ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +gnutls_ext_get_name2 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> tls_id</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-ext-parse-type-t" title="enum gnutls_ext_parse_type_t"><span class="type">gnutls_ext_parse_type_t</span></a> parse_point</code></em>);</pre> +<p>Convert a TLS extension numeric ID to a printable string.</p> +<div class="refsect3"> +<a name="gnutls-ext-get-name2.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> opaque pointer</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>tls_id</p></td> +<td class="parameter_description"><p>is a TLS extension numeric ID</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>parse_point</p></td> +<td class="parameter_description"><p>the parse type of the extension</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-ext-get-name2.returns"></a><h4>Returns</h4> +<p> a pointer to a string that contains the name of the +specified cipher, or <code class="literal">NULL</code>.</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-supp-recv-func"></a><h3>gnutls_supp_recv_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_supp_recv_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const unsigned <span class="type">char</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-supp-send-func"></a><h3>gnutls_supp_send_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_supp_send_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-buffer-t" title="gnutls_buffer_t"><span class="type">gnutls_buffer_t</span></a> buf</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-supplemental-register"></a><h3>gnutls_supplemental_register ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_supplemental_register (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-supplemental-data-format-type-t" title="enum gnutls_supplemental_data_format_type_t"><span class="type">gnutls_supplemental_data_format_type_t</span></a> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-supp-recv-func" title="gnutls_supp_recv_func ()"><span class="type">gnutls_supp_recv_func</span></a> supp_recv_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-supp-send-func" title="gnutls_supp_send_func ()"><span class="type">gnutls_supp_send_func</span></a> supp_send_func</code></em>);</pre> +<p>This function will register a new supplemental data type (rfc4680). +The registered data will remain until <a class="link" href="gnutls-gnutls.html#gnutls-global-deinit" title="gnutls_global_deinit ()"><code class="function">gnutls_global_deinit()</code></a> +is called. The provided <em class="parameter"><code>type</code></em> + must be an unassigned type in +<a class="link" href="gnutls-gnutls.html#gnutls-supplemental-data-format-type-t" title="enum gnutls_supplemental_data_format_type_t"><code class="literal">gnutls_supplemental_data_format_type_t</code></a>. If the type is already +registered or handled by GnuTLS internally <a class="link" href="gnutls-gnutls.html#GNUTLS-E-ALREADY-REGISTERED:CAPS" title="GNUTLS_E_ALREADY_REGISTERED"><code class="literal">GNUTLS_E_ALREADY_REGISTERED</code></a> +will be returned.</p> +<p>This function is not thread safe. As supplemental data are not defined under +TLS 1.3, this function will disable TLS 1.3 support globally.</p> +<div class="refsect3"> +<a name="gnutls-supplemental-register.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>the name of the supplemental data to register</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>the type of the supplemental data format</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_func</p></td> +<td class="parameter_description"><p>the function to receive the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_func</p></td> +<td class="parameter_description"><p>the function to send the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-supplemental-register.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-supplemental-register"></a><h3>gnutls_session_supplemental_register ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_session_supplemental_register (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *name</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-supplemental-data-format-type-t" title="enum gnutls_supplemental_data_format_type_t"><span class="type">gnutls_supplemental_data_format_type_t</span></a> type</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-supp-recv-func" title="gnutls_supp_recv_func ()"><span class="type">gnutls_supp_recv_func</span></a> supp_recv_func</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-supp-send-func" title="gnutls_supp_send_func ()"><span class="type">gnutls_supp_send_func</span></a> supp_send_func</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>This function will register a new supplemental data type (rfc4680). +The registered supplemental functions will be used for that specific +session. The provided <em class="parameter"><code>type</code></em> + must be an unassigned type in +<a class="link" href="gnutls-gnutls.html#gnutls-supplemental-data-format-type-t" title="enum gnutls_supplemental_data_format_type_t"><code class="literal">gnutls_supplemental_data_format_type_t</code></a>.</p> +<p>If the type is already registered or handled by GnuTLS internally +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-ALREADY-REGISTERED:CAPS" title="GNUTLS_E_ALREADY_REGISTERED"><code class="literal">GNUTLS_E_ALREADY_REGISTERED</code></a> will be returned.</p> +<p>As supplemental data are not defined under TLS 1.3, this function will +disable TLS 1.3 support for the given session.</p> +<div class="refsect3"> +<a name="gnutls-session-supplemental-register.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the session for which this will be registered</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>the name of the supplemental data to register</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>the type of the supplemental data format</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>recv_func</p></td> +<td class="parameter_description"><p>the function to receive the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>send_func</p></td> +<td class="parameter_description"><p>the function to send the data</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>must be zero</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-session-supplemental-register.returns"></a><h4>Returns</h4> +<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> on success, otherwise a negative error code.</p> +</div> +<p class="since">Since: 3.5.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-supplemental-recv"></a><h3>gnutls_supplemental_recv ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_supplemental_recv (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> do_recv_supplemental</code></em>);</pre> +<p>This function is to be called by an extension handler to +instruct gnutls to attempt to receive supplemental data +during the handshake process.</p> +<div class="refsect3"> +<a name="gnutls-supplemental-recv.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>do_recv_supplemental</p></td> +<td class="parameter_description"><p>non-zero in order to expect supplemental data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-supplemental-send"></a><h3>gnutls_supplemental_send ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_supplemental_send (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> do_send_supplemental</code></em>);</pre> +<p>This function is to be called by an extension handler to +instruct gnutls to send supplemental data during the handshake process.</p> +<div class="refsect3"> +<a name="gnutls-supplemental-send.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>do_send_supplemental</p></td> +<td class="parameter_description"><p>non-zero in order to send supplemental data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.4.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-init"></a><h3>gnutls_anti_replay_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_anti_replay_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> *anti_replay</code></em>);</pre> +<p>This function will allocate and initialize the <em class="parameter"><code>anti_replay</code></em> + context +to be usable for detect replay attacks. The context can then be +attached to a <em class="parameter"><code>gnutls_session_t</code></em> + with +<a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-enable" title="gnutls_anti_replay_enable ()"><code class="function">gnutls_anti_replay_enable()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-anti-replay-init.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>anti_replay</p></td> +<td class="parameter_description"><p>is a pointer to <a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-anti-replay-init.returns"></a><h4>Returns</h4> +<p> Zero or a negative error code on error.</p> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-deinit"></a><h3>gnutls_anti_replay_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anti_replay_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> anti_replay</code></em>);</pre> +<p>This function will deinitialize all resources occupied by the given +anti-replay context.</p> +<div class="refsect3"> +<a name="gnutls-anti-replay-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>anti_replay</p></td> +<td class="parameter_description"><p>is a <span class="type">gnutls_anti_replay</span> type</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-set-window"></a><h3>gnutls_anti_replay_set_window ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anti_replay_set_window (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> anti_replay</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> window</code></em>);</pre> +<p>Sets the time window used for ClientHello recording. In order to +protect against replay attacks, the server records ClientHello +messages within this time period from the last update, and +considers it a replay when a ClientHello outside of the period; if +a ClientHello arrives within this period, the server checks the +database and detects duplicates.</p> +<p>For the details of the algorithm, see RFC 8446, section 8.2.</p> +<div class="refsect3"> +<a name="gnutls-anti-replay-set-window.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>anti_replay</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>window</p></td> +<td class="parameter_description"><p>is the time window recording ClientHello, in milliseconds</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-enable"></a><h3>gnutls_anti_replay_enable ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anti_replay_enable (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> anti_replay</code></em>);</pre> +<p>Request that the server should use anti-replay mechanism.</p> +<div class="refsect3"> +<a name="gnutls-anti-replay-enable.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>anti_replay</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-db-add-func"></a><h3>gnutls_db_add_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_db_add_func<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *Param1</code></em>, + <em class="parameter"><code><span class="type">time_t</span> exp_time</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, + <em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>);</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-set-add-function"></a><h3>gnutls_anti_replay_set_add_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anti_replay_set_add_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> Param1</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-db-add-func" title="gnutls_db_add_func ()"><span class="type">gnutls_db_add_func</span></a> add_func</code></em>);</pre> +<p>Sets the function that will be used to store an entry if it is not +already present in the resumed sessions database. This function returns 0 +if the entry is successfully stored, and a negative error code +otherwise. In particular, if the entry is found in the database, +it returns <a class="link" href="gnutls-gnutls.html#GNUTLS-E-DB-ENTRY-EXISTS:CAPS" title="GNUTLS_E_DB_ENTRY_EXISTS"><code class="literal">GNUTLS_E_DB_ENTRY_EXISTS</code></a>.</p> +<p>The arguments to the <em class="parameter"><code>add_func</code></em> + are:</p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p><code class="literal">ptr</code>: the pointer set with <a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-set-ptr" title="gnutls_anti_replay_set_ptr ()"><code class="function">gnutls_anti_replay_set_ptr()</code></a></p></li> +<li class="listitem"><p><code class="literal">exp_time</code>: the expiration time of the entry</p></li> +<li class="listitem"><p><code class="literal">key</code>: a pointer to the key</p></li> +<li class="listitem"><p><code class="literal">data</code>: a pointer to data to store</p></li> +</ul></div> +<p>The data set by this function can be examined using +<a class="link" href="gnutls-gnutls.html#gnutls-db-check-entry-expire-time" title="gnutls_db_check_entry_expire_time ()"><code class="function">gnutls_db_check_entry_expire_time()</code></a> and <a class="link" href="gnutls-gnutls.html#gnutls-db-check-entry-time" title="gnutls_db_check_entry_time ()"><code class="function">gnutls_db_check_entry_time()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-anti-replay-set-add-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>anti_replay</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>add_func</p></td> +<td class="parameter_description"><p>is the function.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.6.5</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-set-ptr"></a><h3>gnutls_anti_replay_set_ptr ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_anti_replay_set_ptr (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> Param1</code></em>, + <em class="parameter"><code><span class="type">void</span> *ptr</code></em>);</pre> +<p>Sets the pointer that will be provided to db add function +as the first argument.</p> +<div class="refsect3"> +<a name="gnutls-anti-replay-set-ptr.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>anti_replay</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-anti-replay-t" title="gnutls_anti_replay_t"><span class="type">gnutls_anti_replay_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ptr</p></td> +<td class="parameter_description"><p>is the pointer</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-read-func"></a><h3>gnutls_handshake_read_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_handshake_read_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t"><span class="type">gnutls_record_encryption_level_t</span></a> level</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><span class="type">gnutls_handshake_description_t</span></a> htype</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +<p>Function prototype for handshake intercepting hooks. It is set using +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-read-function" title="gnutls_handshake_set_read_function ()"><code class="function">gnutls_handshake_set_read_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-handshake-read-func.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the current session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>htype</p></td> +<td class="parameter_description"><p>the type of the handshake message (<a class="link" href="gnutls-gnutls.html#gnutls-handshake-description-t" title="enum gnutls_handshake_description_t"><span class="type">gnutls_handshake_description_t</span></a>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>level</p></td> +<td class="parameter_description"><p><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t"><span class="type">gnutls_record_encryption_level_t</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the (const) data that was being sent</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>the size of data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake-read-func.returns"></a><h4>Returns</h4> +<p> Non zero on error.</p> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-read-function"></a><h3>gnutls_handshake_set_read_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_handshake_set_read_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-handshake-read-func" title="gnutls_handshake_read_func ()"><span class="type">gnutls_handshake_read_func</span></a> func</code></em>);</pre> +<p>This function will set a callback to be called when a handshake +message is being sent.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-read-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-write"></a><h3>gnutls_handshake_write ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_handshake_write (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t"><span class="type">gnutls_record_encryption_level_t</span></a> level</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">size_t</span> data_size</code></em>);</pre> +<p>This function processes a handshake message in the encryption level +specified with <em class="parameter"><code>level</code></em> +. Prior to calling this function, a handshake +read callback must be set on <em class="parameter"><code>session</code></em> +. Use +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-read-function" title="gnutls_handshake_set_read_function ()"><code class="function">gnutls_handshake_set_read_function()</code></a> to do this.</p> +<div class="refsect3"> +<a name="gnutls-handshake-write.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>level</p></td> +<td class="parameter_description"><p>the current encryption level for reading a handshake message</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>the (const) handshake data to be processed</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data_size</p></td> +<td class="parameter_description"><p>the size of data</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-secret-func"></a><h3>gnutls_handshake_secret_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_handshake_secret_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t"><span class="type">gnutls_record_encryption_level_t</span></a> level</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *secret_read</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *secret_write</code></em>, + <em class="parameter"><code><span class="type">size_t</span> secret_size</code></em>);</pre> +<p>Function prototype for secret hooks. It is set using +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-secret-function" title="gnutls_handshake_set_secret_function ()"><code class="function">gnutls_handshake_set_secret_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-handshake-secret-func.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the current session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>level</p></td> +<td class="parameter_description"><p>the encryption level</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secret_read</p></td> +<td class="parameter_description"><p>the secret used for reading, can be <code class="literal">NULL</code> if not set</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secret_write</p></td> +<td class="parameter_description"><p>the secret used for writing, can be <code class="literal">NULL</code> if not set</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>secret_size</p></td> +<td class="parameter_description"><p>the size of the secrets</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-handshake-secret-func.returns"></a><h4>Returns</h4> +<p> Non zero on error.</p> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-set-secret-function"></a><h3>gnutls_handshake_set_secret_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_handshake_set_secret_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-handshake-secret-func" title="gnutls_handshake_secret_func ()"><span class="type">gnutls_handshake_secret_func</span></a> func</code></em>);</pre> +<p>This function will set a callback to be called when a new traffic +secret is installed.</p> +<div class="refsect3"> +<a name="gnutls-handshake-set-secret-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is a <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type.</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>the secret func</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-read-func"></a><h3>gnutls_alert_read_func ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*gnutls_alert_read_func<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t"><span class="type">gnutls_record_encryption_level_t</span></a> level</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-level-t" title="enum gnutls_alert_level_t"><span class="type">gnutls_alert_level_t</span></a> alert_level</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-description-t" title="enum gnutls_alert_description_t"><span class="type">gnutls_alert_description_t</span></a> alert_desc</code></em>);</pre> +<p>Function prototype for alert intercepting hooks. It is set using +<a class="link" href="gnutls-gnutls.html#gnutls-alert-set-read-function" title="gnutls_alert_set_read_function ()"><code class="function">gnutls_alert_set_read_function()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-alert-read-func.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the current session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>level</p></td> +<td class="parameter_description"><p><a class="link" href="gnutls-gnutls.html#gnutls-record-encryption-level-t" title="enum gnutls_record_encryption_level_t"><span class="type">gnutls_record_encryption_level_t</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>alert_level</p></td> +<td class="parameter_description"><p>the level of the alert</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>alert_desc</p></td> +<td class="parameter_description"><p>the alert description</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-alert-read-func.returns"></a><h4>Returns</h4> +<p> Non zero on error.</p> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-set-read-function"></a><h3>gnutls_alert_set_read_function ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_alert_set_read_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> session</code></em>, + <em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-alert-read-func" title="gnutls_alert_read_func ()"><span class="type">gnutls_alert_read_func</span></a> func</code></em>);</pre> +<p>This function will set a callback to be called when an alert +message is being sent.</p> +<div class="refsect3"> +<a name="gnutls-alert-set-read-function.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>is <a class="link" href="gnutls-gnutls.html#gnutls-session-t" title="gnutls_session_t"><span class="type">gnutls_session_t</span></a> type</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>func</p></td> +<td class="parameter_description"><p>is the function to be called</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-mode-enabled"></a><h3>gnutls_fips140_mode_enabled ()</h3> +<pre class="programlisting"><span class="returnvalue">unsigned</span> +gnutls_fips140_mode_enabled (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Checks whether this library is in FIPS140 mode. The returned +value corresponds to the library mode as set with +<a class="link" href="gnutls-gnutls.html#gnutls-fips140-set-mode" title="gnutls_fips140_set_mode ()"><code class="function">gnutls_fips140_set_mode()</code></a>.</p> +<p>If <a class="link" href="gnutls-gnutls.html#gnutls-fips140-set-mode" title="gnutls_fips140_set_mode ()"><code class="function">gnutls_fips140_set_mode()</code></a> was called with <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SET-MODE-THREAD:CAPS" title="GNUTLS_FIPS140_SET_MODE_THREAD"><code class="literal">GNUTLS_FIPS140_SET_MODE_THREAD</code></a> +then this function will return the current thread's FIPS140 mode, otherwise +the global value is returned.</p> +<div class="refsect3"> +<a name="gnutls-fips140-mode-enabled.returns"></a><h4>Returns</h4> +<p> return non-zero if true or zero if false.</p> +</div> +<p class="since">Since: 3.3.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-set-mode"></a><h3>gnutls_fips140_set_mode ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_fips140_set_mode (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-fips-mode-t" title="enum gnutls_fips_mode_t"><span class="type">gnutls_fips_mode_t</span></a> mode</code></em>, + <em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> +<p>That function is not thread-safe when changing the mode with no flags +(globally), and should be called prior to creating any threads. Its +behavior with no flags after threads are created is undefined.</p> +<p>When the flag <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SET-MODE-THREAD:CAPS" title="GNUTLS_FIPS140_SET_MODE_THREAD"><code class="literal">GNUTLS_FIPS140_SET_MODE_THREAD</code></a> is specified +then this call will change the FIPS140-2 mode for this particular +thread and not for the whole process. That way an application +can utilize this function to set and reset mode for specific +operations.</p> +<p>This function never fails but will be a no-op if used when +the library is not in FIPS140-2 mode. When asked to switch to unknown +values for <em class="parameter"><code>mode</code></em> + or to <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SELFTESTS:CAPS"><code class="literal">GNUTLS_FIPS140_SELFTESTS</code></a> mode, the library +switches to <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-STRICT:CAPS"><code class="literal">GNUTLS_FIPS140_STRICT</code></a> mode.</p> +<div class="refsect3"> +<a name="gnutls-fips140-set-mode.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>mode</p></td> +<td class="parameter_description"><p>the FIPS140-2 mode to switch to</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>should be zero or <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-SET-MODE-THREAD:CAPS" title="GNUTLS_FIPS140_SET_MODE_THREAD"><code class="literal">GNUTLS_FIPS140_SET_MODE_THREAD</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.6.2</p> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-FIPS140-SET-LAX-MODE:CAPS"></a><h3>GNUTLS_FIPS140_SET_LAX_MODE</h3> +<pre class="programlisting">#define GNUTLS_FIPS140_SET_LAX_MODE()</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-FIPS140-SET-STRICT-MODE:CAPS"></a><h3>GNUTLS_FIPS140_SET_STRICT_MODE</h3> +<pre class="programlisting">#define GNUTLS_FIPS140_SET_STRICT_MODE()</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-context-init"></a><h3>gnutls_fips140_context_init ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_fips140_context_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a> *context</code></em>);</pre> +<p>Create and initialize the FIPS context object.</p> +<div class="refsect3"> +<a name="gnutls-fips140-context-init.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>context</p></td> +<td class="parameter_description"><p>location to store <em class="parameter"><code>gnutls_fips140_context_t</code></em> +</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-fips140-context-init.returns"></a><h4>Returns</h4> +<p> 0 upon success, a negative error code otherwise</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-context-deinit"></a><h3>gnutls_fips140_context_deinit ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +gnutls_fips140_context_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a> context</code></em>);</pre> +<p>Uninitialize and release the FIPS context <em class="parameter"><code>context</code></em> +.</p> +<div class="refsect3"> +<a name="gnutls-fips140-context-deinit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>context</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-get-operation-state"></a><h3>gnutls_fips140_get_operation_state ()</h3> +<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-fips140-operation-state-t" title="enum gnutls_fips140_operation_state_t"><span class="returnvalue">gnutls_fips140_operation_state_t</span></a> +gnutls_fips140_get_operation_state (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a> context</code></em>);</pre> +<p>Get the previous operation state of <em class="parameter"><code>context</code></em> + in terms of FIPS.</p> +<div class="refsect3"> +<a name="gnutls-fips140-get-operation-state.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>context</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-fips140-get-operation-state.returns"></a><h4>Returns</h4> +<p> a <a class="link" href="gnutls-gnutls.html#gnutls-fips140-operation-state-t" title="enum gnutls_fips140_operation_state_t"><span class="type">gnutls_fips140_operation_state_t</span></a></p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-push-context"></a><h3>gnutls_fips140_push_context ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_fips140_push_context (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a> context</code></em>);</pre> +<p>Associate the FIPS <em class="parameter"><code>context</code></em> + to the current thread, diverting the +currently active context. If a cryptographic operation is ongoing +in the current thread, e.g., <code class="function">gnutls_aead_cipher_init()</code> is called +but <a class="link" href="gnutls-crypto.html#gnutls-aead-cipher-deinit" title="gnutls_aead_cipher_deinit ()"><code class="function">gnutls_aead_cipher_deinit()</code></a> is not yet called, it returns an +error <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<p>The operation state of <em class="parameter"><code>context</code></em> + will be reset to +<a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-INITIAL:CAPS"><code class="literal">GNUTLS_FIPS140_OP_INITIAL</code></a>.</p> +<p>This function is no-op if FIPS140 is not compiled in nor enabled +at run-time.</p> +<div class="refsect3"> +<a name="gnutls-fips140-push-context.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>context</p></td> +<td class="parameter_description"><p>a <a class="link" href="gnutls-gnutls.html#gnutls-fips140-context-t" title="gnutls_fips140_context_t"><span class="type">gnutls_fips140_context_t</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="gnutls-fips140-push-context.returns"></a><h4>Returns</h4> +<p> 0 upon success, a negative error code otherwise</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-pop-context"></a><h3>gnutls_fips140_pop_context ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_fips140_pop_context (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Dissociate the FIPS context currently +active on the current thread, reverting to the previously active +context. If a cryptographic operation is ongoing in the current +thread, e.g., <code class="function">gnutls_aead_cipher_init()</code> is called but +<a class="link" href="gnutls-crypto.html#gnutls-aead-cipher-deinit" title="gnutls_aead_cipher_deinit ()"><code class="function">gnutls_aead_cipher_deinit()</code></a> is not yet called, it returns an error +<a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a>.</p> +<p>This function is no-op if FIPS140 is not compiled in nor enabled +at run-time.</p> +<div class="refsect3"> +<a name="gnutls-fips140-pop-context.returns"></a><h4>Returns</h4> +<p> 0 upon success, a negative error code otherwise</p> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-run-self-tests"></a><h3>gnutls_fips140_run_self_tests ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +gnutls_fips140_run_self_tests (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<p>Manually perform the second round of the FIPS140 self-tests, +including:</p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p>Known answer tests (KAT) for the selected set of symmetric +cipher, MAC, public key, KDF, and DRBG</p></li> +<li class="listitem"><p>Library integrity checks</p></li> +</ul></div> +<p>Upon failure with FIPS140 mode enabled, it makes the library +unusable. This function is not thread-safe.</p> +<div class="refsect3"> +<a name="gnutls-fips140-run-self-tests.returns"></a><h4>Returns</h4> +<p> 0 upon success, a negative error code otherwise</p> +</div> +<p class="since">Since: 3.7.7</p> +</div> +</div> +<div class="refsect1"> +<a name="gnutls-gnutls.other_details"></a><h2>Types and Values</h2> +<div class="refsect2"> +<a name="GNUTLS-VERSION:CAPS"></a><h3>GNUTLS_VERSION</h3> +<pre class="programlisting">#define GNUTLS_VERSION "3.7.9" +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-VERSION-MAJOR:CAPS"></a><h3>GNUTLS_VERSION_MAJOR</h3> +<pre class="programlisting">#define GNUTLS_VERSION_MAJOR 3 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-VERSION-MINOR:CAPS"></a><h3>GNUTLS_VERSION_MINOR</h3> +<pre class="programlisting">#define GNUTLS_VERSION_MINOR 7 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-VERSION-PATCH:CAPS"></a><h3>GNUTLS_VERSION_PATCH</h3> +<pre class="programlisting">#define GNUTLS_VERSION_PATCH 9 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-VERSION-NUMBER:CAPS"></a><h3>GNUTLS_VERSION_NUMBER</h3> +<pre class="programlisting">#define GNUTLS_VERSION_NUMBER 0x030709 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CIPHER-RIJNDAEL-128-CBC:CAPS"></a><h3>GNUTLS_CIPHER_RIJNDAEL_128_CBC</h3> +<pre class="programlisting">#define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CIPHER-RIJNDAEL-256-CBC:CAPS"></a><h3>GNUTLS_CIPHER_RIJNDAEL_256_CBC</h3> +<pre class="programlisting">#define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CIPHER-RIJNDAEL-CBC:CAPS"></a><h3>GNUTLS_CIPHER_RIJNDAEL_CBC</h3> +<pre class="programlisting">#define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CIPHER-ARCFOUR:CAPS"></a><h3>GNUTLS_CIPHER_ARCFOUR</h3> +<pre class="programlisting">#define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-SKIP-GLOBAL-INIT:CAPS"></a><h3>GNUTLS_SKIP_GLOBAL_INIT</h3> +<pre class="programlisting">#define GNUTLS_SKIP_GLOBAL_INIT</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-cipher-algorithm-t"></a><h3>enum gnutls_cipher_algorithm_t</h3> +<p>Enumeration of different symmetric encryption algorithms.</p> +<div class="refsect3"> +<a name="gnutls-cipher-algorithm-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-UNKNOWN:CAPS"></a>GNUTLS_CIPHER_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Value to identify an unknown/unsupported algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-NULL:CAPS"></a>GNUTLS_CIPHER_NULL</p></td> +<td class="enum_member_description"> +<p>The NULL (identity) encryption algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-ARCFOUR-128:CAPS"></a>GNUTLS_CIPHER_ARCFOUR_128</p></td> +<td class="enum_member_description"> +<p>ARCFOUR stream cipher with 128-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-3DES-CBC:CAPS"></a>GNUTLS_CIPHER_3DES_CBC</p></td> +<td class="enum_member_description"> +<p>3DES in CBC mode.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-CBC:CAPS"></a>GNUTLS_CIPHER_AES_128_CBC</p></td> +<td class="enum_member_description"> +<p>AES in CBC mode with 128-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-CBC:CAPS"></a>GNUTLS_CIPHER_AES_256_CBC</p></td> +<td class="enum_member_description"> +<p>AES in CBC mode with 256-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-ARCFOUR-40:CAPS"></a>GNUTLS_CIPHER_ARCFOUR_40</p></td> +<td class="enum_member_description"> +<p>ARCFOUR stream cipher with 40-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CAMELLIA-128-CBC:CAPS"></a>GNUTLS_CIPHER_CAMELLIA_128_CBC</p></td> +<td class="enum_member_description"> +<p>Camellia in CBC mode with 128-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CAMELLIA-256-CBC:CAPS"></a>GNUTLS_CIPHER_CAMELLIA_256_CBC</p></td> +<td class="enum_member_description"> +<p>Camellia in CBC mode with 256-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-192-CBC:CAPS"></a>GNUTLS_CIPHER_AES_192_CBC</p></td> +<td class="enum_member_description"> +<p>AES in CBC mode with 192-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-GCM:CAPS"></a>GNUTLS_CIPHER_AES_128_GCM</p></td> +<td class="enum_member_description"> +<p>AES in GCM mode with 128-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-GCM:CAPS"></a>GNUTLS_CIPHER_AES_256_GCM</p></td> +<td class="enum_member_description"> +<p>AES in GCM mode with 256-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CAMELLIA-192-CBC:CAPS"></a>GNUTLS_CIPHER_CAMELLIA_192_CBC</p></td> +<td class="enum_member_description"> +<p>Camellia in CBC mode with 192-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-SALSA20-256:CAPS"></a>GNUTLS_CIPHER_SALSA20_256</p></td> +<td class="enum_member_description"> +<p>Salsa20 with 256-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-ESTREAM-SALSA20-256:CAPS"></a>GNUTLS_CIPHER_ESTREAM_SALSA20_256</p></td> +<td class="enum_member_description"> +<p>Estream's Salsa20 variant with 256-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CAMELLIA-128-GCM:CAPS"></a>GNUTLS_CIPHER_CAMELLIA_128_GCM</p></td> +<td class="enum_member_description"> +<p>CAMELLIA in GCM mode with 128-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CAMELLIA-256-GCM:CAPS"></a>GNUTLS_CIPHER_CAMELLIA_256_GCM</p></td> +<td class="enum_member_description"> +<p>CAMELLIA in GCM mode with 256-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-RC2-40-CBC:CAPS"></a>GNUTLS_CIPHER_RC2_40_CBC</p></td> +<td class="enum_member_description"> +<p>RC2 in CBC mode with 40-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-DES-CBC:CAPS"></a>GNUTLS_CIPHER_DES_CBC</p></td> +<td class="enum_member_description"> +<p>DES in CBC mode (56-bit keys).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-CCM:CAPS"></a>GNUTLS_CIPHER_AES_128_CCM</p></td> +<td class="enum_member_description"> +<p>AES in CCM mode with 128-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-CCM:CAPS"></a>GNUTLS_CIPHER_AES_256_CCM</p></td> +<td class="enum_member_description"> +<p>AES in CCM mode with 256-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-CCM-8:CAPS"></a>GNUTLS_CIPHER_AES_128_CCM_8</p></td> +<td class="enum_member_description"> +<p>AES in CCM mode with 64-bit tag and 128-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-CCM-8:CAPS"></a>GNUTLS_CIPHER_AES_256_CCM_8</p></td> +<td class="enum_member_description"> +<p>AES in CCM mode with 64-bit tag and 256-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CHACHA20-POLY1305:CAPS"></a>GNUTLS_CIPHER_CHACHA20_POLY1305</p></td> +<td class="enum_member_description"> +<p>The Chacha20 cipher with the Poly1305 authenticator (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-GOST28147-TC26Z-CFB:CAPS"></a>GNUTLS_CIPHER_GOST28147_TC26Z_CFB</p></td> +<td class="enum_member_description"> +<p>GOST 28147-89 (Magma) cipher in CFB mode with TC26 Z S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-GOST28147-CPA-CFB:CAPS"></a>GNUTLS_CIPHER_GOST28147_CPA_CFB</p></td> +<td class="enum_member_description"> +<p>GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro A S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-GOST28147-CPB-CFB:CAPS"></a>GNUTLS_CIPHER_GOST28147_CPB_CFB</p></td> +<td class="enum_member_description"> +<p>GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro B S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-GOST28147-CPC-CFB:CAPS"></a>GNUTLS_CIPHER_GOST28147_CPC_CFB</p></td> +<td class="enum_member_description"> +<p>GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro C S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-GOST28147-CPD-CFB:CAPS"></a>GNUTLS_CIPHER_GOST28147_CPD_CFB</p></td> +<td class="enum_member_description"> +<p>GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro D S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-CFB8:CAPS"></a>GNUTLS_CIPHER_AES_128_CFB8</p></td> +<td class="enum_member_description"> +<p>AES in CFB8 mode with 128-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-192-CFB8:CAPS"></a>GNUTLS_CIPHER_AES_192_CFB8</p></td> +<td class="enum_member_description"> +<p>AES in CFB8 mode with 192-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-CFB8:CAPS"></a>GNUTLS_CIPHER_AES_256_CFB8</p></td> +<td class="enum_member_description"> +<p>AES in CFB8 mode with 256-bit keys.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-XTS:CAPS"></a>GNUTLS_CIPHER_AES_128_XTS</p></td> +<td class="enum_member_description"> +<p>AES in XTS mode with 128-bit key + 128bit tweak key.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-XTS:CAPS"></a>GNUTLS_CIPHER_AES_256_XTS</p></td> +<td class="enum_member_description"> +<p>AES in XTS mode with 256-bit key + 256bit tweak key. +Note that the XTS ciphers are message oriented. +The whole message needs to be provided with a single call, because +cipher-stealing requires to know where the message actually terminates +in order to be able to compute where the stealing occurs.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-GOST28147-TC26Z-CNT:CAPS"></a>GNUTLS_CIPHER_GOST28147_TC26Z_CNT</p></td> +<td class="enum_member_description"> +<p>GOST 28147-89 (Magma) cipher in CNT mode with TC26 Z S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CHACHA20-64:CAPS"></a>GNUTLS_CIPHER_CHACHA20_64</p></td> +<td class="enum_member_description"> +<p>Chacha20 cipher with 64-bit nonces and 64-bit block counters.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CHACHA20-32:CAPS"></a>GNUTLS_CIPHER_CHACHA20_32</p></td> +<td class="enum_member_description"> +<p>Chacha20 cipher with 96-bit nonces and 32-bit block counters.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-128-SIV:CAPS"></a>GNUTLS_CIPHER_AES_128_SIV</p></td> +<td class="enum_member_description"> +<p>AES in SIV mode with 128-bit key.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-256-SIV:CAPS"></a>GNUTLS_CIPHER_AES_256_SIV</p></td> +<td class="enum_member_description"> +<p>AES in SIV mode with 256-bit key. +Note that the SIV ciphers can only be used with +the AEAD interface, and the IV plays a role as +the authentication tag while it is prepended to +the cipher text.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES-192-GCM:CAPS"></a>GNUTLS_CIPHER_AES_192_GCM</p></td> +<td class="enum_member_description"> +<p>AES in GCM mode with 192-bit keys (AEAD).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-MAGMA-CTR-ACPKM:CAPS"></a>GNUTLS_CIPHER_MAGMA_CTR_ACPKM</p></td> +<td class="enum_member_description"> +<p>GOST R 34.12-2015 (Magma) cipher in CTR-ACPKM mode.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-KUZNYECHIK-CTR-ACPKM:CAPS"></a>GNUTLS_CIPHER_KUZNYECHIK_CTR_ACPKM</p></td> +<td class="enum_member_description"> +<p>GOST R 34.12-2015 (Kuznyechik) cipher in CTR-ACPKM mode.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-IDEA-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_IDEA_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>IDEA in CFB mode (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-3DES-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_3DES_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>3DES in CFB mode (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-CAST5-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_CAST5_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>CAST5 in CFB mode (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-BLOWFISH-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_BLOWFISH_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>Blowfish in CFB mode (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-SAFER-SK128-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_SAFER_SK128_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>Safer-SK in CFB mode with 128-bit keys (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES128-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_AES128_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>AES in CFB mode with 128-bit keys (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES192-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_AES192_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>AES in CFB mode with 192-bit keys (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-AES256-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_AES256_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>AES in CFB mode with 256-bit keys (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CIPHER-TWOFISH-PGP-CFB:CAPS"></a>GNUTLS_CIPHER_TWOFISH_PGP_CFB</p></td> +<td class="enum_member_description"> +<p>Twofish in CFB mode (placeholder - unsupported).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-kx-algorithm-t"></a><h3>enum gnutls_kx_algorithm_t</h3> +<p>Enumeration of different key exchange algorithms.</p> +<div class="refsect3"> +<a name="gnutls-kx-algorithm-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-UNKNOWN:CAPS"></a>GNUTLS_KX_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-RSA:CAPS"></a>GNUTLS_KX_RSA</p></td> +<td class="enum_member_description"> +<p>RSA key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-DHE-DSS:CAPS"></a>GNUTLS_KX_DHE_DSS</p></td> +<td class="enum_member_description"> +<p>DHE-DSS key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-DHE-RSA:CAPS"></a>GNUTLS_KX_DHE_RSA</p></td> +<td class="enum_member_description"> +<p>DHE-RSA key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-ANON-DH:CAPS"></a>GNUTLS_KX_ANON_DH</p></td> +<td class="enum_member_description"> +<p>Anon-DH key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-SRP:CAPS"></a>GNUTLS_KX_SRP</p></td> +<td class="enum_member_description"> +<p>SRP key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-RSA-EXPORT:CAPS"></a>GNUTLS_KX_RSA_EXPORT</p></td> +<td class="enum_member_description"> +<p>RSA-EXPORT key-exchange algorithm (defunc).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-SRP-RSA:CAPS"></a>GNUTLS_KX_SRP_RSA</p></td> +<td class="enum_member_description"> +<p>SRP-RSA key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-SRP-DSS:CAPS"></a>GNUTLS_KX_SRP_DSS</p></td> +<td class="enum_member_description"> +<p>SRP-DSS key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-PSK:CAPS"></a>GNUTLS_KX_PSK</p></td> +<td class="enum_member_description"> +<p>PSK key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-DHE-PSK:CAPS"></a>GNUTLS_KX_DHE_PSK</p></td> +<td class="enum_member_description"> +<p>DHE-PSK key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-ANON-ECDH:CAPS"></a>GNUTLS_KX_ANON_ECDH</p></td> +<td class="enum_member_description"> +<p>Anon-ECDH key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-ECDHE-RSA:CAPS"></a>GNUTLS_KX_ECDHE_RSA</p></td> +<td class="enum_member_description"> +<p>ECDHE-RSA key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-ECDHE-ECDSA:CAPS"></a>GNUTLS_KX_ECDHE_ECDSA</p></td> +<td class="enum_member_description"> +<p>ECDHE-ECDSA key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-ECDHE-PSK:CAPS"></a>GNUTLS_KX_ECDHE_PSK</p></td> +<td class="enum_member_description"> +<p>ECDHE-PSK key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-RSA-PSK:CAPS"></a>GNUTLS_KX_RSA_PSK</p></td> +<td class="enum_member_description"> +<p>RSA-PSK key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KX-VKO-GOST-12:CAPS"></a>GNUTLS_KX_VKO_GOST_12</p></td> +<td class="enum_member_description"> +<p>VKO GOST R 34.10-2012 key-exchange algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-params-type-t"></a><h3>enum gnutls_params_type_t</h3> +<p>Enumeration of different TLS session parameter types.</p> +<div class="refsect3"> +<a name="gnutls-params-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PARAMS-RSA-EXPORT:CAPS"></a>GNUTLS_PARAMS_RSA_EXPORT</p></td> +<td class="enum_member_description"> +<p>Session RSA-EXPORT parameters (defunc).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PARAMS-DH:CAPS"></a>GNUTLS_PARAMS_DH</p></td> +<td class="enum_member_description"> +<p>Session Diffie-Hellman parameters.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PARAMS-ECDH:CAPS"></a>GNUTLS_PARAMS_ECDH</p></td> +<td class="enum_member_description"> +<p>Session Elliptic-Curve Diffie-Hellman parameters.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-credentials-type-t"></a><h3>enum gnutls_credentials_type_t</h3> +<p>Enumeration of different credential types.</p> +<div class="refsect3"> +<a name="gnutls-credentials-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRD-CERTIFICATE:CAPS"></a>GNUTLS_CRD_CERTIFICATE</p></td> +<td class="enum_member_description"> +<p>Certificate credential.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRD-ANON:CAPS"></a>GNUTLS_CRD_ANON</p></td> +<td class="enum_member_description"> +<p>Anonymous credential.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRD-SRP:CAPS"></a>GNUTLS_CRD_SRP</p></td> +<td class="enum_member_description"> +<p>SRP credential.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRD-PSK:CAPS"></a>GNUTLS_CRD_PSK</p></td> +<td class="enum_member_description"> +<p>PSK credential.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRD-IA:CAPS"></a>GNUTLS_CRD_IA</p></td> +<td class="enum_member_description"> +<p>IA credential.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-MAC-SHA:CAPS"></a><h3>GNUTLS_MAC_SHA</h3> +<pre class="programlisting">#define GNUTLS_MAC_SHA GNUTLS_MAC_SHA1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-DIG-SHA:CAPS"></a><h3>GNUTLS_DIG_SHA</h3> +<pre class="programlisting">#define GNUTLS_DIG_SHA GNUTLS_DIG_SHA1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-mac-algorithm-t"></a><h3>enum gnutls_mac_algorithm_t</h3> +<p>Enumeration of different Message Authentication Code (MAC) +algorithms.</p> +<div class="refsect3"> +<a name="gnutls-mac-algorithm-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-UNKNOWN:CAPS"></a>GNUTLS_MAC_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown MAC algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-NULL:CAPS"></a>GNUTLS_MAC_NULL</p></td> +<td class="enum_member_description"> +<p>NULL MAC algorithm (empty output).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-MD5:CAPS"></a>GNUTLS_MAC_MD5</p></td> +<td class="enum_member_description"> +<p>HMAC-MD5 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA1:CAPS"></a>GNUTLS_MAC_SHA1</p></td> +<td class="enum_member_description"> +<p>HMAC-SHA-1 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-RMD160:CAPS"></a>GNUTLS_MAC_RMD160</p></td> +<td class="enum_member_description"> +<p>HMAC-RMD160 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-MD2:CAPS"></a>GNUTLS_MAC_MD2</p></td> +<td class="enum_member_description"> +<p>HMAC-MD2 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA256:CAPS"></a>GNUTLS_MAC_SHA256</p></td> +<td class="enum_member_description"> +<p>HMAC-SHA-256 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA384:CAPS"></a>GNUTLS_MAC_SHA384</p></td> +<td class="enum_member_description"> +<p>HMAC-SHA-384 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA512:CAPS"></a>GNUTLS_MAC_SHA512</p></td> +<td class="enum_member_description"> +<p>HMAC-SHA-512 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA224:CAPS"></a>GNUTLS_MAC_SHA224</p></td> +<td class="enum_member_description"> +<p>HMAC-SHA-224 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA3-224:CAPS"></a>GNUTLS_MAC_SHA3_224</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA3-256:CAPS"></a>GNUTLS_MAC_SHA3_256</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA3-384:CAPS"></a>GNUTLS_MAC_SHA3_384</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHA3-512:CAPS"></a>GNUTLS_MAC_SHA3_512</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-MD5-SHA1:CAPS"></a>GNUTLS_MAC_MD5_SHA1</p></td> +<td class="enum_member_description"> +<p>Combined MD5+SHA1 MAC placeholder.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-GOSTR-94:CAPS"></a>GNUTLS_MAC_GOSTR_94</p></td> +<td class="enum_member_description"> +<p>HMAC GOST R 34.11-94 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-STREEBOG-256:CAPS"></a>GNUTLS_MAC_STREEBOG_256</p></td> +<td class="enum_member_description"> +<p>HMAC GOST R 34.11-2001 (Streebog) algorithm, 256 bit.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-STREEBOG-512:CAPS"></a>GNUTLS_MAC_STREEBOG_512</p></td> +<td class="enum_member_description"> +<p>HMAC GOST R 34.11-2001 (Streebog) algorithm, 512 bit.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-AEAD:CAPS"></a>GNUTLS_MAC_AEAD</p></td> +<td class="enum_member_description"> +<p>MAC implicit through AEAD cipher.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-UMAC-96:CAPS"></a>GNUTLS_MAC_UMAC_96</p></td> +<td class="enum_member_description"> +<p>The UMAC-96 MAC algorithm (requires nonce).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-UMAC-128:CAPS"></a>GNUTLS_MAC_UMAC_128</p></td> +<td class="enum_member_description"> +<p>The UMAC-128 MAC algorithm (requires nonce).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-AES-CMAC-128:CAPS"></a>GNUTLS_MAC_AES_CMAC_128</p></td> +<td class="enum_member_description"> +<p>The AES-CMAC-128 MAC algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-AES-CMAC-256:CAPS"></a>GNUTLS_MAC_AES_CMAC_256</p></td> +<td class="enum_member_description"> +<p>The AES-CMAC-256 MAC algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-AES-GMAC-128:CAPS"></a>GNUTLS_MAC_AES_GMAC_128</p></td> +<td class="enum_member_description"> +<p>The AES-GMAC-128 MAC algorithm (requires nonce).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-AES-GMAC-192:CAPS"></a>GNUTLS_MAC_AES_GMAC_192</p></td> +<td class="enum_member_description"> +<p>The AES-GMAC-192 MAC algorithm (requires nonce).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-AES-GMAC-256:CAPS"></a>GNUTLS_MAC_AES_GMAC_256</p></td> +<td class="enum_member_description"> +<p>The AES-GMAC-256 MAC algorithm (requires nonce).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-GOST28147-TC26Z-IMIT:CAPS"></a>GNUTLS_MAC_GOST28147_TC26Z_IMIT</p></td> +<td class="enum_member_description"> +<p>The GOST 28147-89 working in IMIT mode with TC26 Z S-box.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHAKE-128:CAPS"></a>GNUTLS_MAC_SHAKE_128</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-SHAKE-256:CAPS"></a>GNUTLS_MAC_SHAKE_256</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-MAGMA-OMAC:CAPS"></a>GNUTLS_MAC_MAGMA_OMAC</p></td> +<td class="enum_member_description"> +<p>GOST R 34.12-2015 (Magma) in OMAC (CMAC) mode.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-MAC-KUZNYECHIK-OMAC:CAPS"></a>GNUTLS_MAC_KUZNYECHIK_OMAC</p></td> +<td class="enum_member_description"> +<p>GOST R 34.12-2015 (Kuznyechik) in OMAC (CMAC) mode.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-digest-algorithm-t"></a><h3>enum gnutls_digest_algorithm_t</h3> +<p>Enumeration of different digest (hash) algorithms.</p> +<div class="refsect3"> +<a name="gnutls-digest-algorithm-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-UNKNOWN:CAPS"></a>GNUTLS_DIG_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown hash algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-NULL:CAPS"></a>GNUTLS_DIG_NULL</p></td> +<td class="enum_member_description"> +<p>NULL hash algorithm (empty output).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-MD5:CAPS"></a>GNUTLS_DIG_MD5</p></td> +<td class="enum_member_description"> +<p>MD5 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA1:CAPS"></a>GNUTLS_DIG_SHA1</p></td> +<td class="enum_member_description"> +<p>SHA-1 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-RMD160:CAPS"></a>GNUTLS_DIG_RMD160</p></td> +<td class="enum_member_description"> +<p>RMD160 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-MD2:CAPS"></a>GNUTLS_DIG_MD2</p></td> +<td class="enum_member_description"> +<p>MD2 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA256:CAPS"></a>GNUTLS_DIG_SHA256</p></td> +<td class="enum_member_description"> +<p>SHA-256 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA384:CAPS"></a>GNUTLS_DIG_SHA384</p></td> +<td class="enum_member_description"> +<p>SHA-384 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA512:CAPS"></a>GNUTLS_DIG_SHA512</p></td> +<td class="enum_member_description"> +<p>SHA-512 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA224:CAPS"></a>GNUTLS_DIG_SHA224</p></td> +<td class="enum_member_description"> +<p>SHA-224 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA3-224:CAPS"></a>GNUTLS_DIG_SHA3_224</p></td> +<td class="enum_member_description"> +<p>SHA3-224 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA3-256:CAPS"></a>GNUTLS_DIG_SHA3_256</p></td> +<td class="enum_member_description"> +<p>SHA3-256 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA3-384:CAPS"></a>GNUTLS_DIG_SHA3_384</p></td> +<td class="enum_member_description"> +<p>SHA3-384 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHA3-512:CAPS"></a>GNUTLS_DIG_SHA3_512</p></td> +<td class="enum_member_description"> +<p>SHA3-512 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-MD5-SHA1:CAPS"></a>GNUTLS_DIG_MD5_SHA1</p></td> +<td class="enum_member_description"> +<p>Combined MD5+SHA1 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-GOSTR-94:CAPS"></a>GNUTLS_DIG_GOSTR_94</p></td> +<td class="enum_member_description"> +<p>GOST R 34.11-94 algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-STREEBOG-256:CAPS"></a>GNUTLS_DIG_STREEBOG_256</p></td> +<td class="enum_member_description"> +<p>GOST R 34.11-2001 (Streebog) algorithm, 256 bit.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-STREEBOG-512:CAPS"></a>GNUTLS_DIG_STREEBOG_512</p></td> +<td class="enum_member_description"> +<p>GOST R 34.11-2001 (Streebog) algorithm, 512 bit.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHAKE-128:CAPS"></a>GNUTLS_DIG_SHAKE_128</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DIG-SHAKE-256:CAPS"></a>GNUTLS_DIG_SHAKE_256</p></td> +<td class="enum_member_description"> +<p>Reserved; unimplemented.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-MAX-ALGORITHM-NUM:CAPS"></a><h3>GNUTLS_MAX_ALGORITHM_NUM</h3> +<pre class="programlisting">#define GNUTLS_MAX_ALGORITHM_NUM 128 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-MAX-SESSION-ID-SIZE:CAPS"></a><h3>GNUTLS_MAX_SESSION_ID_SIZE</h3> +<pre class="programlisting">#define GNUTLS_MAX_SESSION_ID_SIZE 32 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-compression-method-t"></a><h3>enum gnutls_compression_method_t</h3> +<p>Enumeration of different TLS compression methods.</p> +<div class="refsect3"> +<a name="gnutls-compression-method-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-COMP-UNKNOWN:CAPS"></a>GNUTLS_COMP_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown compression method.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-COMP-NULL:CAPS"></a>GNUTLS_COMP_NULL</p></td> +<td class="enum_member_description"> +<p>The NULL compression method (no compression).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-COMP-DEFLATE:CAPS"></a>GNUTLS_COMP_DEFLATE</p></td> +<td class="enum_member_description"> +<p>The DEFLATE compression method from zlib.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-COMP-ZLIB:CAPS"></a>GNUTLS_COMP_ZLIB</p></td> +<td class="enum_member_description"> +<p>Same as <a class="link" href="gnutls-gnutls.html#GNUTLS-COMP-DEFLATE:CAPS"><code class="literal">GNUTLS_COMP_DEFLATE</code></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-COMP-BROTLI:CAPS"></a>GNUTLS_COMP_BROTLI</p></td> +<td class="enum_member_description"> +<p>Brotli compression method.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-COMP-ZSTD:CAPS"></a>GNUTLS_COMP_ZSTD</p></td> +<td class="enum_member_description"> +<p>Zstandard compression method.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-init-flags-t"></a><h3>enum gnutls_init_flags_t</h3> +<p><em class="parameter"><code>GNUTLS_SERVER</code></em> +: Connection end is a server. +<em class="parameter"><code>GNUTLS_CLIENT</code></em> +: Connection end is a client. +<em class="parameter"><code>GNUTLS_DATAGRAM</code></em> +: Connection is datagram oriented (DTLS). Since 3.0.0. +<em class="parameter"><code>GNUTLS_NONBLOCK</code></em> +: Connection should not block. Since 3.0.0. +<em class="parameter"><code>GNUTLS_NO_SIGNAL</code></em> +: In systems where SIGPIPE is delivered on send, it will be disabled. That flag has effect in systems which support the MSG_NOSIGNAL sockets flag (since 3.4.2). +<em class="parameter"><code>GNUTLS_NO_EXTENSIONS</code></em> +: Do not enable any TLS extensions by default (since 3.1.2). As TLS 1.2 and later require extensions this option is considered obsolete and should not be used. +<em class="parameter"><code>GNUTLS_NO_REPLAY_PROTECTION</code></em> +: Disable any replay protection in DTLS. This must only be used if replay protection is achieved using other means. Since 3.2.2. +<em class="parameter"><code>GNUTLS_ALLOW_ID_CHANGE</code></em> +: Allow the peer to replace its certificate, or change its ID during a rehandshake. This change is often used in attacks and thus prohibited by default. Since 3.5.0. +<em class="parameter"><code>GNUTLS_ENABLE_FALSE_START</code></em> +: Enable the TLS false start on client side if the negotiated ciphersuites allow it. This will enable sending data prior to the handshake being complete, and may introduce a risk of crypto failure when combined with certain key exchanged; for that GnuTLS may not enable that option in ciphersuites that are known to be not safe for false start. Since 3.5.0. +<em class="parameter"><code>GNUTLS_ENABLE_EARLY_START</code></em> +: Under TLS1.3 allow the server to return earlier than the full handshake + finish; similarly to false start the handshake will be completed once data are received by the + client, while the server is able to transmit sooner. This is not enabled by default as it could + break certain existing server assumptions and use-cases. Since 3.6.4. +<em class="parameter"><code>GNUTLS_ENABLE_EARLY_DATA</code></em> +: Under TLS1.3 allow the server to receive early data sent as part of the initial ClientHello (0-RTT). + This can also be used to explicitly indicate that the client will send early data. + This is not enabled by default as early data has weaker security properties than other data. Since 3.6.5. +<em class="parameter"><code>GNUTLS_FORCE_CLIENT_CERT</code></em> +: When in client side and only a single cert is specified, send that certificate irrespective of the issuers expected by the server. Since 3.5.0. +<em class="parameter"><code>GNUTLS_NO_TICKETS</code></em> +: Flag to indicate that the session should not use resumption with session tickets. +<em class="parameter"><code>GNUTLS_NO_TICKETS_TLS12</code></em> +: Flag to indicate that the session should not use resumption with session tickets. This flag only has effect if TLS 1.2 is used. +<em class="parameter"><code>GNUTLS_KEY_SHARE_TOP3</code></em> +: Generate key shares for the top-3 different groups which are enabled. + That is, as each group is associated with a key type (EC, finite field, x25519), generate + three keys using <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-DH:CAPS"><code class="literal">GNUTLS_PK_DH</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-EC:CAPS" title="GNUTLS_PK_EC"><code class="literal">GNUTLS_PK_EC</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-ECDH-X25519:CAPS"><code class="literal">GNUTLS_PK_ECDH_X25519</code></a> if all of them are enabled. +<em class="parameter"><code>GNUTLS_KEY_SHARE_TOP2</code></em> +: Generate key shares for the top-2 different groups which are enabled. + For example (ECDH + x25519). This is the default. +<em class="parameter"><code>GNUTLS_KEY_SHARE_TOP</code></em> +: Generate key share for the first group which is enabled. + For example x25519. This option is the most performant for client (less CPU spent + generating keys), but if the server doesn't support the advertized option it may + result to more roundtrips needed to discover the server's choice. +<em class="parameter"><code>GNUTLS_NO_AUTO_REKEY</code></em> +: Disable auto-rekeying under TLS1.3. If this option is not specified + gnutls will force a rekey after 2^24 records have been sent. +<em class="parameter"><code>GNUTLS_POST_HANDSHAKE_AUTH</code></em> +: Enable post handshake authentication for server and client. When set and + a server requests authentication after handshake <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REAUTH-REQUEST:CAPS" title="GNUTLS_E_REAUTH_REQUEST"><code class="literal">GNUTLS_E_REAUTH_REQUEST</code></a> will be returned + by <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a>. A client should then call <a class="link" href="gnutls-gnutls.html#gnutls-reauth" title="gnutls_reauth ()"><code class="function">gnutls_reauth()</code></a> to re-authenticate. +<em class="parameter"><code>GNUTLS_SAFE_PADDING_CHECK</code></em> +: Flag to indicate that the TLS 1.3 padding check will be done in a + safe way which doesn't leak the pad size based on GnuTLS processing time. This is of use to + applications which hide the length of transferred data via the TLS1.3 padding mechanism and + are already taking steps to hide the data processing time. This comes at a performance + penalty. +<em class="parameter"><code>GNUTLS_AUTO_REAUTH</code></em> +: Enable transparent re-authentication in client side when the server + requests to. That is, reauthentication is handled within <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a>, and + the <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REHANDSHAKE:CAPS" title="GNUTLS_E_REHANDSHAKE"><code class="literal">GNUTLS_E_REHANDSHAKE</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-E-REAUTH-REQUEST:CAPS" title="GNUTLS_E_REAUTH_REQUEST"><code class="literal">GNUTLS_E_REAUTH_REQUEST</code></a> are not returned. This must be + enabled with <a class="link" href="gnutls-gnutls.html#GNUTLS-POST-HANDSHAKE-AUTH:CAPS"><code class="literal">GNUTLS_POST_HANDSHAKE_AUTH</code></a> for TLS1.3. Enabling this flag requires to restore + interrupted calls to <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> based on the output of <a class="link" href="gnutls-gnutls.html#gnutls-record-get-direction" title="gnutls_record_get_direction ()"><code class="function">gnutls_record_get_direction()</code></a>, + since <a class="link" href="gnutls-gnutls.html#gnutls-record-recv" title="gnutls_record_recv ()"><code class="function">gnutls_record_recv()</code></a> could be interrupted when sending when this flag is enabled. + Note this flag may not be used if you are using the same session for sending and receiving + in different threads. +<em class="parameter"><code>GNUTLS_ENABLE_RAWPK</code></em> +: Allows raw public-keys to be negotiated during the handshake. Since 3.6.6. +<em class="parameter"><code>GNUTLS_NO_AUTO_SEND_TICKET</code></em> +: Under TLS1.3 disable auto-sending of + session tickets during the handshake. +<em class="parameter"><code>GNUTLS_NO_END_OF_EARLY_DATA</code></em> +: Under TLS1.3 suppress sending EndOfEarlyData message. Since 3.7.2.</p> +<p>Enumeration of different flags for <a class="link" href="gnutls-gnutls.html#gnutls-init" title="gnutls_init ()"><code class="function">gnutls_init()</code></a> function. All the flags +can be combined except <em class="parameter"><code>GNUTLS_SERVER</code></em> + and <em class="parameter"><code>GNUTLS_CLIENT</code></em> + which are mutually +exclusive.</p> +<p>The key share options relate to the TLS 1.3 key share extension +which is a speculative key generation expecting that the server +would support the generated key.</p> +<div class="refsect3"> +<a name="gnutls-init-flags-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SERVER:CAPS"></a>GNUTLS_SERVER</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CLIENT:CAPS"></a>GNUTLS_CLIENT</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DATAGRAM:CAPS"></a>GNUTLS_DATAGRAM</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NONBLOCK:CAPS"></a>GNUTLS_NONBLOCK</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-EXTENSIONS:CAPS"></a>GNUTLS_NO_EXTENSIONS</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-REPLAY-PROTECTION:CAPS"></a>GNUTLS_NO_REPLAY_PROTECTION</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-SIGNAL:CAPS"></a>GNUTLS_NO_SIGNAL</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ALLOW-ID-CHANGE:CAPS"></a>GNUTLS_ALLOW_ID_CHANGE</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENABLE-FALSE-START:CAPS"></a>GNUTLS_ENABLE_FALSE_START</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FORCE-CLIENT-CERT:CAPS"></a>GNUTLS_FORCE_CLIENT_CERT</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-TICKETS:CAPS"></a>GNUTLS_NO_TICKETS</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KEY-SHARE-TOP:CAPS"></a>GNUTLS_KEY_SHARE_TOP</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KEY-SHARE-TOP2:CAPS"></a>GNUTLS_KEY_SHARE_TOP2</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-KEY-SHARE-TOP3:CAPS"></a>GNUTLS_KEY_SHARE_TOP3</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-POST-HANDSHAKE-AUTH:CAPS"></a>GNUTLS_POST_HANDSHAKE_AUTH</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-AUTO-REKEY:CAPS"></a>GNUTLS_NO_AUTO_REKEY</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAFE-PADDING-CHECK:CAPS"></a>GNUTLS_SAFE_PADDING_CHECK</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENABLE-EARLY-START:CAPS"></a>GNUTLS_ENABLE_EARLY_START</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENABLE-RAWPK:CAPS"></a>GNUTLS_ENABLE_RAWPK</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-AUTO-REAUTH:CAPS"></a>GNUTLS_AUTO_REAUTH</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENABLE-EARLY-DATA:CAPS"></a>GNUTLS_ENABLE_EARLY_DATA</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-AUTO-SEND-TICKET:CAPS"></a>GNUTLS_NO_AUTO_SEND_TICKET</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-END-OF-EARLY-DATA:CAPS"></a>GNUTLS_NO_END_OF_EARLY_DATA</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-NO-TICKETS-TLS12:CAPS"></a>GNUTLS_NO_TICKETS_TLS12</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-SERVER:CAPS"></a><h3>GNUTLS_SERVER</h3> +<pre class="programlisting">#define GNUTLS_SERVER (1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CLIENT:CAPS"></a><h3>GNUTLS_CLIENT</h3> +<pre class="programlisting">#define GNUTLS_CLIENT (1<<1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-DATAGRAM:CAPS"></a><h3>GNUTLS_DATAGRAM</h3> +<pre class="programlisting">#define GNUTLS_DATAGRAM (1<<2) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-NONBLOCK:CAPS"></a><h3>GNUTLS_NONBLOCK</h3> +<pre class="programlisting">#define GNUTLS_NONBLOCK (1<<3) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-NO-EXTENSIONS:CAPS"></a><h3>GNUTLS_NO_EXTENSIONS</h3> +<pre class="programlisting">#define GNUTLS_NO_EXTENSIONS (1<<4) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-NO-REPLAY-PROTECTION:CAPS"></a><h3>GNUTLS_NO_REPLAY_PROTECTION</h3> +<pre class="programlisting">#define GNUTLS_NO_REPLAY_PROTECTION (1<<5) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-NO-SIGNAL:CAPS"></a><h3>GNUTLS_NO_SIGNAL</h3> +<pre class="programlisting">#define GNUTLS_NO_SIGNAL (1<<6) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-ALLOW-ID-CHANGE:CAPS"></a><h3>GNUTLS_ALLOW_ID_CHANGE</h3> +<pre class="programlisting">#define GNUTLS_ALLOW_ID_CHANGE (1<<7) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-ENABLE-FALSE-START:CAPS"></a><h3>GNUTLS_ENABLE_FALSE_START</h3> +<pre class="programlisting">#define GNUTLS_ENABLE_FALSE_START (1<<8) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-FORCE-CLIENT-CERT:CAPS"></a><h3>GNUTLS_FORCE_CLIENT_CERT</h3> +<pre class="programlisting">#define GNUTLS_FORCE_CLIENT_CERT (1<<9) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-NO-TICKETS:CAPS"></a><h3>GNUTLS_NO_TICKETS</h3> +<pre class="programlisting">#define GNUTLS_NO_TICKETS (1<<10) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-ENABLE-CERT-TYPE-NEG:CAPS"></a><h3>GNUTLS_ENABLE_CERT_TYPE_NEG</h3> +<pre class="programlisting">#define GNUTLS_ENABLE_CERT_TYPE_NEG 0 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-level-t"></a><h3>enum gnutls_alert_level_t</h3> +<p>Enumeration of different TLS alert severities.</p> +<div class="refsect3"> +<a name="gnutls-alert-level-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-AL-WARNING:CAPS"></a>GNUTLS_AL_WARNING</p></td> +<td class="enum_member_description"> +<p>Alert of warning severity.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-AL-FATAL:CAPS"></a>GNUTLS_AL_FATAL</p></td> +<td class="enum_member_description"> +<p>Alert of fatal severity.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alert-description-t"></a><h3>enum gnutls_alert_description_t</h3> +<p>Enumeration of different TLS alerts.</p> +<div class="refsect3"> +<a name="gnutls-alert-description-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-CLOSE-NOTIFY:CAPS"></a>GNUTLS_A_CLOSE_NOTIFY</p></td> +<td class="enum_member_description"> +<p>Close notify.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-UNEXPECTED-MESSAGE:CAPS"></a>GNUTLS_A_UNEXPECTED_MESSAGE</p></td> +<td class="enum_member_description"> +<p>Unexpected message.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-BAD-RECORD-MAC:CAPS"></a>GNUTLS_A_BAD_RECORD_MAC</p></td> +<td class="enum_member_description"> +<p>Bad record MAC.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-DECRYPTION-FAILED:CAPS"></a>GNUTLS_A_DECRYPTION_FAILED</p></td> +<td class="enum_member_description"> +<p>Decryption failed.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-RECORD-OVERFLOW:CAPS"></a>GNUTLS_A_RECORD_OVERFLOW</p></td> +<td class="enum_member_description"> +<p>Record overflow.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-DECOMPRESSION-FAILURE:CAPS"></a>GNUTLS_A_DECOMPRESSION_FAILURE</p></td> +<td class="enum_member_description"> +<p>Decompression failed.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-HANDSHAKE-FAILURE:CAPS"></a>GNUTLS_A_HANDSHAKE_FAILURE</p></td> +<td class="enum_member_description"> +<p>Handshake failed.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-SSL3-NO-CERTIFICATE:CAPS"></a>GNUTLS_A_SSL3_NO_CERTIFICATE</p></td> +<td class="enum_member_description"> +<p>No certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-BAD-CERTIFICATE:CAPS"></a>GNUTLS_A_BAD_CERTIFICATE</p></td> +<td class="enum_member_description"> +<p>Certificate is bad.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-UNSUPPORTED-CERTIFICATE:CAPS"></a>GNUTLS_A_UNSUPPORTED_CERTIFICATE</p></td> +<td class="enum_member_description"> +<p>Certificate is not supported.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-CERTIFICATE-REVOKED:CAPS"></a>GNUTLS_A_CERTIFICATE_REVOKED</p></td> +<td class="enum_member_description"> +<p>Certificate was revoked.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-CERTIFICATE-EXPIRED:CAPS"></a>GNUTLS_A_CERTIFICATE_EXPIRED</p></td> +<td class="enum_member_description"> +<p>Certificate is expired.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-CERTIFICATE-UNKNOWN:CAPS"></a>GNUTLS_A_CERTIFICATE_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-ILLEGAL-PARAMETER:CAPS"></a>GNUTLS_A_ILLEGAL_PARAMETER</p></td> +<td class="enum_member_description"> +<p>Illegal parameter.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-UNKNOWN-CA:CAPS"></a>GNUTLS_A_UNKNOWN_CA</p></td> +<td class="enum_member_description"> +<p>CA is unknown.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-ACCESS-DENIED:CAPS"></a>GNUTLS_A_ACCESS_DENIED</p></td> +<td class="enum_member_description"> +<p>Access was denied.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-DECODE-ERROR:CAPS"></a>GNUTLS_A_DECODE_ERROR</p></td> +<td class="enum_member_description"> +<p>Decode error.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-DECRYPT-ERROR:CAPS"></a>GNUTLS_A_DECRYPT_ERROR</p></td> +<td class="enum_member_description"> +<p>Decrypt error.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-EXPORT-RESTRICTION:CAPS"></a>GNUTLS_A_EXPORT_RESTRICTION</p></td> +<td class="enum_member_description"> +<p>Export restriction.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-PROTOCOL-VERSION:CAPS"></a>GNUTLS_A_PROTOCOL_VERSION</p></td> +<td class="enum_member_description"> +<p>Error in protocol version.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-INSUFFICIENT-SECURITY:CAPS"></a>GNUTLS_A_INSUFFICIENT_SECURITY</p></td> +<td class="enum_member_description"> +<p>Insufficient security.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-INTERNAL-ERROR:CAPS"></a>GNUTLS_A_INTERNAL_ERROR</p></td> +<td class="enum_member_description"> +<p>Internal error.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-INAPPROPRIATE-FALLBACK:CAPS"></a>GNUTLS_A_INAPPROPRIATE_FALLBACK</p></td> +<td class="enum_member_description"> +<p>Inappropriate fallback,</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-USER-CANCELED:CAPS"></a>GNUTLS_A_USER_CANCELED</p></td> +<td class="enum_member_description"> +<p>User canceled.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-NO-RENEGOTIATION:CAPS"></a>GNUTLS_A_NO_RENEGOTIATION</p></td> +<td class="enum_member_description"> +<p>No renegotiation is allowed.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-MISSING-EXTENSION:CAPS"></a>GNUTLS_A_MISSING_EXTENSION</p></td> +<td class="enum_member_description"> +<p>An extension was expected but was not seen</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-UNSUPPORTED-EXTENSION:CAPS"></a>GNUTLS_A_UNSUPPORTED_EXTENSION</p></td> +<td class="enum_member_description"> +<p>An unsupported extension was +sent.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-CERTIFICATE-UNOBTAINABLE:CAPS"></a>GNUTLS_A_CERTIFICATE_UNOBTAINABLE</p></td> +<td class="enum_member_description"> +<p>Could not retrieve the +specified certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-UNRECOGNIZED-NAME:CAPS"></a>GNUTLS_A_UNRECOGNIZED_NAME</p></td> +<td class="enum_member_description"> +<p>The server name sent was not +recognized.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-UNKNOWN-PSK-IDENTITY:CAPS"></a>GNUTLS_A_UNKNOWN_PSK_IDENTITY</p></td> +<td class="enum_member_description"> +<p>The SRP/PSK username is missing +or not known.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-CERTIFICATE-REQUIRED:CAPS"></a>GNUTLS_A_CERTIFICATE_REQUIRED</p></td> +<td class="enum_member_description"> +<p>Certificate is required.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-NO-APPLICATION-PROTOCOL:CAPS"></a>GNUTLS_A_NO_APPLICATION_PROTOCOL</p></td> +<td class="enum_member_description"> +<p>The ALPN protocol requested is +not supported by the peer.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-A-MAX:CAPS"></a>GNUTLS_A_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-description-t"></a><h3>enum gnutls_handshake_description_t</h3> +<p>Enumeration of different TLS handshake packets.</p> +<div class="refsect3"> +<a name="gnutls-handshake-description-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-HELLO-REQUEST:CAPS"></a>GNUTLS_HANDSHAKE_HELLO_REQUEST</p></td> +<td class="enum_member_description"> +<p>Hello request.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CLIENT-HELLO:CAPS"></a>GNUTLS_HANDSHAKE_CLIENT_HELLO</p></td> +<td class="enum_member_description"> +<p>Client hello.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-SERVER-HELLO:CAPS"></a>GNUTLS_HANDSHAKE_SERVER_HELLO</p></td> +<td class="enum_member_description"> +<p>Server hello.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-HELLO-VERIFY-REQUEST:CAPS"></a>GNUTLS_HANDSHAKE_HELLO_VERIFY_REQUEST</p></td> +<td class="enum_member_description"> +<p>DTLS Hello verify request.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-NEW-SESSION-TICKET:CAPS"></a>GNUTLS_HANDSHAKE_NEW_SESSION_TICKET</p></td> +<td class="enum_member_description"> +<p>New session ticket.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-END-OF-EARLY-DATA:CAPS"></a>GNUTLS_HANDSHAKE_END_OF_EARLY_DATA</p></td> +<td class="enum_member_description"> +<p>End of early data.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-ENCRYPTED-EXTENSIONS:CAPS"></a>GNUTLS_HANDSHAKE_ENCRYPTED_EXTENSIONS</p></td> +<td class="enum_member_description"> +<p>Encrypted extensions message.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CERTIFICATE-PKT:CAPS"></a>GNUTLS_HANDSHAKE_CERTIFICATE_PKT</p></td> +<td class="enum_member_description"> +<p>Certificate packet.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-SERVER-KEY-EXCHANGE:CAPS"></a>GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE</p></td> +<td class="enum_member_description"> +<p>Server key exchange.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CERTIFICATE-REQUEST:CAPS"></a>GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST</p></td> +<td class="enum_member_description"> +<p>Certificate request.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-SERVER-HELLO-DONE:CAPS"></a>GNUTLS_HANDSHAKE_SERVER_HELLO_DONE</p></td> +<td class="enum_member_description"> +<p>Server hello done.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CERTIFICATE-VERIFY:CAPS"></a>GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY</p></td> +<td class="enum_member_description"> +<p>Certificate verify.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CLIENT-KEY-EXCHANGE:CAPS"></a>GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE</p></td> +<td class="enum_member_description"> +<p>Client key exchange.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-FINISHED:CAPS"></a>GNUTLS_HANDSHAKE_FINISHED</p></td> +<td class="enum_member_description"> +<p>Finished.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CERTIFICATE-STATUS:CAPS"></a>GNUTLS_HANDSHAKE_CERTIFICATE_STATUS</p></td> +<td class="enum_member_description"> +<p>Certificate status (OCSP).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-SUPPLEMENTAL:CAPS"></a>GNUTLS_HANDSHAKE_SUPPLEMENTAL</p></td> +<td class="enum_member_description"> +<p>Supplemental.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-KEY-UPDATE:CAPS"></a>GNUTLS_HANDSHAKE_KEY_UPDATE</p></td> +<td class="enum_member_description"> +<p>TLS1.3 key update message.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-COMPRESSED-CERTIFICATE-PKT:CAPS"></a>GNUTLS_HANDSHAKE_COMPRESSED_CERTIFICATE_PKT</p></td> +<td class="enum_member_description"> +<p>Compressed certificate packet.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CHANGE-CIPHER-SPEC:CAPS"></a>GNUTLS_HANDSHAKE_CHANGE_CIPHER_SPEC</p></td> +<td class="enum_member_description"> +<p>Change Cipher Spec.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-CLIENT-HELLO-V2:CAPS"></a>GNUTLS_HANDSHAKE_CLIENT_HELLO_V2</p></td> +<td class="enum_member_description"> +<p>SSLv2 Client Hello.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-HANDSHAKE-HELLO-RETRY-REQUEST:CAPS"></a>GNUTLS_HANDSHAKE_HELLO_RETRY_REQUEST</p></td> +<td class="enum_member_description"> +<p>Hello retry request.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HANDSHAKE-ANY:CAPS"></a><h3>GNUTLS_HANDSHAKE_ANY</h3> +<pre class="programlisting">#define GNUTLS_HANDSHAKE_ANY ((unsigned int)-1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-status-t"></a><h3>enum gnutls_certificate_status_t</h3> +<p>Enumeration of certificate status codes. Note that the status +bits may have different meanings in OpenPGP keys and X.509 +certificate verification.</p> +<div class="refsect3"> +<a name="gnutls-certificate-status-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-INVALID:CAPS"></a>GNUTLS_CERT_INVALID</p></td> +<td class="enum_member_description"> +<p>The certificate is not signed by one of the +known authorities or the signature is invalid (deprecated by the flags + +<a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-SIGNATURE-FAILURE:CAPS"><code class="literal">GNUTLS_CERT_SIGNATURE_FAILURE</code></a> and <a class="link" href="gnutls-gnutls.html#GNUTLS-CERT-SIGNER-NOT-FOUND:CAPS"><code class="literal">GNUTLS_CERT_SIGNER_NOT_FOUND</code></a>).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-REVOKED:CAPS"></a>GNUTLS_CERT_REVOKED</p></td> +<td class="enum_member_description"> +<p>Certificate is revoked by its authority. In X.509 this will be +set only if CRLs are checked.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-SIGNER-NOT-FOUND:CAPS"></a>GNUTLS_CERT_SIGNER_NOT_FOUND</p></td> +<td class="enum_member_description"> +<p>The certificate's issuer is not known. + +This is the case if the issuer is not included in the trusted certificate list.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-SIGNER-NOT-CA:CAPS"></a>GNUTLS_CERT_SIGNER_NOT_CA</p></td> +<td class="enum_member_description"> +<p>The certificate's signer was not a CA. This +may happen if this was a version 1 certificate, which is common with +some CAs, or a version 3 certificate without the basic constrains extension.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-INSECURE-ALGORITHM:CAPS"></a>GNUTLS_CERT_INSECURE_ALGORITHM</p></td> +<td class="enum_member_description"> +<p>The certificate was signed using an insecure +algorithm such as MD2 or MD5. These algorithms have been broken and +should not be trusted.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-NOT-ACTIVATED:CAPS"></a>GNUTLS_CERT_NOT_ACTIVATED</p></td> +<td class="enum_member_description"> +<p>The certificate is not yet activated.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-EXPIRED:CAPS"></a>GNUTLS_CERT_EXPIRED</p></td> +<td class="enum_member_description"> +<p>The certificate has expired.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-SIGNATURE-FAILURE:CAPS"></a>GNUTLS_CERT_SIGNATURE_FAILURE</p></td> +<td class="enum_member_description"> +<p>The signature verification failed.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-REVOCATION-DATA-SUPERSEDED:CAPS"></a>GNUTLS_CERT_REVOCATION_DATA_SUPERSEDED</p></td> +<td class="enum_member_description"> +<p>The revocation data are old and have been superseded.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-UNEXPECTED-OWNER:CAPS"></a>GNUTLS_CERT_UNEXPECTED_OWNER</p></td> +<td class="enum_member_description"> +<p>The owner is not the expected one.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-REVOCATION-DATA-ISSUED-IN-FUTURE:CAPS"></a>GNUTLS_CERT_REVOCATION_DATA_ISSUED_IN_FUTURE</p></td> +<td class="enum_member_description"> +<p>The revocation data have a future issue date.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-SIGNER-CONSTRAINTS-FAILURE:CAPS"></a>GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE</p></td> +<td class="enum_member_description"> +<p>The certificate's signer constraints were +violated.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-MISMATCH:CAPS"></a>GNUTLS_CERT_MISMATCH</p></td> +<td class="enum_member_description"> +<p>The certificate presented isn't the expected one (TOFU)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-PURPOSE-MISMATCH:CAPS"></a>GNUTLS_CERT_PURPOSE_MISMATCH</p></td> +<td class="enum_member_description"> +<p>The certificate or an intermediate does not match the intended purpose (extended key usage).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-MISSING-OCSP-STATUS:CAPS"></a>GNUTLS_CERT_MISSING_OCSP_STATUS</p></td> +<td class="enum_member_description"> +<p>The certificate requires the server to send the certificate status, but no status was received.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-INVALID-OCSP-STATUS:CAPS"></a>GNUTLS_CERT_INVALID_OCSP_STATUS</p></td> +<td class="enum_member_description"> +<p>The received OCSP status response is invalid.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-UNKNOWN-CRIT-EXTENSIONS:CAPS"></a>GNUTLS_CERT_UNKNOWN_CRIT_EXTENSIONS</p></td> +<td class="enum_member_description"> +<p>The certificate has extensions marked as critical which are not supported.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-request-t"></a><h3>enum gnutls_certificate_request_t</h3> +<p>Enumeration of certificate request types.</p> +<div class="refsect3"> +<a name="gnutls-certificate-request-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-IGNORE:CAPS"></a>GNUTLS_CERT_IGNORE</p></td> +<td class="enum_member_description"> +<p>Ignore certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-REQUEST:CAPS"></a>GNUTLS_CERT_REQUEST</p></td> +<td class="enum_member_description"> +<p>Request certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERT-REQUIRE:CAPS"></a>GNUTLS_CERT_REQUIRE</p></td> +<td class="enum_member_description"> +<p>Require certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-crt-status-t"></a><h3>enum gnutls_openpgp_crt_status_t</h3> +<p>Enumeration of ways to send OpenPGP certificate.</p> +<div class="refsect3"> +<a name="gnutls-openpgp-crt-status-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-OPENPGP-CERT:CAPS"></a>GNUTLS_OPENPGP_CERT</p></td> +<td class="enum_member_description"> +<p>Send entire certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-OPENPGP-CERT-FINGERPRINT:CAPS"></a>GNUTLS_OPENPGP_CERT_FINGERPRINT</p></td> +<td class="enum_member_description"> +<p>Send only certificate fingerprint.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-close-request-t"></a><h3>enum gnutls_close_request_t</h3> +<p>Enumeration of how TLS session should be terminated. See <a class="link" href="gnutls-gnutls.html#gnutls-bye" title="gnutls_bye ()"><code class="function">gnutls_bye()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-close-request-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SHUT-RDWR:CAPS"></a>GNUTLS_SHUT_RDWR</p></td> +<td class="enum_member_description"> +<p>Disallow further receives/sends.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SHUT-WR:CAPS"></a>GNUTLS_SHUT_WR</p></td> +<td class="enum_member_description"> +<p>Disallow further sends.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-protocol-t"></a><h3>enum gnutls_protocol_t</h3> +<p>Enumeration of different SSL/TLS protocol versions.</p> +<div class="refsect3"> +<a name="gnutls-protocol-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SSL3:CAPS"></a>GNUTLS_SSL3</p></td> +<td class="enum_member_description"> +<p>SSL version 3.0.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-TLS1-0:CAPS"></a>GNUTLS_TLS1_0</p></td> +<td class="enum_member_description"> +<p>TLS version 1.0.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-TLS1:CAPS"></a>GNUTLS_TLS1</p></td> +<td class="enum_member_description"> +<p>Same as <a class="link" href="gnutls-gnutls.html#GNUTLS-TLS1-0:CAPS"><code class="literal">GNUTLS_TLS1_0</code></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-TLS1-1:CAPS"></a>GNUTLS_TLS1_1</p></td> +<td class="enum_member_description"> +<p>TLS version 1.1.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-TLS1-2:CAPS"></a>GNUTLS_TLS1_2</p></td> +<td class="enum_member_description"> +<p>TLS version 1.2.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-TLS1-3:CAPS"></a>GNUTLS_TLS1_3</p></td> +<td class="enum_member_description"> +<p>TLS version 1.3.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DTLS0-9:CAPS"></a>GNUTLS_DTLS0_9</p></td> +<td class="enum_member_description"> +<p>DTLS version 0.9 (Cisco AnyConnect / OpenSSL 0.9.8e).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DTLS1-0:CAPS"></a>GNUTLS_DTLS1_0</p></td> +<td class="enum_member_description"> +<p>DTLS version 1.0.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DTLS1-2:CAPS"></a>GNUTLS_DTLS1_2</p></td> +<td class="enum_member_description"> +<p>DTLS version 1.2.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DTLS-VERSION-MIN:CAPS"></a>GNUTLS_DTLS_VERSION_MIN</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DTLS-VERSION-MAX:CAPS"></a>GNUTLS_DTLS_VERSION_MAX</p></td> +<td class="enum_member_description"> +<p>Maps to the highest supported DTLS version.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-TLS-VERSION-MAX:CAPS"></a>GNUTLS_TLS_VERSION_MAX</p></td> +<td class="enum_member_description"> +<p>Maps to the highest supported TLS version.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-VERSION-UNKNOWN:CAPS"></a>GNUTLS_VERSION_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown SSL/TLS version.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-CRT-RAW:CAPS"></a><h3>GNUTLS_CRT_RAW</h3> +<pre class="programlisting">#define GNUTLS_CRT_RAW GNUTLS_CRT_RAWPK +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-type-t"></a><h3>enum gnutls_certificate_type_t</h3> +<p>Enumeration of different certificate types.</p> +<div class="refsect3"> +<a name="gnutls-certificate-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-UNKNOWN:CAPS"></a>GNUTLS_CRT_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown certificate type.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-X509:CAPS"></a>GNUTLS_CRT_X509</p></td> +<td class="enum_member_description"> +<p>X.509 Certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-OPENPGP:CAPS"></a>GNUTLS_CRT_OPENPGP</p></td> +<td class="enum_member_description"> +<p>OpenPGP certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-RAWPK:CAPS"></a>GNUTLS_CRT_RAWPK</p></td> +<td class="enum_member_description"> +<p>Raw public-key (SubjectPublicKeyInfo)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-MAX:CAPS"></a>GNUTLS_CRT_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crt-fmt-t"></a><h3>enum gnutls_x509_crt_fmt_t</h3> +<p>Enumeration of different certificate encoding formats.</p> +<div class="refsect3"> +<a name="gnutls-x509-crt-fmt-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-X509-FMT-DER:CAPS"></a>GNUTLS_X509_FMT_DER</p></td> +<td class="enum_member_description"> +<p>X.509 certificate in DER format (binary).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-X509-FMT-PEM:CAPS"></a>GNUTLS_X509_FMT_PEM</p></td> +<td class="enum_member_description"> +<p>X.509 certificate in PEM format (text).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-print-formats-t"></a><h3>enum gnutls_certificate_print_formats_t</h3> +<p>Enumeration of different certificate printing variants.</p> +<div class="refsect3"> +<a name="gnutls-certificate-print-formats-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-PRINT-FULL:CAPS"></a>GNUTLS_CRT_PRINT_FULL</p></td> +<td class="enum_member_description"> +<p>Full information about certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-PRINT-ONELINE:CAPS"></a>GNUTLS_CRT_PRINT_ONELINE</p></td> +<td class="enum_member_description"> +<p>Information about certificate in one line.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-PRINT-UNSIGNED-FULL:CAPS"></a>GNUTLS_CRT_PRINT_UNSIGNED_FULL</p></td> +<td class="enum_member_description"> +<p>All info for an unsigned certificate.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-PRINT-COMPACT:CAPS"></a>GNUTLS_CRT_PRINT_COMPACT</p></td> +<td class="enum_member_description"> +<p>Information about certificate name in one line, plus identification of the public key.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CRT-PRINT-FULL-NUMBERS:CAPS"></a>GNUTLS_CRT_PRINT_FULL_NUMBERS</p></td> +<td class="enum_member_description"> +<p>Full information about certificate and include easy to parse public key parameters.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PK-ECC:CAPS"></a><h3>GNUTLS_PK_ECC</h3> +<pre class="programlisting">#define GNUTLS_PK_ECC GNUTLS_PK_ECDSA +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PK-EC:CAPS"></a><h3>GNUTLS_PK_EC</h3> +<pre class="programlisting">#define GNUTLS_PK_EC GNUTLS_PK_ECDSA +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PK-ECDHX:CAPS"></a><h3>GNUTLS_PK_ECDHX</h3> +<pre class="programlisting">#define GNUTLS_PK_ECDHX GNUTLS_PK_ECDH_X25519 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pk-algorithm-t"></a><h3>enum gnutls_pk_algorithm_t</h3> +<p>Enumeration of different public-key algorithms.</p> +<div class="refsect3"> +<a name="gnutls-pk-algorithm-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-UNKNOWN:CAPS"></a>GNUTLS_PK_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown public-key algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-RSA:CAPS"></a>GNUTLS_PK_RSA</p></td> +<td class="enum_member_description"> +<p>RSA public-key algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-DSA:CAPS"></a>GNUTLS_PK_DSA</p></td> +<td class="enum_member_description"> +<p>DSA public-key algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-DH:CAPS"></a>GNUTLS_PK_DH</p></td> +<td class="enum_member_description"> +<p>Diffie-Hellman algorithm. Used to generate parameters.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-ECDSA:CAPS"></a>GNUTLS_PK_ECDSA</p></td> +<td class="enum_member_description"> +<p>Elliptic curve algorithm. These parameters are compatible with the ECDSA and ECDH algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-ECDH-X25519:CAPS"></a>GNUTLS_PK_ECDH_X25519</p></td> +<td class="enum_member_description"> +<p>Elliptic curve algorithm, restricted to ECDH as per rfc7748.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-RSA-PSS:CAPS"></a>GNUTLS_PK_RSA_PSS</p></td> +<td class="enum_member_description"> +<p>RSA public-key algorithm, with PSS padding.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-EDDSA-ED25519:CAPS"></a>GNUTLS_PK_EDDSA_ED25519</p></td> +<td class="enum_member_description"> +<p>Edwards curve Digital signature algorithm. Used with SHA512 on signatures.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-GOST-01:CAPS"></a>GNUTLS_PK_GOST_01</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10-2001 algorithm per rfc5832.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-GOST-12-256:CAPS"></a>GNUTLS_PK_GOST_12_256</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10-2012 algorithm, 256-bit key per rfc7091.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-GOST-12-512:CAPS"></a>GNUTLS_PK_GOST_12_512</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10-2012 algorithm, 512-bit key per rfc7091.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-ECDH-X448:CAPS"></a>GNUTLS_PK_ECDH_X448</p></td> +<td class="enum_member_description"> +<p>Elliptic curve algorithm, restricted to ECDH as per rfc7748.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-EDDSA-ED448:CAPS"></a>GNUTLS_PK_EDDSA_ED448</p></td> +<td class="enum_member_description"> +<p>Edwards curve Digital signature algorithm. Used with SHAKE256 on signatures.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PK-MAX:CAPS"></a>GNUTLS_PK_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sign-algorithm-t"></a><h3>enum gnutls_sign_algorithm_t</h3> +<p>Enumeration of different digital signature algorithms.</p> +<div class="refsect3"> +<a name="gnutls-sign-algorithm-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-UNKNOWN:CAPS"></a>GNUTLS_SIGN_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown signature algorithm.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA1:CAPS"></a>GNUTLS_SIGN_RSA_SHA1</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-1</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA:CAPS"></a>GNUTLS_SIGN_RSA_SHA</p></td> +<td class="enum_member_description"> +<p>Same as <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-RSA-SHA1:CAPS"><code class="literal">GNUTLS_SIGN_RSA_SHA1</code></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA1:CAPS"></a>GNUTLS_SIGN_DSA_SHA1</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA-1</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA:CAPS"></a>GNUTLS_SIGN_DSA_SHA</p></td> +<td class="enum_member_description"> +<p>Same as <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-DSA-SHA1:CAPS"><code class="literal">GNUTLS_SIGN_DSA_SHA1</code></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-MD5:CAPS"></a>GNUTLS_SIGN_RSA_MD5</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with MD5.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-MD2:CAPS"></a>GNUTLS_SIGN_RSA_MD2</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with MD2.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-RMD160:CAPS"></a>GNUTLS_SIGN_RSA_RMD160</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with RMD-160.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA256:CAPS"></a>GNUTLS_SIGN_RSA_SHA256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-256.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA384:CAPS"></a>GNUTLS_SIGN_RSA_SHA384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-384.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA512:CAPS"></a>GNUTLS_SIGN_RSA_SHA512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-512.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA224:CAPS"></a>GNUTLS_SIGN_RSA_SHA224</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-224.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA224:CAPS"></a>GNUTLS_SIGN_DSA_SHA224</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA-224</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA256:CAPS"></a>GNUTLS_SIGN_DSA_SHA256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA-256</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA1:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA1</p></td> +<td class="enum_member_description"> +<p>ECDSA with SHA1.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA224:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA224</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA-224.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA256:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA-256.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA384:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA-384.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA512:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA-512.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA384:CAPS"></a>GNUTLS_SIGN_DSA_SHA384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA-384</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA512:CAPS"></a>GNUTLS_SIGN_DSA_SHA512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA-512</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA3-224:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA3_224</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA3-224.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA3-256:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA3_256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA3-256.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA3-384:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA3_384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA3-384.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SHA3-512:CAPS"></a>GNUTLS_SIGN_ECDSA_SHA3_512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA with SHA3-512.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA3-224:CAPS"></a>GNUTLS_SIGN_DSA_SHA3_224</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA3-224.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA3-256:CAPS"></a>GNUTLS_SIGN_DSA_SHA3_256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA3-256.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA3-384:CAPS"></a>GNUTLS_SIGN_DSA_SHA3_384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA3-384.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-DSA-SHA3-512:CAPS"></a>GNUTLS_SIGN_DSA_SHA3_512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm DSA with SHA3-512.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA3-224:CAPS"></a>GNUTLS_SIGN_RSA_SHA3_224</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA3-224.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA3-256:CAPS"></a>GNUTLS_SIGN_RSA_SHA3_256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA3-256.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA3-384:CAPS"></a>GNUTLS_SIGN_RSA_SHA3_384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA3-384.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-SHA3-512:CAPS"></a>GNUTLS_SIGN_RSA_SHA3_512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA3-512.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-PSS-SHA256:CAPS"></a>GNUTLS_SIGN_RSA_PSS_SHA256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-256, with PSS padding (RSA-PSS certificate).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-PSS-SHA384:CAPS"></a>GNUTLS_SIGN_RSA_PSS_SHA384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-384, with PSS padding (RSA-PSS certificate).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-PSS-SHA512:CAPS"></a>GNUTLS_SIGN_RSA_PSS_SHA512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-512, with PSS padding (RSA-PSS certificate).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-EDDSA-ED25519:CAPS"></a>GNUTLS_SIGN_EDDSA_ED25519</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm EdDSA with Ed25519 curve.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-RAW:CAPS"></a>GNUTLS_SIGN_RSA_RAW</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with DigestInfo formatted data</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SECP256R1-SHA256:CAPS"></a>GNUTLS_SIGN_ECDSA_SECP256R1_SHA256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA-SECP256R1 with SHA-256 (used in TLS 1.3 but not PKIX).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SECP384R1-SHA384:CAPS"></a>GNUTLS_SIGN_ECDSA_SECP384R1_SHA384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA-SECP384R1 with SHA-384 (used in TLS 1.3 but not PKIX).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-ECDSA-SECP521R1-SHA512:CAPS"></a>GNUTLS_SIGN_ECDSA_SECP521R1_SHA512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm ECDSA-SECP521R1 with SHA-512 (used in TLS 1.3 but not PKIX).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-PSS-RSAE-SHA256:CAPS"></a>GNUTLS_SIGN_RSA_PSS_RSAE_SHA256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-256, +with PSS padding (RSA PKCS#1 1.5 certificate). This signature is identical +to <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-RSA-PSS-SHA256:CAPS"><span class="type">GNUTLS_SIGN_RSA_PSS_SHA256</span></a>, but they are distinct as the TLS1.3 protocol +treats them differently.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-PSS-RSAE-SHA384:CAPS"></a>GNUTLS_SIGN_RSA_PSS_RSAE_SHA384</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-384, +with PSS padding (RSA PKCS#1 1.5 certificate). This signature is identical +to <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-RSA-PSS-SHA384:CAPS"><span class="type">GNUTLS_SIGN_RSA_PSS_SHA384</span></a>, but they are distinct as the TLS1.3 protocol +treats them differently.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-RSA-PSS-RSAE-SHA512:CAPS"></a>GNUTLS_SIGN_RSA_PSS_RSAE_SHA512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm RSA with SHA-512, +with PSS padding (RSA PKCS#1 1.5 certificate). This signature is identical +to <a class="link" href="gnutls-gnutls.html#GNUTLS-SIGN-RSA-PSS-SHA512:CAPS"><span class="type">GNUTLS_SIGN_RSA_PSS_SHA512</span></a>, but they are distinct as the TLS1.3 protocol +treats them differently.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-GOST-94:CAPS"></a>GNUTLS_SIGN_GOST_94</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm GOST R 34.10-2001 with GOST R 34.11-94</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-GOST-256:CAPS"></a>GNUTLS_SIGN_GOST_256</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm GOST R 34.10-2012 with GOST R 34.11-2012 256 bit</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-GOST-512:CAPS"></a>GNUTLS_SIGN_GOST_512</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm GOST R 34.10-2012 with GOST R 34.11-2012 512 bit</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-EDDSA-ED448:CAPS"></a>GNUTLS_SIGN_EDDSA_ED448</p></td> +<td class="enum_member_description"> +<p>Digital signature algorithm EdDSA with Ed448 curve.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SIGN-MAX:CAPS"></a>GNUTLS_SIGN_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ecc-curve-t"></a><h3>enum gnutls_ecc_curve_t</h3> +<p>Enumeration of ECC curves.</p> +<div class="refsect3"> +<a name="gnutls-ecc-curve-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-INVALID:CAPS"></a>GNUTLS_ECC_CURVE_INVALID</p></td> +<td class="enum_member_description"> +<p>Cannot be known</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-SECP224R1:CAPS"></a>GNUTLS_ECC_CURVE_SECP224R1</p></td> +<td class="enum_member_description"> +<p>the SECP224R1 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-SECP256R1:CAPS"></a>GNUTLS_ECC_CURVE_SECP256R1</p></td> +<td class="enum_member_description"> +<p>the SECP256R1 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-SECP384R1:CAPS"></a>GNUTLS_ECC_CURVE_SECP384R1</p></td> +<td class="enum_member_description"> +<p>the SECP384R1 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-SECP521R1:CAPS"></a>GNUTLS_ECC_CURVE_SECP521R1</p></td> +<td class="enum_member_description"> +<p>the SECP521R1 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-SECP192R1:CAPS"></a>GNUTLS_ECC_CURVE_SECP192R1</p></td> +<td class="enum_member_description"> +<p>the SECP192R1 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-X25519:CAPS"></a>GNUTLS_ECC_CURVE_X25519</p></td> +<td class="enum_member_description"> +<p>the X25519 curve (ECDH only)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-ED25519:CAPS"></a>GNUTLS_ECC_CURVE_ED25519</p></td> +<td class="enum_member_description"> +<p>the Ed25519 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256CPA:CAPS"></a>GNUTLS_ECC_CURVE_GOST256CPA</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 CryptoPro 256 A curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256CPB:CAPS"></a>GNUTLS_ECC_CURVE_GOST256CPB</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 CryptoPro 256 B curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256CPC:CAPS"></a>GNUTLS_ECC_CURVE_GOST256CPC</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 CryptoPro 256 C curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256CPXA:CAPS"></a>GNUTLS_ECC_CURVE_GOST256CPXA</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 CryptoPro 256 XchA curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256CPXB:CAPS"></a>GNUTLS_ECC_CURVE_GOST256CPXB</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 CryptoPro 256 XchB curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST512A:CAPS"></a>GNUTLS_ECC_CURVE_GOST512A</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 512 A curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST512B:CAPS"></a>GNUTLS_ECC_CURVE_GOST512B</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 512 B curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST512C:CAPS"></a>GNUTLS_ECC_CURVE_GOST512C</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 512 C curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256A:CAPS"></a>GNUTLS_ECC_CURVE_GOST256A</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 256 A curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256B:CAPS"></a>GNUTLS_ECC_CURVE_GOST256B</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 256 B curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256C:CAPS"></a>GNUTLS_ECC_CURVE_GOST256C</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 256 C curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-GOST256D:CAPS"></a>GNUTLS_ECC_CURVE_GOST256D</p></td> +<td class="enum_member_description"> +<p>GOST R 34.10 TC26 256 D curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-X448:CAPS"></a>GNUTLS_ECC_CURVE_X448</p></td> +<td class="enum_member_description"> +<p>the X448 curve (ECDH only)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-ED448:CAPS"></a>GNUTLS_ECC_CURVE_ED448</p></td> +<td class="enum_member_description"> +<p>the Ed448 curve</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ECC-CURVE-MAX:CAPS"></a>GNUTLS_ECC_CURVE_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-group-t"></a><h3>enum gnutls_group_t</h3> +<p>Enumeration of supported groups. It is intended to be backwards +compatible with the enumerations in <a class="link" href="gnutls-gnutls.html#gnutls-ecc-curve-t" title="enum gnutls_ecc_curve_t"><code class="literal">gnutls_ecc_curve_t</code></a> for the groups +which are valid elliptic curves.</p> +<div class="refsect3"> +<a name="gnutls-group-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-INVALID:CAPS"></a>GNUTLS_GROUP_INVALID</p></td> +<td class="enum_member_description"> +<p>Indicates unknown/invalid group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-SECP192R1:CAPS"></a>GNUTLS_GROUP_SECP192R1</p></td> +<td class="enum_member_description"> +<p>the SECP192R1 curve group (legacy, only for TLS 1.2 compatibility)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-SECP224R1:CAPS"></a>GNUTLS_GROUP_SECP224R1</p></td> +<td class="enum_member_description"> +<p>the SECP224R1 curve group (legacy, only for TLS 1.2 compatibility)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-SECP256R1:CAPS"></a>GNUTLS_GROUP_SECP256R1</p></td> +<td class="enum_member_description"> +<p>the SECP256R1 curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-SECP384R1:CAPS"></a>GNUTLS_GROUP_SECP384R1</p></td> +<td class="enum_member_description"> +<p>the SECP384R1 curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-SECP521R1:CAPS"></a>GNUTLS_GROUP_SECP521R1</p></td> +<td class="enum_member_description"> +<p>the SECP521R1 curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-X25519:CAPS"></a>GNUTLS_GROUP_X25519</p></td> +<td class="enum_member_description"> +<p>the X25519 curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-X448:CAPS"></a>GNUTLS_GROUP_X448</p></td> +<td class="enum_member_description"> +<p>the X448 curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC256A:CAPS"></a>GNUTLS_GROUP_GC256A</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 256 A curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC256B:CAPS"></a>GNUTLS_GROUP_GC256B</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 256 B curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC256C:CAPS"></a>GNUTLS_GROUP_GC256C</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 256 C curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC256D:CAPS"></a>GNUTLS_GROUP_GC256D</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 256 D curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC512A:CAPS"></a>GNUTLS_GROUP_GC512A</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 512 A curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC512B:CAPS"></a>GNUTLS_GROUP_GC512B</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 512 B curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-GC512C:CAPS"></a>GNUTLS_GROUP_GC512C</p></td> +<td class="enum_member_description"> +<p>the GOST R 34.10 TC26 512 C curve group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-FFDHE2048:CAPS"></a>GNUTLS_GROUP_FFDHE2048</p></td> +<td class="enum_member_description"> +<p>the FFDHE2048 group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-FFDHE3072:CAPS"></a>GNUTLS_GROUP_FFDHE3072</p></td> +<td class="enum_member_description"> +<p>the FFDHE3072 group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-FFDHE4096:CAPS"></a>GNUTLS_GROUP_FFDHE4096</p></td> +<td class="enum_member_description"> +<p>the FFDHE4096 group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-FFDHE8192:CAPS"></a>GNUTLS_GROUP_FFDHE8192</p></td> +<td class="enum_member_description"> +<p>the FFDHE8192 group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-FFDHE6144:CAPS"></a>GNUTLS_GROUP_FFDHE6144</p></td> +<td class="enum_member_description"> +<p>the FFDHE6144 group</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GROUP-MAX:CAPS"></a>GNUTLS_GROUP_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-sec-param-t"></a><h3>enum gnutls_sec_param_t</h3> +<p>Enumeration of security parameters for passive attacks.</p> +<div class="refsect3"> +<a name="gnutls-sec-param-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-UNKNOWN:CAPS"></a>GNUTLS_SEC_PARAM_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Cannot be known</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-INSECURE:CAPS"></a>GNUTLS_SEC_PARAM_INSECURE</p></td> +<td class="enum_member_description"> +<p>Less than 42 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-EXPORT:CAPS"></a>GNUTLS_SEC_PARAM_EXPORT</p></td> +<td class="enum_member_description"> +<p>42 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-VERY-WEAK:CAPS"></a>GNUTLS_SEC_PARAM_VERY_WEAK</p></td> +<td class="enum_member_description"> +<p>64 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-WEAK:CAPS"></a>GNUTLS_SEC_PARAM_WEAK</p></td> +<td class="enum_member_description"> +<p>72 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-LOW:CAPS"></a>GNUTLS_SEC_PARAM_LOW</p></td> +<td class="enum_member_description"> +<p>80 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-LEGACY:CAPS"></a>GNUTLS_SEC_PARAM_LEGACY</p></td> +<td class="enum_member_description"> +<p>96 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-MEDIUM:CAPS"></a>GNUTLS_SEC_PARAM_MEDIUM</p></td> +<td class="enum_member_description"> +<p>112 bits of security (used to be <a class="link" href="gnutls-gnutls.html#GNUTLS-SEC-PARAM-NORMAL:CAPS" title="GNUTLS_SEC_PARAM_NORMAL"><code class="literal">GNUTLS_SEC_PARAM_NORMAL</code></a>)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-HIGH:CAPS"></a>GNUTLS_SEC_PARAM_HIGH</p></td> +<td class="enum_member_description"> +<p>128 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-ULTRA:CAPS"></a>GNUTLS_SEC_PARAM_ULTRA</p></td> +<td class="enum_member_description"> +<p>192 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-FUTURE:CAPS"></a>GNUTLS_SEC_PARAM_FUTURE</p></td> +<td class="enum_member_description"> +<p>256 bits of security</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SEC-PARAM-MAX:CAPS"></a>GNUTLS_SEC_PARAM_MAX</p></td> +<td> </td> +<td> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-SEC-PARAM-NORMAL:CAPS"></a><h3>GNUTLS_SEC_PARAM_NORMAL</h3> +<pre class="programlisting">#define GNUTLS_SEC_PARAM_NORMAL GNUTLS_SEC_PARAM_MEDIUM +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-channel-binding-t"></a><h3>enum gnutls_channel_binding_t</h3> +<p>Enumeration of supported channel binding types.</p> +<div class="refsect3"> +<a name="gnutls-channel-binding-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CB-TLS-UNIQUE:CAPS"></a>GNUTLS_CB_TLS_UNIQUE</p></td> +<td class="enum_member_description"> +<p>"tls-unique" (RFC 5929) channel binding</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CB-TLS-SERVER-END-POINT:CAPS"></a>GNUTLS_CB_TLS_SERVER_END_POINT</p></td> +<td class="enum_member_description"> +<p>"tls-server-end-point" (RFC 5929) channel binding</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CB-TLS-EXPORTER:CAPS"></a>GNUTLS_CB_TLS_EXPORTER</p></td> +<td class="enum_member_description"> +<p>"tls-exporter" (RFC 9266) channel binding</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-gost-paramset-t"></a><h3>enum gnutls_gost_paramset_t</h3> +<p>Enumeration of different GOST 28147 parameter sets.</p> +<div class="refsect3"> +<a name="gnutls-gost-paramset-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GOST-PARAMSET-UNKNOWN:CAPS"></a>GNUTLS_GOST_PARAMSET_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown/default parameter set</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GOST-PARAMSET-TC26-Z:CAPS"></a>GNUTLS_GOST_PARAMSET_TC26_Z</p></td> +<td class="enum_member_description"> +<p>Specified by TC26, see rfc7836</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GOST-PARAMSET-CP-A:CAPS"></a>GNUTLS_GOST_PARAMSET_CP_A</p></td> +<td class="enum_member_description"> +<p>CryptoPro-A, see rfc4357</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GOST-PARAMSET-CP-B:CAPS"></a>GNUTLS_GOST_PARAMSET_CP_B</p></td> +<td class="enum_member_description"> +<p>CryptoPro-B, see rfc4357</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GOST-PARAMSET-CP-C:CAPS"></a>GNUTLS_GOST_PARAMSET_CP_C</p></td> +<td class="enum_member_description"> +<p>CryptoPro-C, see rfc4357</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-GOST-PARAMSET-CP-D:CAPS"></a>GNUTLS_GOST_PARAMSET_CP_D</p></td> +<td class="enum_member_description"> +<p>CryptoPro-D, see rfc4357</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ctype-target-t"></a><h3>enum gnutls_ctype_target_t</h3> +<p>Enumeration of certificate type targets with respect to asymmetric +certificate types as specified in RFC7250 and P2P connection set up +as specified in draft-vanrein-tls-symmetry-02.</p> +<div class="refsect3"> +<a name="gnutls-ctype-target-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CTYPE-CLIENT:CAPS"></a>GNUTLS_CTYPE_CLIENT</p></td> +<td class="enum_member_description"> +<p>for requesting client certificate type values.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CTYPE-SERVER:CAPS"></a>GNUTLS_CTYPE_SERVER</p></td> +<td class="enum_member_description"> +<p>for requesting server certificate type values.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CTYPE-OURS:CAPS"></a>GNUTLS_CTYPE_OURS</p></td> +<td class="enum_member_description"> +<p>for requesting our certificate type values.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CTYPE-PEERS:CAPS"></a>GNUTLS_CTYPE_PEERS</p></td> +<td class="enum_member_description"> +<p>for requesting the peers' certificate type values.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-transport-ptr-t"></a><h3>gnutls_transport_ptr_t</h3> +<pre class="programlisting">typedef void *gnutls_transport_ptr_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-t"></a><h3>gnutls_session_t</h3> +<pre class="programlisting">typedef struct gnutls_session_int *gnutls_session_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-t"></a><h3>gnutls_dh_params_t</h3> +<pre class="programlisting">typedef struct gnutls_dh_params_int *gnutls_dh_params_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-rsa-params-t"></a><h3>gnutls_rsa_params_t</h3> +<pre class="programlisting">typedef struct gnutls_x509_privkey_int *gnutls_rsa_params_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-t"></a><h3>gnutls_priority_t</h3> +<pre class="programlisting">typedef struct gnutls_priority_st *gnutls_priority_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-datum-t"></a><h3>gnutls_datum_t</h3> +<pre class="programlisting">typedef struct { + unsigned char *data; + unsigned int size; +} gnutls_datum_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-library-config-st"></a><h3>gnutls_library_config_st</h3> +<pre class="programlisting">typedef struct { + const char *name; + const char *value; +} gnutls_library_config_st; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-params-st"></a><h3>gnutls_params_st</h3> +<pre class="programlisting">typedef struct { + gnutls_params_type_t type; + union params { + gnutls_dh_params_t dh; + gnutls_rsa_params_t rsa_export; + } params; + int deinit; +} gnutls_params_st; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-DEFAULT-HANDSHAKE-TIMEOUT:CAPS"></a><h3>GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT</h3> +<pre class="programlisting">#define GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT ((unsigned int)-1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-INDEFINITE-TIMEOUT:CAPS"></a><h3>GNUTLS_INDEFINITE_TIMEOUT</h3> +<pre class="programlisting">#define GNUTLS_INDEFINITE_TIMEOUT ((unsigned int)-2) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KU-PEER:CAPS"></a><h3>GNUTLS_KU_PEER</h3> +<pre class="programlisting">#define GNUTLS_KU_PEER 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HEARTBEAT-WAIT:CAPS"></a><h3>GNUTLS_HEARTBEAT_WAIT</h3> +<pre class="programlisting">#define GNUTLS_HEARTBEAT_WAIT 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-RECORD-WAIT:CAPS"></a><h3>GNUTLS_RECORD_WAIT</h3> +<pre class="programlisting">#define GNUTLS_RECORD_WAIT 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-range-st"></a><h3>gnutls_range_st</h3> +<pre class="programlisting">typedef struct { + size_t low; + size_t high; +} gnutls_range_st; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-packet-t"></a><h3>gnutls_packet_t</h3> +<pre class="programlisting">typedef struct mbuffer_st *gnutls_packet_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-read"></a><h3>gnutls_read</h3> +<pre class="programlisting">#define gnutls_read gnutls_record_recv +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-write"></a><h3>gnutls_write</h3> +<pre class="programlisting">#define gnutls_write gnutls_record_send +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-server-name-type-t"></a><h3>enum gnutls_server_name_type_t</h3> +<p>Enumeration of different server name types.</p> +<div class="refsect3"> +<a name="gnutls-server-name-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody><tr> +<td class="enum_member_name"><p><a name="GNUTLS-NAME-DNS:CAPS"></a>GNUTLS_NAME_DNS</p></td> +<td class="enum_member_description"> +<p>Domain Name System name type.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HB-PEER-ALLOWED-TO-SEND:CAPS"></a><h3>GNUTLS_HB_PEER_ALLOWED_TO_SEND</h3> +<pre class="programlisting">#define GNUTLS_HB_PEER_ALLOWED_TO_SEND (1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HB-PEER-NOT-ALLOWED-TO-SEND:CAPS"></a><h3>GNUTLS_HB_PEER_NOT_ALLOWED_TO_SEND</h3> +<pre class="programlisting">#define GNUTLS_HB_PEER_NOT_ALLOWED_TO_SEND (1<<1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HB-LOCAL-ALLOWED-TO-SEND:CAPS"></a><h3>GNUTLS_HB_LOCAL_ALLOWED_TO_SEND</h3> +<pre class="programlisting">#define GNUTLS_HB_LOCAL_ALLOWED_TO_SEND (1<<2) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-flags-t"></a><h3>enum gnutls_session_flags_t</h3> +<p>Enumeration of different session parameters.</p> +<div class="refsect3"> +<a name="gnutls-session-flags-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-SAFE-RENEGOTIATION:CAPS"></a>GNUTLS_SFLAGS_SAFE_RENEGOTIATION</p></td> +<td class="enum_member_description"> +<p>Safe renegotiation (RFC5746) was used</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-EXT-MASTER-SECRET:CAPS"></a>GNUTLS_SFLAGS_EXT_MASTER_SECRET</p></td> +<td class="enum_member_description"> +<p>The extended master secret (RFC7627) extension was used</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-ETM:CAPS"></a>GNUTLS_SFLAGS_ETM</p></td> +<td class="enum_member_description"> +<p>The encrypt then MAC (RFC7366) extension was used</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-HB-LOCAL-SEND:CAPS"></a>GNUTLS_SFLAGS_HB_LOCAL_SEND</p></td> +<td class="enum_member_description"> +<p>The heartbeat negotiation allows the local side to send heartbeat messages</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-HB-PEER-SEND:CAPS"></a>GNUTLS_SFLAGS_HB_PEER_SEND</p></td> +<td class="enum_member_description"> +<p>The heartbeat negotiation allows the peer to send heartbeat messages</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-FALSE-START:CAPS"></a>GNUTLS_SFLAGS_FALSE_START</p></td> +<td class="enum_member_description"> +<p>False start was used in this client session.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-RFC7919:CAPS"></a>GNUTLS_SFLAGS_RFC7919</p></td> +<td class="enum_member_description"> +<p>The RFC7919 Diffie-Hellman parameters were negotiated</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-SESSION-TICKET:CAPS"></a>GNUTLS_SFLAGS_SESSION_TICKET</p></td> +<td class="enum_member_description"> +<p>A session ticket has been received by the server.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-POST-HANDSHAKE-AUTH:CAPS"></a>GNUTLS_SFLAGS_POST_HANDSHAKE_AUTH</p></td> +<td class="enum_member_description"> +<p>Indicates client capability for post-handshake auth; set only on server side.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-EARLY-START:CAPS"></a>GNUTLS_SFLAGS_EARLY_START</p></td> +<td class="enum_member_description"> +<p>The TLS1.3 server session returned early.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-EARLY-DATA:CAPS"></a>GNUTLS_SFLAGS_EARLY_DATA</p></td> +<td class="enum_member_description"> +<p>The TLS1.3 early data has been received by the server.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-CLI-REQUESTED-OCSP:CAPS"></a>GNUTLS_SFLAGS_CLI_REQUESTED_OCSP</p></td> +<td class="enum_member_description"> +<p>Set when the client has requested OCSP staple during handshake.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SFLAGS-SERV-REQUESTED-OCSP:CAPS"></a>GNUTLS_SFLAGS_SERV_REQUESTED_OCSP</p></td> +<td class="enum_member_description"> +<p>Set when the server has requested OCSP staple during handshake.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-supplemental-data-format-type-t"></a><h3>enum gnutls_supplemental_data_format_type_t</h3> +<p>Enumeration of different supplemental data types (RFC 4680).</p> +<div class="refsect3"> +<a name="gnutls-supplemental-data-format-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody><tr> +<td class="enum_member_name"><p><a name="GNUTLS-SUPPLEMENTAL-UNKNOWN:CAPS"></a>GNUTLS_SUPPLEMENTAL_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown data format</p> +</td> +<td class="enum_member_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srtp-profile-t"></a><h3>enum gnutls_srtp_profile_t</h3> +<p>Enumeration of different SRTP protection profiles.</p> +<div class="refsect3"> +<a name="gnutls-srtp-profile-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SRTP-AES128-CM-HMAC-SHA1-80:CAPS"></a>GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80</p></td> +<td class="enum_member_description"> +<p>128 bit AES with a 80 bit HMAC-SHA1</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SRTP-AES128-CM-HMAC-SHA1-32:CAPS"></a>GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32</p></td> +<td class="enum_member_description"> +<p>128 bit AES with a 32 bit HMAC-SHA1</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SRTP-NULL-HMAC-SHA1-80:CAPS"></a>GNUTLS_SRTP_NULL_HMAC_SHA1_80</p></td> +<td class="enum_member_description"> +<p>NULL cipher with a 80 bit HMAC-SHA1</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SRTP-NULL-HMAC-SHA1-32:CAPS"></a>GNUTLS_SRTP_NULL_HMAC_SHA1_32</p></td> +<td class="enum_member_description"> +<p>NULL cipher with a 32 bit HMAC-SHA1</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-alpn-flags-t"></a><h3>enum gnutls_alpn_flags_t</h3> +<p>Enumeration of different ALPN flags. These are used by <a class="link" href="gnutls-gnutls.html#gnutls-alpn-set-protocols" title="gnutls_alpn_set_protocols ()"><code class="function">gnutls_alpn_set_protocols()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-alpn-flags-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ALPN-MANDATORY:CAPS"></a>GNUTLS_ALPN_MANDATORY</p></td> +<td class="enum_member_description"> +<p>Require ALPN negotiation. The connection will be +aborted if no matching ALPN protocol is found.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ALPN-SERVER-PRECEDENCE:CAPS"></a>GNUTLS_ALPN_SERVER_PRECEDENCE</p></td> +<td class="enum_member_description"> +<p>The choices set by the server +will take precedence over the client's.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-ALPN-MAND:CAPS"></a><h3>GNUTLS_ALPN_MAND</h3> +<pre class="programlisting">#define GNUTLS_ALPN_MAND GNUTLS_ALPN_MANDATORY +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PRIORITY-INIT-DEF-APPEND:CAPS"></a><h3>GNUTLS_PRIORITY_INIT_DEF_APPEND</h3> +<pre class="programlisting">#define GNUTLS_PRIORITY_INIT_DEF_APPEND 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PRIORITY-LIST-INIT-KEYWORDS:CAPS"></a><h3>GNUTLS_PRIORITY_LIST_INIT_KEYWORDS</h3> +<pre class="programlisting">#define GNUTLS_PRIORITY_LIST_INIT_KEYWORDS 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PRIORITY-LIST-SPECIAL:CAPS"></a><h3>GNUTLS_PRIORITY_LIST_SPECIAL</h3> +<pre class="programlisting">#define GNUTLS_PRIORITY_LIST_SPECIAL 2 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-vdata-types-t"></a><h3>enum gnutls_vdata_types_t</h3> +<p>Enumeration of different typed-data options. They are used as input to certificate +verification functions to provide information about the name and purpose of the +certificate. Only a single option of a type can be provided to the relevant functions +(i.e., options <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-DNS-HOSTNAME:CAPS"><code class="literal">GNUTLS_DT_DNS_HOSTNAME</code></a>, <a class="link" href="gnutls-gnutls.html#GNUTLS-DT-IP-ADDRESS:CAPS"><code class="literal">GNUTLS_DT_IP_ADDRESS</code></a> and +<a class="link" href="gnutls-gnutls.html#GNUTLS-DT-RFC822NAME:CAPS"><code class="literal">GNUTLS_DT_RFC822NAME</code></a> cannot be combined).</p> +<div class="refsect3"> +<a name="gnutls-vdata-types-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DT-UNKNOWN:CAPS"></a>GNUTLS_DT_UNKNOWN</p></td> +<td class="enum_member_description"> +<p>Unknown data type.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DT-DNS-HOSTNAME:CAPS"></a>GNUTLS_DT_DNS_HOSTNAME</p></td> +<td class="enum_member_description"> +<p>The data contain a null-terminated DNS hostname; the hostname will be + +matched using the RFC6125 rules. If the data contain a textual IP (v4 or v6) address it will +be marched against the IPAddress Alternative name, unless the verification flag <a class="link" href="gnutls-x509.html#GNUTLS-VERIFY-DO-NOT-ALLOW-IP-MATCHES:CAPS"><code class="literal">GNUTLS_VERIFY_DO_NOT_ALLOW_IP_MATCHES</code></a> +is specified.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DT-KEY-PURPOSE-OID:CAPS"></a>GNUTLS_DT_KEY_PURPOSE_OID</p></td> +<td class="enum_member_description"> +<p>The data contain a null-terminated key purpose OID. It will be matched +against the certificate's Extended Key Usage extension.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DT-RFC822NAME:CAPS"></a>GNUTLS_DT_RFC822NAME</p></td> +<td class="enum_member_description"> +<p>The data contain a null-terminated email address; the email will be +matched against the RFC822Name Alternative name of the certificate, or the EMAIL DN component if the +former isn't available. Prior to matching the email address will be converted to ACE +(ASCII-compatible-encoding).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-DT-IP-ADDRESS:CAPS"></a>GNUTLS_DT_IP_ADDRESS</p></td> +<td class="enum_member_description"> +<p>The data contain a raw IP address (4 or 16 bytes). If will be matched +against the IPAddress Alternative name; option available since 3.6.0.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-typed-vdata-st"></a><h3>gnutls_typed_vdata_st</h3> +<pre class="programlisting">typedef struct { + gnutls_vdata_types_t type; + unsigned char *data; + unsigned int size; +} gnutls_typed_vdata_st; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-MAX-SESSION-ID:CAPS"></a><h3>GNUTLS_MAX_SESSION_ID</h3> +<pre class="programlisting">#define GNUTLS_MAX_SESSION_ID 32 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HOOK-POST:CAPS"></a><h3>GNUTLS_HOOK_POST</h3> +<pre class="programlisting">#define GNUTLS_HOOK_POST (1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HOOK-PRE:CAPS"></a><h3>GNUTLS_HOOK_PRE</h3> +<pre class="programlisting">#define GNUTLS_HOOK_PRE (0) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-HOOK-BOTH:CAPS"></a><h3>GNUTLS_HOOK_BOTH</h3> +<pre class="programlisting">#define GNUTLS_HOOK_BOTH (-1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-handshake-post-client-hello-func"></a><h3>gnutls_handshake_post_client_hello_func</h3> +<pre class="programlisting">#define gnutls_handshake_post_client_hello_func gnutls_handshake_simple_hook_func +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-cred-set"></a><h3>gnutls_cred_set</h3> +<pre class="programlisting">#define gnutls_cred_set gnutls_credentials_set +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pubkey-t"></a><h3>gnutls_pubkey_t</h3> +<pre class="programlisting">typedef struct gnutls_pubkey_st *gnutls_pubkey_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-privkey-t"></a><h3>gnutls_privkey_t</h3> +<pre class="programlisting">typedef struct gnutls_privkey_st *gnutls_privkey_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-privkey-t"></a><h3>gnutls_x509_privkey_t</h3> +<pre class="programlisting">typedef struct gnutls_x509_privkey_int *gnutls_x509_privkey_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crl-t"></a><h3>gnutls_x509_crl_t</h3> +<pre class="programlisting">typedef struct gnutls_x509_crl_int *gnutls_x509_crl_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crt-t"></a><h3>gnutls_x509_crt_t</h3> +<pre class="programlisting">typedef struct gnutls_x509_crt_int *gnutls_x509_crt_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crq-t"></a><h3>gnutls_x509_crq_t</h3> +<pre class="programlisting">typedef struct gnutls_x509_crq_int *gnutls_x509_crq_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-keyring-t"></a><h3>gnutls_openpgp_keyring_t</h3> +<pre class="programlisting">typedef struct gnutls_openpgp_keyring_int *gnutls_openpgp_keyring_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-flags"></a><h3>enum gnutls_certificate_flags</h3> +<p>Enumeration of different certificate credentials flags.</p> +<div class="refsect3"> +<a name="gnutls-certificate-flags.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERTIFICATE-SKIP-KEY-CERT-MATCH:CAPS"></a>GNUTLS_CERTIFICATE_SKIP_KEY_CERT_MATCH</p></td> +<td class="enum_member_description"> +<p>Skip the key and certificate matching check.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERTIFICATE-API-V2:CAPS"></a>GNUTLS_CERTIFICATE_API_V2</p></td> +<td class="enum_member_description"> +<p>If set the gnutls_certificate_set_*key* functions will return an index of the added key pair instead of zero.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERTIFICATE-SKIP-OCSP-RESPONSE-CHECK:CAPS"></a>GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK</p></td> +<td class="enum_member_description"> +<p>If set, the gnutls_certificate_set_ocsp_status_request_file +function, will not check whether the response set matches any of the certificates.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-CERTIFICATE-VERIFY-CRLS:CAPS"></a>GNUTLS_CERTIFICATE_VERIFY_CRLS</p></td> +<td class="enum_member_description"> +<p>This will enable CRL verification when added in the certificate structure. +When used, it requires CAs to be added before CRLs.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ocsp-data-st"></a><h3>gnutls_ocsp_data_st</h3> +<pre class="programlisting">typedef struct { + unsigned int version; /* must be zero */ + gnutls_datum_t response; + time_t exptime; + unsigned char padding[32]; +} gnutls_ocsp_data_st; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="giovec-t"></a><h3>giovec_t</h3> +<pre class="programlisting">typedef struct iovec giovec_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-random-art-t"></a><h3>enum gnutls_random_art_t</h3> +<p>Enumeration of different random art types.</p> +<div class="refsect3"> +<a name="gnutls-random-art-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody><tr> +<td class="enum_member_name"><p><a name="GNUTLS-RANDOM-ART-OPENSSH:CAPS"></a>GNUTLS_RANDOM_ART_OPENSSH</p></td> +<td class="enum_member_description"> +<p>OpenSSH-style random art.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-IDNA-FORCE-2008:CAPS"></a><h3>GNUTLS_IDNA_FORCE_2008</h3> +<pre class="programlisting">#define GNUTLS_IDNA_FORCE_2008 (1<<1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-base64-encode-alloc"></a><h3>gnutls_srp_base64_encode_alloc</h3> +<pre class="programlisting">#define gnutls_srp_base64_encode_alloc gnutls_srp_base64_encode2 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-srp-base64-decode-alloc"></a><h3>gnutls_srp_base64_decode_alloc</h3> +<pre class="programlisting">#define gnutls_srp_base64_decode_alloc gnutls_srp_base64_decode2 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-psk-key-flags"></a><h3>enum gnutls_psk_key_flags</h3> +<p>Enumeration of different PSK key flags.</p> +<div class="refsect3"> +<a name="gnutls-psk-key-flags.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PSK-KEY-RAW:CAPS"></a>GNUTLS_PSK_KEY_RAW</p></td> +<td class="enum_member_description"> +<p>PSK-key in raw format.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PSK-KEY-HEX:CAPS"></a>GNUTLS_PSK_KEY_HEX</p></td> +<td class="enum_member_description"> +<p>PSK-key in hex format.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-subject-alt-name-t"></a><h3>enum gnutls_x509_subject_alt_name_t</h3> +<p>Enumeration of different subject alternative names types.</p> +<div class="refsect3"> +<a name="gnutls-x509-subject-alt-name-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-DNSNAME:CAPS"></a>GNUTLS_SAN_DNSNAME</p></td> +<td class="enum_member_description"> +<p>DNS-name SAN.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-RFC822NAME:CAPS"></a>GNUTLS_SAN_RFC822NAME</p></td> +<td class="enum_member_description"> +<p>E-mail address SAN.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-URI:CAPS"></a>GNUTLS_SAN_URI</p></td> +<td class="enum_member_description"> +<p>URI SAN.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-IPADDRESS:CAPS"></a>GNUTLS_SAN_IPADDRESS</p></td> +<td class="enum_member_description"> +<p>IP address SAN.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-OTHERNAME:CAPS"></a>GNUTLS_SAN_OTHERNAME</p></td> +<td class="enum_member_description"> +<p>OtherName SAN.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-DN:CAPS"></a>GNUTLS_SAN_DN</p></td> +<td class="enum_member_description"> +<p>DN SAN.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-REGISTERED-ID:CAPS"></a>GNUTLS_SAN_REGISTERED_ID</p></td> +<td class="enum_member_description"> +<p>RegisteredID.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-MAX:CAPS"></a>GNUTLS_SAN_MAX</p></td> +<td> </td> +<td> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-OTHERNAME-XMPP:CAPS"></a>GNUTLS_SAN_OTHERNAME_XMPP</p></td> +<td class="enum_member_description"> +<p>Virtual SAN, used by certain functions for convenience.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-OTHERNAME-KRB5PRINCIPAL:CAPS"></a>GNUTLS_SAN_OTHERNAME_KRB5PRINCIPAL</p></td> +<td class="enum_member_description"> +<p>Virtual SAN, used by certain functions for convenience.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-SAN-OTHERNAME-MSUSERPRINCIPAL:CAPS"></a>GNUTLS_SAN_OTHERNAME_MSUSERPRINCIPAL</p></td> +<td class="enum_member_description"> +<p>Virtual SAN, used by certain functions for convenience.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-crt-t"></a><h3>gnutls_openpgp_crt_t</h3> +<pre class="programlisting">typedef struct gnutls_openpgp_crt_int *gnutls_openpgp_crt_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-privkey-t"></a><h3>gnutls_openpgp_privkey_t</h3> +<pre class="programlisting">typedef struct gnutls_openpgp_privkey_int *gnutls_openpgp_privkey_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pkcs11-privkey-t"></a><h3>gnutls_pkcs11_privkey_t</h3> +<pre class="programlisting">typedef struct gnutls_pkcs11_privkey_st *gnutls_pkcs11_privkey_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-privkey-type-t"></a><h3>enum gnutls_privkey_type_t</h3> +<p>Enumeration of different private key types.</p> +<div class="refsect3"> +<a name="gnutls-privkey-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PRIVKEY-X509:CAPS"></a>GNUTLS_PRIVKEY_X509</p></td> +<td class="enum_member_description"> +<p>X.509 private key, <a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PRIVKEY-OPENPGP:CAPS"></a>GNUTLS_PRIVKEY_OPENPGP</p></td> +<td class="enum_member_description"> +<p>OpenPGP private key, <a class="link" href="gnutls-gnutls.html#gnutls-openpgp-privkey-t" title="gnutls_openpgp_privkey_t"><span class="type">gnutls_openpgp_privkey_t</span></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PRIVKEY-PKCS11:CAPS"></a>GNUTLS_PRIVKEY_PKCS11</p></td> +<td class="enum_member_description"> +<p>PKCS11 private key, <a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a>.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PRIVKEY-EXT:CAPS"></a>GNUTLS_PRIVKEY_EXT</p></td> +<td class="enum_member_description"> +<p>External private key, operating using callbacks.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-retr2-st"></a><h3>gnutls_retr2_st</h3> +<pre class="programlisting">typedef struct { + gnutls_certificate_type_t cert_type; + gnutls_privkey_type_t key_type; + + union { + gnutls_x509_crt_t *x509; + gnutls_openpgp_crt_t pgp; + } cert; + unsigned int ncerts; /* one for pgp keys */ + + union { + gnutls_x509_privkey_t x509; + gnutls_openpgp_privkey_t pgp; + gnutls_pkcs11_privkey_t pkcs11; + } key; + + unsigned int deinit_all; /* if non zero all keys will be deinited */ +} gnutls_retr2_st; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pem-base64-encode-alloc"></a><h3>gnutls_pem_base64_encode_alloc</h3> +<pre class="programlisting">#define gnutls_pem_base64_encode_alloc gnutls_pem_base64_encode2 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pem-base64-decode-alloc"></a><h3>gnutls_pem_base64_decode_alloc</h3> +<pre class="programlisting">#define gnutls_pem_base64_decode_alloc gnutls_pem_base64_decode2 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-DIGITAL-SIGNATURE:CAPS"></a><h3>GNUTLS_KEY_DIGITAL_SIGNATURE</h3> +<pre class="programlisting">#define GNUTLS_KEY_DIGITAL_SIGNATURE 128 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-NON-REPUDIATION:CAPS"></a><h3>GNUTLS_KEY_NON_REPUDIATION</h3> +<pre class="programlisting">#define GNUTLS_KEY_NON_REPUDIATION 64 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-KEY-ENCIPHERMENT:CAPS"></a><h3>GNUTLS_KEY_KEY_ENCIPHERMENT</h3> +<pre class="programlisting">#define GNUTLS_KEY_KEY_ENCIPHERMENT 32 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-DATA-ENCIPHERMENT:CAPS"></a><h3>GNUTLS_KEY_DATA_ENCIPHERMENT</h3> +<pre class="programlisting">#define GNUTLS_KEY_DATA_ENCIPHERMENT 16 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-KEY-AGREEMENT:CAPS"></a><h3>GNUTLS_KEY_KEY_AGREEMENT</h3> +<pre class="programlisting">#define GNUTLS_KEY_KEY_AGREEMENT 8 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-KEY-CERT-SIGN:CAPS"></a><h3>GNUTLS_KEY_KEY_CERT_SIGN</h3> +<pre class="programlisting">#define GNUTLS_KEY_KEY_CERT_SIGN 4 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-CRL-SIGN:CAPS"></a><h3>GNUTLS_KEY_CRL_SIGN</h3> +<pre class="programlisting">#define GNUTLS_KEY_CRL_SIGN 2 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-ENCIPHER-ONLY:CAPS"></a><h3>GNUTLS_KEY_ENCIPHER_ONLY</h3> +<pre class="programlisting">#define GNUTLS_KEY_ENCIPHER_ONLY 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-KEY-DECIPHER-ONLY:CAPS"></a><h3>GNUTLS_KEY_DECIPHER_ONLY</h3> +<pre class="programlisting">#define GNUTLS_KEY_DECIPHER_ONLY 32768 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-t"></a><h3>gnutls_tdb_t</h3> +<pre class="programlisting">typedef struct gnutls_tdb_int *gnutls_tdb_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-SCOMMIT-FLAG-ALLOW-BROKEN:CAPS"></a><h3>GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN</h3> +<pre class="programlisting">#define GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pin-flag-t"></a><h3>enum gnutls_pin_flag_t</h3> +<p>Enumeration of different flags that are input to the PIN function.</p> +<div class="refsect3"> +<a name="gnutls-pin-flag-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PIN-USER:CAPS"></a>GNUTLS_PIN_USER</p></td> +<td class="enum_member_description"> +<p>The PIN for the user.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PIN-SO:CAPS"></a>GNUTLS_PIN_SO</p></td> +<td class="enum_member_description"> +<p>The PIN for the security officer (admin).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PIN-FINAL-TRY:CAPS"></a>GNUTLS_PIN_FINAL_TRY</p></td> +<td class="enum_member_description"> +<p>This is the final try before blocking.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PIN-COUNT-LOW:CAPS"></a>GNUTLS_PIN_COUNT_LOW</p></td> +<td class="enum_member_description"> +<p>Few tries remain before token blocks.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PIN-CONTEXT-SPECIFIC:CAPS"></a>GNUTLS_PIN_CONTEXT_SPECIFIC</p></td> +<td class="enum_member_description"> +<p>The PIN is for a specific action and key like signing.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-PIN-WRONG:CAPS"></a>GNUTLS_PIN_WRONG</p></td> +<td class="enum_member_description"> +<p>Last given PIN was not correct.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PKCS11-PIN-USER:CAPS"></a><h3>GNUTLS_PKCS11_PIN_USER</h3> +<pre class="programlisting">#define GNUTLS_PKCS11_PIN_USER GNUTLS_PIN_USER +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PKCS11-PIN-SO:CAPS"></a><h3>GNUTLS_PKCS11_PIN_SO</h3> +<pre class="programlisting">#define GNUTLS_PKCS11_PIN_SO GNUTLS_PIN_SO +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PKCS11-PIN-FINAL-TRY:CAPS"></a><h3>GNUTLS_PKCS11_PIN_FINAL_TRY</h3> +<pre class="programlisting">#define GNUTLS_PKCS11_PIN_FINAL_TRY GNUTLS_PIN_FINAL_TRY +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PKCS11-PIN-COUNT-LOW:CAPS"></a><h3>GNUTLS_PKCS11_PIN_COUNT_LOW</h3> +<pre class="programlisting">#define GNUTLS_PKCS11_PIN_COUNT_LOW GNUTLS_PIN_COUNT_LOW +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PKCS11-PIN-CONTEXT-SPECIFIC:CAPS"></a><h3>GNUTLS_PKCS11_PIN_CONTEXT_SPECIFIC</h3> +<pre class="programlisting">#define GNUTLS_PKCS11_PIN_CONTEXT_SPECIFIC GNUTLS_PIN_CONTEXT_SPECIFIC +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-PKCS11-PIN-WRONG:CAPS"></a><h3>GNUTLS_PKCS11_PIN_WRONG</h3> +<pre class="programlisting">#define GNUTLS_PKCS11_PIN_WRONG GNUTLS_PIN_WRONG +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-buffer-t"></a><h3>gnutls_buffer_t</h3> +<pre class="programlisting">typedef struct gnutls_buffer_st *gnutls_buffer_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-UTF8-IGNORE-ERRS:CAPS"></a><h3>GNUTLS_UTF8_IGNORE_ERRS</h3> +<pre class="programlisting">#define GNUTLS_UTF8_IGNORE_ERRS 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-priv-data-t"></a><h3>gnutls_ext_priv_data_t</h3> +<pre class="programlisting">typedef void *gnutls_ext_priv_data_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-EXT-RAW-FLAG-TLS-CLIENT-HELLO:CAPS"></a><h3>GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO</h3> +<pre class="programlisting">#define GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-EXT-RAW-FLAG-DTLS-CLIENT-HELLO:CAPS"></a><h3>GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO</h3> +<pre class="programlisting">#define GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO (1<<1) +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-parse-type-t"></a><h3>enum gnutls_ext_parse_type_t</h3> +<p>Enumeration of different TLS extension parsing phases. The <em class="parameter"><code>gnutls_ext_parse_type_t</code></em> + +indicates the time/phase an extension is parsed during Client or Server hello parsing.</p> +<div class="refsect3"> +<a name="gnutls-ext-parse-type-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-ANY:CAPS"></a>GNUTLS_EXT_ANY</p></td> +<td class="enum_member_description"> +<p>Any extension type (should not be used as it is used only internally).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-APPLICATION:CAPS"></a>GNUTLS_EXT_APPLICATION</p></td> +<td class="enum_member_description"> +<p>Parsed after <em class="parameter"><code>GNUTLS_EXT_MANDATORY</code></em> +</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-TLS:CAPS"></a>GNUTLS_EXT_TLS</p></td> +<td class="enum_member_description"> +<p>TLS-internal extensions, parsed after <em class="parameter"><code>GNUTLS_EXT_APPLICATION</code></em> +.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-MANDATORY:CAPS"></a>GNUTLS_EXT_MANDATORY</p></td> +<td class="enum_member_description"> +<p>Parsed after <em class="parameter"><code>GNUTLS_EXT_VERSION_NEG</code></em> + and even when resuming.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-NONE:CAPS"></a>GNUTLS_EXT_NONE</p></td> +<td class="enum_member_description"> +<p>Never to be parsed</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-VERSION-NEG:CAPS"></a>GNUTLS_EXT_VERSION_NEG</p></td> +<td class="enum_member_description"> +<p>Extensions to be parsed first for TLS version negotiation.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-ext-flags-t"></a><h3>enum gnutls_ext_flags_t</h3> +<p>Enumeration of different TLS extension registration flags.</p> +<div class="refsect3"> +<a name="gnutls-ext-flags-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-OVERRIDE-INTERNAL:CAPS"></a>GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL</p></td> +<td class="enum_member_description"> +<p>If specified the extension registered will override the internal; this does not work with extensions existing prior to 3.6.0.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-CLIENT-HELLO:CAPS"></a>GNUTLS_EXT_FLAG_CLIENT_HELLO</p></td> +<td class="enum_member_description"> +<p>This extension can be present in a client hello</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-TLS12-SERVER-HELLO:CAPS"></a>GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO</p></td> +<td class="enum_member_description"> +<p>This extension can be present in a TLS1.2 or earlier server hello</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-TLS13-SERVER-HELLO:CAPS"></a>GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO</p></td> +<td class="enum_member_description"> +<p>This extension can be present in a TLS1.3 server hello</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-EE:CAPS"></a>GNUTLS_EXT_FLAG_EE</p></td> +<td class="enum_member_description"> +<p>This extension can be present in encrypted extensions message</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-HRR:CAPS"></a>GNUTLS_EXT_FLAG_HRR</p></td> +<td class="enum_member_description"> +<p>This extension can be present in hello retry request message</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-IGNORE-CLIENT-REQUEST:CAPS"></a>GNUTLS_EXT_FLAG_IGNORE_CLIENT_REQUEST</p></td> +<td class="enum_member_description"> +<p>When flag is present, this extension will be send even if the client didn't advertise it. An extension of this type is the Cookie TLS1.3 extension.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-TLS:CAPS"></a>GNUTLS_EXT_FLAG_TLS</p></td> +<td class="enum_member_description"> +<p>This extension can be present under TLS; otherwise ignored.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-EXT-FLAG-DTLS:CAPS"></a>GNUTLS_EXT_FLAG_DTLS</p></td> +<td class="enum_member_description"> +<p>This extension can be present under DTLS; otherwise ignored.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-anti-replay-t"></a><h3>gnutls_anti_replay_t</h3> +<pre class="programlisting">typedef struct gnutls_anti_replay_st *gnutls_anti_replay_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-record-encryption-level-t"></a><h3>enum gnutls_record_encryption_level_t</h3> +<p>Enumeration of different levels of record encryption currently in place. +This is used by <a class="link" href="gnutls-gnutls.html#gnutls-handshake-set-read-function" title="gnutls_handshake_set_read_function ()"><code class="function">gnutls_handshake_set_read_function()</code></a> and +<a class="link" href="gnutls-gnutls.html#gnutls-handshake-write" title="gnutls_handshake_write ()"><code class="function">gnutls_handshake_write()</code></a>.</p> +<div class="refsect3"> +<a name="gnutls-record-encryption-level-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENCRYPTION-LEVEL-INITIAL:CAPS"></a>GNUTLS_ENCRYPTION_LEVEL_INITIAL</p></td> +<td class="enum_member_description"> +<p>initial level that doesn't involve any +encryption</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENCRYPTION-LEVEL-EARLY:CAPS"></a>GNUTLS_ENCRYPTION_LEVEL_EARLY</p></td> +<td class="enum_member_description"> +<p>early traffic secret is installed</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENCRYPTION-LEVEL-HANDSHAKE:CAPS"></a>GNUTLS_ENCRYPTION_LEVEL_HANDSHAKE</p></td> +<td class="enum_member_description"> +<p>handshake traffic secret is installed</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-ENCRYPTION-LEVEL-APPLICATION:CAPS"></a>GNUTLS_ENCRYPTION_LEVEL_APPLICATION</p></td> +<td class="enum_member_description"> +<p>application traffic secret is installed</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.0</p> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips-mode-t"></a><h3>enum gnutls_fips_mode_t</h3> +<p>Enumeration of different operational modes under FIPS140-2.</p> +<div class="refsect3"> +<a name="gnutls-fips-mode-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-DISABLED:CAPS"></a>GNUTLS_FIPS140_DISABLED</p></td> +<td class="enum_member_description"> +<p>The FIPS140-2 mode is disabled.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-STRICT:CAPS"></a>GNUTLS_FIPS140_STRICT</p></td> +<td class="enum_member_description"> +<p>The default mode; all forbidden operations will cause an +operation failure via error code.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-SELFTESTS:CAPS"></a>GNUTLS_FIPS140_SELFTESTS</p></td> +<td class="enum_member_description"> +<p>A transient state during library initialization. That state + cannot be set or seen by applications.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-LAX:CAPS"></a>GNUTLS_FIPS140_LAX</p></td> +<td class="enum_member_description"> +<p>The library still uses the FIPS140-2 relevant algorithms but all +forbidden by FIPS140-2 operations are allowed; this is useful when the +application is aware of the followed security policy, and needs +to utilize disallowed operations for other reasons (e.g., compatibility).</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-LOG:CAPS"></a>GNUTLS_FIPS140_LOG</p></td> +<td class="enum_member_description"> +<p>Similarly to <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-LAX:CAPS"><code class="literal">GNUTLS_FIPS140_LAX</code></a>, it allows forbidden operations; any use of them results +to a message to the audit callback functions.</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-FIPS140-SET-MODE-THREAD:CAPS"></a><h3>GNUTLS_FIPS140_SET_MODE_THREAD</h3> +<pre class="programlisting">#define GNUTLS_FIPS140_SET_MODE_THREAD 1 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-context-t"></a><h3>gnutls_fips140_context_t</h3> +<pre class="programlisting">typedef struct gnutls_fips140_context_st *gnutls_fips140_context_t; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-fips140-operation-state-t"></a><h3>enum gnutls_fips140_operation_state_t</h3> +<p>The FIPS operation state set by the preceding operation.</p> +<p>There are state transition rules among the enum values:</p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p>When the context is attached to a thread, it will be set to reset +to the <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-INITIAL:CAPS"><code class="literal">GNUTLS_FIPS140_OP_INITIAL</code></a> state</p></li> +<li class="listitem"><p>From the <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-INITIAL:CAPS"><code class="literal">GNUTLS_FIPS140_OP_INITIAL</code></a> state, the context can +transition to either <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-APPROVED:CAPS"><code class="literal">GNUTLS_FIPS140_OP_APPROVED</code></a>, +<a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-NOT-APPROVED:CAPS"><code class="literal">GNUTLS_FIPS140_OP_NOT_APPROVED</code></a>, or <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-ERROR:CAPS"><code class="literal">GNUTLS_FIPS140_OP_ERROR</code></a></p></li> +<li class="listitem"><p>From the <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-APPROVED:CAPS"><code class="literal">GNUTLS_FIPS140_OP_APPROVED</code></a> state, the context can +transition to <a class="link" href="gnutls-gnutls.html#GNUTLS-FIPS140-OP-NOT-APPROVED:CAPS"><code class="literal">GNUTLS_FIPS140_OP_NOT_APPROVED</code></a></p></li> +<li class="listitem"><p>All other transitions are prohibited.</p></li> +</ul></div> +<div class="refsect3"> +<a name="gnutls-fips140-operation-state-t.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-OP-INITIAL:CAPS"></a>GNUTLS_FIPS140_OP_INITIAL</p></td> +<td class="enum_member_description"> +<p>no previous operation has done</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-OP-APPROVED:CAPS"></a>GNUTLS_FIPS140_OP_APPROVED</p></td> +<td class="enum_member_description"> +<p>the previous operation was FIPS approved</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-OP-NOT-APPROVED:CAPS"></a>GNUTLS_FIPS140_OP_NOT_APPROVED</p></td> +<td class="enum_member_description"> +<p>the previous operation was not FIPS approved</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="GNUTLS-FIPS140-OP-ERROR:CAPS"></a>GNUTLS_FIPS140_OP_ERROR</p></td> +<td class="enum_member_description"> +<p>the previous operation caused an error regardless of FIPS</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p class="since">Since: 3.7.3</p> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SUCCESS:CAPS"></a><h3>GNUTLS_E_SUCCESS</h3> +<pre class="programlisting">#define GNUTLS_E_SUCCESS 0 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-COMPRESSION-ALGORITHM:CAPS"></a><h3>GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM -3 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-CIPHER-TYPE:CAPS"></a><h3>GNUTLS_E_UNKNOWN_CIPHER_TYPE</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_CIPHER_TYPE -6 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-LARGE-PACKET:CAPS"></a><h3>GNUTLS_E_LARGE_PACKET</h3> +<pre class="programlisting">#define GNUTLS_E_LARGE_PACKET -7 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNSUPPORTED-VERSION-PACKET:CAPS"></a><h3>GNUTLS_E_UNSUPPORTED_VERSION_PACKET</h3> +<pre class="programlisting">#define GNUTLS_E_UNSUPPORTED_VERSION_PACKET -8 /* GNUTLS_A_PROTOCOL_VERSION */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TLS-PACKET-DECODING-ERROR:CAPS"></a><h3>GNUTLS_E_TLS_PACKET_DECODING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_TLS_PACKET_DECODING_ERROR GNUTLS_E_UNEXPECTED_PACKET_LENGTH +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNEXPECTED-PACKET-LENGTH:CAPS"></a><h3>GNUTLS_E_UNEXPECTED_PACKET_LENGTH</h3> +<pre class="programlisting">#define GNUTLS_E_UNEXPECTED_PACKET_LENGTH -9 /* GNUTLS_A_DECODE_ERROR */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INVALID-SESSION:CAPS"></a><h3>GNUTLS_E_INVALID_SESSION</h3> +<pre class="programlisting">#define GNUTLS_E_INVALID_SESSION -10 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-FATAL-ALERT-RECEIVED:CAPS"></a><h3>GNUTLS_E_FATAL_ALERT_RECEIVED</h3> +<pre class="programlisting">#define GNUTLS_E_FATAL_ALERT_RECEIVED -12 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNEXPECTED-PACKET:CAPS"></a><h3>GNUTLS_E_UNEXPECTED_PACKET</h3> +<pre class="programlisting">#define GNUTLS_E_UNEXPECTED_PACKET -15 /* GNUTLS_A_UNEXPECTED_MESSAGE */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-WARNING-ALERT-RECEIVED:CAPS"></a><h3>GNUTLS_E_WARNING_ALERT_RECEIVED</h3> +<pre class="programlisting">#define GNUTLS_E_WARNING_ALERT_RECEIVED -16 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ERROR-IN-FINISHED-PACKET:CAPS"></a><h3>GNUTLS_E_ERROR_IN_FINISHED_PACKET</h3> +<pre class="programlisting">#define GNUTLS_E_ERROR_IN_FINISHED_PACKET -18 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNEXPECTED-HANDSHAKE-PACKET:CAPS"></a><h3>GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET</h3> +<pre class="programlisting">#define GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET -19 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-CIPHER-SUITE:CAPS"></a><h3>GNUTLS_E_UNKNOWN_CIPHER_SUITE</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_CIPHER_SUITE -21 /* GNUTLS_A_HANDSHAKE_FAILURE */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNWANTED-ALGORITHM:CAPS"></a><h3>GNUTLS_E_UNWANTED_ALGORITHM</h3> +<pre class="programlisting">#define GNUTLS_E_UNWANTED_ALGORITHM -22 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-MPI-SCAN-FAILED:CAPS"></a><h3>GNUTLS_E_MPI_SCAN_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_MPI_SCAN_FAILED -23 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-DECRYPTION-FAILED:CAPS"></a><h3>GNUTLS_E_DECRYPTION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_DECRYPTION_FAILED -24 /* GNUTLS_A_DECRYPTION_FAILED, GNUTLS_A_BAD_RECORD_MAC */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-MEMORY-ERROR:CAPS"></a><h3>GNUTLS_E_MEMORY_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_MEMORY_ERROR -25 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-DECOMPRESSION-FAILED:CAPS"></a><h3>GNUTLS_E_DECOMPRESSION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_DECOMPRESSION_FAILED -26 /* GNUTLS_A_DECOMPRESSION_FAILURE */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-COMPRESSION-FAILED:CAPS"></a><h3>GNUTLS_E_COMPRESSION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_COMPRESSION_FAILED -27 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-AGAIN:CAPS"></a><h3>GNUTLS_E_AGAIN</h3> +<pre class="programlisting">#define GNUTLS_E_AGAIN -28 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-EXPIRED:CAPS"></a><h3>GNUTLS_E_EXPIRED</h3> +<pre class="programlisting">#define GNUTLS_E_EXPIRED -29 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-DB-ERROR:CAPS"></a><h3>GNUTLS_E_DB_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_DB_ERROR -30 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SRP-PWD-ERROR:CAPS"></a><h3>GNUTLS_E_SRP_PWD_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_SRP_PWD_ERROR GNUTLS_E_KEYFILE_ERROR +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-KEYFILE-ERROR:CAPS"></a><h3>GNUTLS_E_KEYFILE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_KEYFILE_ERROR -31 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INSUFFICIENT-CREDENTIALS:CAPS"></a><h3>GNUTLS_E_INSUFFICIENT_CREDENTIALS</h3> +<pre class="programlisting">#define GNUTLS_E_INSUFFICIENT_CREDENTIALS -32 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INSUFICIENT-CREDENTIALS:CAPS"></a><h3>GNUTLS_E_INSUFICIENT_CREDENTIALS</h3> +<pre class="programlisting">#define GNUTLS_E_INSUFICIENT_CREDENTIALS GNUTLS_E_INSUFFICIENT_CREDENTIALS /* for backwards compatibility only */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INSUFFICIENT-CRED:CAPS"></a><h3>GNUTLS_E_INSUFFICIENT_CRED</h3> +<pre class="programlisting">#define GNUTLS_E_INSUFFICIENT_CRED GNUTLS_E_INSUFFICIENT_CREDENTIALS +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INSUFICIENT-CRED:CAPS"></a><h3>GNUTLS_E_INSUFICIENT_CRED</h3> +<pre class="programlisting">#define GNUTLS_E_INSUFICIENT_CRED GNUTLS_E_INSUFFICIENT_CREDENTIALS /* for backwards compatibility only */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-HASH-FAILED:CAPS"></a><h3>GNUTLS_E_HASH_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_HASH_FAILED -33 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-BASE64-DECODING-ERROR:CAPS"></a><h3>GNUTLS_E_BASE64_DECODING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_BASE64_DECODING_ERROR -34 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-MPI-PRINT-FAILED:CAPS"></a><h3>GNUTLS_E_MPI_PRINT_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_MPI_PRINT_FAILED -35 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-REHANDSHAKE:CAPS"></a><h3>GNUTLS_E_REHANDSHAKE</h3> +<pre class="programlisting">#define GNUTLS_E_REHANDSHAKE -37 /* GNUTLS_A_NO_RENEGOTIATION */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-GOT-APPLICATION-DATA:CAPS"></a><h3>GNUTLS_E_GOT_APPLICATION_DATA</h3> +<pre class="programlisting">#define GNUTLS_E_GOT_APPLICATION_DATA -38 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RECORD-LIMIT-REACHED:CAPS"></a><h3>GNUTLS_E_RECORD_LIMIT_REACHED</h3> +<pre class="programlisting">#define GNUTLS_E_RECORD_LIMIT_REACHED -39 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ENCRYPTION-FAILED:CAPS"></a><h3>GNUTLS_E_ENCRYPTION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_ENCRYPTION_FAILED -40 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-ENCRYPTION-FAILED:CAPS"></a><h3>GNUTLS_E_PK_ENCRYPTION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_PK_ENCRYPTION_FAILED -44 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-DECRYPTION-FAILED:CAPS"></a><h3>GNUTLS_E_PK_DECRYPTION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_PK_DECRYPTION_FAILED -45 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-SIGN-FAILED:CAPS"></a><h3>GNUTLS_E_PK_SIGN_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_PK_SIGN_FAILED -46 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-UNSUPPORTED-CRITICAL-EXTENSION:CAPS"></a><h3>GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION</h3> +<pre class="programlisting">#define GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION -47 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-KEY-USAGE-VIOLATION:CAPS"></a><h3>GNUTLS_E_KEY_USAGE_VIOLATION</h3> +<pre class="programlisting">#define GNUTLS_E_KEY_USAGE_VIOLATION -48 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-CERTIFICATE-FOUND:CAPS"></a><h3>GNUTLS_E_NO_CERTIFICATE_FOUND</h3> +<pre class="programlisting">#define GNUTLS_E_NO_CERTIFICATE_FOUND -49 /* GNUTLS_A_BAD_CERTIFICATE */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INVALID-REQUEST:CAPS"></a><h3>GNUTLS_E_INVALID_REQUEST</h3> +<pre class="programlisting">#define GNUTLS_E_INVALID_REQUEST -50 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS"></a><h3>GNUTLS_E_SHORT_MEMORY_BUFFER</h3> +<pre class="programlisting">#define GNUTLS_E_SHORT_MEMORY_BUFFER -51 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INTERRUPTED:CAPS"></a><h3>GNUTLS_E_INTERRUPTED</h3> +<pre class="programlisting">#define GNUTLS_E_INTERRUPTED -52 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PUSH-ERROR:CAPS"></a><h3>GNUTLS_E_PUSH_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PUSH_ERROR -53 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PULL-ERROR:CAPS"></a><h3>GNUTLS_E_PULL_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PULL_ERROR -54 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RECEIVED-ILLEGAL-PARAMETER:CAPS"></a><h3>GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER</h3> +<pre class="programlisting">#define GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER -55 /* GNUTLS_A_ILLEGAL_PARAMETER */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS"></a><h3>GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</h3> +<pre class="programlisting">#define GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE -56 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS1-WRONG-PAD:CAPS"></a><h3>GNUTLS_E_PKCS1_WRONG_PAD</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS1_WRONG_PAD -57 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RECEIVED-ILLEGAL-EXTENSION:CAPS"></a><h3>GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION</h3> +<pre class="programlisting">#define GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION -58 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INTERNAL-ERROR:CAPS"></a><h3>GNUTLS_E_INTERNAL_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_INTERNAL_ERROR -59 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-DH-PRIME-UNACCEPTABLE:CAPS"></a><h3>GNUTLS_E_DH_PRIME_UNACCEPTABLE</h3> +<pre class="programlisting">#define GNUTLS_E_DH_PRIME_UNACCEPTABLE -63 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-FILE-ERROR:CAPS"></a><h3>GNUTLS_E_FILE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_FILE_ERROR -64 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TOO-MANY-EMPTY-PACKETS:CAPS"></a><h3>GNUTLS_E_TOO_MANY_EMPTY_PACKETS</h3> +<pre class="programlisting">#define GNUTLS_E_TOO_MANY_EMPTY_PACKETS -78 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-PK-ALGORITHM:CAPS"></a><h3>GNUTLS_E_UNKNOWN_PK_ALGORITHM</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_PK_ALGORITHM -80 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TOO-MANY-HANDSHAKE-PACKETS:CAPS"></a><h3>GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS</h3> +<pre class="programlisting">#define GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS -81 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RECEIVED-DISALLOWED-NAME:CAPS"></a><h3>GNUTLS_E_RECEIVED_DISALLOWED_NAME</h3> +<pre class="programlisting">#define GNUTLS_E_RECEIVED_DISALLOWED_NAME -82 /* GNUTLS_A_ILLEGAL_PARAMETER */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CERTIFICATE-REQUIRED:CAPS"></a><h3>GNUTLS_E_CERTIFICATE_REQUIRED</h3> +<pre class="programlisting">#define GNUTLS_E_CERTIFICATE_REQUIRED -112 /* GNUTLS_A_CERTIFICATE_REQUIRED */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-TEMPORARY-RSA-PARAMS:CAPS"></a><h3>GNUTLS_E_NO_TEMPORARY_RSA_PARAMS</h3> +<pre class="programlisting">#define GNUTLS_E_NO_TEMPORARY_RSA_PARAMS -84 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-COMPRESSION-ALGORITHMS:CAPS"></a><h3>GNUTLS_E_NO_COMPRESSION_ALGORITHMS</h3> +<pre class="programlisting">#define GNUTLS_E_NO_COMPRESSION_ALGORITHMS -86 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-CIPHER-SUITES:CAPS"></a><h3>GNUTLS_E_NO_CIPHER_SUITES</h3> +<pre class="programlisting">#define GNUTLS_E_NO_CIPHER_SUITES -87 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OPENPGP-GETKEY-FAILED:CAPS"></a><h3>GNUTLS_E_OPENPGP_GETKEY_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_OPENPGP_GETKEY_FAILED -88 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-SIG-VERIFY-FAILED:CAPS"></a><h3>GNUTLS_E_PK_SIG_VERIFY_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_PK_SIG_VERIFY_FAILED -89 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ILLEGAL-SRP-USERNAME:CAPS"></a><h3>GNUTLS_E_ILLEGAL_SRP_USERNAME</h3> +<pre class="programlisting">#define GNUTLS_E_ILLEGAL_SRP_USERNAME -90 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SRP-PWD-PARSING-ERROR:CAPS"></a><h3>GNUTLS_E_SRP_PWD_PARSING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_SRP_PWD_PARSING_ERROR GNUTLS_E_KEYFILE_PARSING_ERROR +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-KEYFILE-PARSING-ERROR:CAPS"></a><h3>GNUTLS_E_KEYFILE_PARSING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_KEYFILE_PARSING_ERROR -91 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-TEMPORARY-DH-PARAMS:CAPS"></a><h3>GNUTLS_E_NO_TEMPORARY_DH_PARAMS</h3> +<pre class="programlisting">#define GNUTLS_E_NO_TEMPORARY_DH_PARAMS -93 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-ELEMENT-NOT-FOUND:CAPS"></a><h3>GNUTLS_E_ASN1_ELEMENT_NOT_FOUND</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_ELEMENT_NOT_FOUND -67 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-IDENTIFIER-NOT-FOUND:CAPS"></a><h3>GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND -68 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-DER-ERROR:CAPS"></a><h3>GNUTLS_E_ASN1_DER_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_DER_ERROR -69 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-VALUE-NOT-FOUND:CAPS"></a><h3>GNUTLS_E_ASN1_VALUE_NOT_FOUND</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_VALUE_NOT_FOUND -70 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-GENERIC-ERROR:CAPS"></a><h3>GNUTLS_E_ASN1_GENERIC_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_GENERIC_ERROR -71 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-VALUE-NOT-VALID:CAPS"></a><h3>GNUTLS_E_ASN1_VALUE_NOT_VALID</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_VALUE_NOT_VALID -72 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-TAG-ERROR:CAPS"></a><h3>GNUTLS_E_ASN1_TAG_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_TAG_ERROR -73 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-TAG-IMPLICIT:CAPS"></a><h3>GNUTLS_E_ASN1_TAG_IMPLICIT</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_TAG_IMPLICIT -74 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-TYPE-ANY-ERROR:CAPS"></a><h3>GNUTLS_E_ASN1_TYPE_ANY_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_TYPE_ANY_ERROR -75 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-SYNTAX-ERROR:CAPS"></a><h3>GNUTLS_E_ASN1_SYNTAX_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_SYNTAX_ERROR -76 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-DER-OVERFLOW:CAPS"></a><h3>GNUTLS_E_ASN1_DER_OVERFLOW</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_DER_OVERFLOW -77 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OPENPGP-UID-REVOKED:CAPS"></a><h3>GNUTLS_E_OPENPGP_UID_REVOKED</h3> +<pre class="programlisting">#define GNUTLS_E_OPENPGP_UID_REVOKED -79 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CERTIFICATE-ERROR:CAPS"></a><h3>GNUTLS_E_CERTIFICATE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CERTIFICATE_ERROR -43 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-CERTIFICATE-ERROR:CAPS"></a><h3>GNUTLS_E_X509_CERTIFICATE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_X509_CERTIFICATE_ERROR GNUTLS_E_CERTIFICATE_ERROR +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CERTIFICATE-KEY-MISMATCH:CAPS"></a><h3>GNUTLS_E_CERTIFICATE_KEY_MISMATCH</h3> +<pre class="programlisting">#define GNUTLS_E_CERTIFICATE_KEY_MISMATCH -60 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNSUPPORTED-CERTIFICATE-TYPE:CAPS"></a><h3>GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE</h3> +<pre class="programlisting">#define GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE -61 /* GNUTLS_A_UNSUPPORTED_CERTIFICATE */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-UNKNOWN-SAN:CAPS"></a><h3>GNUTLS_E_X509_UNKNOWN_SAN</h3> +<pre class="programlisting">#define GNUTLS_E_X509_UNKNOWN_SAN -62 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OPENPGP-FINGERPRINT-UNSUPPORTED:CAPS"></a><h3>GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED</h3> +<pre class="programlisting">#define GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED -94 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-UNSUPPORTED-ATTRIBUTE:CAPS"></a><h3>GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE</h3> +<pre class="programlisting">#define GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE -95 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-HASH-ALGORITHM:CAPS"></a><h3>GNUTLS_E_UNKNOWN_HASH_ALGORITHM</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_HASH_ALGORITHM -96 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-PKCS-CONTENT-TYPE:CAPS"></a><h3>GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE -97 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-PKCS-BAG-TYPE:CAPS"></a><h3>GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE -98 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INVALID-PASSWORD:CAPS"></a><h3>GNUTLS_E_INVALID_PASSWORD</h3> +<pre class="programlisting">#define GNUTLS_E_INVALID_PASSWORD -99 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-MAC-VERIFY-FAILED:CAPS"></a><h3>GNUTLS_E_MAC_VERIFY_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_MAC_VERIFY_FAILED -100 /* for PKCS #12 MAC */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CONSTRAINT-ERROR:CAPS"></a><h3>GNUTLS_E_CONSTRAINT_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CONSTRAINT_ERROR -101 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-WARNING-IA-IPHF-RECEIVED:CAPS"></a><h3>GNUTLS_E_WARNING_IA_IPHF_RECEIVED</h3> +<pre class="programlisting">#define GNUTLS_E_WARNING_IA_IPHF_RECEIVED -102 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-WARNING-IA-FPHF-RECEIVED:CAPS"></a><h3>GNUTLS_E_WARNING_IA_FPHF_RECEIVED</h3> +<pre class="programlisting">#define GNUTLS_E_WARNING_IA_FPHF_RECEIVED -103 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-IA-VERIFY-FAILED:CAPS"></a><h3>GNUTLS_E_IA_VERIFY_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_IA_VERIFY_FAILED -104 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-ALGORITHM:CAPS"></a><h3>GNUTLS_E_UNKNOWN_ALGORITHM</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_ALGORITHM -105 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNSUPPORTED-SIGNATURE-ALGORITHM:CAPS"></a><h3>GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM</h3> +<pre class="programlisting">#define GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM -106 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SAFE-RENEGOTIATION-FAILED:CAPS"></a><h3>GNUTLS_E_SAFE_RENEGOTIATION_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_SAFE_RENEGOTIATION_FAILED -107 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNSAFE-RENEGOTIATION-DENIED:CAPS"></a><h3>GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED</h3> +<pre class="programlisting">#define GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED -108 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNKNOWN-SRP-USERNAME:CAPS"></a><h3>GNUTLS_E_UNKNOWN_SRP_USERNAME</h3> +<pre class="programlisting">#define GNUTLS_E_UNKNOWN_SRP_USERNAME -109 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PREMATURE-TERMINATION:CAPS"></a><h3>GNUTLS_E_PREMATURE_TERMINATION</h3> +<pre class="programlisting">#define GNUTLS_E_PREMATURE_TERMINATION -110 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-MALFORMED-CIDR:CAPS"></a><h3>GNUTLS_E_MALFORMED_CIDR</h3> +<pre class="programlisting">#define GNUTLS_E_MALFORMED_CIDR -111 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-BASE64-ENCODING-ERROR:CAPS"></a><h3>GNUTLS_E_BASE64_ENCODING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_BASE64_ENCODING_ERROR -201 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INCOMPATIBLE-GCRYPT-LIBRARY:CAPS"></a><h3>GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY</h3> +<pre class="programlisting">#define GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY -202 /* obsolete */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INCOMPATIBLE-CRYPTO-LIBRARY:CAPS"></a><h3>GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY</h3> +<pre class="programlisting">#define GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY -202 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INCOMPATIBLE-LIBTASN1-LIBRARY:CAPS"></a><h3>GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY</h3> +<pre class="programlisting">#define GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY -203 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OPENPGP-KEYRING-ERROR:CAPS"></a><h3>GNUTLS_E_OPENPGP_KEYRING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_OPENPGP_KEYRING_ERROR -204 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-UNSUPPORTED-OID:CAPS"></a><h3>GNUTLS_E_X509_UNSUPPORTED_OID</h3> +<pre class="programlisting">#define GNUTLS_E_X509_UNSUPPORTED_OID -205 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RANDOM-FAILED:CAPS"></a><h3>GNUTLS_E_RANDOM_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_RANDOM_FAILED -206 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-BASE64-UNEXPECTED-HEADER-ERROR:CAPS"></a><h3>GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR -207 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OPENPGP-SUBKEY-ERROR:CAPS"></a><h3>GNUTLS_E_OPENPGP_SUBKEY_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_OPENPGP_SUBKEY_ERROR -208 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CRYPTO-ALREADY-REGISTERED:CAPS"></a><h3>GNUTLS_E_CRYPTO_ALREADY_REGISTERED</h3> +<pre class="programlisting">#define GNUTLS_E_CRYPTO_ALREADY_REGISTERED GNUTLS_E_ALREADY_REGISTERED +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ALREADY-REGISTERED:CAPS"></a><h3>GNUTLS_E_ALREADY_REGISTERED</h3> +<pre class="programlisting">#define GNUTLS_E_ALREADY_REGISTERED -209 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-HANDSHAKE-TOO-LARGE:CAPS"></a><h3>GNUTLS_E_HANDSHAKE_TOO_LARGE</h3> +<pre class="programlisting">#define GNUTLS_E_HANDSHAKE_TOO_LARGE -210 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CRYPTODEV-IOCTL-ERROR:CAPS"></a><h3>GNUTLS_E_CRYPTODEV_IOCTL_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CRYPTODEV_IOCTL_ERROR -211 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CRYPTODEV-DEVICE-ERROR:CAPS"></a><h3>GNUTLS_E_CRYPTODEV_DEVICE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CRYPTODEV_DEVICE_ERROR -212 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CHANNEL-BINDING-NOT-AVAILABLE:CAPS"></a><h3>GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE</h3> +<pre class="programlisting">#define GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE -213 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-BAD-COOKIE:CAPS"></a><h3>GNUTLS_E_BAD_COOKIE</h3> +<pre class="programlisting">#define GNUTLS_E_BAD_COOKIE -214 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OPENPGP-PREFERRED-KEY-ERROR:CAPS"></a><h3>GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR -215 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INCOMPAT-DSA-KEY-WITH-TLS-PROTOCOL:CAPS"></a><h3>GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL</h3> +<pre class="programlisting">#define GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL -216 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INSUFFICIENT-SECURITY:CAPS"></a><h3>GNUTLS_E_INSUFFICIENT_SECURITY</h3> +<pre class="programlisting">#define GNUTLS_E_INSUFFICIENT_SECURITY -217 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-HEARTBEAT-PONG-RECEIVED:CAPS"></a><h3>GNUTLS_E_HEARTBEAT_PONG_RECEIVED</h3> +<pre class="programlisting">#define GNUTLS_E_HEARTBEAT_PONG_RECEIVED -292 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-HEARTBEAT-PING-RECEIVED:CAPS"></a><h3>GNUTLS_E_HEARTBEAT_PING_RECEIVED</h3> +<pre class="programlisting">#define GNUTLS_E_HEARTBEAT_PING_RECEIVED -293 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNRECOGNIZED-NAME:CAPS"></a><h3>GNUTLS_E_UNRECOGNIZED_NAME</h3> +<pre class="programlisting">#define GNUTLS_E_UNRECOGNIZED_NAME -294 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_ERROR -300 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-LOAD-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_LOAD_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_LOAD_ERROR -301 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PARSING-ERROR:CAPS"></a><h3>GNUTLS_E_PARSING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PARSING_ERROR -302 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-PIN-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_PIN_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_PIN_ERROR -303 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-SLOT-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_SLOT_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_SLOT_ERROR -305 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-LOCKING-ERROR:CAPS"></a><h3>GNUTLS_E_LOCKING_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_LOCKING_ERROR -306 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-ATTRIBUTE-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_ATTRIBUTE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_ATTRIBUTE_ERROR -307 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-DEVICE-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_DEVICE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_DEVICE_ERROR -308 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-DATA-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_DATA_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_DATA_ERROR -309 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-UNSUPPORTED-FEATURE-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_UNSUPPORTED_FEATURE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_UNSUPPORTED_FEATURE_ERROR -310 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-KEY-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_KEY_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_KEY_ERROR -311 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-PIN-EXPIRED:CAPS"></a><h3>GNUTLS_E_PKCS11_PIN_EXPIRED</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_PIN_EXPIRED -312 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-PIN-LOCKED:CAPS"></a><h3>GNUTLS_E_PKCS11_PIN_LOCKED</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_PIN_LOCKED -313 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-SESSION-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_SESSION_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_SESSION_ERROR -314 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-SIGNATURE-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_SIGNATURE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_SIGNATURE_ERROR -315 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-TOKEN-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_TOKEN_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_TOKEN_ERROR -316 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-USER-ERROR:CAPS"></a><h3>GNUTLS_E_PKCS11_USER_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_USER_ERROR -317 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CRYPTO-INIT-FAILED:CAPS"></a><h3>GNUTLS_E_CRYPTO_INIT_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_CRYPTO_INIT_FAILED -318 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TIMEDOUT:CAPS"></a><h3>GNUTLS_E_TIMEDOUT</h3> +<pre class="programlisting">#define GNUTLS_E_TIMEDOUT -319 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-USER-ERROR:CAPS"></a><h3>GNUTLS_E_USER_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_USER_ERROR -320 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ECC-NO-SUPPORTED-CURVES:CAPS"></a><h3>GNUTLS_E_ECC_NO_SUPPORTED_CURVES</h3> +<pre class="programlisting">#define GNUTLS_E_ECC_NO_SUPPORTED_CURVES -321 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ECC-UNSUPPORTED-CURVE:CAPS"></a><h3>GNUTLS_E_ECC_UNSUPPORTED_CURVE</h3> +<pre class="programlisting">#define GNUTLS_E_ECC_UNSUPPORTED_CURVE -322 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PKCS11-REQUESTED-OBJECT-NOT-AVAILBLE:CAPS"></a><h3>GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE</h3> +<pre class="programlisting">#define GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE -323 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CERTIFICATE-LIST-UNSORTED:CAPS"></a><h3>GNUTLS_E_CERTIFICATE_LIST_UNSORTED</h3> +<pre class="programlisting">#define GNUTLS_E_CERTIFICATE_LIST_UNSORTED -324 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ILLEGAL-PARAMETER:CAPS"></a><h3>GNUTLS_E_ILLEGAL_PARAMETER</h3> +<pre class="programlisting">#define GNUTLS_E_ILLEGAL_PARAMETER -325 /* GNUTLS_A_ILLEGAL_PARAMETER */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-PRIORITIES-WERE-SET:CAPS"></a><h3>GNUTLS_E_NO_PRIORITIES_WERE_SET</h3> +<pre class="programlisting">#define GNUTLS_E_NO_PRIORITIES_WERE_SET -326 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-UNSUPPORTED-EXTENSION:CAPS"></a><h3>GNUTLS_E_X509_UNSUPPORTED_EXTENSION</h3> +<pre class="programlisting">#define GNUTLS_E_X509_UNSUPPORTED_EXTENSION -327 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SESSION-EOF:CAPS"></a><h3>GNUTLS_E_SESSION_EOF</h3> +<pre class="programlisting">#define GNUTLS_E_SESSION_EOF -328 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-ERROR:CAPS"></a><h3>GNUTLS_E_TPM_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_ERROR -329 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-KEY-PASSWORD-ERROR:CAPS"></a><h3>GNUTLS_E_TPM_KEY_PASSWORD_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_KEY_PASSWORD_ERROR -330 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-SRK-PASSWORD-ERROR:CAPS"></a><h3>GNUTLS_E_TPM_SRK_PASSWORD_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_SRK_PASSWORD_ERROR -331 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-SESSION-ERROR:CAPS"></a><h3>GNUTLS_E_TPM_SESSION_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_SESSION_ERROR -332 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-KEY-NOT-FOUND:CAPS"></a><h3>GNUTLS_E_TPM_KEY_NOT_FOUND</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_KEY_NOT_FOUND -333 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-UNINITIALIZED:CAPS"></a><h3>GNUTLS_E_TPM_UNINITIALIZED</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_UNINITIALIZED -334 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TPM-NO-LIB:CAPS"></a><h3>GNUTLS_E_TPM_NO_LIB</h3> +<pre class="programlisting">#define GNUTLS_E_TPM_NO_LIB -335 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-CERTIFICATE-STATUS:CAPS"></a><h3>GNUTLS_E_NO_CERTIFICATE_STATUS</h3> +<pre class="programlisting">#define GNUTLS_E_NO_CERTIFICATE_STATUS -340 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OCSP-RESPONSE-ERROR:CAPS"></a><h3>GNUTLS_E_OCSP_RESPONSE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_OCSP_RESPONSE_ERROR -341 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RANDOM-DEVICE-ERROR:CAPS"></a><h3>GNUTLS_E_RANDOM_DEVICE_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_RANDOM_DEVICE_ERROR -342 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-AUTH-ERROR:CAPS"></a><h3>GNUTLS_E_AUTH_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_AUTH_ERROR -343 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-APPLICATION-PROTOCOL:CAPS"></a><h3>GNUTLS_E_NO_APPLICATION_PROTOCOL</h3> +<pre class="programlisting">#define GNUTLS_E_NO_APPLICATION_PROTOCOL -344 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SOCKETS-INIT-ERROR:CAPS"></a><h3>GNUTLS_E_SOCKETS_INIT_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_SOCKETS_INIT_ERROR -345 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-KEY-IMPORT-FAILED:CAPS"></a><h3>GNUTLS_E_KEY_IMPORT_FAILED</h3> +<pre class="programlisting">#define GNUTLS_E_KEY_IMPORT_FAILED -346 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INAPPROPRIATE-FALLBACK:CAPS"></a><h3>GNUTLS_E_INAPPROPRIATE_FALLBACK</h3> +<pre class="programlisting">#define GNUTLS_E_INAPPROPRIATE_FALLBACK -347 /*GNUTLS_A_INAPPROPRIATE_FALLBACK*/ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CERTIFICATE-VERIFICATION-ERROR:CAPS"></a><h3>GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR -348 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PRIVKEY-VERIFICATION-ERROR:CAPS"></a><h3>GNUTLS_E_PRIVKEY_VERIFICATION_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PRIVKEY_VERIFICATION_ERROR -349 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNEXPECTED-EXTENSIONS-LENGTH:CAPS"></a><h3>GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH</h3> +<pre class="programlisting">#define GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH -350 /*GNUTLS_A_DECODE_ERROR*/ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-EMBEDDED-NULL-IN-STRING:CAPS"></a><h3>GNUTLS_E_ASN1_EMBEDDED_NULL_IN_STRING</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_EMBEDDED_NULL_IN_STRING -351 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SELF-TEST-ERROR:CAPS"></a><h3>GNUTLS_E_SELF_TEST_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_SELF_TEST_ERROR -400 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-SELF-TEST:CAPS"></a><h3>GNUTLS_E_NO_SELF_TEST</h3> +<pre class="programlisting">#define GNUTLS_E_NO_SELF_TEST -401 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-LIB-IN-ERROR-STATE:CAPS"></a><h3>GNUTLS_E_LIB_IN_ERROR_STATE</h3> +<pre class="programlisting">#define GNUTLS_E_LIB_IN_ERROR_STATE -402 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-GENERATION-ERROR:CAPS"></a><h3>GNUTLS_E_PK_GENERATION_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_PK_GENERATION_ERROR -403 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-IDNA-ERROR:CAPS"></a><h3>GNUTLS_E_IDNA_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_IDNA_ERROR -404 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NEED-FALLBACK:CAPS"></a><h3>GNUTLS_E_NEED_FALLBACK</h3> +<pre class="programlisting">#define GNUTLS_E_NEED_FALLBACK -405 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-SESSION-USER-ID-CHANGED:CAPS"></a><h3>GNUTLS_E_SESSION_USER_ID_CHANGED</h3> +<pre class="programlisting">#define GNUTLS_E_SESSION_USER_ID_CHANGED -406 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-HANDSHAKE-DURING-FALSE-START:CAPS"></a><h3>GNUTLS_E_HANDSHAKE_DURING_FALSE_START</h3> +<pre class="programlisting">#define GNUTLS_E_HANDSHAKE_DURING_FALSE_START -407 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNAVAILABLE-DURING-HANDSHAKE:CAPS"></a><h3>GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE</h3> +<pre class="programlisting">#define GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE -408 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-INVALID-PUBKEY:CAPS"></a><h3>GNUTLS_E_PK_INVALID_PUBKEY</h3> +<pre class="programlisting">#define GNUTLS_E_PK_INVALID_PUBKEY -409 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-INVALID-PRIVKEY:CAPS"></a><h3>GNUTLS_E_PK_INVALID_PRIVKEY</h3> +<pre class="programlisting">#define GNUTLS_E_PK_INVALID_PRIVKEY -410 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NOT-YET-ACTIVATED:CAPS"></a><h3>GNUTLS_E_NOT_YET_ACTIVATED</h3> +<pre class="programlisting">#define GNUTLS_E_NOT_YET_ACTIVATED -411 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INVALID-UTF8-STRING:CAPS"></a><h3>GNUTLS_E_INVALID_UTF8_STRING</h3> +<pre class="programlisting">#define GNUTLS_E_INVALID_UTF8_STRING -412 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-EMBEDDED-DATA:CAPS"></a><h3>GNUTLS_E_NO_EMBEDDED_DATA</h3> +<pre class="programlisting">#define GNUTLS_E_NO_EMBEDDED_DATA -413 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INVALID-UTF8-EMAIL:CAPS"></a><h3>GNUTLS_E_INVALID_UTF8_EMAIL</h3> +<pre class="programlisting">#define GNUTLS_E_INVALID_UTF8_EMAIL -414 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INVALID-PASSWORD-STRING:CAPS"></a><h3>GNUTLS_E_INVALID_PASSWORD_STRING</h3> +<pre class="programlisting">#define GNUTLS_E_INVALID_PASSWORD_STRING -415 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CERTIFICATE-TIME-ERROR:CAPS"></a><h3>GNUTLS_E_CERTIFICATE_TIME_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CERTIFICATE_TIME_ERROR -416 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-RECORD-OVERFLOW:CAPS"></a><h3>GNUTLS_E_RECORD_OVERFLOW</h3> +<pre class="programlisting">#define GNUTLS_E_RECORD_OVERFLOW -417 /* GNUTLS_A_RECORD_OVERFLOW */ +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-ASN1-TIME-ERROR:CAPS"></a><h3>GNUTLS_E_ASN1_TIME_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_ASN1_TIME_ERROR -418 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INCOMPATIBLE-SIG-WITH-KEY:CAPS"></a><h3>GNUTLS_E_INCOMPATIBLE_SIG_WITH_KEY</h3> +<pre class="programlisting">#define GNUTLS_E_INCOMPATIBLE_SIG_WITH_KEY -419 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-INVALID-PUBKEY-PARAMS:CAPS"></a><h3>GNUTLS_E_PK_INVALID_PUBKEY_PARAMS</h3> +<pre class="programlisting">#define GNUTLS_E_PK_INVALID_PUBKEY_PARAMS -420 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-PK-NO-VALIDATION-PARAMS:CAPS"></a><h3>GNUTLS_E_PK_NO_VALIDATION_PARAMS</h3> +<pre class="programlisting">#define GNUTLS_E_PK_NO_VALIDATION_PARAMS -421 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-OCSP-MISMATCH-WITH-CERTS:CAPS"></a><h3>GNUTLS_E_OCSP_MISMATCH_WITH_CERTS</h3> +<pre class="programlisting">#define GNUTLS_E_OCSP_MISMATCH_WITH_CERTS -422 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-NO-COMMON-KEY-SHARE:CAPS"></a><h3>GNUTLS_E_NO_COMMON_KEY_SHARE</h3> +<pre class="programlisting">#define GNUTLS_E_NO_COMMON_KEY_SHARE -423 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-REAUTH-REQUEST:CAPS"></a><h3>GNUTLS_E_REAUTH_REQUEST</h3> +<pre class="programlisting">#define GNUTLS_E_REAUTH_REQUEST -424 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-TOO-MANY-MATCHES:CAPS"></a><h3>GNUTLS_E_TOO_MANY_MATCHES</h3> +<pre class="programlisting">#define GNUTLS_E_TOO_MANY_MATCHES -425 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-CRL-VERIFICATION-ERROR:CAPS"></a><h3>GNUTLS_E_CRL_VERIFICATION_ERROR</h3> +<pre class="programlisting">#define GNUTLS_E_CRL_VERIFICATION_ERROR -426 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-MISSING-EXTENSION:CAPS"></a><h3>GNUTLS_E_MISSING_EXTENSION</h3> +<pre class="programlisting">#define GNUTLS_E_MISSING_EXTENSION -427 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-DB-ENTRY-EXISTS:CAPS"></a><h3>GNUTLS_E_DB_ENTRY_EXISTS</h3> +<pre class="programlisting">#define GNUTLS_E_DB_ENTRY_EXISTS -428 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-EARLY-DATA-REJECTED:CAPS"></a><h3>GNUTLS_E_EARLY_DATA_REJECTED</h3> +<pre class="programlisting">#define GNUTLS_E_EARLY_DATA_REJECTED -429 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-X509-DUPLICATE-EXTENSION:CAPS"></a><h3>GNUTLS_E_X509_DUPLICATE_EXTENSION</h3> +<pre class="programlisting">#define GNUTLS_E_X509_DUPLICATE_EXTENSION -430 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-UNIMPLEMENTED-FEATURE:CAPS"></a><h3>GNUTLS_E_UNIMPLEMENTED_FEATURE</h3> +<pre class="programlisting">#define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INT-RET-0:CAPS"></a><h3>GNUTLS_E_INT_RET_0</h3> +<pre class="programlisting">#define GNUTLS_E_INT_RET_0 -1251 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-INT-CHECK-AGAIN:CAPS"></a><h3>GNUTLS_E_INT_CHECK_AGAIN</h3> +<pre class="programlisting">#define GNUTLS_E_INT_CHECK_AGAIN -1252 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-APPLICATION-ERROR-MAX:CAPS"></a><h3>GNUTLS_E_APPLICATION_ERROR_MAX</h3> +<pre class="programlisting">#define GNUTLS_E_APPLICATION_ERROR_MAX -65000 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="GNUTLS-E-APPLICATION-ERROR-MIN:CAPS"></a><h3>GNUTLS_E_APPLICATION_ERROR_MIN</h3> +<pre class="programlisting">#define GNUTLS_E_APPLICATION_ERROR_MIN -65500 +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-certificate-credentials-st"></a><h3>struct gnutls_certificate_credentials_st</h3> +<pre class="programlisting">struct gnutls_certificate_credentials_st;</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-dh-params-int"></a><h3>struct gnutls_dh_params_int</h3> +<pre class="programlisting">struct gnutls_dh_params_int;</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-crt-int"></a><h3>struct gnutls_openpgp_crt_int</h3> +<pre class="programlisting">struct gnutls_openpgp_crt_int;</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-keyring-int"></a><h3>struct gnutls_openpgp_keyring_int</h3> +<pre class="programlisting">struct gnutls_openpgp_keyring_int;</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-openpgp-privkey-int"></a><h3>struct gnutls_openpgp_privkey_int</h3> +<pre class="programlisting">struct gnutls_openpgp_privkey_int;</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pkcs11-privkey-st"></a><h3>struct gnutls_pkcs11_privkey_st</h3> +<pre class="programlisting">struct gnutls_pkcs11_privkey_st { + gnutls_pk_algorithm_t pk_algorithm; + unsigned int rsa_pss_ok; /* if it is an RSA key, it can do RSA-PSS */ + unsigned int bits; + + unsigned int flags; + struct p11_kit_uri *uinfo; + char *url; + + struct pkcs11_session_info sinfo; + ck_object_handle_t ref; /* the key in the session */ + unsigned reauth; /* whether we need to login on each operation */ + + void *mutex; /* lock for operations requiring co-ordination */ + + struct pin_info_st pin; +}; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-priority-st"></a><h3>struct gnutls_priority_st</h3> +<pre class="programlisting">struct gnutls_priority_st { + priority_st protocol; + priority_st client_ctype; + priority_st server_ctype; + + /* The following are not necessary to be stored in + * the structure; however they are required by the + * external APIs: gnutls_priority_*_list() */ + priority_st _cipher; + priority_st _mac; + priority_st _kx; + priority_st _sign_algo; + priority_st _supported_ecc; + + /* the supported groups */ + group_list_st groups; + + /* the supported signature algorithms */ + sign_algo_list_st sigalg; + + /* the supported ciphersuites */ + ciphersuite_list_st cs; + + /* to disable record padding */ + bool no_extensions; + + safe_renegotiation_t sr; + bool min_record_version; + bool server_precedence; + bool allow_server_key_usage_violation; /* for test suite purposes only */ + bool no_tickets; + bool no_tickets_tls12; + bool have_cbc; + bool have_psk; + bool force_etm; + unsigned int additional_verify_flags; + bool tls13_compat_mode; + + /* TLS_FALLBACK_SCSV */ + bool fallback; + + /* The session's expected security level. + * Will be used to determine the minimum DH bits, + * (or the acceptable certificate security level). + */ + gnutls_sec_param_t level; + + /* these should be accessed from + * session->internals.VAR names */ + bool _allow_large_records; + bool _allow_small_records; + bool _no_etm; + bool _no_ext_master_secret; + bool _allow_key_usage_violation; + bool _allow_wrong_pms; + bool _dumbfw; + unsigned int _dh_prime_bits; /* old (deprecated) variable */ + + DEF_ATOMIC_INT(usage_cnt); +}; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-privkey-st"></a><h3>struct gnutls_privkey_st</h3> +<pre class="programlisting">struct gnutls_privkey_st { + gnutls_privkey_type_t type; + gnutls_pk_algorithm_t pk_algorithm; + + union { + gnutls_x509_privkey_t x509; +#ifdef ENABLE_PKCS11 + gnutls_pkcs11_privkey_t pkcs11; +#endif + struct { + gnutls_privkey_sign_func sign_func; /* raw like TLS 1.x */ + gnutls_privkey_sign_data_func sign_data_func; + gnutls_privkey_sign_hash_func sign_hash_func; + gnutls_privkey_decrypt_func decrypt_func; + gnutls_privkey_decrypt_func2 decrypt_func2; + gnutls_privkey_deinit_func deinit_func; + gnutls_privkey_info_func info_func; + gnutls_privkey_pk_params_func pk_params_func; + void *userdata; + unsigned bits; + } ext; + } key; + + unsigned int flags; + struct pin_info_st pin; +}; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-pubkey-st"></a><h3>struct gnutls_pubkey_st</h3> +<pre class="programlisting">struct gnutls_pubkey_st { + unsigned int bits; /* an indication of the security parameter */ + + /* the size of params depends on the public + * key algorithm + * RSA: [0] is modulus + * [1] is public exponent + * DSA: [0] is p + * [1] is q + * [2] is g + * [3] is public key + */ + gnutls_pk_params_st params; + + unsigned int key_usage; /* bits from GNUTLS_KEY_* */ + + struct pin_info_st pin; +}; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-session-int"></a><h3>struct gnutls_session_int</h3> +<pre class="programlisting">struct gnutls_session_int { + security_parameters_st security_parameters; + record_parameters_st *record_parameters[MAX_EPOCH_INDEX]; + internals_st internals; + gnutls_key_st key; +}; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-tdb-int"></a><h3>struct gnutls_tdb_int</h3> +<pre class="programlisting">struct gnutls_tdb_int;</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crl-int"></a><h3>gnutls_x509_crl_int</h3> +<pre class="programlisting">typedef struct { + asn1_node crl; + + unsigned expanded; + /* This is used to optimize reads by gnutls_x509_crl_get_crt_serial2() */ + asn1_node rcache; + unsigned rcache_idx; + int use_extensions; + + gnutls_datum_t der; + gnutls_datum_t raw_issuer_dn; +} gnutls_x509_crl_int; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crq-int"></a><h3>gnutls_x509_crq_int</h3> +<pre class="programlisting">typedef struct { + asn1_node crq; +} gnutls_x509_crq_int; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-crt-int"></a><h3>gnutls_x509_crt_int</h3> +<pre class="programlisting">typedef struct { + asn1_node cert; + int use_extensions; + unsigned expanded; /* a certificate has been expanded */ + unsigned modified; /* the cached values below may no longer be valid */ + unsigned flags; + + struct pin_info_st pin; + + /* These two cached values allow fast calls to + * get_raw_*_dn(). */ + gnutls_datum_t raw_dn; + gnutls_datum_t raw_issuer_dn; + gnutls_datum_t raw_spki; + + gnutls_datum_t der; + + /* this cached value allows fast access to alt names */ + gnutls_subject_alt_names_t san; + gnutls_subject_alt_names_t ian; + + /* backwards compatibility for gnutls_x509_crt_get_subject() + * and gnutls_x509_crt_get_issuer() */ + gnutls_x509_dn_st dn; + gnutls_x509_dn_st idn; +} gnutls_x509_crt_int; +</pre> +</div> +<hr> +<div class="refsect2"> +<a name="gnutls-x509-privkey-int"></a><h3>gnutls_x509_privkey_int</h3> +<pre class="programlisting">typedef struct { + /* the size of params depends on the public + * key algorithm + */ + gnutls_pk_params_st params; + + unsigned expanded; + unsigned flags; + + asn1_node key; + struct pin_info_st pin; +} gnutls_x509_privkey_int; +</pre> +</div> +</div> +</div> +<div class="footer"> +<hr>Generated by GTK-Doc V1.33.1</div> +</body> +</html>
\ No newline at end of file |