X509Request
X509Request is a class for managing X509 requests with their Pkeys. It’s main use is for proxy delegation.
- class DIRAC.Core.Security.m2crypto.X509Request.X509Request(reqObj=None, pkeyObj=None)
Bases:
object
Class representing X509 Certificate Request. it is used for delegation. Please see About proxies for detailed explanations on delegation, and
DIRAC.Core.Security.m2crypto.X509Chain
for code examples.- __init__(reqObj=None, pkeyObj=None)
C’tor
- Parameters:
reqObj – M2Crypto.X509.Request object. Never used. Shall be removed
pkeyObj – M2Crypto.EVP.PKey() object. Never used. Shall be removed
- checkChain(chain)
Check that the public keys of the chain and the request match.
- Parameters:
chain –
X509Chain
object
- dumpAll()
Dump the Request and the PKey into a string
- Returns:
S_OK(PEM encoded req + key), S_ERROR
- dumpPKey()
Get the private as a string
- Returns:
S_OK(PEM encoded PKey)
- dumpRequest()
Get the request as a string
- Returns:
S_OK(pem encoded request)
- generateProxyRequest(bitStrength=2048, limited=False)
Initialize the Request object as well as the PKey.
- Parameters:
bitStrength – (default 2048) length of the key generated
limited – (default False) If True, request is done for a limited proxy
- getPKey()
Get PKey Internal
- Returns:
M2Crypto.EVP.PKEY object
- getStrength()
Get the length of the key of the request in bit
- Returns:
S_OK( size )/S_ERROR
- getSubjectDN()
Get subject DN of the request as a string
- Returns:
S_OK( string )/S_ERROR
- loadAllFromString(pemData)
load the Request and key argument from a PEM encoded string.
- Parameters:
pemData – PEN encoded string containing Request and PKey
- Returns:
S_OK()