Package AccessGrid :: Package Security :: Package wxgui :: Module CertificateRepository :: Class CertificateRepository
[show private | hide private]
[frames | no frames]

Class CertificateRepository


Method Summary
  __init__(self, repoDir, create)
Create the repository.
  CreateCertificateRequest(self, nameEntries, passphraseCB, keyType, bits, messageDigest, extensions)
Create a new certificate request and store it in the repository.
  FindCertificateRequests(self, pred)
Return a list of certificate requests for which pred(req) returns true.
  FindCertificateRequestsWithMetadata(self, mdkey, mdvalue)
  FindCertificateRequestsWithSubject(self, subj)
  FindCertificates(self, pred)
Return a list of certificates for which pred(cert) returns true.
  FindCertificatesWithIssuer(self, issuer)
  FindCertificatesWithMetadata(self, mdkey, mdvalue)
  FindCertificatesWithSubject(self, subj)
  GetAllCertificateRequests(self)
  GetAllCertificates(self)
  GetMetadata(self, key)
  GetPrivatekeyMetadata(self, modulus, key)
  ImportCertificatePEM(self, certFile, keyFile, passphraseCB)
Import a PEM-formatted certificate from certFile.
  ImportCertificateX509(self, certobj, pkey, passphraseCB)
Import a PEM-formatted certificate from OpenSSL X509 data structure cert, optional PKey data structre in pkey.
  ImportRequestedCertificate(self, certFile, passphraseCB)
Import a certificate that we earlier issued a request for.
  RemoveCertificate(self, cert)
Remove the specificed certificate from the repository.
  RemoveCertificateRequest(self, req)
Remove the specificed certificate request from the repository.
  SetMetadata(self, key, value)
  SetPrivatekeyMetadata(self, modulus, key, value)

Class Variable Summary
int KEYTYPE_DSA = 116                                                                   
int KEYTYPE_RSA = 6                                                                     
list validNameComponents = ['cn', 'c', 'l', 'st', 'o', 'ou', ...

Method Details

__init__(self, repoDir, create=0)
(Constructor)

Create the repository.

dir - directory in which to store certificates.

CreateCertificateRequest(self, nameEntries, passphraseCB, keyType=6, bits=1024, messageDigest='md5', extensions=None)

Create a new certificate request and store it in the repository. Returns a CertificateRequestDescriptor for that request.

nameEntries is a list of pairs (key, value) where key is a standard distinguished name key, and value is the value to be used for that key.

extensions is a list of triples (name, critical, value) to be used to set the requests extensions. If passed in as none, a useful default set of extensions will be used.

FindCertificateRequests(self, pred)

Return a list of certificate requests for which pred(req) returns true.

FindCertificates(self, pred)

Return a list of certificates for which pred(cert) returns true.

ImportCertificatePEM(self, certFile, keyFile=None, passphraseCB=None)

Import a PEM-formatted certificate from certFile.

If keyFile is not None, load it as a private key for cert.

We don't currently inspect the key itself to ensure it matches the certificate, as that may require a passphrase.

ImportCertificateX509(self, certobj, pkey=None, passphraseCB=None)

Import a PEM-formatted certificate from OpenSSL X509 data structure cert, optional PKey data structre in pkey.

ImportRequestedCertificate(self, certFile, passphraseCB=None)

Import a certificate that we earlier issued a request for.

RemoveCertificate(self, cert)

Remove the specificed certificate from the repository.

RemoveCertificateRequest(self, req)

Remove the specificed certificate request from the repository.


Class Variable Details

KEYTYPE_DSA

Type:
int
Value:
116                                                                   

KEYTYPE_RSA

Type:
int
Value:
6                                                                     

validNameComponents

Type:
list
Value:
['cn', 'c', 'l', 'st', 'o', 'ou', 'emailaddress']                      

Generated by Epydoc 2.1 on Thu Apr 14 16:39:32 2005 http://epydoc.sf.net