diff options
author | beck <> | 2000-12-15 02:58:47 +0000 |
---|---|---|
committer | beck <> | 2000-12-15 02:58:47 +0000 |
commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libssl/ssl.h | |
parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libssl/ssl.h')
-rw-r--r-- | src/lib/libssl/ssl.h | 63 |
1 files changed, 46 insertions, 17 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index bb846f491c..fdbdc70ba7 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -59,12 +59,21 @@ | |||
59 | #ifndef HEADER_SSL_H | 59 | #ifndef HEADER_SSL_H |
60 | #define HEADER_SSL_H | 60 | #define HEADER_SSL_H |
61 | 61 | ||
62 | #ifndef NO_COMP | ||
63 | #include <openssl/comp.h> | ||
64 | #endif | ||
65 | #ifndef NO_BIO | ||
66 | #include <openssl/bio.h> | ||
67 | #endif | ||
68 | #ifndef NO_X509 | ||
69 | #include <openssl/x509.h> | ||
70 | #endif | ||
71 | #include <openssl/safestack.h> | ||
72 | |||
62 | #ifdef __cplusplus | 73 | #ifdef __cplusplus |
63 | extern "C" { | 74 | extern "C" { |
64 | #endif | 75 | #endif |
65 | 76 | ||
66 | #include <openssl/safestack.h> | ||
67 | |||
68 | /* SSLeay version number for ASN.1 encoding of the session information */ | 77 | /* SSLeay version number for ASN.1 encoding of the session information */ |
69 | /* Version 0 - initial version | 78 | /* Version 0 - initial version |
70 | * Version 1 - added the optional peer certificate | 79 | * Version 1 - added the optional peer certificate |
@@ -140,6 +149,10 @@ extern "C" { | |||
140 | #define SSL_SENT_SHUTDOWN 1 | 149 | #define SSL_SENT_SHUTDOWN 1 |
141 | #define SSL_RECEIVED_SHUTDOWN 2 | 150 | #define SSL_RECEIVED_SHUTDOWN 2 |
142 | 151 | ||
152 | #ifdef __cplusplus | ||
153 | } | ||
154 | #endif | ||
155 | |||
143 | #include <openssl/crypto.h> | 156 | #include <openssl/crypto.h> |
144 | #include <openssl/lhash.h> | 157 | #include <openssl/lhash.h> |
145 | #include <openssl/buffer.h> | 158 | #include <openssl/buffer.h> |
@@ -147,6 +160,10 @@ extern "C" { | |||
147 | #include <openssl/pem.h> | 160 | #include <openssl/pem.h> |
148 | #include <openssl/x509.h> | 161 | #include <openssl/x509.h> |
149 | 162 | ||
163 | #ifdef __cplusplus | ||
164 | extern "C" { | ||
165 | #endif | ||
166 | |||
150 | #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) | 167 | #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) |
151 | #define NO_SSL2 | 168 | #define NO_SSL2 |
152 | #endif | 169 | #endif |
@@ -318,6 +335,9 @@ typedef struct ssl_session_st | |||
318 | * the misconception that non-blocking SSL_write() behaves like | 335 | * the misconception that non-blocking SSL_write() behaves like |
319 | * non-blocking write(): */ | 336 | * non-blocking write(): */ |
320 | #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L | 337 | #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L |
338 | /* Never bother the application with retries if the transport | ||
339 | * is blocking: */ | ||
340 | #define SSL_MODE_AUTO_RETRY 0x00000004L | ||
321 | 341 | ||
322 | /* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, | 342 | /* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, |
323 | * they cannot be used to clear bits. */ | 343 | * they cannot be used to clear bits. */ |
@@ -343,15 +363,15 @@ typedef struct ssl_session_st | |||
343 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) | 363 | #define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) |
344 | 364 | ||
345 | typedef struct ssl_comp_st | 365 | typedef struct ssl_comp_st |
346 | { | 366 | { |
347 | int id; | 367 | int id; |
348 | char *name; | 368 | char *name; |
349 | #ifdef HEADER_COMP_H | 369 | #ifndef NO_COMP |
350 | COMP_METHOD *method; | 370 | COMP_METHOD *method; |
351 | #else | 371 | #else |
352 | char *method; | 372 | char *method; |
353 | #endif | 373 | #endif |
354 | } SSL_COMP; | 374 | } SSL_COMP; |
355 | 375 | ||
356 | DECLARE_STACK_OF(SSL_COMP) | 376 | DECLARE_STACK_OF(SSL_COMP) |
357 | 377 | ||
@@ -533,10 +553,10 @@ struct ssl_st | |||
533 | * same. This is so data can be read and written to different | 553 | * same. This is so data can be read and written to different |
534 | * handlers */ | 554 | * handlers */ |
535 | 555 | ||
536 | #ifdef HEADER_BIO_H | 556 | #ifndef NO_BIO |
537 | BIO *rbio; /* used by SSL_read */ | 557 | BIO *rbio; /* used by SSL_read */ |
538 | BIO *wbio; /* used by SSL_write */ | 558 | BIO *wbio; /* used by SSL_write */ |
539 | BIO *bbio; /* used during session-id reuse to concatinate | 559 | BIO *bbio; /* used during session-id reuse to concatenate |
540 | * messages */ | 560 | * messages */ |
541 | #else | 561 | #else |
542 | char *rbio; /* used by SSL_read */ | 562 | char *rbio; /* used by SSL_read */ |
@@ -597,7 +617,7 @@ struct ssl_st | |||
597 | 617 | ||
598 | EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ | 618 | EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ |
599 | const EVP_MD *read_hash; /* used for mac generation */ | 619 | const EVP_MD *read_hash; /* used for mac generation */ |
600 | #ifdef HEADER_COMP_H | 620 | #ifndef NO_COMP |
601 | COMP_CTX *expand; /* uncompress */ | 621 | COMP_CTX *expand; /* uncompress */ |
602 | #else | 622 | #else |
603 | char *expand; | 623 | char *expand; |
@@ -605,7 +625,7 @@ struct ssl_st | |||
605 | 625 | ||
606 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ | 626 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ |
607 | const EVP_MD *write_hash; /* used for mac generation */ | 627 | const EVP_MD *write_hash; /* used for mac generation */ |
608 | #ifdef HEADER_COMP_H | 628 | #ifndef NO_COMP |
609 | COMP_CTX *compress; /* compression */ | 629 | COMP_CTX *compress; /* compression */ |
610 | #else | 630 | #else |
611 | char *compress; | 631 | char *compress; |
@@ -655,11 +675,19 @@ struct ssl_st | |||
655 | * SSLv3/TLS rollback check */ | 675 | * SSLv3/TLS rollback check */ |
656 | }; | 676 | }; |
657 | 677 | ||
678 | #ifdef __cplusplus | ||
679 | } | ||
680 | #endif | ||
681 | |||
658 | #include <openssl/ssl2.h> | 682 | #include <openssl/ssl2.h> |
659 | #include <openssl/ssl3.h> | 683 | #include <openssl/ssl3.h> |
660 | #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ | 684 | #include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */ |
661 | #include <openssl/ssl23.h> | 685 | #include <openssl/ssl23.h> |
662 | 686 | ||
687 | #ifdef __cplusplus | ||
688 | extern "C" { | ||
689 | #endif | ||
690 | |||
663 | /* compatibility */ | 691 | /* compatibility */ |
664 | #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) | 692 | #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) |
665 | #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) | 693 | #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) |
@@ -883,7 +911,7 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); | |||
883 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack | 911 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack |
884 | #endif | 912 | #endif |
885 | 913 | ||
886 | #ifdef HEADER_BIO_H | 914 | #ifndef NO_BIO |
887 | BIO_METHOD *BIO_f_ssl(void); | 915 | BIO_METHOD *BIO_f_ssl(void); |
888 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); | 916 | BIO *BIO_new_ssl(SSL_CTX *ctx,int client); |
889 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); | 917 | BIO *BIO_new_ssl_connect(SSL_CTX *ctx); |
@@ -920,7 +948,7 @@ int SSL_set_fd(SSL *s, int fd); | |||
920 | int SSL_set_rfd(SSL *s, int fd); | 948 | int SSL_set_rfd(SSL *s, int fd); |
921 | int SSL_set_wfd(SSL *s, int fd); | 949 | int SSL_set_wfd(SSL *s, int fd); |
922 | #endif | 950 | #endif |
923 | #ifdef HEADER_BIO_H | 951 | #ifndef NO_BIO |
924 | void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); | 952 | void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); |
925 | BIO * SSL_get_rbio(SSL *s); | 953 | BIO * SSL_get_rbio(SSL *s); |
926 | BIO * SSL_get_wbio(SSL *s); | 954 | BIO * SSL_get_wbio(SSL *s); |
@@ -975,7 +1003,7 @@ int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b); | |||
975 | #ifndef NO_FP_API | 1003 | #ifndef NO_FP_API |
976 | int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); | 1004 | int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); |
977 | #endif | 1005 | #endif |
978 | #ifdef HEADER_BIO_H | 1006 | #ifndef NO_BIO |
979 | int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); | 1007 | int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); |
980 | #endif | 1008 | #endif |
981 | void SSL_SESSION_free(SSL_SESSION *ses); | 1009 | void SSL_SESSION_free(SSL_SESSION *ses); |
@@ -1171,7 +1199,7 @@ void SSL_set_tmp_dh_callback(SSL *ssl, | |||
1171 | int keylength)); | 1199 | int keylength)); |
1172 | #endif | 1200 | #endif |
1173 | 1201 | ||
1174 | #ifdef HEADER_COMP_H | 1202 | #ifndef NO_COMP |
1175 | int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); | 1203 | int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); |
1176 | #else | 1204 | #else |
1177 | int SSL_COMP_add_compression_method(int id,char *cm); | 1205 | int SSL_COMP_add_compression_method(int id,char *cm); |
@@ -1443,6 +1471,7 @@ int SSL_COMP_add_compression_method(int id,char *cm); | |||
1443 | #define SSL_R_READ_WRONG_PACKET_TYPE 212 | 1471 | #define SSL_R_READ_WRONG_PACKET_TYPE 212 |
1444 | #define SSL_R_RECORD_LENGTH_MISMATCH 213 | 1472 | #define SSL_R_RECORD_LENGTH_MISMATCH 213 |
1445 | #define SSL_R_RECORD_TOO_LARGE 214 | 1473 | #define SSL_R_RECORD_TOO_LARGE 214 |
1474 | #define SSL_R_RECORD_TOO_SMALL 1093 | ||
1446 | #define SSL_R_REQUIRED_CIPHER_MISSING 215 | 1475 | #define SSL_R_REQUIRED_CIPHER_MISSING 215 |
1447 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 | 1476 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216 |
1448 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 | 1477 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217 |