|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kth.pdc.grid.utility.ProxyGenerator
public class ProxyGenerator
Generate a proxy certificate.
| Constructor Summary | |
|---|---|
ProxyGenerator()
itinnov, 15.9.2006 |
|
| Method Summary | |
|---|---|
X509Certificate |
createProxyFromCert(InputStream inCert,
InputStream inCACert,
InputStream inCAKey,
String caPwd)
Creates a proxy certificate from existing certificate |
X509Certificate[] |
createProxyFromCertReq(InputStream inCertReq,
BufferedInputStream inUserCert,
InputStream inUserKey,
String pwd)
Creates a proxy certificate from a certificate request |
static org.bouncycastle.asn1.x509.SubjectKeyIdentifier |
createSubjectKeyId(PublicKey pubKey)
|
X509Certificate |
getCertProxy()
Getting created proxy certificate |
X509Certificate |
getx509Cert()
|
void |
saveCertProxyTofile()
Save proxy certificate to file |
void |
saveCertProxyTofile(String delegationID,
String userDN)
Save proxy certificate to file |
void |
setBits(int bits)
Set the number of bits |
void |
setCertFile(String certFile)
Set certificate file needed to create proxy |
void |
setKeyFile(String keyFile)
Set key file needed to create proxy |
void |
setLifetime(int hours)
Set the life time |
void |
setPathLength(int pathLength)
Set path length of proxy |
void |
setProxyAslimited()
Set proxy as limited proxy |
void |
setProxyFile(String proxyFile)
Set proxyFile name |
void |
setProxyType(int proxyType)
Set the proxy type |
byte[] |
x509MakeCert(byte[] inCertReq,
String alterDN,
byte[] issuerCert,
byte[] issuerKey,
String pwd,
long validitytime)
|
byte[] |
x509MakeProxyCert(byte[] inCertReq,
byte[] inUserCert,
byte[] inUserKey,
String pwd,
long validitytime)
Creates a proxy certificate from a certificate request |
byte[] |
x509MakeProxyCert(byte[] inCertReq,
byte[] inProxy,
String password)
Creates a proxy certificate from a certificate request and a proxy certificate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProxyGenerator()
| Method Detail |
|---|
public byte[] x509MakeProxyCert(byte[] inCertReq,
byte[] inUserCert,
byte[] inUserKey,
String pwd,
long validitytime)
inCertReq - Certificate requestinUserCert - Issuer certificateinUserKey - Issuer privateKeypwd - Issuer password
public byte[] x509MakeProxyCert(byte[] inCertReq,
byte[] inProxy,
String password)
inCertReq - Certificate requestinProxy - user proxypwd - Issuer password
public X509Certificate[] createProxyFromCertReq(InputStream inCertReq,
BufferedInputStream inUserCert,
InputStream inUserKey,
String pwd)
inCertReq - Certificate requestinUserCert - Issuer certificateinUserKey - Issuer privateKeypwd - Issuer password
public X509Certificate createProxyFromCert(InputStream inCert,
InputStream inCACert,
InputStream inCAKey,
String caPwd)
throws IOException,
NoSuchAlgorithmException,
NoSuchProviderException,
InvalidKeyException,
GeneralSecurityException
inCert - User's certificateinCACert - issuer certificateinCAKey - issuer private keycaPwd - issuer password
IOException
NoSuchAlgorithmException
NoSuchProviderException
InvalidKeyException
GeneralSecurityExceptionpublic X509Certificate getCertProxy()
public void saveCertProxyTofile()
throws IOException,
CertificateEncodingException
IOException
CertificateEncodingException
public void saveCertProxyTofile(String delegationID,
String userDN)
throws IOException,
CertificateEncodingException
delegationID - proxy delegation ID to be added in proxy fileuserDN - the user DN to be added in proxy file
IOException
CertificateEncodingExceptionpublic void setBits(int bits)
bits - number of bitspublic void setLifetime(int hours)
hours - life time of proxypublic void setProxyType(int proxyType)
proxyType - public void setProxyAslimited()
public void setPathLength(int pathLength)
pathLength - public void setProxyFile(String proxyFile)
proxyFile - File name that proxy should be saved topublic void setKeyFile(String keyFile)
keyFile - public void setCertFile(String certFile)
certFile - public static org.bouncycastle.asn1.x509.SubjectKeyIdentifier createSubjectKeyId(PublicKey pubKey)
public byte[] x509MakeCert(byte[] inCertReq,
String alterDN,
byte[] issuerCert,
byte[] issuerKey,
String pwd,
long validitytime)
public X509Certificate getx509Cert()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||