Hi, When studying the SSL structure, I was confused by some variables. Here is the definition of ssl_st: struct ssl_st { ...... ...... /* These are the ones being used, the ones is SSL_SESSION are * the ones to be 'copied' into these ones */ EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ const EVP_MD *read_hash; /* used for mac generation */ #ifdef HEADER_COMP_H COMP_CTX *expand; /* uncompress */ #else char *expand; #endif EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ const EVP_MD *write_hash; /* used for mac generation */ #ifdef HEADER_COMP_H COMP_CTX *compress; /* compression */ #else char *compress; #endif ....... ....... } What I concern is the cipher suite that encrypt the application data after a ssl connection is built. In this definition the variables "enc_write_ctx" and "compress" are related to data encryption. I found that in the function int ssl3_enc(SSL *s, int send) /* in s3_enc.c */ EVP_Cipher() is called to encrypt record data, using "enc_write_ctx". data. Whereas in the function static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len); /* in s3_pkt.c */ do_compress() is called to compress data, using "compress". Can anyone explain the funtions of these variables for me? When is ssl3_enc() called? and when is do_ssl3_write() called? Shawroo King. --== Sent via Deja.com http://www.deja.com/ ==-- Share what you know. Learn what you don't. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]