keycloak-service
公開メンバ関数 | 関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.authentication.authenticators.x509.CertificateValidator.BouncyCastleOCSPChecker クラス
org.keycloak.authentication.authenticators.x509.CertificateValidator.BouncyCastleOCSPChecker の継承関係図
Inheritance graph
org.keycloak.authentication.authenticators.x509.CertificateValidator.BouncyCastleOCSPChecker 連携図
Collaboration graph

公開メンバ関数

OCSPUtils.OCSPRevocationStatus check (X509Certificate cert, X509Certificate issuerCertificate) throws CertPathValidatorException
 

関数

 BouncyCastleOCSPChecker (String responderUri)
 

非公開変数類

final String responderUri
 

詳解

構築子と解体子

◆ BouncyCastleOCSPChecker()

org.keycloak.authentication.authenticators.x509.CertificateValidator.BouncyCastleOCSPChecker.BouncyCastleOCSPChecker ( String  responderUri)
inlinepackage
152  {
153  this.responderUri = responderUri;
154  }

関数詳解

◆ check()

OCSPUtils.OCSPRevocationStatus org.keycloak.authentication.authenticators.x509.CertificateValidator.BouncyCastleOCSPChecker.check ( X509Certificate  cert,
X509Certificate  issuerCertificate 
) throws CertPathValidatorException
inline
157  {
158 
159  OCSPUtils.OCSPRevocationStatus ocspRevocationStatus = null;
160  if (responderUri == null || responderUri.trim().length() == 0) {
161  // Obtains revocation status of a certificate using OCSP and assuming
162  // most common defaults. If responderUri is not specified,
163  // then OCS responder URI is retrieved from the
164  // certificate's AIA extension.
165  // OCSP responses must be signed with the issuer certificate
166  // or with another certificate that must be:
167  // 1) signed by the issuer certificate,
168  // 2) Includes the value of OCSPsigning in ExtendedKeyUsage v3 extension
169  // 3) Certificate is valid at the time
170  ocspRevocationStatus = OCSPUtils.check(cert, issuerCertificate);
171  }
172  else {
173  URI uri;
174  try {
175  uri = new URI(responderUri);
176  } catch (URISyntaxException e) {
177  String message = String.format("Unable to check certificate revocation status using OCSP.\n%s", e.getMessage());
178  throw new CertPathValidatorException(message, e);
179  }
180  logger.tracef("Responder URI \"%s\" will be used to verify revocation status of the certificate using OCSP", uri.toString());
181  // Obtains the revocation status of a certificate using OCSP.
182  // OCSP responder's certificate is assumed to be the issuer's certificate
183  // certificate.
184  // responderUri overrides the contents (if any) of the certificate's AIA extension
185  ocspRevocationStatus = OCSPUtils.check(cert, issuerCertificate, uri, null, null);
186  }
187  return ocspRevocationStatus;
188  }
static final ServicesLogger logger
Definition: CertificateValidator.java:63

メンバ詳解

◆ responderUri

final String org.keycloak.authentication.authenticators.x509.CertificateValidator.BouncyCastleOCSPChecker.responderUri
private

このクラス詳解は次のファイルから抽出されました: