eu.emi.security.authn.x509.helpers.proxy
Class ProxyCSRImpl
java.lang.Object
eu.emi.security.authn.x509.helpers.proxy.ProxyCSRImpl
- All Implemented Interfaces:
- ProxyCSR
public class ProxyCSRImpl
- extends Object
- implements ProxyCSR
ProxyCSR implementation.
- Author:
- K. Benedyczak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxyCSRImpl
public ProxyCSRImpl(PKCS10CertificationRequest csr,
PrivateKey pk)
- Parameters:
csr
- pk
- use null if PrivateKey was not generated
getCSR
public PKCS10CertificationRequest getCSR()
- Returns the CSR
- Specified by:
getCSR
in interface ProxyCSR
- Returns:
- the generated CSR
getPrivateKey
public PrivateKey getPrivateKey()
throws IllegalStateException
- Returns the generated private key of this CSR.
If public key was manually set an exception is thrown.
- Specified by:
getPrivateKey
in interface ProxyCSR
- Returns:
- The private key.
- Throws:
IllegalStateException
- if the private and public keys were not generated
hasPrivateKey
public boolean hasPrivateKey()
-
- Specified by:
hasPrivateKey
in interface ProxyCSR
- Returns:
- true if private key was generated and is available through
ProxyCSR.getPrivateKey()
Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.