102 #ifndef OPENSSL_NO_KRB5
108 #ifndef OPENSSL_NO_TLSEXT
113 #ifndef OPENSSL_NO_PSK
117 #ifndef OPENSSL_NO_SRP
124 #define LSIZE2 (sizeof(long)*2)
125 int v1=0,v2=0,v3=0,v4=0,v5=0,v7=0,v8=0;
128 #ifndef OPENSSL_NO_TLSEXT
130 unsigned char ibuf6[
LSIZE2];
132 #ifndef OPENSSL_NO_COMP
136 #ifndef OPENSSL_NO_SRP
171 buf[0]=((
unsigned char)(l>>16L))&0xff;
172 buf[1]=((
unsigned char)(l>> 8L))&0xff;
173 buf[2]=((
unsigned char)(l ))&0xff;
178 buf[0]=((
unsigned char)(l>>8L))&0xff;
179 buf[1]=((
unsigned char)(l ))&0xff;
182 #ifndef OPENSSL_NO_COMP
208 #ifndef OPENSSL_NO_KRB5
241 #ifndef OPENSSL_NO_TLSEXT
262 #ifndef OPENSSL_NO_PSK
276 #ifndef OPENSSL_NO_SRP
290 #ifndef OPENSSL_NO_KRB5
300 if (in->
peer != NULL)
306 #ifndef OPENSSL_NO_TLSEXT
313 #ifndef OPENSSL_NO_COMP
318 #ifndef OPENSSL_NO_PSK
324 #ifndef OPENSSL_NO_SRP
336 #ifndef OPENSSL_NO_KRB5
346 if (in->
peer != NULL)
352 #ifndef OPENSSL_NO_TLSEXT
356 #ifndef OPENSSL_NO_PSK
362 #ifndef OPENSSL_NO_TLSEXT
368 #ifndef OPENSSL_NO_COMP
372 #ifndef OPENSSL_NO_SRP
401 ret->ssl_version=ssl_version;
414 ((
unsigned long)os.
data[0]<<16L)|
415 ((
unsigned long)os.
data[1]<< 8L)|
416 (
unsigned long)os.
data[2];
426 ((
unsigned long)os.
data[0]<<8L)|
427 (
unsigned long)os.
data[1];
446 if (os.
length > (
int)
sizeof(ret->session_id))
447 os.
length =
sizeof(ret->session_id);
449 ret->session_id_length=os.
length;
457 ret->master_key_length=os.
length;
458 memcpy(ret->master_key,os.
data,ret->master_key_length);
462 #ifndef OPENSSL_NO_KRB5
468 ret->krb5_client_princ_len=0;
470 ret->krb5_client_princ_len=os.
length;
471 memcpy(ret->krb5_client_princ,os.
data,ret->krb5_client_princ_len);
477 ret->krb5_client_princ_len=0;
484 ret->key_arg_length=os.
length;
485 memcpy(ret->key_arg,os.
data,ret->key_arg_length);
496 ret->time=(
unsigned long)time(NULL);
508 if (ret->peer != NULL)
510 X509_free(ret->peer);
528 ret->sid_ctx_length=os.
length;
534 ret->sid_ctx_length=0;
546 #ifndef OPENSSL_NO_TLSEXT
558 ret->tlsext_hostname=NULL;
561 #ifndef OPENSSL_NO_PSK
573 ret->psk_identity_hint=NULL;
586 ret->psk_identity=NULL;
589 #ifndef OPENSSL_NO_TLSEXT
597 else if (ret->tlsext_ticklen && ret->session_id_length)
598 ret->tlsext_tick_lifetime_hint = -1;
600 ret->tlsext_tick_lifetime_hint=0;
606 ret->tlsext_tick = os.
data;
607 ret->tlsext_ticklen = os.
length;
612 ret->tlsext_tick=NULL;
614 #ifndef OPENSSL_NO_COMP
620 ret->compress_meth = os.
data[0];
626 #ifndef OPENSSL_NO_SRP
638 ret->srp_username=NULL;