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

Class X509_Stack



X509 Stack


Warning: Do not modify the underlying OpenSSL stack except through this interface, or use any OpenSSL functions that do so indirectly. Doing so will get the OpenSSL stack and the internal pystack of this class out of sync, leading to python memory leaks, exceptions or even python crashes!

Instance Methods
 
m2_sk_x509_free(...)
 
__init__(self, stack=None, _pyfree=0, _pyfree_x509=0)
 
__del__(self)
 
__len__(self)
 
__getitem__(self, idx)
 
__iter__(self)
 
push(self, x509)
push an X509 certificate onto the stack.
 
pop(self)
pop a certificate from the stack.
 
as_der(self)
Return the stack as a DER encoded string
Method Details

push(self, x509)

 

push an X509 certificate onto the stack.

Parameters:
  • x509 - X509 object.
Returns:
The number of X509 objects currently on the stack.

pop(self)

 

pop a certificate from the stack.

Returns:
X509 object that was popped, or None if there is nothing to pop.