[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.172,1.173

Jeremy Hylton jhylton@users.sourceforge.net
2001年10月10日 15:37:51 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv5857
Modified Files:
	socketmodule.c 
Log Message:
Do simple error checking before doing any SSL calls.
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -C2 -d -r1.172 -r1.173
*** socketmodule.c	2001年10月10日 22:33:32	1.172
--- socketmodule.c	2001年10月10日 22:37:48	1.173
***************
*** 2513,2524 ****
 	self->Socket = NULL;
 
! 	self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
! 	if (self->ctx == NULL) {
! 		errstr = "SSL_CTX_new error";
 		goto fail;
 	}
 
! 	if ((key_file && !cert_file) || (!key_file && cert_file)) {
! 		errstr = "Both the key & certificate files must be specified";
 		goto fail;
 	}
--- 2513,2524 ----
 	self->Socket = NULL;
 
! 	if ((key_file && !cert_file) || (!key_file && cert_file)) {
! 		errstr = "Both the key & certificate files must be specified";
 		goto fail;
 	}
 
! 	self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
! 	if (self->ctx == NULL) {
! 		errstr = "SSL_CTX_new error";
 		goto fail;
 	}

AltStyle によって変換されたページ (->オリジナル) /