|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.ObjectCOM.claymoresystems.sslg.SSLContextInt
COM.claymoresystems.ptls.SSLContext
SSLContext holds all state relevant to more than one SSL Session/ Connection. In particular, it's the access point for user keying material, user policy settings, and the session cache.
For clients, it is legal to merely create an SSLContext and use it immediately, though it is advisable to set the SSLPolicy.
Since servers must have keying material to operate, all SSLContexts which are to be used for servers must be initialized using loadEAYKeyFile() or loadPKS12KeyFile().
Currently, SSLContext supports only one key at a time and loading a new keyfile overrides any exiting keys/certificates. Future implementations may support multiple keys automatically selected based on the cipherSuite.
| Field Summary |
|---|
| Fields inherited from class COM.claymoresystems.sslg.SSLContextInt |
|---|
policy |
| Constructor Summary | |
|---|---|
SSLContext()
|
|
| Method Summary | |
|---|---|
protected void |
destroySession(java.lang.String sessionLookupKey)
|
protected COM.claymoresystems.ptls.SSLSessionData |
findSession(java.lang.String key)
|
void |
loadDHParams(java.io.InputStream is)
Load a DH parameters structure from disk. |
void |
loadDHParams(java.lang.String path)
Load the DH parameters structure from a file |
void |
loadEAYKeyFile(java.io.InputStream is,
java.lang.String passphrase)
Load a subset of SSLeay keyfiles. |
void |
loadEAYKeyFile(java.lang.String path,
java.lang.String passphrase)
Load a subset of SSLeay keyfiles. |
void |
loadPKCS12File(java.lang.String path,
java.lang.String passphrase)
Load keying material from the indicated PKCS12/PFX keyfile, using the passphrase passed in |
void |
loadRootCertificates(java.io.InputStream is)
Load a list of acceptable roots. |
void |
loadRootCertificates(java.lang.String path)
Load a list of acceptable roots. |
void |
saveDHParams(java.lang.String path,
int size,
boolean sophieGermainPrimes)
Save DH parameters to disk, generating them if necessary |
void |
saveEAYKeyFile(java.lang.String path,
java.lang.String passphrase)
|
void |
seedRNG(byte[] seed)
Build new RNG based on the indicated seed, or update current RNG |
protected void |
storeSession(java.lang.String key,
COM.claymoresystems.ptls.SSLSessionData sd)
|
void |
useRandomnessFile(java.lang.String file,
java.lang.String passphrase)
use the indicated file for randomness If the file does not exist, it is created. |
| Methods inherited from class COM.claymoresystems.sslg.SSLContextInt |
|---|
getPolicy, setPolicy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SSLContext()
| Method Detail |
public void seedRNG(byte[] seed)
seed - the seed
public void useRandomnessFile(java.lang.String file,
java.lang.String passphrase)
throws java.io.IOException,
java.io.FileNotFoundException
useRandomnessFile in class SSLContextIntpassphrase - the passphrase needed to decrypt/verify the keyfile
java.io.IOException - if something goes wrong
java.io.FileNotFoundException - if we're unable to update the file
public void loadPKCS12File(java.lang.String path,
java.lang.String passphrase)
loadPKCS12File in class SSLContextIntpath - the filename for the keyfilepassphrase - the passphrase needed to decrypt/verify the keyfile
Currently not implemented
public void loadEAYKeyFile(java.lang.String path,
java.lang.String passphrase)
throws java.io.FileNotFoundException,
java.io.IOException
We assume that the first key is bound to the first group of certificates
We assume that any certificates we find are strictly ordered from the user's certificate to the root.
loadEAYKeyFile in class SSLContextIntpath - the filename for the fielpassphrase - the passphrase needed to decrypt the private key
java.io.IOException - if the keyfile is badly formatted
java.io.FileNotFoundException - if the keyfile doesn't exist
public void loadEAYKeyFile(java.io.InputStream is,
java.lang.String passphrase)
throws java.io.IOException
We assume that the first key is bound to the first group of certificates
We assume that any certificates we find are strictly ordered from the user's certificate to the root.
loadEAYKeyFile in class SSLContextIntis - the filepassphrase - the passphrase needed to decrypt the private key
java.io.IOException - if the keyfile is badly formatted
java.io.FileNotFoundException - if the keyfile doesn't exist
public void saveEAYKeyFile(java.lang.String path,
java.lang.String passphrase)
throws java.io.IOException,
java.io.FileNotFoundException
saveEAYKeyFile in class SSLContextIntjava.io.IOException
java.io.FileNotFoundException
public void loadRootCertificates(java.lang.String path)
throws java.io.FileNotFoundException,
java.io.IOException
Roots are not used for verifying the keys found in the keyfile. They are only used for verifying the certificates of peer entities.
Roots are formatted in SSLeay "PEM" style
loadRootCertificates in class SSLContextIntpath - the filename containing the root list
java.io.FileNotFoundException
java.io.IOException
public void loadRootCertificates(java.io.InputStream is)
throws java.io.IOException
Roots are not used for verifying the keys found in the keyfile. They are only used for verifying the certificates of peer entities.
Roots are formatted in SSLeay "PEM" style
loadRootCertificates in class SSLContextIntjava.io.IOException
public void loadDHParams(java.lang.String path)
throws java.io.FileNotFoundException,
java.io.IOException
loadDHParams in class SSLContextIntpath - the file
java.io.FileNotFoundException
java.io.IOException
public void loadDHParams(java.io.InputStream is)
throws java.io.IOException
loadDHParams in class SSLContextIntis - the params file
java.io.IOException
public void saveDHParams(java.lang.String path,
int size,
boolean sophieGermainPrimes)
throws java.io.IOException,
java.io.FileNotFoundException
saveDHParams in class SSLContextIntpath - the file to save tosophieGermainPrimes - generate sophieGermainPrimes (VERY slow)
java.io.IOException
java.io.FileNotFoundException
protected void storeSession(java.lang.String key,
COM.claymoresystems.ptls.SSLSessionData sd)
protected COM.claymoresystems.ptls.SSLSessionData findSession(java.lang.String key)
protected void destroySession(java.lang.String sessionLookupKey)
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||