Package org.xipki.ocsp.client.shell
Class Actions.BaseOcspStatusAction
- java.lang.Object
-
- org.xipki.shell.XiAction
-
- org.xipki.ocsp.client.shell.Actions.CommonOcspStatusAction
-
- org.xipki.ocsp.client.shell.Actions.BaseOcspStatusAction
-
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
- Direct Known Subclasses:
Actions.OcspStatus
- Enclosing class:
- Actions
public abstract static class Actions.BaseOcspStatusAction extends Actions.CommonOcspStatusAction
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,java.lang.String>EXTENSION_OIDNAME_MAPprotected java.lang.Booleanverbose-
Fields inherited from class org.xipki.ocsp.client.shell.Actions.CommonOcspStatusAction
allowNoNonceInResponse, hashAlgo, issuerCertFile, nonceLen, prefSigAlgs, signRequest, useHttpGetForSmallRequest, usenonce
-
-
Constructor Summary
Constructors Constructor Description BaseOcspStatusAction()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckParameters(org.xipki.security.X509Cert respIssuer, java.util.List<java.math.BigInteger> serialNumbers, java.util.Map<java.math.BigInteger,byte[]> encodedCerts)Check whether the parameters are valid.protected java.lang.Objectexecute0()static java.util.List<java.lang.String>extractOcspUrls(org.bouncycastle.asn1.x509.AuthorityInformationAccess aia)static java.util.List<java.lang.String>extractOcspUrls(org.bouncycastle.cert.X509AttributeCertificateHolder cert)static java.util.List<java.lang.String>extractOcspUrls(org.xipki.security.X509Cert cert)protected abstract voidprocessResponse(org.bouncycastle.cert.ocsp.OCSPResp response, org.xipki.security.X509Cert respIssuer, org.xipki.security.IssuerHash issuerHash, java.util.List<java.math.BigInteger> serialNumbers, java.util.Map<java.math.BigInteger,byte[]> encodedCerts)Check whether the response has the expected issuer, certificate serial numbers and for the given encoded certificates.-
Methods inherited from class org.xipki.ocsp.client.shell.Actions.CommonOcspStatusAction
getRequestOptions
-
Methods inherited from class org.xipki.shell.XiAction
confirm, derPemEncode, embedFileContent, encodeCert, encodeCrl, encodeCsr, execute, expandFilepath, expandFilepath, isBlank, isEmpty, isEnabled, isNotBlank, isNotEmpty, isTrue, print, println, readPassword, readPassword, readPasswordIfNotSet, readPasswordIfNotSet, readPrompt, resolvePassword, save, save, saveVerbose, saveVerbose, split, toBigInt, toBigInt
-
-
-
-
Method Detail
-
checkParameters
protected abstract void checkParameters(org.xipki.security.X509Cert respIssuer, java.util.List<java.math.BigInteger> serialNumbers, java.util.Map<java.math.BigInteger,byte[]> encodedCerts) throws java.lang.ExceptionCheck whether the parameters are valid.- Parameters:
respIssuer- Expected responder issuer. Could benull.serialNumbers- Expected serial numbers. Must not benull.encodedCerts- Map of serial number and the corresponding certificate. Could benull.- Throws:
java.lang.Exception- if checking failed.
-
processResponse
protected abstract void processResponse(org.bouncycastle.cert.ocsp.OCSPResp response, org.xipki.security.X509Cert respIssuer, org.xipki.security.IssuerHash issuerHash, java.util.List<java.math.BigInteger> serialNumbers, java.util.Map<java.math.BigInteger,byte[]> encodedCerts) throws java.lang.ExceptionCheck whether the response has the expected issuer, certificate serial numbers and for the given encoded certificates.- Parameters:
response- OCSP response. Must not benull.respIssuer- Expected responder issuer. Could benull.issuerHash- Expected issuer hash. Must not benull.serialNumbers- Expected serial numbers. Must not benull.encodedCerts- Map of serial number and the corresponding certificate. Could benull.- Throws:
java.lang.Exception- if processing response failed.
-
execute0
protected final java.lang.Object execute0() throws java.lang.Exception- Specified by:
execute0in classorg.xipki.shell.XiAction- Throws:
java.lang.Exception
-
extractOcspUrls
public static java.util.List<java.lang.String> extractOcspUrls(org.xipki.security.X509Cert cert)
-
extractOcspUrls
public static java.util.List<java.lang.String> extractOcspUrls(org.bouncycastle.cert.X509AttributeCertificateHolder cert)
-
extractOcspUrls
public static java.util.List<java.lang.String> extractOcspUrls(org.bouncycastle.asn1.x509.AuthorityInformationAccess aia)
-
-