Changeset 641
- Timestamp:
- 28/07/08 11:02:58 (4 months ago)
- Files:
-
- 1 modified
-
trunk/sx/ssl.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sx/ssl.c
r640 r641 742 742 ctx = SSL_CTX_new(SSLv23_method()); 743 743 if(ctx == NULL) { 744 _sx_debug(ZONE, "ssl context creation failed ");744 _sx_debug(ZONE, "ssl context creation failed; %s", ERR_error_string(ERR_get_error(), NULL)); 745 745 return 1; 746 746 } … … 750 750 ret = SSL_CTX_load_verify_locations (ctx, cachain, NULL); 751 751 if(ret != 1) { 752 _sx_debug(ZONE, "WARNING: couldn't load CA chain: %s; %s", cachain, ERR_error_string( ret, NULL));752 _sx_debug(ZONE, "WARNING: couldn't load CA chain: %s; %s", cachain, ERR_error_string(ERR_get_error(), NULL)); 753 753 } 754 754 } … … 757 757 ret = SSL_CTX_use_certificate_chain_file(ctx, pemfile); 758 758 if(ret != 1) { 759 _sx_debug(ZONE, "couldn't load certificate from %s; %s", pemfile, ERR_error_string( ret, NULL));759 _sx_debug(ZONE, "couldn't load certificate from %s; %s", pemfile, ERR_error_string(ERR_get_error(), NULL)); 760 760 SSL_CTX_free(ctx); 761 761 return 1; … … 765 765 ret = SSL_CTX_use_PrivateKey_file(ctx, pemfile, SSL_FILETYPE_PEM); 766 766 if(ret != 1) { 767 _sx_debug(ZONE, "couldn't load private key from %s; %s", pemfile, ERR_error_string( ret, NULL));767 _sx_debug(ZONE, "couldn't load private key from %s; %s", pemfile, ERR_error_string(ERR_get_error(), NULL)); 768 768 SSL_CTX_free(ctx); 769 769 return 1; … … 773 773 ret = SSL_CTX_check_private_key(ctx); 774 774 if(ret != 1) { 775 _sx_debug(ZONE, "private key does not match certificate public key; %s", ERR_error_string( ret, NULL));775 _sx_debug(ZONE, "private key does not match certificate public key; %s", ERR_error_string(ERR_get_error(), NULL)); 776 776 SSL_CTX_free(ctx); 777 777 return 1;
