public final class SelfSignedGenerator extends Object
Constructor and Description |
---|
SelfSignedGenerator() |
Modifier and Type | Method and Description |
---|---|
static Object[] |
generate(String cname,
Set<String> altNames,
String ou,
String o,
String l,
String st,
String c,
int validDays,
SigType type) |
static Object[] |
generate(String cname,
String ou,
String o,
String l,
String st,
String c,
int validDays,
SigType type) |
static void |
main(String[] args)
Note: For CLI testing, use java -jar i2p.jar su3file keygen pubkey.crt keystore.ks commonName
|
static Object[] |
renew(X509Certificate cert,
PrivateKey jpriv,
int validDays) |
public static Object[] generate(String cname, String ou, String o, String l, String st, String c, int validDays, SigType type) throws GeneralSecurityException
cname
- the common name, non-null. Must be a hostname or email address. IP addresses will not be correctly encoded.ou
- The OU (organizational unit) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28o
- The O (organization)in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28l
- The L (city or locality) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28st
- The ST (state or province) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28c
- The C (country) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28GeneralSecurityException
public static Object[] generate(String cname, Set<String> altNames, String ou, String o, String l, String st, String c, int validDays, SigType type) throws GeneralSecurityException
cname
- the common name, non-null. Must be a hostname or email address. IP addresses will not be correctly encoded.altNames
- the Subject Alternative Names. May be null. May contain hostnames and/or IP addresses.
cname, localhost, 127.0.0.1, and ::1 will be automatically added.ou
- The OU (organizational unit) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28o
- The O (organization)in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28l
- The L (city or locality) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28st
- The ST (state or province) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28c
- The C (country) in the distinguished name, non-null before 0.9.28, may be null as of 0.9.28GeneralSecurityException
public static Object[] renew(X509Certificate cert, PrivateKey jpriv, int validDays) throws GeneralSecurityException
cert
- the old cert to be replacedjpriv
- the private keyGeneralSecurityException