|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.jeri.ssl.Utilities
net.jini.jeri.ssl.SubjectCredentials
class SubjectCredentials
Provides methods for retrieving credentials from a Subject.
Nested Class Summary | |
---|---|
private static class |
SubjectCredentials.CertificateMatcher
Provides utilities for converting between X.509 certificates and unique certificate names. |
(package private) static class |
SubjectCredentials.GetAllPrivateCredentialsAction
A privileged action that returns all the X.500 private credentials for a subject as an X500PrivateCredential array. |
(package private) static class |
SubjectCredentials.GetPrivateCredentialAction
A privileged action that gets the private credentials for an X.509 certificate. |
Nested classes/interfaces inherited from class net.jini.jeri.ssl.Utilities |
---|
Utilities.SSLContextInfo |
Field Summary |
---|
Fields inherited from class net.jini.jeri.ssl.Utilities |
---|
ANY_KEY_ALGORITHM, clientLogger, DSA_KEY_ALGORITHM, getSubjectPermission, initLogger, INTEGRITY_PREFERRED, INTEGRITY_REQUIRED, RSA_KEY_ALGORITHM, serverLogger, UNKNOWN_PRINCIPAL |
Constructor Summary | |
---|---|
private |
SubjectCredentials()
This class shouldn't be instantiated |
Method Summary | |
---|---|
private static void |
appendKeyString(Key key,
StringBuffer buf)
Appends information about a key to a StringBuffer. |
(package private) static String |
credentialsString(Subject subject)
Returns a String that describes the credentials in the subject. |
(package private) static CertPath |
getCertificateChain(Subject subject,
String name)
Retrieves the X.509 CertPath for a credential name. |
(package private) static CertPath |
getCertificateChain(Subject subject,
X509Certificate cert)
Checks if the subject's public credentials contain a certificate chain that starts with a certificate with the same subject and public key, and returns the certificate chain if it does. |
(package private) static List |
getCertificateChains(Subject subject)
Returns the X.509 CertPaths stored in the public credentials of the subject. |
(package private) static String |
getCertificateName(X509Certificate cert)
Returns the credential name for an X.509 certificate. |
(package private) static X500Principal |
getPrincipal(Subject subject,
X509Certificate cert)
Returns the subject principal matching the X.509 certificate. |
(package private) static Set |
getPrincipals(Subject subject,
int keyAlgorithms,
X500PrivateCredential[] privateCredentials)
Retrieves the principals in the subject with X.509 CertPaths which use the specified key algorithm and, optionally, have associated private credentials. |
(package private) static X500PrivateCredential |
getPrivateCredential(Subject subject,
X509Certificate cert)
Returns the X500PrivateCredential for an X.509 certificate. |
private static boolean |
isX509CertificateChain(Object credential)
Determines if the argument is an X.509 certificate CertPath. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private SubjectCredentials()
Method Detail |
---|
static CertPath getCertificateChain(Subject subject, String name)
subject
- the Subject containing the credentials or nullname
- the name of the credentials
static String getCertificateName(X509Certificate cert)
cert
- the certificate
static List getCertificateChains(Subject subject)
subject
- the subject containing the X.509 CertPaths or null
static CertPath getCertificateChain(Subject subject, X509Certificate cert)
cert
- the certificate
static Set getPrincipals(Subject subject, int keyAlgorithms, X500PrivateCredential[] privateCredentials)
subject
- the Subject containing the principalskeyAlgorithms
- the permitted key algorithms, an OR of any of
DSA_KEY_ALGORITHM and RSA_KEY_ALGORITHMprivateCredentials
- the available private credentials, or null if
private credentials are not required
static X500PrivateCredential getPrivateCredential(Subject subject, X509Certificate cert)
subject
- the Subject containing the credentialscert
- the X.509 certificate
static X500Principal getPrincipal(Subject subject, X509Certificate cert)
subject
- the Subject containing the credentialscert
- the X.509 certificate
static String credentialsString(Subject subject)
subject
- the Subject containing the credentials
NullPointerException
- if the subject is nullprivate static void appendKeyString(Key key, StringBuffer buf)
private static boolean isX509CertificateChain(Object credential)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |