267 Hashtable<String, String> env =
new Hashtable<>(2);
269 env.put(Context.PROVIDER_URL, remoteURI.toString());
272 DirContext ctx =
new InitialDirContext(env);
274 Attributes attrs = ctx.getAttributes(
"");
275 Attribute cRLAttribute = attrs.get(
"certificateRevocationList;binary");
276 byte[] data = (byte[])cRLAttribute.get();
277 if (data == null || data.length == 0) {
278 throw new CertificateException(String.format(
"Failed to download CRL from \"%s\"", remoteURI.toString()));
281 return Collections.singleton(crl);
285 }
catch (NamingException e) {
286 logger.error(e.getMessage());
287 }
catch(IOException e) {
288 logger.error(e.getMessage());
291 return Collections.emptyList();
String getLdapFactoryClassName()
Definition: CertificateValidator.java:124
X509CRL loadFromStream(CertificateFactory cf, InputStream is)
Definition: CertificateValidator.java:315
final LdapContext ldapContext
Definition: CertificateValidator.java:204
static final ServicesLogger logger
Definition: CertificateValidator.java:63