org.pelds.auth
Class CreateCert
java.lang.Object
org.pelds.auth.CreateCert
public class CreateCert
- extends java.lang.Object
X509 certificate signing with custom Subject Alt Name values
- Author:
- Hannes Muehleisen (hannes@muehleisen.org)
Method Summary |
java.security.cert.X509Certificate |
createCert(int lifetimeDays,
java.lang.String cn,
java.net.URL certURL,
java.lang.String spkac)
Create the certificate from a "Netscape signed public key and challenge"
(SPKAC) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateCert
public CreateCert(Config c)
- Constructor
- Parameters:
c
- a PeLDS configuration object- See Also:
Config
createCert
public java.security.cert.X509Certificate createCert(int lifetimeDays,
java.lang.String cn,
java.net.URL certURL,
java.lang.String spkac)
throws java.lang.Exception
- Create the certificate from a "Netscape signed public key and challenge"
(SPKAC)
- Parameters:
lifetimeDays
- Certificate lifetime in dayscn
- Common Name (CN) for certificatecertURL
- Subject Alternative Name as Web IDspkac
- the encoded SPKAC
- Returns:
- a new X509 Certificate
- Throws:
java.lang.Exception
- See Also:
http://openssl.org/docs/apps/spkac.html