|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents a Certificate Validator and describes methods available to the application for certificate validation functionality.
This interface is intended to be implemented by the application to provide SWS-J with assurances that a certificate contained in a message or a document is valid and acceptable for use. Note: The only way to turn off certificate validation is to override theCertValidator class and force the validate()
method to return true in all cases.
| Field Summary | |
static byte |
XML_ENC
Flag to indicate that the certificate must be validated for XML encryption |
static byte |
XML_SIG
Flag to indicate that the certificate must be validated for XML signature |
| Method Summary | |
boolean |
validate(java.security.cert.X509Certificate certToValidate,
java.security.cert.X509Certificate[] extraCerts,
int requiredUsage)
Validates a certificate, possibly against a supplied path or chain, and checks the key usage extensions of the certificate. |
| Field Detail |
public static final byte XML_SIG
public static final byte XML_ENC
| Method Detail |
public boolean validate(java.security.cert.X509Certificate certToValidate,
java.security.cert.X509Certificate[] extraCerts,
int requiredUsage)
throws SWSJException
certToValidate - The certificate for which SWS-J is requesting
validation. extraCerts - An array of additonal and possibly unrelated
certificates that were present in the parsed message or
document. They are used to try to validate the certificate path.
This array can be empty. The application must provide
appropriate checks and assurances that the certificate is valid
for use. requiredUsage - An integer identifier for the required certificate
usage; for example, encryption or signing. Valid values at
present are XML_SIG and XML_ENC.
true if the certificate was validated; otherwise,
false.
SWSJException - If any of the parameters are invalid.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||