Package M2Crypto :: Module X509
[frames] | no frames]

Module X509



M2Crypto wrapper for OpenSSL X509 API.

Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.

Portions created by Open Source Applications Foundation (OSAF) are Copyright (C) 2004-2007 OSAF. All Rights Reserved. Author: Heikki Toivonen

Classes
  X509Error
  X509_Extension
X509 Extension
  X509_Extension_Stack
X509 Extension Stack
  X509_Name_Entry
X509 Name Entry
  X509_Name
X509 Name
  X509
X.509 Certificate
  X509_Store_Context
X509 Store Context
  X509_Store
X509 Store
  X509_Stack
X509 Stack
  Request
X509 Certificate Request.
  CRL
X509 Certificate Revocation List
Functions
 
new_extension(name, value, critical=0, _pyfree=1)
Create new X509_Extension instance.
M2Crypto.X509.X509
load_cert(file, format=1)
Load certificate from file.
M2Crypto.X509.X509
load_cert_bio(bio, format=1)
Load certificate from a bio.
M2Crypto.X509.X509
load_cert_string(string, format=1)
Load certificate from a string.
M2Crypto.X509.X509
load_cert_der_string(string)
Load certificate from a string.
 
new_stack_from_der(der_string)
Create a new X509_Stack from DER string.
M2Crypto.X509.Request
load_request(file, format=1)
Load certificate request from file.
M2Crypto.X509.Request
load_request_bio(bio, format=1)
Load certificate request from a bio.
M2Crypto.X509.Request
load_request_string(string, format=1)
Load certificate request from a string.
M2Crypto.X509.Request
load_request_der_string(string)
Load certificate request from a string.
M2Crypto.X509.CRL
load_crl(file)
Load CRL from file.
Variables
  FORMAT_DER = 0
  FORMAT_PEM = 1
  V_OK = 0
Function Details

load_cert(file, format=1)

 

Load certificate from file.

Parameters:
  • file (string) - Name of file containing certificate in either DER or PEM format.
  • format (int, either FORMAT_PEM or FORMAT_DER) - Describes the format of the file to be loaded, either PEM or DER.
Returns: M2Crypto.X509.X509
M2Crypto.X509.X509 object.

load_cert_bio(bio, format=1)

 

Load certificate from a bio.

Parameters:
  • bio (M2Crypto.BIO.BIO) - BIO pointing at a certificate in either DER or PEM format.
  • format (int, either FORMAT_PEM or FORMAT_DER) - Describes the format of the cert to be loaded, either PEM or DER.
Returns: M2Crypto.X509.X509
M2Crypto.X509.X509 object.

load_cert_string(string, format=1)

 

Load certificate from a string.

Parameters:
  • string (string) - String containing a certificate in either DER or PEM format.
  • format (int, either FORMAT_PEM or FORMAT_DER) - Describes the format of the cert to be loaded, either PEM or DER.
Returns: M2Crypto.X509.X509
M2Crypto.X509.X509 object.

load_cert_der_string(string)

 

Load certificate from a string.

Parameters:
  • string (string) - String containing a certificate in DER format.
Returns: M2Crypto.X509.X509
M2Crypto.X509.X509 object.

new_stack_from_der(der_string)

 

Create a new X509_Stack from DER string.

Returns:
X509_Stack

load_request(file, format=1)

 

Load certificate request from file.

Parameters:
  • file (string) - Name of file containing certificate request in either PEM or DER format.
  • format (int, either FORMAT_PEM or FORMAT_DER) - Describes the format of the file to be loaded, either PEM or DER.
Returns: M2Crypto.X509.Request
M2Crypto.X509.Request object.

load_request_bio(bio, format=1)

 

Load certificate request from a bio.

Parameters:
  • bio (M2Crypto.BIO.BIO) - BIO pointing at a certificate request in either DER or PEM format.
  • format (int, either FORMAT_PEM or FORMAT_DER) - Describes the format of the request to be loaded, either PEM or DER.
Returns: M2Crypto.X509.Request
M2Crypto.X509.Request object.

load_request_string(string, format=1)

 

Load certificate request from a string.

Parameters:
  • string (string) - String containing a certificate request in either DER or PEM format.
  • format (int, either FORMAT_PEM or FORMAT_DER) - Describes the format of the request to be loaded, either PEM or DER.
Returns: M2Crypto.X509.Request
M2Crypto.X509.Request object.

load_request_der_string(string)

 

Load certificate request from a string.

Parameters:
  • string (string) - String containing a certificate request in DER format.
Returns: M2Crypto.X509.Request
M2Crypto.X509.Request object.

load_crl(file)

 

Load CRL from file.

Parameters:
  • file (string) - Name of file containing CRL in PEM format.
Returns: M2Crypto.X509.CRL
M2Crypto.X509.CRL object.