org.pelds.auth
Class CreateCert

java.lang.Object
  extended by 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)

Constructor Summary
CreateCert(Config c)
          Constructor
 
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
 

Constructor Detail

CreateCert

public CreateCert(Config c)
Constructor

Parameters:
c - a PeLDS configuration object
See Also:
Config
Method Detail

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 days
cn - Common Name (CN) for certificate
certURL - Subject Alternative Name as Web ID
spkac - the encoded SPKAC
Returns:
a new X509 Certificate
Throws:
java.lang.Exception
See Also:
http://openssl.org/docs/apps/spkac.html