Package org.bouncycastle.dvcs
Class DVCSRequestInfo
java.lang.Object
org.bouncycastle.dvcs.DVCSRequestInfo
Information piece of DVCS requests.
It is common for all types of DVCS requests.
-
Constructor Summary
ConstructorsConstructorDescriptionDVCSRequestInfo(byte[] in) Constructs DVCRequestInfo from byte array (DER encoded DVCSRequestInformation).DVCSRequestInfo(org.bouncycastle.asn1.dvcs.DVCSRequestInformation data) Constructs DVCRequestInfo from DVCSRequestInformation ASN.1 structure. -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.GeneralNamesGet data locations, where the copy of request Data can be obtained.org.bouncycastle.asn1.x509.GeneralNamesGet names of DVCS servers.getNonce()Get nonce if it is set.org.bouncycastle.asn1.x509.GeneralNamesGet names of requesting entity, if set.org.bouncycastle.asn1.x509.PolicyInformationGet policy, under which the validation is requested.Get request generation time if it is set.intGet requested service type.intGet DVCS version of request.org.bouncycastle.asn1.dvcs.DVCSRequestInformationConverts to corresponding ASN.1 structure (DVCSRequestInformation).static booleanvalidate(DVCSRequestInfo requestInfo, DVCSRequestInfo responseInfo) Compares two DVCRequestInfo structures: one from DVCRequest, and one from DVCResponse.
-
Constructor Details
-
DVCSRequestInfo
public DVCSRequestInfo(byte[] in) Constructs DVCRequestInfo from byte array (DER encoded DVCSRequestInformation).- Parameters:
in- a byte array holding the encoding of a DVCSRequestInformation structure.
-
DVCSRequestInfo
public DVCSRequestInfo(org.bouncycastle.asn1.dvcs.DVCSRequestInformation data) Constructs DVCRequestInfo from DVCSRequestInformation ASN.1 structure.- Parameters:
data- a DVCSRequestInformation to populate this object with.
-
-
Method Details
-
toASN1Structure
public org.bouncycastle.asn1.dvcs.DVCSRequestInformation toASN1Structure()Converts to corresponding ASN.1 structure (DVCSRequestInformation).- Returns:
- a DVCSRequestInformation object.
-
getVersion
public int getVersion()Get DVCS version of request.- Returns:
- the version number of the request.
-
getServiceType
public int getServiceType()Get requested service type.- Returns:
- one of CPD, VSD, VPKC, CCPD (see constants).
-
getNonce
Get nonce if it is set. Note: this field can be set (if not present) or extended (if present) by DVCS.- Returns:
- nonce value, or null if it is not set.
-
getRequestTime
Get request generation time if it is set.- Returns:
- time of request, or null if it is not set.
- Throws:
DVCSParsingException- if a request time is present but cannot be extracted.
-
getRequester
public org.bouncycastle.asn1.x509.GeneralNames getRequester()Get names of requesting entity, if set.- Returns:
- the requesting entity, or null.
-
getRequestPolicy
public org.bouncycastle.asn1.x509.PolicyInformation getRequestPolicy()Get policy, under which the validation is requested.- Returns:
- policy identifier or null, if any policy is acceptable.
-
getDVCSNames
public org.bouncycastle.asn1.x509.GeneralNames getDVCSNames()Get names of DVCS servers. Note: this field can be set by DVCS.- Returns:
- the DVCS names object, or null if not set.
-
getDataLocations
public org.bouncycastle.asn1.x509.GeneralNames getDataLocations()Get data locations, where the copy of request Data can be obtained. Note: the exact meaning of field is up to applications. Note: this field can be set by DVCS.- Returns:
- the DVCS dataLocations object, or null if not set.
-
validate
Compares two DVCRequestInfo structures: one from DVCRequest, and one from DVCResponse. This function implements RFC 3029, 9.1 checks of reqInfo.- Parameters:
requestInfo- - DVCRequestInfo of DVCRequestresponseInfo- - DVCRequestInfo of DVCResponse- Returns:
- true if server's requestInfo matches client's requestInfo
-