s3_srvr.c (100928) | s3_srvr.c (100936) |
---|---|
1/* ssl/s3_srvr.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 108 unchanged lines hidden (view full) --- 117#include <openssl/buffer.h> 118#include <openssl/rand.h> 119#include <openssl/objects.h> 120#include <openssl/md5.h> 121#include <openssl/sha.h> 122#include <openssl/evp.h> 123#include <openssl/x509.h> 124#include "ssl_locl.h" | 1/* ssl/s3_srvr.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 108 unchanged lines hidden (view full) --- 117#include <openssl/buffer.h> 118#include <openssl/rand.h> 119#include <openssl/objects.h> 120#include <openssl/md5.h> 121#include <openssl/sha.h> 122#include <openssl/evp.h> 123#include <openssl/x509.h> 124#include "ssl_locl.h" |
125#include "cryptlib.h" |
|
125 126static SSL_METHOD *ssl3_get_server_method(int ver); 127static int ssl3_get_client_hello(SSL *s); 128static int ssl3_check_client_hello(SSL *s); 129static int ssl3_send_server_hello(SSL *s); 130static int ssl3_send_server_key_exchange(SSL *s); 131static int ssl3_send_certificate_request(SSL *s); 132static int ssl3_send_server_done(SSL *s); --- 810 unchanged lines hidden (view full) --- 943 * session-id if we want it to be single use. 944 * Currently I will not implement the '0' length session-id 945 * 12-Jan-98 - I'll now support the '0' length stuff. 946 */ 947 if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER)) 948 s->session->session_id_length=0; 949 950 sl=s->session->session_id_length; | 126 127static SSL_METHOD *ssl3_get_server_method(int ver); 128static int ssl3_get_client_hello(SSL *s); 129static int ssl3_check_client_hello(SSL *s); 130static int ssl3_send_server_hello(SSL *s); 131static int ssl3_send_server_key_exchange(SSL *s); 132static int ssl3_send_certificate_request(SSL *s); 133static int ssl3_send_server_done(SSL *s); --- 810 unchanged lines hidden (view full) --- 944 * session-id if we want it to be single use. 945 * Currently I will not implement the '0' length session-id 946 * 12-Jan-98 - I'll now support the '0' length stuff. 947 */ 948 if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER)) 949 s->session->session_id_length=0; 950 951 sl=s->session->session_id_length; |
952 die(sl <= sizeof s->session->session_id); |
|
951 *(p++)=sl; 952 memcpy(p,s->session->session_id,sl); 953 p+=sl; 954 955 /* put the cipher */ 956 i=ssl3_put_cipher_by_char(s->s3->tmp.new_cipher,p); 957 p+=i; 958 --- 904 unchanged lines hidden --- | 953 *(p++)=sl; 954 memcpy(p,s->session->session_id,sl); 955 p+=sl; 956 957 /* put the cipher */ 958 i=ssl3_put_cipher_by_char(s->s3->tmp.new_cipher,p); 959 p+=i; 960 --- 904 unchanged lines hidden --- |