summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h88
1 files changed, 49 insertions, 39 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 516d3cc5ae..5208c4c42a 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -56,7 +56,7 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58/* ==================================================================== 58/* ====================================================================
59 * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. 59 * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
60 * 60 *
61 * Redistribution and use in source and binary forms, with or without 61 * Redistribution and use in source and binary forms, with or without
62 * modification, are permitted provided that the following conditions 62 * modification, are permitted provided that the following conditions
@@ -116,7 +116,7 @@
116#include <string.h> 116#include <string.h>
117#include <errno.h> 117#include <errno.h>
118 118
119#include "openssl/e_os.h" 119#include <e_os.h>
120 120
121#include <openssl/buffer.h> 121#include <openssl/buffer.h>
122#include <openssl/comp.h> 122#include <openssl/comp.h>
@@ -127,6 +127,12 @@
127#include <openssl/x509.h> 127#include <openssl/x509.h>
128#include <openssl/err.h> 128#include <openssl/err.h>
129#include <openssl/ssl.h> 129#include <openssl/ssl.h>
130#include <openssl/symhacks.h>
131
132#ifdef OPENSSL_BUILD_SHLIBSSL
133# undef OPENSSL_EXTERN
134# define OPENSSL_EXTERN OPENSSL_EXPORT
135#endif
130 136
131#define PKCS1_CHECK 137#define PKCS1_CHECK
132 138
@@ -221,48 +227,52 @@
221 * that the different entities within are mutually exclusive: 227 * that the different entities within are mutually exclusive:
222 * ONLY ONE BIT PER MASK CAN BE SET AT A TIME. 228 * ONLY ONE BIT PER MASK CAN BE SET AT A TIME.
223 */ 229 */
224#define SSL_MKEY_MASK 0x0000001FL 230#define SSL_MKEY_MASK 0x0000003FL
225#define SSL_kRSA 0x00000001L /* RSA key exchange */ 231#define SSL_kRSA 0x00000001L /* RSA key exchange */
226#define SSL_kDHr 0x00000002L /* DH cert RSA CA cert */ 232#define SSL_kDHr 0x00000002L /* DH cert RSA CA cert */
227#define SSL_kDHd 0x00000004L /* DH cert DSA CA cert */ 233#define SSL_kDHd 0x00000004L /* DH cert DSA CA cert */
228#define SSL_kFZA 0x00000008L 234#define SSL_kFZA 0x00000008L
229#define SSL_kEDH 0x00000010L /* tmp DH key no DH cert */ 235#define SSL_kEDH 0x00000010L /* tmp DH key no DH cert */
236#define SSL_kKRB5 0x00000020L /* Kerberos5 key exchange */
230#define SSL_EDH (SSL_kEDH|(SSL_AUTH_MASK^SSL_aNULL)) 237#define SSL_EDH (SSL_kEDH|(SSL_AUTH_MASK^SSL_aNULL))
231 238
232#define SSL_AUTH_MASK 0x000003e0L 239#define SSL_AUTH_MASK 0x00000FC0L
233#define SSL_aRSA 0x00000020L /* Authenticate with RSA */ 240#define SSL_aRSA 0x00000040L /* Authenticate with RSA */
234#define SSL_aDSS 0x00000040L /* Authenticate with DSS */ 241#define SSL_aDSS 0x00000080L /* Authenticate with DSS */
235#define SSL_DSS SSL_aDSS 242#define SSL_DSS SSL_aDSS
236#define SSL_aFZA 0x00000080L 243#define SSL_aFZA 0x00000100L
237#define SSL_aNULL 0x00000100L /* no Authenticate, ADH */ 244#define SSL_aNULL 0x00000200L /* no Authenticate, ADH */
238#define SSL_aDH 0x00000200L /* no Authenticate, ADH */ 245#define SSL_aDH 0x00000400L /* no Authenticate, ADH */
246#define SSL_aKRB5 0x00000800L /* Authenticate with KRB5 */
239 247
240#define SSL_NULL (SSL_eNULL) 248#define SSL_NULL (SSL_eNULL)
241#define SSL_ADH (SSL_kEDH|SSL_aNULL) 249#define SSL_ADH (SSL_kEDH|SSL_aNULL)
242#define SSL_RSA (SSL_kRSA|SSL_aRSA) 250#define SSL_RSA (SSL_kRSA|SSL_aRSA)
243#define SSL_DH (SSL_kDHr|SSL_kDHd|SSL_kEDH) 251#define SSL_DH (SSL_kDHr|SSL_kDHd|SSL_kEDH)
244#define SSL_FZA (SSL_aFZA|SSL_kFZA|SSL_eFZA) 252#define SSL_FZA (SSL_aFZA|SSL_kFZA|SSL_eFZA)
245 253#define SSL_KRB5 (SSL_kKRB5|SSL_aKRB5)
246#define SSL_ENC_MASK 0x0001Fc00L 254
247#define SSL_DES 0x00000400L 255#define SSL_ENC_MASK 0x0087F000L
248#define SSL_3DES 0x00000800L 256#define SSL_DES 0x00001000L
249#define SSL_RC4 0x00001000L 257#define SSL_3DES 0x00002000L
250#define SSL_RC2 0x00002000L 258#define SSL_RC4 0x00004000L
251#define SSL_IDEA 0x00004000L 259#define SSL_RC2 0x00008000L
252#define SSL_eFZA 0x00008000L 260#define SSL_IDEA 0x00010000L
253#define SSL_eNULL 0x00010000L 261#define SSL_eFZA 0x00020000L
254 262#define SSL_eNULL 0x00040000L
255#define SSL_MAC_MASK 0x00060000L 263#define SSL_AES 0x00800000L
256#define SSL_MD5 0x00020000L 264
257#define SSL_SHA1 0x00040000L 265#define SSL_MAC_MASK 0x00180000L
266#define SSL_MD5 0x00080000L
267#define SSL_SHA1 0x00100000L
258#define SSL_SHA (SSL_SHA1) 268#define SSL_SHA (SSL_SHA1)
259 269
260#define SSL_SSL_MASK 0x00180000L 270#define SSL_SSL_MASK 0x00600000L
261#define SSL_SSLV2 0x00080000L 271#define SSL_SSLV2 0x00200000L
262#define SSL_SSLV3 0x00100000L 272#define SSL_SSLV3 0x00400000L
263#define SSL_TLSV1 SSL_SSLV3 /* for now */ 273#define SSL_TLSV1 SSL_SSLV3 /* for now */
264 274
265/* we have used 001fffff - 11 bits left to go */ 275/* we have used 007fffff - 9 bits left to go */
266 276
267/* 277/*
268 * Export and cipher strength information. For each cipher we have to decide 278 * Export and cipher strength information. For each cipher we have to decide
@@ -367,11 +377,11 @@ typedef struct cert_st
367 int valid; 377 int valid;
368 unsigned long mask; 378 unsigned long mask;
369 unsigned long export_mask; 379 unsigned long export_mask;
370#ifndef NO_RSA 380#ifndef OPENSSL_NO_RSA
371 RSA *rsa_tmp; 381 RSA *rsa_tmp;
372 RSA *(*rsa_tmp_cb)(SSL *ssl,int is_export,int keysize); 382 RSA *(*rsa_tmp_cb)(SSL *ssl,int is_export,int keysize);
373#endif 383#endif
374#ifndef NO_DH 384#ifndef OPENSSL_NO_DH
375 DH *dh_tmp; 385 DH *dh_tmp;
376 DH *(*dh_tmp_cb)(SSL *ssl,int is_export,int keysize); 386 DH *(*dh_tmp_cb)(SSL *ssl,int is_export,int keysize);
377#endif 387#endif
@@ -394,10 +404,10 @@ typedef struct sess_cert_st
394 /* Obviously we don't have the private keys of these, 404 /* Obviously we don't have the private keys of these,
395 * so maybe we shouldn't even use the CERT_PKEY type here. */ 405 * so maybe we shouldn't even use the CERT_PKEY type here. */
396 406
397#ifndef NO_RSA 407#ifndef OPENSSL_NO_RSA
398 RSA *peer_rsa_tmp; /* not used for SSL 2 */ 408 RSA *peer_rsa_tmp; /* not used for SSL 2 */
399#endif 409#endif
400#ifndef NO_DH 410#ifndef OPENSSL_NO_DH
401 DH *peer_dh_tmp; /* not used for SSL 2 */ 411 DH *peer_dh_tmp; /* not used for SSL 2 */
402#endif 412#endif
403 413
@@ -454,9 +464,9 @@ OPENSSL_EXTERN SSL3_ENC_METHOD ssl3_undef_enc_method;
454OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[]; 464OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[];
455OPENSSL_EXTERN SSL_CIPHER ssl3_ciphers[]; 465OPENSSL_EXTERN SSL_CIPHER ssl3_ciphers[];
456 466
457#ifdef VMS 467#ifdef OPENSSL_SYS_VMS
458#undef SSL_COMP_get_compression_methods 468#undef SSL_COMP_get_compression_methods
459#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods 469#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods
460#endif 470#endif
461 471
462 472
@@ -520,8 +530,8 @@ int ssl2_peek(SSL *s, void *buf, int len);
520int ssl2_write(SSL *s, const void *buf, int len); 530int ssl2_write(SSL *s, const void *buf, int len);
521int ssl2_shutdown(SSL *s); 531int ssl2_shutdown(SSL *s);
522void ssl2_clear(SSL *s); 532void ssl2_clear(SSL *s);
523long ssl2_ctrl(SSL *s,int cmd, long larg, char *parg); 533long ssl2_ctrl(SSL *s,int cmd, long larg, void *parg);
524long ssl2_ctx_ctrl(SSL_CTX *s,int cmd, long larg, char *parg); 534long ssl2_ctx_ctrl(SSL_CTX *s,int cmd, long larg, void *parg);
525long ssl2_callback_ctrl(SSL *s,int cmd, void (*fp)()); 535long ssl2_callback_ctrl(SSL *s,int cmd, void (*fp)());
526long ssl2_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)()); 536long ssl2_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)());
527int ssl2_pending(SSL *s); 537int ssl2_pending(SSL *s);
@@ -556,8 +566,8 @@ void ssl3_finish_mac(SSL *s, const unsigned char *buf, int len);
556int ssl3_enc(SSL *s, int send_data); 566int ssl3_enc(SSL *s, int send_data);
557int ssl3_mac(SSL *ssl, unsigned char *md, int send_data); 567int ssl3_mac(SSL *ssl, unsigned char *md, int send_data);
558unsigned long ssl3_output_cert_chain(SSL *s, X509 *x); 568unsigned long ssl3_output_cert_chain(SSL *s, X509 *x);
559SSL_CIPHER *ssl3_choose_cipher(SSL *ssl,STACK_OF(SSL_CIPHER) *have, 569SSL_CIPHER *ssl3_choose_cipher(SSL *ssl,STACK_OF(SSL_CIPHER) *clnt,
560 STACK_OF(SSL_CIPHER) *pref); 570 STACK_OF(SSL_CIPHER) *srvr);
561int ssl3_setup_buffers(SSL *s); 571int ssl3_setup_buffers(SSL *s);
562int ssl3_new(SSL *s); 572int ssl3_new(SSL *s);
563void ssl3_free(SSL *s); 573void ssl3_free(SSL *s);
@@ -568,8 +578,8 @@ int ssl3_peek(SSL *s, void *buf, int len);
568int ssl3_write(SSL *s, const void *buf, int len); 578int ssl3_write(SSL *s, const void *buf, int len);
569int ssl3_shutdown(SSL *s); 579int ssl3_shutdown(SSL *s);
570void ssl3_clear(SSL *s); 580void ssl3_clear(SSL *s);
571long ssl3_ctrl(SSL *s,int cmd, long larg, char *parg); 581long ssl3_ctrl(SSL *s,int cmd, long larg, void *parg);
572long ssl3_ctx_ctrl(SSL_CTX *s,int cmd, long larg, char *parg); 582long ssl3_ctx_ctrl(SSL_CTX *s,int cmd, long larg, void *parg);
573long ssl3_callback_ctrl(SSL *s,int cmd, void (*fp)()); 583long ssl3_callback_ctrl(SSL *s,int cmd, void (*fp)());
574long ssl3_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)()); 584long ssl3_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)());
575int ssl3_pending(SSL *s); 585int ssl3_pending(SSL *s);
@@ -582,7 +592,7 @@ int ssl23_write_bytes(SSL *s);
582int tls1_new(SSL *s); 592int tls1_new(SSL *s);
583void tls1_free(SSL *s); 593void tls1_free(SSL *s);
584void tls1_clear(SSL *s); 594void tls1_clear(SSL *s);
585long tls1_ctrl(SSL *s,int cmd, long larg, char *parg); 595long tls1_ctrl(SSL *s,int cmd, long larg, void *parg);
586long tls1_callback_ctrl(SSL *s,int cmd, void (*fp)()); 596long tls1_callback_ctrl(SSL *s,int cmd, void (*fp)());
587SSL_METHOD *tlsv1_base_method(void ); 597SSL_METHOD *tlsv1_base_method(void );
588 598