diff options
author | tedu <> | 2014-05-30 14:30:50 +0000 |
---|---|---|
committer | tedu <> | 2014-05-30 14:30:50 +0000 |
commit | d970fd597dc43c71716f5ce1db8f102515a73ad8 (patch) | |
tree | cbf937e75b5dc1f5e8f2452d45ad4d6942a9b1d4 /src/lib/libssl/ssl_lib.c | |
parent | d7bb67cc99974281f55641afa52a0f9e8f1ff938 (diff) | |
download | openbsd-d970fd597dc43c71716f5ce1db8f102515a73ad8.tar.gz openbsd-d970fd597dc43c71716f5ce1db8f102515a73ad8.tar.bz2 openbsd-d970fd597dc43c71716f5ce1db8f102515a73ad8.zip |
remove some #if 0 code. we don't need any more reminders that we're using
a not quite appropriate data structure. ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index e3b67817cc..94792c6d51 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -215,9 +215,6 @@ SSL_clear(SSL *s) | |||
215 | s->client_version = s->version; | 215 | s->client_version = s->version; |
216 | s->rwstate = SSL_NOTHING; | 216 | s->rwstate = SSL_NOTHING; |
217 | s->rstate = SSL_ST_READ_HEADER; | 217 | s->rstate = SSL_ST_READ_HEADER; |
218 | #if 0 | ||
219 | s->read_ahead = s->ctx->read_ahead; | ||
220 | #endif | ||
221 | 218 | ||
222 | if (s->init_buf != NULL) { | 219 | if (s->init_buf != NULL) { |
223 | BUF_MEM_free(s->init_buf); | 220 | BUF_MEM_free(s->init_buf); |
@@ -230,7 +227,6 @@ SSL_clear(SSL *s) | |||
230 | 227 | ||
231 | s->first_packet = 0; | 228 | s->first_packet = 0; |
232 | 229 | ||
233 | #if 1 | ||
234 | /* | 230 | /* |
235 | * Check to see if we were changed into a different method, if | 231 | * Check to see if we were changed into a different method, if |
236 | * so, revert back if we are not doing session-id reuse. | 232 | * so, revert back if we are not doing session-id reuse. |
@@ -242,7 +238,6 @@ SSL_clear(SSL *s) | |||
242 | if (!s->method->ssl_new(s)) | 238 | if (!s->method->ssl_new(s)) |
243 | return (0); | 239 | return (0); |
244 | } else | 240 | } else |
245 | #endif | ||
246 | s->method->ssl_clear(s); | 241 | s->method->ssl_clear(s); |
247 | return (1); | 242 | return (1); |
248 | } | 243 | } |
@@ -312,9 +307,6 @@ SSL_new(SSL_CTX *ctx) | |||
312 | s->msg_callback = ctx->msg_callback; | 307 | s->msg_callback = ctx->msg_callback; |
313 | s->msg_callback_arg = ctx->msg_callback_arg; | 308 | s->msg_callback_arg = ctx->msg_callback_arg; |
314 | s->verify_mode = ctx->verify_mode; | 309 | s->verify_mode = ctx->verify_mode; |
315 | #if 0 | ||
316 | s->verify_depth = ctx->verify_depth; | ||
317 | #endif | ||
318 | s->sid_ctx_length = ctx->sid_ctx_length; | 310 | s->sid_ctx_length = ctx->sid_ctx_length; |
319 | OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx); | 311 | OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx); |
320 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); | 312 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); |
@@ -325,10 +317,6 @@ SSL_new(SSL_CTX *ctx) | |||
325 | if (!s->param) | 317 | if (!s->param) |
326 | goto err; | 318 | goto err; |
327 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); | 319 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); |
328 | #if 0 | ||
329 | s->purpose = ctx->purpose; | ||
330 | s->trust = ctx->trust; | ||
331 | #endif | ||
332 | s->quiet_shutdown = ctx->quiet_shutdown; | 320 | s->quiet_shutdown = ctx->quiet_shutdown; |
333 | s->max_send_fragment = ctx->max_send_fragment; | 321 | s->max_send_fragment = ctx->max_send_fragment; |
334 | 322 | ||
@@ -1766,9 +1754,6 @@ SSL_CTX_new(const SSL_METHOD *meth) | |||
1766 | ret->msg_callback = 0; | 1754 | ret->msg_callback = 0; |
1767 | ret->msg_callback_arg = NULL; | 1755 | ret->msg_callback_arg = NULL; |
1768 | ret->verify_mode = SSL_VERIFY_NONE; | 1756 | ret->verify_mode = SSL_VERIFY_NONE; |
1769 | #if 0 | ||
1770 | ret->verify_depth=-1; /* Don't impose a limit (but x509_lu.c does) */ | ||
1771 | #endif | ||
1772 | ret->sid_ctx_length = 0; | 1757 | ret->sid_ctx_length = 0; |
1773 | ret->default_verify_callback = NULL; | 1758 | ret->default_verify_callback = NULL; |
1774 | if ((ret->cert = ssl_cert_new()) == NULL) | 1759 | if ((ret->cert = ssl_cert_new()) == NULL) |
@@ -1881,14 +1866,6 @@ err2: | |||
1881 | return (NULL); | 1866 | return (NULL); |
1882 | } | 1867 | } |
1883 | 1868 | ||
1884 | #if 0 | ||
1885 | static void | ||
1886 | SSL_COMP_free(SSL_COMP *comp) | ||
1887 | { | ||
1888 | free(comp); | ||
1889 | } | ||
1890 | #endif | ||
1891 | |||
1892 | void | 1869 | void |
1893 | SSL_CTX_free(SSL_CTX *a) | 1870 | SSL_CTX_free(SSL_CTX *a) |
1894 | { | 1871 | { |
@@ -1933,12 +1910,8 @@ SSL_CTX_free(SSL_CTX *a) | |||
1933 | sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free); | 1910 | sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free); |
1934 | if (a->extra_certs != NULL) | 1911 | if (a->extra_certs != NULL) |
1935 | sk_X509_pop_free(a->extra_certs, X509_free); | 1912 | sk_X509_pop_free(a->extra_certs, X509_free); |
1936 | #if 0 /* This should never be done, since it removes a global database */ | 1913 | /* Don't free, since it removes a global database */ |
1937 | if (a->comp_methods != NULL) | ||
1938 | sk_SSL_COMP_pop_free(a->comp_methods, SSL_COMP_free); | ||
1939 | #else | ||
1940 | a->comp_methods = NULL; | 1914 | a->comp_methods = NULL; |
1941 | #endif | ||
1942 | 1915 | ||
1943 | #ifndef OPENSSL_NO_SRTP | 1916 | #ifndef OPENSSL_NO_SRTP |
1944 | if (a->srtp_profiles) | 1917 | if (a->srtp_profiles) |
@@ -2056,16 +2029,6 @@ ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
2056 | if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc))) | 2029 | if (rsa_enc_export || (rsa_tmp_export && (rsa_sign || rsa_enc))) |
2057 | emask_k|=SSL_kRSA; | 2030 | emask_k|=SSL_kRSA; |
2058 | 2031 | ||
2059 | #if 0 | ||
2060 | /* The match needs to be both kEDH and aRSA or aDSA, so don't worry */ | ||
2061 | if ((dh_tmp || dh_rsa || dh_dsa) && | ||
2062 | (rsa_enc || rsa_sign || dsa_sign)) | ||
2063 | mask_k|=SSL_kEDH; | ||
2064 | if ((dh_tmp_export || dh_rsa_export || dh_dsa_export) && | ||
2065 | (rsa_enc || rsa_sign || dsa_sign)) | ||
2066 | emask_k|=SSL_kEDH; | ||
2067 | #endif | ||
2068 | |||
2069 | if (dh_tmp_export) | 2032 | if (dh_tmp_export) |
2070 | emask_k|=SSL_kEDH; | 2033 | emask_k|=SSL_kEDH; |
2071 | 2034 | ||