class SubjectCredentials extends Utilities
Modifier and Type | Class and Description |
---|---|
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.
|
Utilities.SSLContextInfo
ANY_KEY_ALGORITHM, clientLogger, DSA_KEY_ALGORITHM, getSubjectPermission, initLogger, INTEGRITY_PREFERRED, INTEGRITY_REQUIRED, RSA_KEY_ALGORITHM, serverLogger, UNKNOWN_PRINCIPAL
Modifier | Constructor and Description |
---|---|
private |
SubjectCredentials()
This class shouldn't be instantiated
|
Modifier and Type | Method and Description |
---|---|
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.
|
checkValidity, contains, doesEncryption, doesServerAuthentication, equals, firstX509Cert, getCertFactory, getCipherAlgorithm, getClassName, getClientPrincipals, getClientPrincipals, getClientSSLContextInfo, getKeyAlgorithm, getKeyExchangeAlgorithm, getPermittedKeyAlgorithms, getServerPrincipals, getServerSSLContextInfo, getSupportedCipherSuites, hasStrongCipherAlgorithm, logThrow, maintainsIntegrity, permittedKeyAlgorithm, position, releaseClientSSLContextInfo, safeEquals, subjectString, toString
private SubjectCredentials()
static CertPath getCertificateChain(Subject subject, String name)
subject
- the Subject containing the credentials or nullname
- the name of the credentialsstatic String getCertificateName(X509Certificate cert)
cert
- the certificatestatic List getCertificateChains(Subject subject)
subject
- the subject containing the X.509 CertPaths or nullstatic CertPath getCertificateChain(Subject subject, X509Certificate cert)
cert
- the certificatestatic 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 requiredstatic X500PrivateCredential getPrivateCredential(Subject subject, X509Certificate cert)
subject
- the Subject containing the credentialscert
- the X.509 certificatestatic X500Principal getPrincipal(Subject subject, X509Certificate cert)
subject
- the Subject containing the credentialscert
- the X.509 certificatestatic String credentialsString(Subject subject)
subject
- the Subject containing the credentialsNullPointerException
- if the subject is nullprivate static void appendKeyString(Key key, StringBuffer buf)
private static boolean isX509CertificateChain(Object credential)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.