GridShibCA::CA

Abstract interface to CA to sign certificates. This class isn't intended to be used itself, it just serves as a base for other classes.

Current implementations include: GridShibCA::OpenSSLCA and GridShibCA::MyProxyCA

Methods

new()
Create a new interface to the CA.

Arguments:

$username - name of user as string

$idp - idp of user as string

Returns: CA instance

getDN()
Return the DN for the user in RFC 2253 format.

Arguments: None

Returns: DN as string, or undef on error

getOpenSSLDN()
Return the DN for the user in OpenSSL format (e.g. /C=US/O=Example/CN=John Smith).

Arguments: None

Returns: DN as string, or undef on error

getProtectedOpenSSLDN()
Return the DN for the user in OpenSSL format with any forward slahses protected so that it can be passed to OpenSSL. E.g.:

/C=US/O=Example/OU=https:\/\/someurl.edu\/foo/CN=John Smith).

Arguments: None

Returns: DN as string, or undef on error

getCADN()
Return the DN of the CA.

Arguments: None

Returns: CA DN as string, undef on error

getCAOpenSSLDN()
Return the CA DN in OpenSSL ``oneline'' format.

Arguments: None

Returns: CA DN as string, undef on error

getRelativeDN()
Return the Relative DN in RFC 2253 format.

Arguments: None

Returns: Relative DN as string, undef on error

getRelativeOpenSSLDN()
Return the Relative DN in OpenSSL ``oneline'' format.

Arguments: None

Returns: Relative DN as string, undef on error

signRequest()
Given a certificate request return a certificate

Arguments: PEM-encoded PKCS10 certificate request as string.

Returns: Certificate as string, or undef on error

setCredLifetime()
Set the lifetime of signed credentials

Arguments: Lifetime in seconds

Returns: 1 on success, 0 on error

getCredLifetime()
Get the lifetime of signed credentials.

Arguments: None

Returns: Credential lifetime in seconds

getError()
Return the last error message as a string.

Arguments: None

Returns: Error string

convertRFC2253DNToOpenSSL()
Convert a DN in RFC 2253 format to OpenSSL ``oneline'' format as used by the Globus Toolkit.

Arguments: DN string in RFC 2253 format

Returns: DN string in OpenSSL ``oneline'' format

Internal methods

These internal methods not intended for external use.

_error()
Handle a error message.

Arguments: As to sprintf()

Returns: Nothing

_warn()
Hande a warning message.

Arguments: As to sprintf()

Returns: Nothing

_debug()
Hande a debug message.

Arguments: As to sprintf()

Returns: Nothing

Version

GridShib-CA version 0.4.0 ($Id: CA.pm.in,v 1.12 2007/04/30 22:12:25 welch Exp $)