NAME
CertInqReq - SET CertInqReq message data structures and routines
SYNOPSIS
#include <set_msg.h>

typedef struct CertInqReq_ {
    asn1set__MessageWrapper      messageWrapper;
    asn1set__CertInqReqTBS       certInqReqTBS;

    /* at least one of the following 2 are required */
    cert_identity                eeSignatureCID;
    pkcs8__PrivateKeyInfo        eeSignatureKey;

#define                          CertInqReq__eeSignatureCID      0
#define                          CertInqReq__eeSignatureKey      1
    UCHAR                        _present[1];
} *CertInqReq;

CertInqReq safe_cast_CertInqReq(msg)
    set_msg            msg;             /* IN */
DESCRIPTION
CertInqReq contains the data from a SET CertInqReq message in native C form. See the asn_types.h and asn1set.h header files for the declarations of the various types. See the SET specification for a description of individual fields.

CertInqReq message objects of type set_msg can be cast to type CertInqReq using the safe_cast_CertInqReq() routine.

FIELDS
A call to make_set_msg() results in the protocol layer filling in the following fields:
 *    messageWrapper.messageHeader.version
 *    messageWrapper.messageHeader.date
 *    messageWrapper.messageHeader.messageIDs
 *    messageWrapper.messageHeader.rrPID
 *    messageWrapper.messageHeader.swIdent
 *    messageWrapper.message._choice
 *    certInqReqTBS.rrpid
 *    certInqReqTBS.lid_EE
 *    certInqReqTBS.lid_CA
 *    certInqReqTBS.chall_EE3

If the request type requires a certificate-backed signature, then software must fill in the following required fields:

 *    eeSignatureCID

If the request is for a signature cert, then software must fill in the following required fields:

 *    eeSignatureKey

It is unwise for applications to change the contents of the fields filled in by the protocol layer. Non-required fields may be left empty at the discretion of the cardholder application, subject to any business constraints placed on the application.

OPTIONAL FIELDS

The _present element is used for specifying the presence or absence of optional elements. The macros SET_PRESENT(), IS_PRESENT(), SET_ABSENT(), and IS_ABSENT() are used to specify or query the status of optional elements. See documentation on ASN.1/DER runtime types for additional information.

When sending a message, the presence or absence must be set (using SET_PRESENT() or SET_ABSENT()) prior to calling send_set_msg(). It is usually unnecessary to invoke the SET_ABSENT() macro because absent is the default setting for blank messages.

When receiving a message, presence or absence can be determined (using the IS_PRESENT() or IS_ABSENT() macro) after calling decode_set_msg().

CertInqReq__eeSignatureCID
Software indicates to SETREF that the CertInqReq message is to be signed using a key pair backed by an existed cert by setting CertInqReq__eeSignatureCID to present.

SETREF indicates to CA software that the CertInqReq message was signed using a key pair backed by an existing cert by setting CertInqReq__eeSignatureCID to present.

CertInqReq__eeSignatureKey
Software indicates to SETREF that the CertInqReq message is to be signed using a key pair for which a cert is being requested by setting CertInqReq__eeSignatureKey to present.

SETREF indicates to CA software that the CertInqReq message was signed using a key pair for which a cert is being requested by setting CertInqReq__eeSignatureKey to present.

CACHING
Cardholder
      STATE_CERTINQREQ_RRPID         put
      STATE_CERTREQ_RRPID            get
      STATE_LOCALID_CA               get
      STATE_LOCALID_EE               get
      STATE_REQUESTTYPE              get
Merchant
      STATE_CERTINQREQ_RRPID         put
      STATE_PUBLICKEYS               get
      STATE_REQUESTTYPE              get
RETURN VALUES
On success, safe_cast_CertInqReq() returns a pointer to an CertInqReq data structure. Objects of type set_msg that were not created with message type asn1set__Message__certInqReq will cause safe_cast_CertInqReq() to fail. On failure, safe_cast_CertInqReq() returns a 0 pointer.
SEE ALSO
set_msg
NOTES
There is a difference between non-required and optional. Non-required fields may be omitted according to the SET protocol. Optional fields may be omitted according to ASN.1 encoding rules. In some messages, a field may be optional according to ASN.1, but still required by the SET protocol. In these cases, it is incumbent on the application to fill in these fields.

Optional fields that are filled in require an application of the SET_PRESENT() macro. See documentation on ASN.1/DER runtime types for additional information.

EXAMPLE
A more complete, explicated example is provided in the Implementor's Guide.
    certInqReq = safe_cast_CertInqReq(request);
    assert(certInqReq != 0);
   
    certInqReq->messageWrapper.messageHeader.swIdent._choice = asn1set__SWIdent__visibleString;
    certInqReq->messageWrapper.messageHeader.swIdent.u.visibleString = "WebTerm v7.2.3alpha";

    /* ... */

BUGS
This document describes a beta implementation. The information contained in this document may be incomplete and is subject to change.

Copyright © 1996, 1997, Visa International Service Association and MasterCard International Incorporated
All Rights Reserved.