Package org.bouncycastle.dvcs
Class DVCSRequestInfo
- java.lang.Object
-
- org.bouncycastle.dvcs.DVCSRequestInfo
-
public class DVCSRequestInfo extends java.lang.ObjectInformation piece of DVCS requests. It is common for all types of DVCS requests.
-
-
Constructor Summary
Constructors Constructor Description DVCSRequestInfo(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.x509.GeneralNamesgetDataLocations()Get data locations, where the copy of request Data can be obtained.org.bouncycastle.asn1.x509.GeneralNamesgetDVCSNames()Get names of DVCS servers.java.math.BigIntegergetNonce()Get nonce if it is set.org.bouncycastle.asn1.x509.GeneralNamesgetRequester()Get names of requesting entity, if set.org.bouncycastle.asn1.x509.PolicyInformationgetRequestPolicy()Get policy, under which the validation is requested.java.util.DategetRequestTime()Get request generation time if it is set.intgetServiceType()Get requested service type.intgetVersion()Get DVCS version of request.org.bouncycastle.asn1.dvcs.DVCSRequestInformationtoASN1Structure()Converts to corresponding ASN.1 structure (DVCSRequestInformation).static booleanvalidate(DVCSRequestInfo requestInfo, DVCSRequestInfo responseInfo)Compares two DVCRequestInfo structures: one from DVCRequest, and one from DVCResponse.
-
-
-
Constructor Detail
-
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 Detail
-
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
public java.math.BigInteger 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
public java.util.Date getRequestTime() throws DVCSParsingExceptionGet 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
public static boolean validate(DVCSRequestInfo requestInfo, DVCSRequestInfo responseInfo)
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
-
-