|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.kernel.SecurityTools
public class SecurityTools
Utility class for the major cryptographic operations in the kernel. See also AgentContainer.java
| Field Summary | |
|---|---|
static java.lang.String |
KEYSTORE_TYPE
|
| Constructor Summary | |
|---|---|
SecurityTools()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
calculatePeerSCID(java.net.Socket socket)
Calculate the SCID of a peer |
static java.lang.String |
calculateSCID(java.security.PublicKey pubkey)
Guido defined the SCID as the BASE32 encoded SHA-1 of the RSA public key. |
static java.lang.String |
certificateToPEM(java.security.cert.Certificate cert)
Converts a certificate to PEM-encoding |
static boolean |
equalsSCID(java.lang.String a,
java.lang.String b)
Standardized comparison function for SCIDs. |
static java.security.KeyStore |
generateKeyPair(java.lang.String Passphrase,
int validityInterval)
Generate a public/private key pair for the kernel with the public key in a self-signed certificate. |
static java.security.KeyStore |
generateKeyStore(java.security.KeyPair KP,
java.security.cert.Certificate[] Chain,
java.lang.String Passphrase)
Create a keystore containing a key pair |
static java.security.KeyPair |
generatePubKeyPair()
Generate a public/private key pair for the kernel. |
static java.lang.String |
getZeroSCID()
Returns BASE32 encoded version of a digest/SCID that consists of all 0 bytes |
static java.lang.String[] |
selectUsableSuites(java.lang.String[] wantedSuites,
java.lang.String[] supportedSuites)
Return the list of usable security suites, i.e., suites that are both wanted and supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEYSTORE_TYPE
| Constructor Detail |
|---|
public SecurityTools()
| Method Detail |
|---|
public static java.security.KeyStore generateKeyPair(java.lang.String Passphrase,
int validityInterval)
throws AuthenticationException
AuthenticationException
public static java.security.KeyPair generatePubKeyPair()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static java.lang.String calculateSCID(java.security.PublicKey pubkey)
throws AuthenticationException
AuthenticationExceptionpublic static java.lang.String getZeroSCID()
public static boolean equalsSCID(java.lang.String a,
java.lang.String b)
public static java.security.KeyStore generateKeyStore(java.security.KeyPair KP,
java.security.cert.Certificate[] Chain,
java.lang.String Passphrase)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateException,
java.io.IOException
Chain - in user -> root order
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
java.io.IOException
public static java.lang.String certificateToPEM(java.security.cert.Certificate cert)
throws java.security.cert.CertificateEncodingException
cert - The certificate to encode
java.security.cert.CertificateEncodingException
public static java.lang.String calculatePeerSCID(java.net.Socket socket)
throws AuthenticationException
socket - TLS socket to the peer
AuthenticationException
public static java.lang.String[] selectUsableSuites(java.lang.String[] wantedSuites,
java.lang.String[] supportedSuites)
throws NoKnownSecuritySuiteException
NoKnownSecuritySuiteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||