aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/gnutls.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/gnutls.h')
-rw-r--r--src/daemon/https/gnutls.h165
1 files changed, 0 insertions, 165 deletions
diff --git a/src/daemon/https/gnutls.h b/src/daemon/https/gnutls.h
index 74e62ef4..f779e1b9 100644
--- a/src/daemon/https/gnutls.h
+++ b/src/daemon/https/gnutls.h
@@ -239,48 +239,15 @@ extern "C"
239 239
240 enum MHD_GNUTLS_CompressionMethod 240 enum MHD_GNUTLS_CompressionMethod
241 MHD_gtls_compression_get (MHD_gtls_session_t session); 241 MHD_gtls_compression_get (MHD_gtls_session_t session);
242// enum MHD_GNUTLS_CipherAlgorithm MHD_gnutls_cipher_get (MHD_gtls_session_t session);
243// enum MHD_GNUTLS_KeyExchangeAlgorithm MHD_gnutls_kx_get (MHD_gtls_session_t session);
244// enum MHD_GNUTLS_HashAlgorithm MHD_gnutls_mac_get (MHD_gtls_session_t session);
245// enum MHD_GNUTLS_CertificateType MHD_gnutls_certificate_type_get (MHD_gtls_session_t
246// session);
247
248 size_t MHD__gnutls_cipher_get_key_size (enum MHD_GNUTLS_CipherAlgorithm 242 size_t MHD__gnutls_cipher_get_key_size (enum MHD_GNUTLS_CipherAlgorithm
249 algorithm); 243 algorithm);
250 size_t MHD__gnutls_mac_get_key_size (enum MHD_GNUTLS_HashAlgorithm
251 algorithm);
252 244
253/* the name of the specified algorithms */ 245/* the name of the specified algorithms */
254 const char *MHD__gnutls_cipher_get_name (enum MHD_GNUTLS_CipherAlgorithm
255 algorithm);
256 const char *MHD__gnutls_mac_get_name (enum MHD_GNUTLS_HashAlgorithm
257 algorithm);
258 const char *MHD_gtls_compression_get_name (enum 246 const char *MHD_gtls_compression_get_name (enum
259 MHD_GNUTLS_CompressionMethod 247 MHD_GNUTLS_CompressionMethod
260 algorithm); 248 algorithm);
261 const char *MHD__gnutls_kx_get_name (enum MHD_GNUTLS_KeyExchangeAlgorithm
262 algorithm);
263 const char *MHD__gnutls_certificate_type_get_name (enum
264 MHD_GNUTLS_CertificateType
265 type);
266
267 enum MHD_GNUTLS_HashAlgorithm MHD_gtls_mac_get_id (const char *name);
268 enum MHD_GNUTLS_CompressionMethod MHD_gtls_compression_get_id (const char 249 enum MHD_GNUTLS_CompressionMethod MHD_gtls_compression_get_id (const char
269 *name); 250 *name);
270 enum MHD_GNUTLS_CipherAlgorithm MHD_gtls_cipher_get_id (const char *name);
271 enum MHD_GNUTLS_KeyExchangeAlgorithm MHD_gtls_kx_get_id (const char *name);
272 enum MHD_GNUTLS_Protocol MHD_gtls_protocol_get_id (const char *name);
273 enum MHD_GNUTLS_CertificateType MHD_gtls_certificate_type_get_id (const char
274 *name);
275
276 /* list supported algorithms */
277 const enum MHD_GNUTLS_CipherAlgorithm *MHD_gtls_cipher_list (void);
278 const enum MHD_GNUTLS_HashAlgorithm *MHD_gtls_mac_list (void);
279 const enum MHD_GNUTLS_CompressionMethod *MHD_gtls_compression_list (void);
280 const enum MHD_GNUTLS_Protocol *MHD_gtls_protocol_list (void);
281 const enum MHD_GNUTLS_CertificateType
282 *MHD_gtls_certificate_type_list (void);
283 const enum MHD_GNUTLS_KeyExchangeAlgorithm *MHD_gtls_kx_list (void);
284 251
285 /* error functions */ 252 /* error functions */
286 int MHD_gtls_error_is_fatal (int error); 253 int MHD_gtls_error_is_fatal (int error);
@@ -288,8 +255,6 @@ extern "C"
288 void MHD_gtls_perror (int error); 255 void MHD_gtls_perror (int error);
289 const char *MHD_gtls_strerror (int error); 256 const char *MHD_gtls_strerror (int error);
290 257
291 void MHD_gtls_handshake_set_private_extensions (MHD_gtls_session_t session,
292 int allow);
293/* 258/*
294 * Record layer functions. 259 * Record layer functions.
295 */ 260 */
@@ -299,25 +264,7 @@ extern "C"
299 size_t sizeofdata); 264 size_t sizeofdata);
300 265
301 /* provides extra compatibility */ 266 /* provides extra compatibility */
302 void MHD_gtls_record_disable_padding (MHD_gtls_session_t session);
303 size_t MHD_gtls_record_check_pending (MHD_gtls_session_t session);
304
305 int MHD__gnutls_record_get_direction (MHD_gtls_session_t session); 267 int MHD__gnutls_record_get_direction (MHD_gtls_session_t session);
306 size_t MHD__gnutls_record_get_max_size (MHD_gtls_session_t session);
307 ssize_t MHD__gnutls_record_set_max_size (MHD_gtls_session_t session,
308 size_t size);
309
310
311 int MHD__gnutls_prf (MHD_gtls_session_t session,
312 size_t label_size, const char *label,
313 int server_random_first,
314 size_t extra_size, const char *extra,
315 size_t outsize, char *out);
316
317 int MHD__gnutls_prf_raw (MHD_gtls_session_t session,
318 size_t label_size, const char *label,
319 size_t seed_size, const char *seed,
320 size_t outsize, char *out);
321 268
322/* 269/*
323 * TLS Extensions 270 * TLS Extensions
@@ -327,22 +274,10 @@ extern "C"
327 GNUTLS_NAME_DNS = 1 274 GNUTLS_NAME_DNS = 1
328 } MHD_gnutls_server_name_type_t; 275 } MHD_gnutls_server_name_type_t;
329 276
330 int MHD__gnutls_server_name_set (MHD_gtls_session_t session,
331 MHD_gnutls_server_name_type_t type,
332 const void *name, size_t name_length);
333
334 int MHD__gnutls_server_name_get (MHD_gtls_session_t session,
335 void *data, size_t * data_length,
336 unsigned int *type, unsigned int indx);
337
338 /* Opaque PRF Input 277 /* Opaque PRF Input
339 * http://tools.ietf.org/id/draft-rescorla-tls-opaque-prf-input-00.txt 278 * http://tools.ietf.org/id/draft-rescorla-tls-opaque-prf-input-00.txt
340 */ 279 */
341 280
342 void
343 MHD_gtls_oprfi_enable_client (MHD_gtls_session_t session,
344 size_t len, unsigned char *data);
345
346 typedef int (*MHD_gnutls_oprfi_callback_func) (MHD_gtls_session_t session, 281 typedef int (*MHD_gnutls_oprfi_callback_func) (MHD_gtls_session_t session,
347 void *userdata, 282 void *userdata,
348 size_t oprfi_len, 283 size_t oprfi_len,
@@ -350,32 +285,12 @@ extern "C"
350 *in_oprfi, 285 *in_oprfi,
351 unsigned char *out_oprfi); 286 unsigned char *out_oprfi);
352 287
353 void
354 MHD_gtls_oprfi_enable_server (MHD_gtls_session_t session,
355 MHD_gnutls_oprfi_callback_func cb,
356 void *userdata);
357
358 /* Supplemental data, RFC 4680. */ 288 /* Supplemental data, RFC 4680. */
359 typedef enum 289 typedef enum
360 { 290 {
361 GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA = 0 291 GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA = 0
362 } MHD_gnutls_supplemental_data_format_type_t; 292 } MHD_gnutls_supplemental_data_format_type_t;
363 293
364 const char *MHD_gtls_supplemental_get_name
365 (MHD_gnutls_supplemental_data_format_type_t type);
366
367 int MHD__gnutls_cipher_set_priority (MHD_gtls_session_t session,
368 const int *list);
369 int MHD__gnutls_mac_set_priority (MHD_gtls_session_t session,
370 const int *list);
371 int MHD__gnutls_compression_set_priority (MHD_gtls_session_t session,
372 const int *list);
373 int MHD__gnutls_kx_set_priority (MHD_gtls_session_t session,
374 const int *list);
375 int MHD__gnutls_protocol_set_priority (MHD_gtls_session_t session,
376 const int *list);
377 int MHD__gnutls_certificate_type_set_priority (MHD_gtls_session_t session,
378 const int *list);
379 294
380 int MHD_tls_set_default_priority (MHD_gnutls_priority_t *, 295 int MHD_tls_set_default_priority (MHD_gnutls_priority_t *,
381 const char *priority, 296 const char *priority,
@@ -392,38 +307,8 @@ extern "C"
392 enum MHD_GNUTLS_Protocol 307 enum MHD_GNUTLS_Protocol
393 MHD__gnutls_protocol_get_version (MHD_gtls_session_t session); 308 MHD__gnutls_protocol_get_version (MHD_gtls_session_t session);
394 309
395 const char *MHD__gnutls_protocol_get_name (enum MHD_GNUTLS_Protocol
396 version);
397
398/*
399 * get/set session
400 */
401// int MHD_gnutls_session_set_data (MHD_gtls_session_t session,
402// const void *session_data,
403// size_t session_data_size);
404// int MHD_gnutls_session_get_data (MHD_gtls_session_t session, void *session_data,
405// size_t * session_data_size);
406// int MHD_gnutls_session_get_data2 (MHD_gtls_session_t session,
407// MHD_gnutls_datum_t * data);
408
409 int MHD_gtls_session_get_id (MHD_gtls_session_t session, void *session_id,
410 size_t * session_id_size);
411
412/* returns security values.
413 * Do not use them unless you know what you're doing.
414 */
415 const void *MHD_gtls_session_get_server_random (MHD_gtls_session_t session);
416 const void *MHD_gtls_session_get_client_random (MHD_gtls_session_t session);
417 const void *MHD_gtls_session_get_master_secret (MHD_gtls_session_t session);
418
419 int MHD_gtls_session_is_resumed (MHD_gtls_session_t session);
420
421 typedef 310 typedef
422 int (*MHD_gnutls_handshake_post_client_hello_func) (MHD_gtls_session_t); 311 int (*MHD_gnutls_handshake_post_client_hello_func) (MHD_gtls_session_t);
423 void
424 MHD__gnutls_handshake_set_post_client_hello_function (MHD_gtls_session_t,
425 MHD_gnutls_handshake_post_client_hello_func);
426
427 void MHD__gnutls_handshake_set_max_packet_length (MHD_gtls_session_t 312 void MHD__gnutls_handshake_set_max_packet_length (MHD_gtls_session_t
428 session, size_t max); 313 session, size_t max);
429 314
@@ -490,17 +375,6 @@ extern "C"
490 struct MHD_gnutls_x509_crt_int; 375 struct MHD_gnutls_x509_crt_int;
491 typedef struct MHD_gnutls_x509_crt_int *MHD_gnutls_x509_crt_t; 376 typedef struct MHD_gnutls_x509_crt_int *MHD_gnutls_x509_crt_t;
492 377
493// int MHD_gnutls_certificate_set_x509_key (MHD_gtls_cert_credentials_t res,
494// MHD_gnutls_x509_crt_t * cert_list,
495// int cert_list_size,
496// MHD_gnutls_x509_privkey_t key);
497// int MHD_gnutls_certificate_set_x509_trust (MHD_gtls_cert_credentials_t res,
498// MHD_gnutls_x509_crt_t * ca_list,
499// int ca_list_size);
500// int MHD_gnutls_certificate_set_x509_crl (MHD_gtls_cert_credentials_t res,
501// MHD_gnutls_x509_crl_t * crl_list,
502// int crl_list_size);
503
504/* global state functions 378/* global state functions
505 */ 379 */
506 380
@@ -518,8 +392,6 @@ extern "C"
518 extern MHD_gnutls_calloc_function MHD_gnutls_calloc; 392 extern MHD_gnutls_calloc_function MHD_gnutls_calloc;
519 extern MHD_gnutls_free_function MHD_gnutls_free; 393 extern MHD_gnutls_free_function MHD_gnutls_free;
520 394
521 extern char *(*MHD_gnutls_strdup) (const char *);
522
523 typedef void (*MHD_gnutls_log_func) (int, const char *); 395 typedef void (*MHD_gnutls_log_func) (int, const char *);
524 void MHD_gtls_global_set_log_function (MHD_gnutls_log_func log_func); 396 void MHD_gtls_global_set_log_function (MHD_gnutls_log_func log_func);
525 void MHD_gtls_global_set_log_level (int level); 397 void MHD_gtls_global_set_log_level (int level);
@@ -549,10 +421,6 @@ extern "C"
549 const void *, size_t); 421 const void *, size_t);
550 void MHD__gnutls_transport_set_ptr (MHD_gtls_session_t session, 422 void MHD__gnutls_transport_set_ptr (MHD_gtls_session_t session,
551 MHD_gnutls_transport_ptr_t ptr); 423 MHD_gnutls_transport_ptr_t ptr);
552 void MHD__gnutls_transport_set_ptr2 (MHD_gtls_session_t session,
553 MHD_gnutls_transport_ptr_t recv_ptr,
554 MHD_gnutls_transport_ptr_t send_ptr);
555
556 void MHD__gnutls_transport_set_lowat (MHD_gtls_session_t session, int num); 424 void MHD__gnutls_transport_set_lowat (MHD_gtls_session_t session, int num);
557 425
558 426
@@ -561,15 +429,6 @@ extern "C"
561 void MHD__gnutls_transport_set_pull_function (MHD_gtls_session_t session, 429 void MHD__gnutls_transport_set_pull_function (MHD_gtls_session_t session,
562 MHD_gtls_pull_func pull_func); 430 MHD_gtls_pull_func pull_func);
563 431
564 void MHD__gnutls_transport_set_errno (MHD_gtls_session_t session, int err);
565 void MHD__gnutls_transport_set_global_errno (int err);
566
567/*
568 * session specific
569 */
570 void MHD__gnutls_session_set_ptr (MHD_gtls_session_t session, void *ptr);
571 void *MHD_gtls_session_get_ptr (MHD_gtls_session_t session);
572
573 typedef enum MHD_gnutls_x509_subject_alt_name_t 432 typedef enum MHD_gnutls_x509_subject_alt_name_t
574 { 433 {
575 GNUTLS_SAN_DNSNAME = 1, 434 GNUTLS_SAN_DNSNAME = 1,
@@ -620,11 +479,6 @@ extern "C"
620 */ 479 */
621 enum MHD_GNUTLS_CredentialsType MHD_gtls_auth_get_type (MHD_gtls_session_t 480 enum MHD_GNUTLS_CredentialsType MHD_gtls_auth_get_type (MHD_gtls_session_t
622 session); 481 session);
623 enum MHD_GNUTLS_CredentialsType
624 MHD_gtls_auth_server_get_type (MHD_gtls_session_t session);
625 enum MHD_GNUTLS_CredentialsType
626 MHD_gtls_auth_client_get_type (MHD_gtls_session_t session);
627
628 /* 482 /*
629 * DH 483 * DH
630 */ 484 */
@@ -640,25 +494,6 @@ extern "C"
640 const MHD_gnutls_datum_t * hash, 494 const MHD_gnutls_datum_t * hash,
641 MHD_gnutls_datum_t * signature); 495 MHD_gnutls_datum_t * signature);
642 496
643 void MHD_gtls_sign_callback_set (MHD_gtls_session_t session,
644 MHD_gnutls_sign_func sign_func,
645 void *userdata);
646 MHD_gnutls_sign_func MHD_gtls_sign_callback_get (MHD_gtls_session_t session,
647 void **userdata);
648
649 /* These are set on the credentials structure.
650 */
651 void MHD_gtls_certificate_client_set_retrieve_function
652 (MHD_gtls_cert_credentials_t cred,
653 MHD_gnutls_certificate_client_retrieve_function * func);
654 void MHD_gtls_certificate_server_set_retrieve_function
655 (MHD_gtls_cert_credentials_t cred,
656 MHD_gnutls_certificate_server_retrieve_function * func);
657
658 void MHD_gtls_certificate_server_set_request (MHD_gtls_session_t session,
659 MHD_gnutls_certificate_request_t
660 req);
661
662 int MHD_gtls_pem_base64_encode (const char *msg, 497 int MHD_gtls_pem_base64_encode (const char *msg,
663 const MHD_gnutls_datum_t * data, 498 const MHD_gnutls_datum_t * data,
664 char *result, size_t * result_size); 499 char *result, size_t * result_size);