Convert Epytext markup to RST markup
diff --git a/OpenSSL/crypto/crl.c b/OpenSSL/crypto/crl.c
index eec5bcb..97326f8 100644
--- a/OpenSSL/crypto/crl.c
+++ b/OpenSSL/crypto/crl.c
@@ -37,7 +37,7 @@
Return revoked portion of the CRL structure (by value\n\
not reference).\n\
\n\
-@return: A tuple of Revoked objects.\n\
+:return: A tuple of Revoked objects.\n\
";
static PyObject *
crypto_CRL_get_revoked(crypto_CRLObj *self, PyObject *args) {
@@ -84,9 +84,9 @@
static char crypto_CRL_add_revoked_doc[] = "\n\
Add a revoked (by value not reference) to the CRL structure\n\
\n\
-@param cert: The new revoked.\n\
-@type cert: L{X509}\n\
-@return: None\n\
+:param cert: The new revoked.\n\
+:type cert: L{X509}\n\
+:return: None\n\
";
static PyObject *
crypto_CRL_add_revoked(crypto_CRLObj *self, PyObject *args, PyObject *keywds) {
@@ -112,14 +112,14 @@
static char crypto_CRL_export_doc[] = "\n\
export(cert, key[, type[, days]]) -> export a CRL as a string\n\
\n\
-@param cert: Used to sign CRL.\n\
-@type cert: L{X509}\n\
-@param key: Used to sign CRL.\n\
-@type key: L{PKey}\n\
-@param type: The export format, either L{FILETYPE_PEM}, L{FILETYPE_ASN1}, or L{FILETYPE_TEXT}.\n\
-@param days: The number of days until the next update of this CRL.\n\
-@type days: L{int}\n\
-@return: L{str}\n\
+:param cert: Used to sign CRL.\n\
+:type cert: L{X509}\n\
+:param key: Used to sign CRL.\n\
+:type key: L{PKey}\n\
+:param type: The export format, either L{FILETYPE_PEM}, L{FILETYPE_ASN1}, or L{FILETYPE_TEXT}.\n\
+:param days: The number of days until the next update of this CRL.\n\
+:type days: L{int}\n\
+:return: L{str}\n\
";
static PyObject *
crypto_CRL_export(crypto_CRLObj *self, PyObject *args, PyObject *keywds) {
@@ -223,7 +223,7 @@
\n\
Create a new empty CRL object.\n\
\n\
-@returns: The CRL object\n\
+:returns: The CRL object\n\
";
static PyObject* crypto_CRL_new(PyTypeObject *subtype, PyObject *args, PyObject *kwargs) {
diff --git a/OpenSSL/crypto/crypto.c b/OpenSSL/crypto/crypto.c
index 3573a12..421eabc 100644
--- a/OpenSSL/crypto/crypto.c
+++ b/OpenSSL/crypto/crypto.c
@@ -64,13 +64,13 @@
static char crypto_load_privatekey_doc[] = "\n\
Load a private key from a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
-@param buffer: The buffer the key is stored in\n\
-@param passphrase: (optional) if encrypted PEM format, this can be\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param buffer: The buffer the key is stored in\n\
+:param passphrase: (optional) if encrypted PEM format, this can be\n\
either the passphrase to use, or a callback for\n\
providing the passphrase.\n\
\n\
-@return: The PKey object\n\
+:return: The PKey object\n\
";
static PyObject *
@@ -137,15 +137,15 @@
static char crypto_dump_privatekey_doc[] = "\n\
Dump a private key to a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
-@param pkey: The PKey to dump\n\
-@param cipher: (optional) if encrypted PEM format, the cipher to\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param pkey: The PKey to dump\n\
+:param cipher: (optional) if encrypted PEM format, the cipher to\n\
use\n\
-@param passphrase - (optional) if encrypted PEM format, this can be either\n\
+:param passphrase - (optional) if encrypted PEM format, this can be either\n\
the passphrase to use, or a callback for providing the\n\
passphrase.\n\
-@return: The buffer with the dumped key in\n\
-@rtype: C{str}\n\
+:return: The buffer with the dumped key in\n\
+:rtype: C{str}\n\
";
static PyObject *
@@ -242,9 +242,9 @@
static char crypto_load_certificate_doc[] = "\n\
Load a certificate from a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
buffer - The buffer the certificate is stored in\n\
-@return: The X509 object\n\
+:return: The X509 object\n\
";
static PyObject *
@@ -289,9 +289,9 @@
static char crypto_dump_certificate_doc[] = "\n\
Dump a certificate to a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
-@param cert: The certificate to dump\n\
-@return: The buffer with the dumped certificate in\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param cert: The certificate to dump\n\
+:return: The buffer with the dumped certificate in\n\
";
static PyObject *
@@ -345,9 +345,9 @@
static char crypto_load_certificate_request_doc[] = "\n\
Load a certificate request from a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
buffer - The buffer the certificate request is stored in\n\
-@return: The X509Req object\n\
+:return: The X509Req object\n\
";
static PyObject *
@@ -392,9 +392,9 @@
static char crypto_dump_certificate_request_doc[] = "\n\
Dump a certificate request to a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
req - The certificate request to dump\n\
-@return: The buffer with the dumped certificate request in\n\
+:return: The buffer with the dumped certificate request in\n\
";
static PyObject *
@@ -448,10 +448,10 @@
static char crypto_load_crl_doc[] = "\n\
Load a certificate revocation list from a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
-@param buffer: The buffer the CRL is stored in\n\
+:param type: The file type (one of FILETYPE_PEM, FILETYPE_ASN1)\n\
+:param buffer: The buffer the CRL is stored in\n\
\n\
-@return: The PKey object\n\
+:return: The PKey object\n\
";
static PyObject *
@@ -493,9 +493,9 @@
static char crypto_load_pkcs7_data_doc[] = "\n\
Load pkcs7 data from a buffer\n\
\n\
-@param type: The file type (one of FILETYPE_PEM or FILETYPE_ASN1)\n\
+:param type: The file type (one of FILETYPE_PEM or FILETYPE_ASN1)\n\
buffer - The buffer with the pkcs7 data.\n\
-@return: The PKCS7 object\n\
+:return: The PKCS7 object\n\
";
static PyObject *
@@ -545,9 +545,9 @@
static char crypto_load_pkcs12_doc[] = "\n\
Load a PKCS12 object from a buffer\n\
\n\
-@param buffer: The buffer the certificate is stored in\n\
+:param buffer: The buffer the certificate is stored in\n\
passphrase (Optional) - The password to decrypt the PKCS12 lump\n\
-@returns: The PKCS12 object\n\
+:returns: The PKCS12 object\n\
";
static PyObject *
@@ -577,8 +577,8 @@
static char crypto_X509_verify_cert_error_string_doc[] = "\n\
Get X509 verify certificate error string.\n\
\n\
-@param errnum: The error number.\n\
-@return: Error string as a Python string\n\
+:param errnum: The error number.\n\
+:return: Error string as a Python string\n\
";
static PyObject *
@@ -607,10 +607,10 @@
static char crypto_sign_doc[] = "\n\
Sign data with a digest\n\
\n\
-@param pkey: Pkey to sign with\n\
-@param data: data to be signed\n\
-@param digest: message digest to use\n\
-@return: signature\n\
+:param pkey: Pkey to sign with\n\
+:param data: data to be signed\n\
+:param digest: message digest to use\n\
+:return: signature\n\
";
static PyObject *
@@ -654,11 +654,11 @@
static char crypto_verify_doc[] = "\n\
Verify a signature\n\
\n\
-@param cert: signing certificate (X509 object)\n\
-@param signature: signature returned by sign function\n\
-@param data: data to be verified\n\
-@param digest: message digest to use\n\
-@return: None if the signature is correct, raise exception otherwise\n\
+:param cert: signing certificate (X509 object)\n\
+:param signature: signature returned by sign function\n\
+:param data: data to be verified\n\
+:param digest: message digest to use\n\
+:return: None if the signature is correct, raise exception otherwise\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/netscape_spki.c b/OpenSSL/crypto/netscape_spki.c
index 9369d50..d6103ca 100644
--- a/OpenSSL/crypto/netscape_spki.c
+++ b/OpenSSL/crypto/netscape_spki.c
@@ -38,9 +38,9 @@
static char crypto_NetscapeSPKI_doc[] = "\n\
NetscapeSPKI([enc]) -> NetscapeSPKI instance\n\
\n\
-@param enc: Base64 encoded NetscapeSPKI object.\n\
-@type enc: C{str}\n\
-@return: The NetscapeSPKI object\n\
+:param enc: Base64 encoded NetscapeSPKI object.\n\
+:type enc: C{str}\n\
+:return: The NetscapeSPKI object\n\
";
static PyObject *
@@ -84,9 +84,9 @@
static char crypto_NetscapeSPKI_sign_doc[] = "\n\
Sign the certificate request using the supplied key and digest\n\
\n\
-@param pkey: The key to sign with\n\
-@param digest: The message digest to use\n\
-@return: None\n\
+:param pkey: The key to sign with\n\
+:param digest: The message digest to use\n\
+:return: None\n\
";
static PyObject *
@@ -129,9 +129,9 @@
static char crypto_NetscapeSPKI_verify_doc[] = "\n\
Verifies a certificate request using the supplied public key\n\
\n\
-@param key: a public key\n\
-@return: True if the signature is correct.\n\
-@raise OpenSSL.crypto.Error: If the signature is invalid or there is a\n\
+:param key: a public key\n\
+:return: True if the signature is correct.\n\
+:raise OpenSSL.crypto.Error: If the signature is invalid or there is a\n\
problem verifying the signature.\n\
";
@@ -156,7 +156,7 @@
static char crypto_NetscapeSPKI_b64_encode_doc[] = "\n\
Generate a base64 encoded string from an SPKI\n\
\n\
-@return: The base64 encoded string\n\
+:return: The base64 encoded string\n\
";
PyObject *
@@ -175,7 +175,7 @@
static char crypto_NetscapeSPKI_get_pubkey_doc[] = "\n\
Get the public key of the certificate\n\
\n\
-@return: The public key\n\
+:return: The public key\n\
";
static PyObject *
@@ -204,8 +204,8 @@
static char crypto_NetscapeSPKI_set_pubkey_doc[] = "\n\
Set the public key of the certificate\n\
\n\
-@param pkey: The public key\n\
-@return: None\n\
+:param pkey: The public key\n\
+:return: None\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/pkcs12.c b/OpenSSL/crypto/pkcs12.c
index a1a5a79..f4878e5 100644
--- a/OpenSSL/crypto/pkcs12.c
+++ b/OpenSSL/crypto/pkcs12.c
@@ -26,7 +26,7 @@
static char crypto_PKCS12_get_certificate_doc[] = "\n\
Return certificate portion of the PKCS12 structure\n\
\n\
-@return: X509 object containing the certificate\n\
+:return: X509 object containing the certificate\n\
";
static PyObject *
crypto_PKCS12_get_certificate(crypto_PKCS12Obj *self, PyObject *args)
@@ -41,9 +41,9 @@
static char crypto_PKCS12_set_certificate_doc[] = "\n\
Replace the certificate portion of the PKCS12 structure\n\
\n\
-@param cert: The new certificate.\n\
-@type cert: L{X509} or L{NoneType}\n\
-@return: None\n\
+:param cert: The new certificate.\n\
+:type cert: L{X509} or L{NoneType}\n\
+:return: None\n\
";
static PyObject *
crypto_PKCS12_set_certificate(crypto_PKCS12Obj *self, PyObject *args, PyObject *keywds) {
@@ -70,7 +70,7 @@
static char crypto_PKCS12_get_privatekey_doc[] = "\n\
Return private key portion of the PKCS12 structure\n\
\n\
-@returns: PKey object containing the private key\n\
+:returns: PKey object containing the private key\n\
";
static crypto_PKeyObj *
crypto_PKCS12_get_privatekey(crypto_PKCS12Obj *self, PyObject *args)
@@ -85,9 +85,9 @@
static char crypto_PKCS12_set_privatekey_doc[] = "\n\
Replace or set the certificate portion of the PKCS12 structure\n\
\n\
-@param pkey: The new private key.\n\
-@type pkey: L{PKey}\n\
-@return: None\n\
+:param pkey: The new private key.\n\
+:type pkey: L{PKey}\n\
+:return: None\n\
";
static PyObject *
crypto_PKCS12_set_privatekey(crypto_PKCS12Obj *self, PyObject *args, PyObject *keywds) {
@@ -114,7 +114,7 @@
static char crypto_PKCS12_get_ca_certificates_doc[] = "\n\
Return CA certificates within of the PKCS12 object\n\
\n\
-@return: A newly created tuple containing the CA certificates in the chain,\n\
+:return: A newly created tuple containing the CA certificates in the chain,\n\
if any are present, or None if no CA certificates are present.\n\
";
static PyObject *
@@ -130,9 +130,9 @@
static char crypto_PKCS12_set_ca_certificates_doc[] = "\n\
Replace or set the CA certificates withing the PKCS12 object.\n\
\n\
-@param cacerts: The new CA certificates.\n\
-@type cacerts: Iterable of L{X509} or L{NoneType}\n\
-@return: None\n\
+:param cacerts: The new CA certificates.\n\
+:type cacerts: Iterable of L{X509} or L{NoneType}\n\
+:return: None\n\
";
static PyObject *
crypto_PKCS12_set_ca_certificates(crypto_PKCS12Obj *self, PyObject *args, PyObject *keywds)
@@ -176,7 +176,7 @@
static char crypto_PKCS12_get_friendlyname_doc[] = "\n\
Return friendly name portion of the PKCS12 structure\n\
\n\
-@returns: String containing the friendlyname\n\
+:returns: String containing the friendlyname\n\
";
static PyObject *
crypto_PKCS12_get_friendlyname(crypto_PKCS12Obj *self, PyObject *args) {
@@ -190,9 +190,9 @@
static char crypto_PKCS12_set_friendlyname_doc[] = "\n\
Replace or set the certificate portion of the PKCS12 structure\n\
\n\
-@param name: The new friendly name.\n\
-@type name: L{str}\n\
-@return: None\n\
+:param name: The new friendly name.\n\
+:type name: L{str}\n\
+:return: None\n\
";
static PyObject *
crypto_PKCS12_set_friendlyname(crypto_PKCS12Obj *self, PyObject *args, PyObject *keywds) {
@@ -220,13 +220,13 @@
export([passphrase=None][, friendly_name=None][, iter=2048][, maciter=1]\n\
Dump a PKCS12 object as a string. See also \"man PKCS12_create\".\n\
\n\
-@param passphrase: used to encrypt the PKCS12\n\
-@type passphrase: L{str}\n\
-@param iter: How many times to repeat the encryption\n\
-@type iter: L{int}\n\
-@param maciter: How many times to repeat the MAC\n\
-@type maciter: L{int}\n\
-@return: The string containing the PKCS12\n\
+:param passphrase: used to encrypt the PKCS12\n\
+:type passphrase: L{str}\n\
+:param iter: How many times to repeat the encryption\n\
+:type iter: L{int}\n\
+:param maciter: How many times to repeat the MAC\n\
+:type maciter: L{int}\n\
+:return: The string containing the PKCS12\n\
";
static PyObject *
crypto_PKCS12_export(crypto_PKCS12Obj *self, PyObject *args, PyObject *keywds) {
@@ -439,7 +439,7 @@
\n\
Create a new empty PKCS12 object.\n\
\n\
-@returns: The PKCS12 object\n\
+:returns: The PKCS12 object\n\
";
static PyObject *
crypto_PKCS12_new(PyTypeObject *subtype, PyObject *args, PyObject *kwargs) {
diff --git a/OpenSSL/crypto/pkcs7.c b/OpenSSL/crypto/pkcs7.c
index 1770f7f..24adde8 100644
--- a/OpenSSL/crypto/pkcs7.c
+++ b/OpenSSL/crypto/pkcs7.c
@@ -15,7 +15,7 @@
static char crypto_PKCS7_type_is_signed_doc[] = "\n\
Check if this NID_pkcs7_signed object\n\
\n\
-@return: True if the PKCS7 is of type signed\n\
+:return: True if the PKCS7 is of type signed\n\
";
static PyObject *
@@ -33,7 +33,7 @@
static char crypto_PKCS7_type_is_enveloped_doc[] = "\n\
Check if this NID_pkcs7_enveloped object\n\
\n\
-@returns: True if the PKCS7 is of type enveloped\n\
+:returns: True if the PKCS7 is of type enveloped\n\
";
static PyObject *
@@ -51,7 +51,7 @@
static char crypto_PKCS7_type_is_signedAndEnveloped_doc[] = "\n\
Check if this NID_pkcs7_signedAndEnveloped object\n\
\n\
-@returns: True if the PKCS7 is of type signedAndEnveloped\n\
+:returns: True if the PKCS7 is of type signedAndEnveloped\n\
";
static PyObject *
@@ -69,7 +69,7 @@
static char crypto_PKCS7_type_is_data_doc[] = "\n\
Check if this NID_pkcs7_data object\n\
\n\
-@return: True if the PKCS7 is of type data\n\
+:return: True if the PKCS7 is of type data\n\
";
static PyObject *
@@ -87,7 +87,7 @@
static char crypto_PKCS7_get_type_name_doc[] = "\n\
Returns the type name of the PKCS7 structure\n\
\n\
-@return: A string with the typename\n\
+:return: A string with the typename\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/pkey.c b/OpenSSL/crypto/pkey.c
index 1f78682..27ea4d4 100644
--- a/OpenSSL/crypto/pkey.c
+++ b/OpenSSL/crypto/pkey.c
@@ -30,9 +30,9 @@
static char crypto_PKey_generate_key_doc[] = "\n\
Generate a key of a given type, with a given number of a bits\n\
\n\
-@param type: The key type (TYPE_RSA or TYPE_DSA)\n\
-@param bits: The number of bits\n\
-@return: None\n\
+:param type: The key type (TYPE_RSA or TYPE_DSA)\n\
+:param bits: The number of bits\n\
+:return: None\n\
";
static PyObject *
@@ -80,7 +80,7 @@
static char crypto_PKey_bits_doc[] = "\n\
Returns the number of bits of the key\n\
\n\
-@return: The number of bits of the key.\n\
+:return: The number of bits of the key.\n\
";
static PyObject *
@@ -95,7 +95,7 @@
static char crypto_PKey_type_doc[] = "\n\
Returns the type of the key\n\
\n\
-@return: The type of the key.\n\
+:return: The type of the key.\n\
";
static PyObject *
@@ -110,9 +110,9 @@
static char crypto_PKey_check_doc[] = "\n\
Check the consistency of an RSA private key.\n\
\n\
-@return: True if key is consistent.\n\
-@raise Error: if the key is inconsistent.\n\
-@raise TypeError: if the key is of a type which cannot be checked.\n\
+:return: True if key is consistent.\n\
+:raise Error: if the key is inconsistent.\n\
+:raise TypeError: if the key is of a type which cannot be checked.\n\
Only RSA keys can currently be checked.\n\
";
@@ -194,7 +194,7 @@
\n\
Create a new PKey object.\n\
\n\
-@return: The PKey object\n\
+:return: The PKey object\n\
";
static PyObject*
crypto_PKey_new(PyTypeObject *subtype, PyObject *args, PyObject *kwargs) {
diff --git a/OpenSSL/crypto/revoked.c b/OpenSSL/crypto/revoked.c
index 93f9946..8087fca 100644
--- a/OpenSSL/crypto/revoked.c
+++ b/OpenSSL/crypto/revoked.c
@@ -26,7 +26,7 @@
static char crypto_Revoked_all_reasons_doc[] = "\n\
Return a list of all the supported reason strings.\n\
\n\
-@return: A list of reason strings.\n\
+:return: A list of reason strings.\n\
";
static PyObject *
crypto_Revoked_all_reasons(crypto_RevokedObj *self, PyObject *args) {
@@ -126,9 +126,9 @@
static char crypto_Revoked_set_reason_doc[] = "\n\
Set the reason of a Revoked object.\n\
\n\
-@param reason: The reason string.\n\
-@type reason: L{str}\n\
-@return: None\n\
+:param reason: The reason string.\n\
+:type reason: L{str}\n\
+:return: None\n\
";
static PyObject *
crypto_Revoked_set_reason(crypto_RevokedObj *self, PyObject *args, PyObject *keywds) {
@@ -176,7 +176,7 @@
static char crypto_Revoked_get_reason_doc[] = "\n\
Return the reason of a Revoked object.\n\
\n\
-@return: The reason as a string\n\
+:return: The reason as a string\n\
";
static PyObject *
crypto_Revoked_get_reason(crypto_RevokedObj *self, PyObject *args) {
@@ -204,7 +204,7 @@
static char crypto_Revoked_get_rev_date_doc[] = "\n\
Retrieve the revocation date\n\
\n\
-@return: A string giving the timestamp, in the format:\n\
+:return: A string giving the timestamp, in the format:\n\
\n\
YYYYMMDDhhmmssZ\n\
YYYYMMDDhhmmss+hhmm\n\
@@ -221,13 +221,13 @@
static char crypto_Revoked_set_rev_date_doc[] = "\n\
Set the revocation timestamp\n\
\n\
-@param when: A string giving the timestamp, in the format:\n\
+:param when: A string giving the timestamp, in the format:\n\
\n\
YYYYMMDDhhmmssZ\n\
YYYYMMDDhhmmss+hhmm\n\
YYYYMMDDhhmmss-hhmm\n\
\n\
-@return: None\n\
+:return: None\n\
";
static PyObject*
@@ -278,7 +278,7 @@
static char crypto_Revoked_get_serial_doc[] = "\n\
Return the serial number of a Revoked structure\n\
\n\
-@return: The serial number as a string\n\
+:return: The serial number as a string\n\
";
static PyObject *
crypto_Revoked_get_serial(crypto_RevokedObj *self, PyObject *args) {
@@ -298,9 +298,9 @@
static char crypto_Revoked_set_serial_doc[] = "\n\
Set the serial number of a revoked Revoked structure\n\
\n\
-@param hex_str: The new serial number.\n\
-@type hex_str: L{str}\n\
-@return: None\n\
+:param hex_str: The new serial number.\n\
+:type hex_str: L{str}\n\
+:return: None\n\
";
static PyObject *
crypto_Revoked_set_serial(crypto_RevokedObj *self, PyObject *args, PyObject *keywds) {
@@ -377,7 +377,7 @@
\n\
Create a new empty Revoked object.\n\
\n\
-@returns: The Revoked object\n\
+:returns: The Revoked object\n\
";
static PyObject* crypto_Revoked_new(PyTypeObject *subtype, PyObject *args, PyObject *kwargs) {
diff --git a/OpenSSL/crypto/x509.c b/OpenSSL/crypto/x509.c
index 0754dec..0ea6542 100644
--- a/OpenSSL/crypto/x509.c
+++ b/OpenSSL/crypto/x509.c
@@ -23,7 +23,7 @@
static char crypto_X509_get_version_doc[] = "\n\
Return version number of the certificate\n\
\n\
-@return: Version number as a Python integer\n\
+:return: Version number as a Python integer\n\
";
static PyObject *
@@ -38,8 +38,8 @@
static char crypto_X509_set_version_doc[] = "\n\
Set version number of the certificate\n\
\n\
-@param version: The version number\n\
-@return: None\n\
+:param version: The version number\n\
+:return: None\n\
";
static PyObject *
@@ -59,7 +59,7 @@
static char crypto_X509_get_serial_number_doc[] = "\n\
Return serial number of the certificate\n\
\n\
-@return: Serial number as a Python integer\n\
+:return: Serial number as a Python integer\n\
";
static PyObject *
@@ -85,8 +85,8 @@
static char crypto_X509_set_serial_number_doc[] = "\n\
Set serial number of the certificate\n\
\n\
-@param serial: The serial number\n\
-@return: None\n\
+:param serial: The serial number\n\
+:return: None\n\
";
static PyObject *
@@ -176,7 +176,7 @@
static char crypto_X509_get_issuer_doc[] = "\n\
Create an X509Name object for the issuer of the certificate\n\
\n\
-@return: An X509Name object\n\
+:return: An X509Name object\n\
";
static PyObject *
@@ -201,9 +201,9 @@
static char crypto_X509_set_issuer_doc[] = "\n\
Set the issuer of the certificate\n\
\n\
-@param issuer: The issuer name\n\
-@type issuer: L{X509Name}\n\
-@return: None\n\
+:param issuer: The issuer name\n\
+:type issuer: L{X509Name}\n\
+:return: None\n\
";
static PyObject *
@@ -228,7 +228,7 @@
static char crypto_X509_get_subject_doc[] = "\n\
Create an X509Name object for the subject of the certificate\n\
\n\
-@return: An X509Name object\n\
+:return: An X509Name object\n\
";
static PyObject *
@@ -253,9 +253,9 @@
static char crypto_X509_set_subject_doc[] = "\n\
Set the subject of the certificate\n\
\n\
-@param subject: The subject name\n\
-@type subject: L{X509Name}\n\
-@return: None\n\
+:param subject: The subject name\n\
+:type subject: L{X509Name}\n\
+:return: None\n\
";
static PyObject *
@@ -280,7 +280,7 @@
static char crypto_X509_get_pubkey_doc[] = "\n\
Get the public key of the certificate\n\
\n\
-@return: The public key\n\
+:return: The public key\n\
";
static PyObject *
@@ -309,8 +309,8 @@
static char crypto_X509_set_pubkey_doc[] = "\n\
Set the public key of the certificate\n\
\n\
-@param pkey: The public key\n\
-@return: None\n\
+:param pkey: The public key\n\
+:return: None\n\
";
static PyObject *
@@ -358,13 +358,13 @@
static char crypto_X509_set_notBefore_doc[] = "\n\
Set the time stamp for when the certificate starts being valid\n\
\n\
-@param when: A string giving the timestamp, in the format:\n\
+:param when: A string giving the timestamp, in the format:\n\
\n\
YYYYMMDDhhmmssZ\n\
YYYYMMDDhhmmss+hhmm\n\
YYYYMMDDhhmmss-hhmm\n\
\n\
-@return: None\n\
+:return: None\n\
";
static PyObject*
@@ -378,13 +378,13 @@
static char crypto_X509_set_notAfter_doc[] = "\n\
Set the time stamp for when the certificate stops being valid\n\
\n\
-@param when: A string giving the timestamp, in the format:\n\
+:param when: A string giving the timestamp, in the format:\n\
\n\
YYYYMMDDhhmmssZ\n\
YYYYMMDDhhmmss+hhmm\n\
YYYYMMDDhhmmss-hhmm\n\
\n\
-@return: None\n\
+:return: None\n\
";
static PyObject*
@@ -433,7 +433,7 @@
static char crypto_X509_get_notBefore_doc[] = "\n\
Retrieve the time stamp for when the certificate starts being valid\n\
\n\
-@return: A string giving the timestamp, in the format:\n\
+:return: A string giving the timestamp, in the format:\n\
\n\
YYYYMMDDhhmmssZ\n\
YYYYMMDDhhmmss+hhmm\n\
@@ -455,7 +455,7 @@
static char crypto_X509_get_notAfter_doc[] = "\n\
Retrieve the time stamp for when the certificate stops being valid\n\
\n\
-@return: A string giving the timestamp, in the format:\n\
+:return: A string giving the timestamp, in the format:\n\
\n\
YYYYMMDDhhmmssZ\n\
YYYYMMDDhhmmss+hhmm\n\
@@ -478,9 +478,9 @@
Change the timestamp for when the certificate starts being valid to the current\n\
time plus an offset.\n \
\n\
-@param amount: The number of seconds by which to adjust the starting validity\n\
+:param amount: The number of seconds by which to adjust the starting validity\n\
time.\n\
-@return: None\n\
+:return: None\n\
";
static PyObject *
@@ -500,9 +500,9 @@
static char crypto_X509_gmtime_adj_notAfter_doc[] = "\n\
Adjust the time stamp for when the certificate stops being valid\n\
\n\
-@param amount: The number of seconds by which to adjust the ending validity\n\
+:param amount: The number of seconds by which to adjust the ending validity\n\
time.\n\
-@return: None\n\
+:return: None\n\
";
static PyObject *
@@ -523,9 +523,9 @@
static char crypto_X509_get_signature_algorithm_doc[] = "\n\
Retrieve the signature algorithm used in the certificate\n\
\n\
-@return: A byte string giving the name of the signature algorithm used in\n\
+:return: A byte string giving the name of the signature algorithm used in\n\
the certificate.\n\
-@raise ValueError: If the signature algorithm is undefined.\n\
+:raise ValueError: If the signature algorithm is undefined.\n\
";
static PyObject *
@@ -550,9 +550,9 @@
static char crypto_X509_sign_doc[] = "\n\
Sign the certificate using the supplied key and digest\n\
\n\
-@param pkey: The key to sign with\n\
-@param digest: The message digest to use\n\
-@return: None\n\
+:param pkey: The key to sign with\n\
+:param digest: The message digest to use\n\
+:return: None\n\
";
static PyObject *
@@ -595,7 +595,7 @@
static char crypto_X509_has_expired_doc[] = "\n\
Check whether the certificate has expired.\n\
\n\
-@return: True if the certificate has expired, false otherwise\n\
+:return: True if the certificate has expired, false otherwise\n\
";
static PyObject *
@@ -616,7 +616,7 @@
static char crypto_X509_subject_name_hash_doc[] = "\n\
Return the hash of the X509 subject.\n\
\n\
-@return: The hash of the subject\n\
+:return: The hash of the subject\n\
";
static PyObject *
@@ -631,7 +631,7 @@
static char crypto_X509_digest_doc[] = "\n\
Return the digest of the X509 object.\n\
\n\
-@return: The digest of the object\n\
+:return: The digest of the object\n\
";
static PyObject *
@@ -672,8 +672,8 @@
static char crypto_X509_add_extensions_doc[] = "\n\
Add extensions to the certificate.\n\
\n\
-@param extensions: a sequence of X509Extension objects\n\
-@return: None\n\
+:param extensions: a sequence of X509Extension objects\n\
+:return: None\n\
";
static PyObject *
@@ -717,7 +717,7 @@
static char crypto_X509_get_extension_count_doc[] = "\n\
Get the number of extensions on the certificate.\n\
\n\
-@return: Number of extensions as a Python integer\n\
+:return: Number of extensions as a Python integer\n\
";
static PyObject *
@@ -732,8 +732,8 @@
static char crypto_X509_get_extension_doc[] = "\n\
Get a specific extension of the certificate by index.\n\
\n\
-@param index: The index of the extension to retrieve.\n\
-@return: The X509Extension object at the specified index.\n\
+:param index: The index of the extension to retrieve.\n\
+:return: The X509Extension object at the specified index.\n\
";
static PyObject *
@@ -824,11 +824,11 @@
static char crypto_X509_doc[] = "\n\
-X509() -> X509 instance\n\
+A class representing X.509 certificates.\n\
\n\
Create a new X509 object.\n\
\n\
-@returns: The X509 object\n\
+:returns: The :class:`X509` object\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/x509ext.c b/OpenSSL/crypto/x509ext.c
index adbe084..96c1993 100644
--- a/OpenSSL/crypto/x509ext.c
+++ b/OpenSSL/crypto/x509ext.c
@@ -16,7 +16,7 @@
static char crypto_X509Extension_get_critical_doc[] = "\n\
Returns the critical field of the X509Extension\n\
\n\
-@return: The critical field.\n\
+:return: The critical field.\n\
";
static PyObject *
@@ -31,7 +31,7 @@
static char crypto_X509Extension_get_short_name_doc[] = "\n\
Returns the short version of the type name of the X509Extension\n\
\n\
-@return: The short type name.\n\
+:return: The short type name.\n\
";
static PyObject *
@@ -54,7 +54,7 @@
static char crypto_X509Extension_get_data_doc[] = "\n\
Returns the data of the X509Extension\n\
\n\
-@return: A C{str} giving the X509Extension's ASN.1 encoded data.\n\
+:return: A C{str} giving the X509Extension's ASN.1 encoded data.\n\
";
static PyObject *
@@ -185,16 +185,16 @@
X509Extension(typename, critical, value[, subject][, issuer]) -> \n\
X509Extension instance\n\
\n\
-@param typename: The name of the extension to create.\n\
-@type typename: C{str}\n\
-@param critical: A flag indicating whether this is a critical extension.\n\
-@param value: The value of the extension.\n\
-@type value: C{str}\n\
-@param subject: Optional X509 cert to use as subject.\n\
-@type subject: C{X509}\n\
-@param issuer: Optional X509 cert to use as issuer.\n\
-@type issuer: C{X509}\n\
-@return: The X509Extension object\n\
+:param typename: The name of the extension to create.\n\
+:type typename: C{str}\n\
+:param critical: A flag indicating whether this is a critical extension.\n\
+:param value: The value of the extension.\n\
+:type value: C{str}\n\
+:param subject: Optional X509 cert to use as subject.\n\
+:type subject: C{X509}\n\
+:param issuer: Optional X509 cert to use as issuer.\n\
+:type issuer: C{X509}\n\
+:return: The X509Extension object\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/x509name.c b/OpenSSL/crypto/x509name.c
index a62c957..705683e 100644
--- a/OpenSSL/crypto/x509name.c
+++ b/OpenSSL/crypto/x509name.c
@@ -48,8 +48,8 @@
\n\
Create a new X509Name, copying the given X509Name instance.\n\
\n\
-@param name: An X509Name object to copy\n\
-@return: The X509Name object\n\
+:param name: An X509Name object to copy\n\
+:return: The X509Name object\n\
";
static PyObject *
@@ -320,7 +320,7 @@
static char crypto_X509Name_hash_doc[] = "\n\
Return the hash value of this name\n\
\n\
-@return: None\n\
+:return: None\n\
";
/*
@@ -344,7 +344,7 @@
static char crypto_X509Name_der_doc[] = "\n\
Return the DER encoding of this name\n\
\n\
-@return: None\n\
+:return: None\n\
";
/*
@@ -367,7 +367,7 @@
static char crypto_X509Name_get_components_doc[] = "\n\
Returns the split-up components of this name.\n\
\n\
-@return: List of tuples (name, value).\n\
+:return: List of tuples (name, value).\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/x509req.c b/OpenSSL/crypto/x509req.c
index a2d1f11..a331712 100644
--- a/OpenSSL/crypto/x509req.c
+++ b/OpenSSL/crypto/x509req.c
@@ -16,7 +16,7 @@
static char crypto_X509Req_get_subject_doc[] = "\n\
Create an X509Name object for the subject of the certificate request\n\
\n\
-@return: An X509Name object\n\
+:return: An X509Name object\n\
";
static PyObject *
@@ -44,7 +44,7 @@
static char crypto_X509Req_get_pubkey_doc[] = "\n\
Get the public key from the certificate request\n\
\n\
-@return: The public key\n\
+:return: The public key\n\
";
static PyObject *
@@ -73,8 +73,8 @@
static char crypto_X509Req_set_pubkey_doc[] = "\n\
Set the public key of the certificate request\n\
\n\
-@param pkey: The public key to use\n\
-@return: None\n\
+:param pkey: The public key to use\n\
+:return: None\n\
";
static PyObject *
@@ -98,9 +98,9 @@
static char crypto_X509Req_sign_doc[] = "\n\
Sign the certificate request using the supplied key and digest\n\
\n\
-@param pkey: The key to sign with\n\
-@param digest: The message digest to use\n\
-@return: None\n\
+:param pkey: The key to sign with\n\
+:param digest: The message digest to use\n\
+:return: None\n\
";
static PyObject *
@@ -143,9 +143,9 @@
static char crypto_X509Req_verify_doc[] = "\n\
Verifies a certificate request using the supplied public key\n\
\n\
-@param key: a public key\n\
-@return: True if the signature is correct.\n\
-@raise OpenSSL.crypto.Error: If the signature is invalid or there is a\n\
+:param key: a public key\n\
+:return: True if the signature is correct.\n\
+:raise OpenSSL.crypto.Error: If the signature is invalid or there is a\n\
problem verifying the signature.\n\
";
@@ -173,8 +173,8 @@
static char crypto_X509Req_add_extensions_doc[] = "\n\
Add extensions to the request.\n\
\n\
-@param extensions: a sequence of X509Extension objects\n\
-@return: None\n\
+:param extensions: a sequence of X509Extension objects\n\
+:return: None\n\
";
static PyObject *
@@ -234,8 +234,8 @@
Set the version subfield (RFC 2459, section 4.1.2.1) of the certificate\n\
request.\n\
\n\
-@param version: The version number\n\
-@return: None\n\
+:param version: The version number\n\
+:return: None\n\
";
static PyObject *
@@ -259,7 +259,7 @@
Get the version subfield (RFC 2459, section 4.1.2.1) of the certificate\n\
request.\n\
\n\
-@return: an integer giving the value of the version subfield\n\
+:return: an integer giving the value of the version subfield\n\
";
static PyObject *
@@ -328,7 +328,7 @@
\n\
Create a new X509Req object.\n\
\n\
-@return: The X509Req object\n\
+:return: The X509Req object\n\
";
static PyObject *
diff --git a/OpenSSL/crypto/x509store.c b/OpenSSL/crypto/x509store.c
index bf22756..a9750ed 100644
--- a/OpenSSL/crypto/x509store.c
+++ b/OpenSSL/crypto/x509store.c
@@ -14,8 +14,8 @@
static char crypto_X509Store_add_cert_doc[] = "\n\
Add a certificate\n\
\n\
-@param cert: The certificate to add\n\
-@return: None\n\
+:param cert: The certificate to add\n\
+:return: None\n\
";
static PyObject *
diff --git a/OpenSSL/rand/rand.c b/OpenSSL/rand/rand.c
index 8307ac6..712ad56 100644
--- a/OpenSSL/rand/rand.c
+++ b/OpenSSL/rand/rand.c
@@ -33,9 +33,9 @@
static char rand_add_doc[] = "\n\
Add data with a given entropy to the PRNG\n\
\n\
-@param buffer: Buffer with random data\n\
-@param entropy: The entropy (in bytes) measurement of the buffer\n\
-@return: None\n\
+:param buffer: Buffer with random data\n\
+:param entropy: The entropy (in bytes) measurement of the buffer\n\
+:return: None\n\
";
static PyObject *
@@ -57,8 +57,8 @@
static char rand_seed_doc[] = "\n\
Alias for rand_add, with entropy equal to length\n\
\n\
-@param buffer: Buffer with random data\n\
-@return: None\n\
+:param buffer: Buffer with random data\n\
+:return: None\n\
";
static PyObject *
@@ -79,7 +79,7 @@
static char rand_status_doc[] = "\n\
Retrieve the status of the PRNG\n\
\n\
-@return: True if the PRNG is seeded enough, false otherwise\n\
+:return: True if the PRNG is seeded enough, false otherwise\n\
";
static PyObject *
@@ -96,7 +96,7 @@
Add the current contents of the screen to the PRNG state. Availability:\n\
Windows.\n\
\n\
-@return: None\n\
+:return: None\n\
";
static PyObject *
@@ -116,9 +116,9 @@
PRNG. I haven't found any problems when the socket is missing, the function\n\
just returns 0.\n\
\n\
-@param path: The path to the EGD socket\n\
-@param bytes: (optional) The number of bytes to read, default is 255\n\
-@returns: The number of bytes read (NB: a value of 0 isn't necessarily an\n\
+:param path: The path to the EGD socket\n\
+:param bytes: (optional) The number of bytes to read, default is 255\n\
+:returns: The number of bytes read (NB: a value of 0 isn't necessarily an\n\
error, check rand.status())\n\
";
@@ -137,7 +137,7 @@
static char rand_cleanup_doc[] = "\n\
Erase the memory used by the PRNG.\n\
\n\
-@return: None\n\
+:return: None\n\
";
static PyObject *
@@ -155,10 +155,10 @@
static char rand_load_file_doc[] = "\n\
Seed the PRNG with data from a file\n\
\n\
-@param filename: The file to read data from\n\
-@param maxbytes: (optional) The number of bytes to read, default is\n\
+:param filename: The file to read data from\n\
+:param maxbytes: (optional) The number of bytes to read, default is\n\
to read the entire file\n\
-@return: The number of bytes read\n\
+:return: The number of bytes read\n\
";
static PyObject *
@@ -176,8 +176,8 @@
static char rand_write_file_doc[] = "\n\
Save PRNG state to a file\n\
\n\
-@param filename: The file to write data to\n\
-@return: The number of bytes written\n\
+:param filename: The file to write data to\n\
+:return: The number of bytes written\n\
";
static PyObject *
@@ -194,8 +194,8 @@
static char rand_bytes_doc[] = "\n\
Get some randomm bytes as a string.\n\
\n\
-@param num_bytes: The number of bytes to fetch\n\
-@return: A string of random bytes\n\
+:param num_bytes: The number of bytes to fetch\n\
+:return: A string of random bytes\n\
";
#if PY_VERSION_HEX < 0x02050000
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 *
diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
index 5cdcefb..9f16643 100644
--- a/OpenSSL/test/test_crypto.py
+++ b/OpenSSL/test/test_crypto.py
@@ -1888,12 +1888,12 @@
"""
Internal method for quoting a single command-line argument.
- @type: C{str}
- @param s: A single unquoted string to quote for something that is expecting
+ :type: C{str}
+ :param s: A single unquoted string to quote for something that is expecting
cmd.exe-style quoting
- @rtype: C{str}
- @return: A cmd.exe-style quoted string
+ :rtype: C{str}
+ :return: A cmd.exe-style quoted string
@see: U{http://www.perlmonks.org/?node_id=764004}
"""
@@ -1908,11 +1908,11 @@
a similar API. This allows the list passed to C{reactor.spawnProcess} to
match the child process's C{sys.argv} properly.
- @type arguments: C{iterable} of C{str}
- @param arguments: An iterable of unquoted arguments to quote
+ :type arguments: C{iterable} of C{str}
+ :param arguments: An iterable of unquoted arguments to quote
- @rtype: C{str}
- @return: A space-delimited string containing quoted versions of L{arguments}
+ :rtype: C{str}
+ :return: A space-delimited string containing quoted versions of L{arguments}
"""
return ' '.join(map(cmdLineQuote, arguments))
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 2ab67fd..f7ce67f 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -1753,7 +1753,7 @@
"""
Verify the return value of the C{get_client_ca_list} method for server and client connections.
- @param func: A function which will be called with the server context
+ :param func: A function which will be called with the server context
before the client and server are connected to each other. This
function should specify a list of CAs for the server to send to the
client and return that same list. The list will be used to verify
diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index 643fb91..ac9190e 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -54,10 +54,10 @@
"""
Fail the test if C{containee} is not found in C{container}.
- @param containee: the value that should be in C{container}
- @param container: a sequence type, or in the case of a mapping type,
+ :param containee: the value that should be in C{container}
+ :param container: a sequence type, or in the case of a mapping type,
will follow semantics of 'if key in dict.keys()'
- @param msg: if msg is None, then the failure message will be
+ :param msg: if msg is None, then the failure message will be
'%r not in %r' % (first, second)
"""
if containee not in container:
@@ -72,7 +72,7 @@
obect-identity-equality test, not an object equality
(i.e. C{__eq__}) test.
- @param msg: if msg is None, then the failure message will be
+ :param msg: if msg is None, then the failure message will be
'%r is not %r' % (first, second)
"""
if first is not second:
@@ -87,7 +87,7 @@
obect-identity-equality test, not an object equality
(i.e. C{__eq__}) test.
- @param msg: if msg is None, then the failure message will be
+ :param msg: if msg is None, then the failure message will be
'%r is %r' % (first, second)
"""
if first is second:
@@ -102,11 +102,11 @@
C{args} and C{kwargs} raises C{exception}. The failure will report
the traceback and call stack of the unexpected exception.
- @param exception: exception type that is to be expected
- @param f: the function to call
+ :param exception: exception type that is to be expected
+ :param f: the function to call
- @return: The raised exception instance, if it is of the given type.
- @raise self.failureException: Raised if the function call does
+ :return: The raised exception instance, if it is of the given type.
+ :raise self.failureException: Raised if the function call does
not raise an exception or if it raises an exception of a
different type.
"""
@@ -155,9 +155,9 @@
pretty easy to do something wacky. If something about the type is
unusual, an exception will be raised.
- @param theType: The type object about which to make assertions.
- @param name: A string giving the name of the type.
- @param constructionArgs: Positional arguments to use with C{theType} to
+ :param theType: The type object about which to make assertions.
+ :param name: A string giving the name of the type.
+ :param constructionArgs: Positional arguments to use with C{theType} to
create an instance of it.
"""
self.assertEqual(theType.__name__, name)