summaryrefslogtreecommitdiff
path: root/OpenSSL/crypto
diff options
context:
space:
mode:
authorJonathan Ballet <jon@multani.info>2011-07-16 08:07:26 +0900
committerJonathan Ballet <jon@multani.info>2011-07-16 08:07:26 +0900
commit78b92a2f68ec960563e90c86bb41a2d128d0d1c8 (patch)
tree92ee5249d0326c03a2462afae79ea35b3f0f4371 /OpenSSL/crypto
parent0646a24c0d9177733b6f6a9fb051063eea314040 (diff)
downloadpyopenssl-78b92a2f68ec960563e90c86bb41a2d128d0d1c8.tar.gz
Convert Epytext markup to RST markup
Diffstat (limited to 'OpenSSL/crypto')
-rw-r--r--OpenSSL/crypto/crl.c26
-rw-r--r--OpenSSL/crypto/crypto.c74
-rw-r--r--OpenSSL/crypto/netscape_spki.c26
-rw-r--r--OpenSSL/crypto/pkcs12.c48
-rw-r--r--OpenSSL/crypto/pkcs7.c10
-rw-r--r--OpenSSL/crypto/pkey.c18
-rw-r--r--OpenSSL/crypto/revoked.c26
-rw-r--r--OpenSSL/crypto/x509.c84
-rw-r--r--OpenSSL/crypto/x509ext.c26
-rw-r--r--OpenSSL/crypto/x509name.c10
-rw-r--r--OpenSSL/crypto/x509req.c32
-rw-r--r--OpenSSL/crypto/x509store.c4
12 files changed, 192 insertions, 192 deletions
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 @@ static char crypto_CRL_get_revoked_doc[] = "\n\
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 @@ crypto_CRL_get_revoked(crypto_CRLObj *self, PyObject *args) {
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 @@ crypto_CRL_add_revoked(crypto_CRLObj *self, PyObject *args, PyObject *keywds) {
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 @@ CRL() -> CRL instance\n\
\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 @@ global_passphrase_callback(char *buf, int len, int rwflag, void *cb_arg)
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 @@ crypto_load_privatekey(PyObject *spam, PyObject *args)
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 @@ crypto_dump_privatekey(PyObject *spam, PyObject *args)
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 @@ crypto_load_certificate(PyObject *spam, PyObject *args)
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 @@ crypto_dump_certificate(PyObject *spam, PyObject *args)
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 @@ crypto_load_certificate_request(PyObject *spam, PyObject *args)
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 @@ crypto_dump_certificate_request(PyObject *spam, PyObject *args)
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 @@ crypto_load_crl(PyObject *spam, PyObject *args) {
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 @@ crypto_load_pkcs7_data(PyObject *spam, PyObject *args)
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 @@ crypto_load_pkcs12(PyObject *spam, PyObject *args)
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 @@ crypto_exception_from_error_queue(PyObject *spam, PyObject *eggs) {
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 @@ crypto_sign(PyObject *spam, PyObject *args) {
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 @@ crypto_NetscapeSPKI_New(NETSCAPE_SPKI *name, int dealloc)
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 @@ crypto_NetscapeSPKI_dealloc(crypto_NetscapeSPKIObj *self)
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 @@ crypto_NetscapeSPKI_sign(crypto_NetscapeSPKIObj *self, PyObject *args)
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 @@ crypto_NetscapeSPKI_verify(crypto_NetscapeSPKIObj *self, PyObject *args)
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 @@ crypto_NetscapeSPKI_b64_encode(crypto_NetscapeSPKIObj *self, PyObject *args)
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 @@ crypto_NetscapeSPKI_get_pubkey(crypto_NetscapeSPKIObj *self, PyObject *args)
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 int crypto_PKCS12_clear(crypto_PKCS12Obj *self);
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 @@ crypto_PKCS12_get_certificate(crypto_PKCS12Obj *self, PyObject *args)
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 @@ crypto_PKCS12_set_certificate(crypto_PKCS12Obj *self, PyObject *args, PyObject *
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 @@ crypto_PKCS12_get_privatekey(crypto_PKCS12Obj *self, PyObject *args)
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 @@ crypto_PKCS12_set_privatekey(crypto_PKCS12Obj *self, PyObject *args, PyObject *k
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 @@ crypto_PKCS12_get_ca_certificates(crypto_PKCS12Obj *self, PyObject *args)
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 @@ crypto_PKCS12_set_ca_certificates(crypto_PKCS12Obj *self, PyObject *args, PyObje
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 @@ crypto_PKCS12_get_friendlyname(crypto_PKCS12Obj *self, PyObject *args) {
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 @@ static char crypto_PKCS12_export_doc[] = "\n\
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 @@ PKCS12() -> PKCS12 instance\n\
\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 @@ crypto_PKCS7_type_is_signed(crypto_PKCS7Obj *self, PyObject *args)
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 @@ crypto_PKCS7_type_is_enveloped(crypto_PKCS7Obj *self, PyObject *args)
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 @@ crypto_PKCS7_type_is_signedAndEnveloped(crypto_PKCS7Obj *self, PyObject *args)
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 @@ crypto_PKCS7_type_is_data(crypto_PKCS7Obj *self, PyObject *args)
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 @@ do { \
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 @@ crypto_PKey_generate_key(crypto_PKeyObj *self, PyObject *args)
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 @@ crypto_PKey_bits(crypto_PKeyObj *self, PyObject *args)
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 @@ crypto_PKey_type(crypto_PKeyObj *self, PyObject *args)
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 @@ PKey() -> PKey instance\n\
\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 const char *crl_reasons[] = {
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 @@ reason_str_to_code(const char * reason_str) {
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 @@ crypto_Revoked_set_reason(crypto_RevokedObj *self, PyObject *args, PyObject *key
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 @@ crypto_Revoked_get_reason(crypto_RevokedObj *self, PyObject *args) {
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 @@ crypto_Revoked_get_rev_date(crypto_RevokedObj *self, PyObject *args) {
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 @@ ASN1_INTEGER_to_PyString(ASN1_INTEGER *asn1_int) {
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 @@ crypto_Revoked_get_serial(crypto_RevokedObj *self, PyObject *args) {
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 @@ Revoked() -> Revoked instance\n\
\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 @@ crypto_X509_get_version(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_set_version(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_get_serial_number(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_set_serial_number(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_get_issuer(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_set_issuer(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_get_subject(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_set_subject(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_get_pubkey(crypto_X509Obj *self, PyObject *args)
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 @@ _set_asn1_time(char *format, ASN1_TIME* timestamp, PyObject *args)
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 @@ crypto_X509_set_notBefore(crypto_X509Obj *self, PyObject *args)
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 @@ _get_asn1_time(char *format, ASN1_TIME* timestamp, PyObject *args)
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 @@ crypto_X509_get_notBefore(crypto_X509Obj *self, PyObject *args)
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 @@ static char crypto_X509_gmtime_adj_notBefore_doc[] = "\n\
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 @@ crypto_X509_gmtime_adj_notBefore(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_gmtime_adj_notAfter(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_get_signature_algorithm(crypto_X509Obj *self, PyObject *args) {
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 @@ crypto_X509_sign(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_has_expired(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_subject_name_hash(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_digest(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_add_extensions(crypto_X509Obj *self, PyObject *args)
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 @@ crypto_X509_get_extension_count(crypto_X509Obj *self, PyObject *args) {
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 @@ crypto_X509_New(X509 *cert, int dealloc)
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 @@ crypto_X509Extension_get_critical(crypto_X509ExtensionObj *self, PyObject *args)
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 @@ crypto_X509Extension_get_short_name(crypto_X509ExtensionObj *self, PyObject *arg
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 @@ static char crypto_X509Extension_doc[] = "\n\
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 @@ X509Name(name) -> New X509Name object\n\
\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 @@ crypto_X509Name_repr(crypto_X509NameObj *self)
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 @@ crypto_X509Name_hash(crypto_X509NameObj *self, PyObject* args)
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 @@ crypto_X509Name_der(crypto_X509NameObj *self, PyObject *args)
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 @@ crypto_X509Req_get_subject(crypto_X509ReqObj *self, PyObject *args)
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 @@ crypto_X509Req_get_pubkey(crypto_X509ReqObj *self, PyObject *args)
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 @@ crypto_X509Req_set_pubkey(crypto_X509ReqObj *self, PyObject *args)
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 @@ crypto_X509Req_sign(crypto_X509ReqObj *self, PyObject *args)
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 @@ crypto_X509Req_verify(crypto_X509ReqObj *self, PyObject *args)
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 @@ static char crypto_X509Req_set_version_doc[] = "\n\
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 @@ static char crypto_X509Req_get_version_doc[] = "\n\
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 @@ X509Req() -> X509Req instance\n\
\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 *