• Home
  • Raw
  • Download

Lines Matching refs:s3

192 		EVP_DigestUpdate(&s1,s->s3->server_random,SSL3_RANDOM_SIZE);  in ssl3_generate_key_block()
193 EVP_DigestUpdate(&s1,s->s3->client_random,SSL3_RANDOM_SIZE); in ssl3_generate_key_block()
232 is_exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher); in ssl3_change_cipher_state()
233 c=s->s3->tmp.new_sym_enc; in ssl3_change_cipher_state()
234 m=s->s3->tmp.new_hash; in ssl3_change_cipher_state()
238 if (s->s3->tmp.new_compression == NULL) in ssl3_change_cipher_state()
241 comp=s->s3->tmp.new_compression->method; in ssl3_change_cipher_state()
271 if (s->s3->rrec.comp == NULL) in ssl3_change_cipher_state()
272 s->s3->rrec.comp=(unsigned char *) in ssl3_change_cipher_state()
274 if (s->s3->rrec.comp == NULL) in ssl3_change_cipher_state()
278 memset(&(s->s3->read_sequence[0]),0,8); in ssl3_change_cipher_state()
279 mac_secret= &(s->s3->read_mac_secret[0]); in ssl3_change_cipher_state()
309 memset(&(s->s3->write_sequence[0]),0,8); in ssl3_change_cipher_state()
310 mac_secret= &(s->s3->write_mac_secret[0]); in ssl3_change_cipher_state()
316 p=s->s3->tmp.key_block; in ssl3_change_cipher_state()
321 j=is_exp ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ? in ssl3_change_cipher_state()
322 cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl; in ssl3_change_cipher_state()
331 er1= &(s->s3->client_random[0]); in ssl3_change_cipher_state()
332 er2= &(s->s3->server_random[0]); in ssl3_change_cipher_state()
340 er1= &(s->s3->server_random[0]); in ssl3_change_cipher_state()
341 er2= &(s->s3->client_random[0]); in ssl3_change_cipher_state()
344 if (n > s->s3->tmp.key_block_length) in ssl3_change_cipher_state()
397 if (s->s3->tmp.key_block_length != 0) in ssl3_setup_key_block()
406 s->s3->tmp.new_sym_enc=c; in ssl3_setup_key_block()
407 s->s3->tmp.new_hash=hash; in ssl3_setup_key_block()
409 s->s3->tmp.new_compression=NULL; in ssl3_setup_key_block()
411 s->s3->tmp.new_compression=comp; in ssl3_setup_key_block()
426 s->s3->tmp.key_block_length=num; in ssl3_setup_key_block()
427 s->s3->tmp.key_block=p; in ssl3_setup_key_block()
436 s->s3->need_empty_fragments = 1; in ssl3_setup_key_block()
441 s->s3->need_empty_fragments = 0; in ssl3_setup_key_block()
445 s->s3->need_empty_fragments = 0; in ssl3_setup_key_block()
459 if (s->s3->tmp.key_block != NULL) in ssl3_cleanup_key_block()
461 OPENSSL_cleanse(s->s3->tmp.key_block, in ssl3_cleanup_key_block()
462 s->s3->tmp.key_block_length); in ssl3_cleanup_key_block()
463 OPENSSL_free(s->s3->tmp.key_block); in ssl3_cleanup_key_block()
464 s->s3->tmp.key_block=NULL; in ssl3_cleanup_key_block()
466 s->s3->tmp.key_block_length=0; in ssl3_cleanup_key_block()
480 rec= &(s->s3->wrec); in ssl3_enc()
489 rec= &(s->s3->rrec); in ssl3_enc()
557 if (s->s3->handshake_buffer) BIO_free(s->s3->handshake_buffer); in ssl3_init_finished_mac()
558 if (s->s3->handshake_dgst) ssl3_free_digest_list(s); in ssl3_init_finished_mac()
559 s->s3->handshake_buffer=BIO_new(BIO_s_mem()); in ssl3_init_finished_mac()
560 (void)BIO_set_close(s->s3->handshake_buffer,BIO_CLOSE); in ssl3_init_finished_mac()
566 if (!s->s3->handshake_dgst) return; in ssl3_free_digest_list()
569 if (s->s3->handshake_dgst[i]) in ssl3_free_digest_list()
570 EVP_MD_CTX_destroy(s->s3->handshake_dgst[i]); in ssl3_free_digest_list()
572 OPENSSL_free(s->s3->handshake_dgst); in ssl3_free_digest_list()
573 s->s3->handshake_dgst=NULL; in ssl3_free_digest_list()
580 if (s->s3->handshake_buffer && !(s->s3->flags & TLS1_FLAGS_KEEP_HANDSHAKE)) in ssl3_finish_mac()
582 BIO_write (s->s3->handshake_buffer,(void *)buf,len); in ssl3_finish_mac()
589 if (s->s3->handshake_dgst[i]!= NULL) in ssl3_finish_mac()
590 EVP_DigestUpdate(s->s3->handshake_dgst[i],buf,len); in ssl3_finish_mac()
605 s->s3->handshake_dgst = OPENSSL_malloc(SSL_MAX_DIGEST * sizeof(EVP_MD_CTX *)); in ssl3_digest_cached_records()
606 memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST *sizeof(EVP_MD_CTX *)); in ssl3_digest_cached_records()
607 hdatalen = BIO_get_mem_data(s->s3->handshake_buffer,&hdata); in ssl3_digest_cached_records()
619 s->s3->handshake_dgst[i]=EVP_MD_CTX_create(); in ssl3_digest_cached_records()
623 EVP_MD_CTX_set_flags(s->s3->handshake_dgst[i], in ssl3_digest_cached_records()
627 EVP_DigestInit_ex(s->s3->handshake_dgst[i],md,NULL); in ssl3_digest_cached_records()
628 EVP_DigestUpdate(s->s3->handshake_dgst[i],hdata,hdatalen); in ssl3_digest_cached_records()
632 s->s3->handshake_dgst[i]=NULL; in ssl3_digest_cached_records()
635 if (!(s->s3->flags & TLS1_FLAGS_KEEP_HANDSHAKE)) in ssl3_digest_cached_records()
638 BIO_free(s->s3->handshake_buffer); in ssl3_digest_cached_records()
639 s->s3->handshake_buffer = NULL; in ssl3_digest_cached_records()
667 if (s->s3->handshake_buffer) in ssl3_handshake_mac()
675 if (s->s3->handshake_dgst[i]&&EVP_MD_CTX_type(s->s3->handshake_dgst[i])==md_nid) in ssl3_handshake_mac()
677 d=s->s3->handshake_dgst[i]; in ssl3_handshake_mac()
725 rec= &(ssl->s3->wrec); in n_ssl3_mac()
726 mac_sec= &(ssl->s3->write_mac_secret[0]); in n_ssl3_mac()
727 seq= &(ssl->s3->write_sequence[0]); in n_ssl3_mac()
732 rec= &(ssl->s3->rrec); in n_ssl3_mac()
733 mac_sec= &(ssl->s3->read_mac_secret[0]); in n_ssl3_mac()
734 seq= &(ssl->s3->read_sequence[0]); in n_ssl3_mac()
807 EVP_DigestUpdate(&ctx,&(s->s3->client_random[0]), in ssl3_generate_master_secret()
809 EVP_DigestUpdate(&ctx,&(s->s3->server_random[0]), in ssl3_generate_master_secret()