Ticket #764: pyOpenSSL.diff
File pyOpenSSL.diff, 2.1 KB (added by , 13 years ago) |
---|
-
ssl.c
old new 180 180 PyModule_AddIntConstant(module, "OP_NETSCAPE_CA_DN_BUG", SSL_OP_NETSCAPE_CA_DN_BUG); 181 181 PyModule_AddIntConstant(module, "OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG); 182 182 183 /* For SSL_set_shutdown */ 184 PyModule_AddIntConstant(module, "SENT_SHUTDOWN", SSL_SENT_SHUTDOWN); 185 PyModule_AddIntConstant(module, "RECEIVED_SHUTDOWN", SSL_RECEIVED_SHUTDOWN); 186 183 187 dict = PyModule_GetDict(module); 184 188 if (!init_ssl_context(dict)) 185 189 goto error; -
connection.c
old new 756 756 return Py_None; 757 757 } 758 758 759 static char ssl_Connection_get_shutdown_doc[] = "\n\ 760 Get shutdown state\n\ 761 \n\ 762 Arguments: self - The Connection object\n\ 763 args - The Python argument tuple, should be empty\n\ 764 Returns: The shutdown state, a bitmask of SENT_SHUTDOWN, RECEIVED_SHUTDOWN.\n\ 765 "; 766 static PyObject * 767 ssl_Connection_get_shutdown(ssl_ConnectionObj *self, PyObject *args) 768 { 769 if (!PyArg_ParseTuple(args, ":get_shutdown")) 770 return NULL; 771 772 return PyInt_FromLong((long)SSL_get_shutdown(self->ssl)); 773 } 774 775 static char ssl_Connection_set_shutdown_doc[] = "\n\ 776 Set shutdown state\n\ 777 \n\ 778 Arguments: self - The Connection object\n\ 779 args - The Python argument tuple, should be\n\ 780 shutdown state - bitmask of SENT_SHUTDOWN, RECEIVED_SHUTDOWN.\n\ 781 Returns: None\n\ 782 "; 783 static PyObject * 784 ssl_Connection_set_shutdown(ssl_ConnectionObj *self, PyObject *args) 785 { 786 int shutdown; 787 788 if (!PyArg_ParseTuple(args, "i:set_shutdown", &shutdown)) 789 return NULL; 790 791 SSL_set_shutdown(self->ssl, shutdown); 792 Py_INCREF(Py_None); 793 return Py_None; 794 } 795 759 796 static char ssl_Connection_state_string_doc[] = "\n\ 760 797 Get a verbose state description\n\ 761 798 \n\ … … 888 925 ADD_METHOD(makefile), 889 926 ADD_METHOD(get_app_data), 890 927 ADD_METHOD(set_app_data), 928 ADD_METHOD(get_shutdown), 929 ADD_METHOD(set_shutdown), 891 930 ADD_METHOD(state_string), 892 931 ADD_METHOD(sock_shutdown), 893 932 ADD_METHOD(get_peer_certificate),