Convert Epytext markup to RST markup
diff --git a/OpenSSL/ssl/connection.c b/OpenSSL/ssl/connection.c
index 9e9794b..ba6da3f 100755
--- a/OpenSSL/ssl/connection.c
+++ b/OpenSSL/ssl/connection.c
@@ -251,7 +251,7 @@
 static char ssl_Connection_get_context_doc[] = "\n\
 Get session context\n\
 \n\
-@return: A Context object\n\
+:return: A Context object\n\
 ";
 static PyObject *
 ssl_Connection_get_context(ssl_ConnectionObj *self, PyObject *args) {
@@ -266,7 +266,7 @@
 static char ssl_Connection_set_context_doc[] = "\n\
 Switch this connection to a new session context\n\
 \n\
-@param context: A L{Context} instance giving the new session context to use.\n\
+:param context: A L{Context} instance giving the new session context to use.\n\
 \n\
 ";
 static PyObject *
@@ -305,7 +305,7 @@
 Retrieve the servername extension value if provided in the client hello\n\
 message, or None if there wasn't one.\n\
 \n\
-@return: A byte string giving the server name or C{None}.\n\
+:return: A byte string giving the server name or C{None}.\n\
 \n\
 ";
 static PyObject *
@@ -331,7 +331,7 @@
 static char ssl_Connection_set_tlsext_host_name_doc[] = "\n\
 Set the value of the servername extension to send in the client hello.\n\
 \n\
-@param name: A byte string giving the name.\n\
+:param name: A byte string giving the name.\n\
 \n\
 ";
 static PyObject *
@@ -354,7 +354,7 @@
 static char ssl_Connection_pending_doc[] = "\n\
 Get the number of bytes that can be safely read from the connection\n\
 \n\
-@return: The number of bytes available in the receive buffer.\n\
+:return: The number of bytes available in the receive buffer.\n\
 ";
 static PyObject *
 ssl_Connection_pending(ssl_ConnectionObj *self, PyObject *args) {
@@ -372,8 +372,8 @@
 When using non-socket connections this function sends\n\
 \"dirty\" data that would have traveled in on the network.\n\
 \n\
-@param buf: The string to put into the memory BIO.\n\
-@return: The number of bytes written\n\
+:param buf: The string to put into the memory BIO.\n\
+:return: The number of bytes written\n\
 ";
 static PyObject *
 ssl_Connection_bio_write(ssl_ConnectionObj *self, PyObject *args)
@@ -414,10 +414,10 @@
 WantWrite or WantX509Lookup exceptions on this, you have to call the\n\
 method again with the SAME buffer.\n\
 \n\
-@param buf: The string to send\n\
-@param flags: (optional) Included for compatibility with the socket\n\
+:param buf: The string to send\n\
+:param flags: (optional) Included for compatibility with the socket\n\
               API, the value is ignored\n\
-@return: The number of bytes written\n\
+:return: The number of bytes written\n\
 ";
 static PyObject *
 ssl_Connection_send(ssl_ConnectionObj *self, PyObject *args) {
@@ -469,10 +469,10 @@
 all data is sent. If an error occurs, it's impossible to tell how much data\n\
 has been sent.\n\
 \n\
-@param buf: The string to send\n\
-@param flags: (optional) Included for compatibility with the socket\n\
+:param buf: The string to send\n\
+:param flags: (optional) Included for compatibility with the socket\n\
               API, the value is ignored\n\
-@return: The number of bytes written\n\
+:return: The number of bytes written\n\
 ";
 static PyObject *
 ssl_Connection_sendall(ssl_ConnectionObj *self, PyObject *args)
@@ -532,10 +532,10 @@
 WantWrite or WantX509Lookup exceptions on this, you have to call the\n\
 method again with the SAME buffer.\n\
 \n\
-@param bufsiz: The maximum number of bytes to read\n\
-@param flags: (optional) Included for compatibility with the socket\n\
+:param bufsiz: The maximum number of bytes to read\n\
+:param flags: (optional) Included for compatibility with the socket\n\
               API, the value is ignored\n\
-@return: The string read from the Connection\n\
+:return: The string read from the Connection\n\
 ";
 static PyObject *
 ssl_Connection_recv(ssl_ConnectionObj *self, PyObject *args)
@@ -580,8 +580,8 @@
 When using non-socket connections this function reads\n\
 the \"dirty\" data that would have traveled away on the network.\n\
 \n\
-@param bufsiz: The maximum number of bytes to read\n\
-@return: The string read.\n\
+:param bufsiz: The maximum number of bytes to read\n\
+:return: The string read.\n\
 ";
 static PyObject *
 ssl_Connection_bio_read(ssl_ConnectionObj *self, PyObject *args)
@@ -634,7 +634,7 @@
 static char ssl_Connection_renegotiate_doc[] = "\n\
 Renegotiate the session\n\
 \n\
-@return: True if the renegotiation can be started, false otherwise\n\
+:return: True if the renegotiation can be started, false otherwise\n\
 ";
 static PyObject *
 ssl_Connection_renegotiate(ssl_ConnectionObj *self, PyObject *args) {
@@ -660,7 +660,7 @@
 Perform an SSL handshake (usually called after renegotiate() or one of\n\
 set_*_state()). This can raise the same exceptions as send and recv.\n\
 \n\
-@return: None.\n\
+:return: None.\n\
 ";
 static PyObject *
 ssl_Connection_do_handshake(ssl_ConnectionObj *self, PyObject *args)
@@ -698,7 +698,7 @@
 Check if there's a renegotiation in progress, it will return false once\n\
 a renegotiation is finished.\n\
 \n\
-@return: Whether there's a renegotiation in progress\n\
+:return: Whether there's a renegotiation in progress\n\
 ";
 static PyObject *
 ssl_Connection_renegotiate_pending(ssl_ConnectionObj *self, PyObject *args)
@@ -713,7 +713,7 @@
 static char ssl_Connection_total_renegotiations_doc[] = "\n\
 Find out the total number of renegotiations.\n\
 \n\
-@return: The number of renegotiations.\n\
+:return: The number of renegotiations.\n\
 ";
 static PyObject *
 ssl_Connection_total_renegotiations(ssl_ConnectionObj *self, PyObject *args)
@@ -728,7 +728,7 @@
 Set the connection to work in server mode. The handshake will be handled\n\
 automatically by read/write.\n\
 \n\
-@return: None\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Connection_set_accept_state(ssl_ConnectionObj *self, PyObject *args)
@@ -746,7 +746,7 @@
 Set the connection to work in client mode. The handshake will be handled\n\
 automatically by read/write.\n\
 \n\
-@return: None\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Connection_set_connect_state(ssl_ConnectionObj *self, PyObject *args)
@@ -763,8 +763,8 @@
 static char ssl_Connection_connect_doc[] = "\n\
 Connect to remote host and set up client-side SSL\n\
 \n\
-@param addr: A remote address\n\
-@return: What the socket's connect method returns\n\
+:param addr: A remote address\n\
+:return: What the socket's connect method returns\n\
 ";
 static PyObject *
 ssl_Connection_connect(ssl_ConnectionObj *self, PyObject *args)
@@ -788,8 +788,8 @@
 Connect to remote host and set up client-side SSL. Note that if the socket's\n\
 connect_ex method doesn't return 0, SSL won't be initialized.\n\
 \n\
-@param addr: A remove address\n\
-@return: What the socket's connect_ex method returns\n\
+:param addr: A remove address\n\
+:return: What the socket's connect_ex method returns\n\
 ";
 static PyObject *
 ssl_Connection_connect_ex(ssl_ConnectionObj *self, PyObject *args)
@@ -809,7 +809,7 @@
 static char ssl_Connection_accept_doc[] = "\n\
 Accept incoming connection and set up SSL on it\n\
 \n\
-@return: A (conn,addr) pair where conn is a Connection and addr is an\n\
+:return: A (conn,addr) pair where conn is a Connection and addr is an\n\
          address\n\
 ";
 static PyObject *
@@ -853,7 +853,7 @@
 When using non-socket connections this function signals end of\n\
 data on the input for this connection.\n\
 \n\
-@return: None\n\
+:return: None\n\
 ";
 
 static PyObject *
@@ -875,7 +875,7 @@
 static char ssl_Connection_shutdown_doc[] = "\n\
 Send closure alert\n\
 \n\
-@return: True if the shutdown completed successfully (i.e. both sides\n\
+:return: True if the shutdown completed successfully (i.e. both sides\n\
          have sent closure alerts), false otherwise (i.e. you have to\n\
          wait for a ZeroReturnError on a recv() method call\n\
 ";
@@ -917,7 +917,7 @@
 static char ssl_Connection_get_cipher_list_doc[] = "\n\
 Get the session cipher list\n\
 \n\
-@return: A list of cipher strings\n\
+:return: A list of cipher strings\n\
 ";
 static PyObject *
 ssl_Connection_get_cipher_list(ssl_ConnectionObj *self, PyObject *args)
@@ -943,7 +943,7 @@
 static char ssl_Connection_get_client_ca_list_doc[] = "\n\
 Get CAs whose certificates are suggested for client authentication.\n\
 \n\
-@return: If this is a server connection, a list of X509Names representing\n\
+:return: If this is a server connection, a list of X509Names representing\n\
     the acceptable CAs as set by L{OpenSSL.SSL.Context.set_client_ca_list} or\n\
     L{OpenSSL.SSL.Context.add_client_ca}.  If this is a client connection,\n\
     the list of such X509Names sent by the server, or an empty list if that\n\
@@ -997,7 +997,7 @@
 The makefile() method is not implemented, since there is no dup semantics\n\
 for SSL connections\n\
 \n\
-@raise NotImplementedError\n\
+:raise NotImplementedError\n\
 ";
 static PyObject *
 ssl_Connection_makefile(ssl_ConnectionObj *self, PyObject *args)
@@ -1009,7 +1009,7 @@
 static char ssl_Connection_get_app_data_doc[] = "\n\
 Get application data\n\
 \n\
-@return: The application data\n\
+:return: The application data\n\
 ";
 static PyObject *
 ssl_Connection_get_app_data(ssl_ConnectionObj *self, PyObject *args)
@@ -1024,8 +1024,8 @@
 static char ssl_Connection_set_app_data_doc[] = "\n\
 Set application data\n\
 \n\
-@param data - The application data\n\
-@return: None\n\
+:param data - The application data\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Connection_set_app_data(ssl_ConnectionObj *self, PyObject *args)
@@ -1046,7 +1046,7 @@
 static char ssl_Connection_get_shutdown_doc[] = "\n\
 Get shutdown state\n\
 \n\
-@return: The shutdown state, a bitvector of SENT_SHUTDOWN, RECEIVED_SHUTDOWN.\n\
+:return: The shutdown state, a bitvector of SENT_SHUTDOWN, RECEIVED_SHUTDOWN.\n\
 ";
 static PyObject *
 ssl_Connection_get_shutdown(ssl_ConnectionObj *self, PyObject *args)
@@ -1060,8 +1060,8 @@
 static char ssl_Connection_set_shutdown_doc[] = "\n\
 Set shutdown state\n\
 \n\
-@param state - bitvector of SENT_SHUTDOWN, RECEIVED_SHUTDOWN.\n\
-@return: None\n\
+:param state - bitvector of SENT_SHUTDOWN, RECEIVED_SHUTDOWN.\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Connection_set_shutdown(ssl_ConnectionObj *self, PyObject *args)
@@ -1079,7 +1079,7 @@
 static char ssl_Connection_state_string_doc[] = "\n\
 Get a verbose state description\n\
 \n\
-@return: A string representing the state\n\
+:return: A string representing the state\n\
 ";
 static PyObject *
 ssl_Connection_state_string(ssl_ConnectionObj *self, PyObject *args)
@@ -1093,7 +1093,7 @@
 static char ssl_Connection_client_random_doc[] = "\n\
 Get a copy of the client hello nonce.\n\
 \n\
-@return: A string representing the state\n\
+:return: A string representing the state\n\
 ";
 static PyObject *
 ssl_Connection_client_random(ssl_ConnectionObj *self, PyObject *args)
@@ -1111,7 +1111,7 @@
 static char ssl_Connection_server_random_doc[] = "\n\
 Get a copy of the server hello nonce.\n\
 \n\
-@return: A string representing the state\n\
+:return: A string representing the state\n\
 ";
 static PyObject *
 ssl_Connection_server_random(ssl_ConnectionObj *self, PyObject *args)
@@ -1129,7 +1129,7 @@
 static char ssl_Connection_master_key_doc[] = "\n\
 Get a copy of the master key.\n\
 \n\
-@return: A string representing the state\n\
+:return: A string representing the state\n\
 ";
 static PyObject *
 ssl_Connection_master_key(ssl_ConnectionObj *self, PyObject *args)
@@ -1147,7 +1147,7 @@
 static char ssl_Connection_sock_shutdown_doc[] = "\n\
 See shutdown(2)\n\
 \n\
-@return: What the socket's shutdown() method returns\n\
+:return: What the socket's shutdown() method returns\n\
 ";
 static PyObject *
 ssl_Connection_sock_shutdown(ssl_ConnectionObj *self, PyObject *args)
@@ -1164,7 +1164,7 @@
 static char ssl_Connection_get_peer_certificate_doc[] = "\n\
 Retrieve the other side's certificate (if any)\n\
 \n\
-@return: The peer's certificate\n\
+:return: The peer's certificate\n\
 ";
 static PyObject *
 ssl_Connection_get_peer_certificate(ssl_ConnectionObj *self, PyObject *args)
@@ -1189,7 +1189,7 @@
 static char ssl_Connection_get_peer_cert_chain_doc[] = "\n\
 Retrieve the other side's certificate (if any)\n\
 \n\
-@return: A list of X509 instances giving the peer's certificate chain,\n\
+:return: A list of X509 instances giving the peer's certificate chain,\n\
          or None if it does not have one.\n\
 ";
 static PyObject *
@@ -1228,7 +1228,7 @@
 Checks if more data has to be read from the transport layer to complete an\n\
 operation.\n\
 \n\
-@return: True iff more data has to be read\n\
+:return: True iff more data has to be read\n\
 ";
 static PyObject *
 ssl_Connection_want_read(ssl_ConnectionObj *self, PyObject *args)
@@ -1243,7 +1243,7 @@
 Checks if there is data to write to the transport layer to complete an\n\
 operation.\n\
 \n\
-@return: True iff there is data to write\n\
+:return: True iff there is data to write\n\
 ";
 static PyObject *
 ssl_Connection_want_write(ssl_ConnectionObj *self, PyObject *args)
@@ -1320,8 +1320,8 @@
 Create a new Connection object, using the given OpenSSL.SSL.Context instance\n\
 and socket.\n\
 \n\
-@param context: An SSL Context to use for this connection\n\
-@param socket: The socket to use for transport layer\n\
+:param context: An SSL Context to use for this connection\n\
+:param socket: The socket to use for transport layer\n\
 ";
 
 /*
diff --git a/OpenSSL/ssl/context.c b/OpenSSL/ssl/context.c
index c2bdcab..9f936f4 100644
--- a/OpenSSL/ssl/context.c
+++ b/OpenSSL/ssl/context.c
@@ -292,7 +292,7 @@
 OpenSSL.SSL.Context instances define the parameters for setting up new SSL\n\
 connections.\n\
 \n\
-@param method: One of " SSLv2_METHOD_TEXT "SSLv3_METHOD, SSLv23_METHOD, or\n\
+:param method: One of " SSLv2_METHOD_TEXT "SSLv3_METHOD, SSLv23_METHOD, or\n\
                TLSv1_METHOD.\n\
 ";
 
@@ -302,9 +302,9 @@
 Let SSL know where we can find trusted certificates for the certificate\n\
 chain\n\
 \n\
-@param cafile: In which file we can find the certificates\n\
-@param capath: In which directory we can find the certificates\n\
-@return: None\n\
+:param cafile: In which file we can find the certificates\n\
+:param capath: In which directory we can find the certificates\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_load_verify_locations(ssl_ContextObj *self, PyObject *args) {
@@ -330,7 +330,7 @@
 static char ssl_Context_set_default_verify_paths_doc[] = "\n\
 Use the platform-specific CA certificate locations\n\
 \n\
-@return: None\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_set_default_verify_paths(ssl_ContextObj *self, PyObject *args) {
@@ -354,10 +354,10 @@
 static char ssl_Context_set_passwd_cb_doc[] = "\n\
 Set the passphrase callback\n\
 \n\
-@param callback: The Python callback to use\n\
-@param userdata: (optional) A Python object which will be given as\n\
+:param callback: The Python callback to use\n\
+:param userdata: (optional) A Python object which will be given as\n\
                  argument to the callback\n\
-@return: None\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_set_passwd_cb(ssl_ContextObj *self, PyObject *args)
@@ -459,8 +459,8 @@
 static char ssl_Context_add_extra_chain_cert_doc[] = "\n\
 Add certificate to chain\n\
 \n\
-@param certobj: The X509 certificate object to add to the chain\n\
-@return: None\n\
+:param certobj: The X509 certificate object to add to the chain\n\
+:return: None\n\
 ";
 
 static PyObject *
@@ -496,8 +496,8 @@
 static char ssl_Context_use_certificate_chain_file_doc[] = "\n\
 Load a certificate chain from a file\n\
 \n\
-@param certfile: The name of the certificate chain file\n\
-@return: None\n\
+:param certfile: The name of the certificate chain file\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_use_certificate_chain_file(ssl_ContextObj *self, PyObject *args)
@@ -523,9 +523,9 @@
 static char ssl_Context_use_certificate_file_doc[] = "\n\
 Load a certificate from a file\n\
 \n\
-@param certfile: The name of the certificate file\n\
-@param filetype: (optional) The encoding of the file, default is PEM\n\
-@return: None\n\
+:param certfile: The name of the certificate file\n\
+:param filetype: (optional) The encoding of the file, default is PEM\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_use_certificate_file(ssl_ContextObj *self, PyObject *args)
@@ -551,8 +551,8 @@
 static char ssl_Context_use_certificate_doc[] = "\n\
 Load a certificate from a X509 object\n\
 \n\
-@param cert: The X509 object\n\
-@return: None\n\
+:param cert: The X509 object\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_use_certificate(ssl_ContextObj *self, PyObject *args)
@@ -578,9 +578,9 @@
 static char ssl_Context_use_privatekey_file_doc[] = "\n\
 Load a private key from a file\n\
 \n\
-@param keyfile: The name of the key file\n\
-@param filetype: (optional) The encoding of the file, default is PEM\n\
-@return: None\n\
+:param keyfile: The name of the key file\n\
+:param filetype: (optional) The encoding of the file, default is PEM\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_use_privatekey_file(ssl_ContextObj *self, PyObject *args)
@@ -616,8 +616,8 @@
 static char ssl_Context_use_privatekey_doc[] = "\n\
 Load a private key from a PKey object\n\
 \n\
-@param pkey: The PKey object\n\
-@return: None\n\
+:param pkey: The PKey object\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_use_privatekey(ssl_ContextObj *self, PyObject *args) {
@@ -646,7 +646,7 @@
 static char ssl_Context_check_privatekey_doc[] = "\n\
 Check that the private key and certificate match up\n\
 \n\
-@return: None (raises an exception if something's wrong)\n\
+:return: None (raises an exception if something's wrong)\n\
 ";
 static PyObject *
 ssl_Context_check_privatekey(ssl_ContextObj *self, PyObject *args)
@@ -672,8 +672,8 @@
 imply any of the certificates are trusted; that must be configured\n\
 separately.\n\
 \n\
-@param cafile: The name of the certificates file\n\
-@return: None\n\
+:param cafile: The name of the certificates file\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_load_client_ca(ssl_ContextObj *self, PyObject *args)
@@ -693,8 +693,8 @@
 Set the session identifier, this is needed if you want to do session\n\
 resumption (which, ironically, isn't implemented yet)\n\
 \n\
-@param buf: A Python object that can be safely converted to a string\n\
-@returns: None\n\
+:param buf: A Python object that can be safely converted to a string\n\
+:returns: None\n\
 ";
 static PyObject *
 ssl_Context_set_session_id(ssl_ContextObj *self, PyObject *args)
@@ -720,10 +720,10 @@
 static char ssl_Context_set_verify_doc[] = "\n\
 Set the verify mode and verify callback\n\
 \n\
-@param mode: The verify mode, this is either VERIFY_NONE or\n\
+:param mode: The verify mode, this is either VERIFY_NONE or\n\
              VERIFY_PEER combined with possible other flags\n\
-@param callback: The Python callback to use\n\
-@return: None\n\
+:param callback: The Python callback to use\n\
+:return: None\n\
 \n\
 See SSL_CTX_set_verify(3SSL) for further details.\n\
 ";
@@ -754,8 +754,8 @@
 static char ssl_Context_set_verify_depth_doc[] = "\n\
 Set the verify depth\n\
 \n\
-@param depth: An integer specifying the verify depth\n\
-@return: None\n\
+:param depth: An integer specifying the verify depth\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_set_verify_depth(ssl_ContextObj *self, PyObject *args)
@@ -773,7 +773,7 @@
 static char ssl_Context_get_verify_mode_doc[] = "\n\
 Get the verify mode\n\
 \n\
-@return: The verify mode\n\
+:return: The verify mode\n\
 ";
 static PyObject *
 ssl_Context_get_verify_mode(ssl_ContextObj *self, PyObject *args)
@@ -790,7 +790,7 @@
 static char ssl_Context_get_verify_depth_doc[] = "\n\
 Get the verify depth\n\
 \n\
-@return: The verify depth\n\
+:return: The verify depth\n\
 ";
 static PyObject *
 ssl_Context_get_verify_depth(ssl_ContextObj *self, PyObject *args)
@@ -807,8 +807,8 @@
 static char ssl_Context_load_tmp_dh_doc[] = "\n\
 Load parameters for Ephemeral Diffie-Hellman\n\
 \n\
-@param dhfile: The file to load EDH parameters from\n\
-@return: None\n\
+:param dhfile: The file to load EDH parameters from\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_load_tmp_dh(ssl_ContextObj *self, PyObject *args)
@@ -838,8 +838,8 @@
 static char ssl_Context_set_cipher_list_doc[] = "\n\
 Change the cipher list\n\
 \n\
-@param cipher_list: A cipher list, see ciphers(1)\n\
-@return: None\n\
+:param cipher_list: A cipher list, see ciphers(1)\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_set_cipher_list(ssl_ContextObj *self, PyObject *args)
@@ -867,8 +867,8 @@
 This list of certificate authorities will be sent to the client when the\n\
 server requests a client certificate.\n\
 \n\
-@param certificate_authorities: a sequence of X509Names.\n\
-@return: None\n\
+:param certificate_authorities: a sequence of X509Names.\n\
+:return: None\n\
 ";
 
 static PyObject *
@@ -945,8 +945,8 @@
 The list of certificate authorities will be sent to the client when the\n\
 server requests a client certificate.\n\
 \n\
-@param certificate_authority: certificate authority's X509 certificate.\n\
-@return: None\n\
+:param certificate_authority: certificate authority's X509 certificate.\n\
+:return: None\n\
 ";
 
 static PyObject *
@@ -969,8 +969,8 @@
 static char ssl_Context_set_timeout_doc[] = "\n\
 Set session timeout\n\
 \n\
-@param timeout: The timeout in seconds\n\
-@return: The previous session timeout\n\
+:param timeout: The timeout in seconds\n\
+:return: The previous session timeout\n\
 ";
 static PyObject *
 ssl_Context_set_timeout(ssl_ContextObj *self, PyObject *args)
@@ -987,7 +987,7 @@
 static char ssl_Context_get_timeout_doc[] = "\n\
 Get the session timeout\n\
 \n\
-@return: The session timeout\n\
+:return: The session timeout\n\
 ";
 static PyObject *
 ssl_Context_get_timeout(ssl_ContextObj *self, PyObject *args)
@@ -1004,8 +1004,8 @@
 static char ssl_Context_set_info_callback_doc[] = "\n\
 Set the info callback\n\
 \n\
-@param callback: The Python callback to use\n\
-@return: None\n\
+:param callback: The Python callback to use\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_set_info_callback(ssl_ContextObj *self, PyObject *args)
@@ -1033,7 +1033,7 @@
 static char ssl_Context_get_app_data_doc[] = "\n\
 Get the application data (supplied via set_app_data())\n\
 \n\
-@return: The application data\n\
+:return: The application data\n\
 ";
 static PyObject *
 ssl_Context_get_app_data(ssl_ContextObj *self, PyObject *args)
@@ -1048,8 +1048,8 @@
 static char ssl_Context_set_app_data_doc[] = "\n\
 Set the application data (will be returned from get_app_data())\n\
 \n\
-@param data: Any Python object\n\
-@return: None\n\
+:param data: Any Python object\n\
+:return: None\n\
 ";
 static PyObject *
 ssl_Context_set_app_data(ssl_ContextObj *self, PyObject *args)
@@ -1070,7 +1070,7 @@
 static char ssl_Context_get_cert_store_doc[] = "\n\
 Get the certificate store for the context\n\
 \n\
-@return: A X509Store object\n\
+:return: A X509Store object\n\
 ";
 static PyObject *
 ssl_Context_get_cert_store(ssl_ContextObj *self, PyObject *args)
@@ -1094,8 +1094,8 @@
 static char ssl_Context_set_options_doc[] = "\n\
 Add options. Options set before are not cleared!\n\
 \n\
-@param options: The options to add.\n\
-@return: The new option bitmask.\n\
+:param options: The options to add.\n\
+:return: The new option bitmask.\n\
 ";
 static PyObject *
 ssl_Context_set_options(ssl_ContextObj *self, PyObject *args)
@@ -1111,7 +1111,7 @@
 static char ssl_Context_set_tlsext_servername_callback_doc[] = "\n\
 Specify a callback function to be called when clients specify a server name.\n\
 \n\
-@param callback: The callback function.  It will be invoked with one\n\
+:param callback: The callback function.  It will be invoked with one\n\
     argument, the Connection instance.\n\
 \n\
 ";
diff --git a/OpenSSL/ssl/ssl.c b/OpenSSL/ssl/ssl.c
index 0dd9871..03558c7 100644
--- a/OpenSSL/ssl/ssl.c
+++ b/OpenSSL/ssl/ssl.c
@@ -53,7 +53,7 @@
 static char ssl_SSLeay_version_doc[] = "\n\
 Return a string describing the version of OpenSSL in use.\n\
 \n\
-@param type: One of the SSLEAY_ constants defined in this module.\n\
+:param type: One of the SSLEAY_ constants defined in this module.\n\
 ";
 
 static PyObject *