Class DVCSRequestInfo


  • public class DVCSRequestInfo
    extends Object
    Information piece of DVCS requests. It is common for all types of DVCS requests.
    • 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 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 Date getRequestTime()
                            throws DVCSParsingException
        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

        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 DVCRequest
        responseInfo - - DVCRequestInfo of DVCResponse
        Returns:
        true if server's requestInfo matches client's requestInfo