public class KeyUsageFilter extends CertificateFilter
Modifier and Type | Field and Description |
---|---|
static java.lang.Boolean[] |
SIGN_CERT_USAGE
KeyUsage típico de un certificado válido para firmas
digitales.
|
Constructor and Description |
---|
KeyUsageFilter(java.lang.Boolean[] keyUsage)
Construye un filtro para certificados.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(java.security.cert.X509Certificate cert)
Comprueba si un certificado se adecúa al filtro
|
matches
public static final java.lang.Boolean[] SIGN_CERT_USAGE
public KeyUsageFilter(java.lang.Boolean[] keyUsage)
keyUsage
- Máscara de bits para filtro por KeyUsagenull
: No establece un filtro para ese uso del certificado.false
: El certificado no debe tener permitido ese uso.true
: El certificado debe tener permitido ese uso.public boolean matches(java.security.cert.X509Certificate cert)
CertificateFilter
matches
in class CertificateFilter
cert
- Certificado a comprobartrue
si el certificado se adecúa al filtro, false
en caso contrario