Package ndg :: Package saml :: Package utils :: Module m2crypto :: Class SSLContextProxy
[hide private]

Class SSLContextProxy

source code


Holder for M2Crypto.SSL.Context parameters

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
M2Crypto.SSL.Context @return M2Crypto SSL context object
createCtx(self, depth=9, **kw)
Create an M2Crypto SSL Context from this objects properties
source code
 
copy(self, sslCtxProxy)
Copy settings from another context object
source code
 
createVerifySSLPeerCertCallback(self)
Create a callback function to enable the DN of the peer in an SSL connection to be verified against a whitelist.
source code
 
_getSSLCertFilePath(self) source code
 
_setSSLCertFilePath(self, filePath)
Set X.509 cert/cert chian file path property method
source code
 
_getSSLCACertFilePath(self)
Get file path for list of CA cert or certs used to validate SSL connections
source code
 
_setSSLCACertFilePath(self, value)
Set CA cert file path
source code
 
_getSSLCACertDir(self)
Get file path for list of CA cert or certs used to validate SSL connections
source code
 
_setSSLCACertDir(self, value)
Set CA cert or certs to validate AC signatures, signatures of Attribute Authority SOAP responses and SSL connections where AA SOAP service is run over SSL.
source code
 
_getSslValidDNs(self) source code
 
_setSslValidDNs(self, value) source code
 
_getSSLPriKeyFilePath(self) source code
 
_setSSLPriKeyFilePath(self, filePath)
Set ssl private key file path property method
source code
 
_setSSLPriKeyPwd(self, sslPriKeyPwd)
Set method for ssl private key file password
source code
 
_getSSLPriKeyPwd(self)
Get property method for SSL private key
source code
 
__getstate__(self)
Enable pickling for use with beaker.session
source code
 
__setstate__(self, attrDict)
Enable pickling for use with beaker.session
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  SSL_CERT_FILEPATH_OPTNAME = 'sslCertFilePath'
  SSL_PRIKEY_FILEPATH_OPTNAME = 'sslPriKeyFilePath'
  SSL_PRIKEY_PWD_OPTNAME = 'sslPriKeyPwd'
  SSL_CACERT_FILEPATH_OPTNAME = 'sslCACertFilePath'
  SSL_CACERT_DIRPATH_OPTNAME = 'sslCACertDir'
  SSL_VALID_DNS_OPTNAME = 'sslValidDNs'
  OPTNAMES = ('sslCertFilePath', 'sslPriKeyFilePath', 'sslPriKey...
  VALID_DNS_PAT = re.compile(r',\s*')
  PRE_VERIFY_FAIL = 0
  PRE_VERIFY_OK = 1
Properties [hide private]
  sslCertFilePath
File path to X.509 cert.
  sslCACertFilePath
Path to file containing concatenated PEM encoded CA Certificates - used for verification of peer certs in SSL connection
  sslCACertDir
Path to directory containing PEM encoded CA Certificates used for verification of peer certs in SSL connection.
  sslValidDNs
whitelist of acceptable certificate Distinguished Names for peer certificates in SSL requests
  sslPriKeyFilePath
File path to SSL private key
  sslPriKeyPwd
Password protecting SSL private key file
  __sslCACertDir
  __sslCACertFilePath
  __sslCertFilePath
  __sslPriKeyFilePath
  __sslPriKeyPwd
  __sslValidDNs

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

createCtx(self, depth=9, **kw)

source code 

Create an M2Crypto SSL Context from this objects properties

Parameters:
  • depth (int) - max. depth of certificate to verify against
  • kw (dict) - M2Crypto.SSL.Context keyword arguments
Returns: M2Crypto.SSL.Context @return M2Crypto SSL context object

createVerifySSLPeerCertCallback(self)

source code 

Create a callback function to enable the DN of the peer in an SSL connection to be verified against a whitelist.

Nb. Making this function within the scope of a method of the class to enables to access instance variables

_setSSLCACertFilePath(self, value)

source code 

Set CA cert file path

Parameters:
  • sslCACertFilePath (basestring, list, tuple or None) - file path to CA certificate file. If None then the input is quietly ignored.

_setSSLCACertDir(self, value)

source code 

Set CA cert or certs to validate AC signatures, signatures of Attribute Authority SOAP responses and SSL connections where AA SOAP service is run over SSL.

Parameters:
  • sslCACertDir (basestring) - directory containing CA certificate files.

Class Variable Details [hide private]

OPTNAMES

Value:
('sslCertFilePath',
 'sslPriKeyFilePath',
 'sslPriKeyPwd',
 'sslCACertFilePath',
 'sslCACertDir',
 'sslValidDNs')

Property Details [hide private]

sslCertFilePath

File path to X.509 cert. / cert. chain

Get Method:
_getSSLCertFilePath(self)
Set Method:
_setSSLCertFilePath(self, filePath) - Set X.509 cert/cert chian file path property method

sslCACertFilePath

Path to file containing concatenated PEM encoded CA Certificates - used for verification of peer certs in SSL connection

Get Method:
_getSSLCACertFilePath(self) - Get file path for list of CA cert or certs used to validate SSL connections
Set Method:
_setSSLCACertFilePath(self, value) - Set CA cert file path

sslCACertDir

Path to directory containing PEM encoded CA Certificates used for verification of peer certs in SSL connection. Files in the directory must be named with the form <hash>.0 where <hash> can be obtained using openssl x509 -in cert -hash -noout or using the c_rehash OpenSSL script

Get Method:
_getSSLCACertDir(self) - Get file path for list of CA cert or certs used to validate SSL connections
Set Method:
_setSSLCACertDir(self, value) - Set CA cert or certs to validate AC signatures, signatures of Attribute Authority SOAP responses and SSL connections where AA SOAP service is run over SSL.

sslValidDNs

whitelist of acceptable certificate Distinguished Names for peer certificates in SSL requests

Get Method:
_getSslValidDNs(self)
Set Method:
_setSslValidDNs(self, value)

sslPriKeyFilePath

File path to SSL private key

Get Method:
_getSSLPriKeyFilePath(self)
Set Method:
_setSSLPriKeyFilePath(self, filePath) - Set ssl private key file path property method

sslPriKeyPwd

Password protecting SSL private key file

Get Method:
_getSSLPriKeyPwd(self) - Get property method for SSL private key
Set Method:
_setSSLPriKeyPwd(self, sslPriKeyPwd) - Set method for ssl private key file password