Package AccessGrid :: Package Security :: Module CertificateManager :: Class CertificateManagerUserInterface
[show private | hide private]
[frames | no frames]

Class CertificateManagerUserInterface


Base class for the UI interface to a CertificateManager.
Method Summary
  __init__(self)
  CreateProxy(self)
Command-line interface for creating a Globus proxy.
  GetCertificateManager(self)
  GetPassphraseCallback(self, caption, message)
  GetProxyInfo(self, cert, userMessage)
Return the information required to create a proxy from cert.
  InitGlobusEnvironment(self)
Initialize the globus runtime environment.
  ReportBadPassphrase(self)
  ReportError(self, err)
  RequestCertificate(self, reqInfo, password, proxyEnabled, proxyHost, proxyPort)
Request a certificate.
  SetCertificateManager(self, cm)

Method Details

CreateProxy(self)

Command-line interface for creating a Globus proxy.

Collect the passphrase, lifetime in hours, and key-size from user.

Returns a tuple (success, retry). If success is true, the proxy was created. If false, there was some error. If retry is true, the caller shoudl attempt to retry the proxy creation.

GetProxyInfo(self, cert, userMessage='')

Return the information required to create a proxy from cert.

userMessage is a string to be presented to the user before asking for the passphrase.

The return value must be a tuple (passphrase, hours, bits) where passphrase is the passphrase for the private key for the cert; hours is the desired lifetime of the certificate in hours; and bits is the length of the key (valid values are 512, 1024, 2048, 4096).

InitGlobusEnvironment(self)

Initialize the globus runtime environment.

This method invokes certmgr.InitEnvironment().

If the InitEnvrironment call succeeds, we are done.

If it does not succeed, it may raise a number of different exceptions based on what in particular the error was. These must be handled before the InitGlobusEnvironment call can succeed.

Since this is the user interface class, it can expect to do some work on behalf of the user to remedy the problems.

RequestCertificate(self, reqInfo, password, proxyEnabled, proxyHost, proxyPort)

Request a certificate.

reqInfo is an instance of CertificateManager.CertificateRequestInfo.

Perform the actual certificate request mechanics.

Returns 1 on success, 0 on failure.

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