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

typedef struct RegFormRes_ {
    asn1set__MessageWrapper    messageWrapper;
    asn1set__RegFormResTBS     regFormTBS;
    cert_identity              caSignatureCID;
} *RegFormRes;

RegFormRes safe_cast_RegFormRes(msg)
    set_msg            msg;             /* IN */
DESCRIPTION
RegFormRes contains the data from a SET RegFormRes 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.

RegFormRes message objects of type set_msg may be cast to type RegFormRes using the safe_cast_RegFormRes() routine.

FIELDS
Before calling make_set_msg(), CA software must insert the following state into the cache_ctx:
 *    STATE_LOCALID_CA

A call to make_set_msg() results in the protocol layer filling in the following fields:

 *    messageWrapper.messageHeader.version
 *    messageWrapper.messageHeader.date
 *    messageWrapper.swIdent
 *    messageWrapper.messageHeader.rrPID
 *    messageWrapper.message._choice
 *    regFormResTBS.rrpid
 *    regFormResTBS.lid_EE
 *    regFormResTBS.chall_EE2
 *    regFormResTBS.lid_CA
 *    regFormResTBS.chall_CA
 *    regFormResTBS.requestType
 *    regFormResTBS.brandCRLIdentifier (optional)
 *    regFormResTBS.thumbs (optional)
 *    caSignatureCID
It is unwise for users to change the contents of the fields filled in by the protocol layer.

After calling make_set_msg(), merchant software must (at a minimum) fill in the following required fields:

 *    regFormResTBS.formOrReferal....
Non-required fields may be left empty at the discretion of the merchant application, subject to any business constraints placed on the application.
CACHING
Cardholder
      STATE_CAETHUMB                 put
      STATE_CHALL_CA                 put
      STATE_CHALL_EE                 get
      STATE_LOCALID_CA               put
      STATE_REGFORMREQ_RRPID         get
Certification Authority
      STATE_CA_SIGID                 get
      STATE_CHALL_CA                 put
      STATE_CHALL_EE                 get
      STATE_LOCALID_CA               get
      STATE_LOCALID_CA               put
      STATE_LOCALID_EE               get
      STATE_REGFORMREQ_RRPID         get
      STATE_REQUESTTYPE              get
RETURN VALUES
On success, safe_cast_RegFormRes() returns a pointer to an RegFormRes data structure. Objects of type set_msg that were not created with message type asn1set__Message__regFormRes will cause safe_cast_RegFormRes() to fail. On failure, safe_cast_RegFormRes() returns a null 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, the application must 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.
    msg_type = asn1set__Message__regFormRes;
    status = make_set_msg(response, app_ctx, &msg_cache[0], msg_type);
    assert(status == NO_ERROR);

    regFormRes = safe_cast_RegFormRes(response);
    assert(regFormRes != 0);

    regFormRes->regFormResTBS.formOrReferal.u.regFormData.policy.u.
        visibleString = POLICY_TEXT;
    regFormRes->regFormResTBS.formOrReferal.u.regFormData.policy._choice =
        asn1set__PolicyText__visibleString;

    regFormRes->regFormResTBS.formOrReferal.u.regFormData.regTemplate.
        brandLogoURL = LOGO_URL;
    SET_PRESENT(regFormRes->regFormResTBS.formOrReferal.u.regFormData.regTemplate,
                asn1set__RegTemplate__brandLogoURL);

    regFormRes->regFormResTBS.formOrReferal.u.regFormData.regTemplate.
         regFormID = REGFORMID;

    regFormRes->regFormResTBS.formOrReferal.u.regFormData.regTemplate.
         regFieldSeq = (asn1set__RegFieldSeq*)
                      AC_calloc(heap, 1, sizeof(asn1set__RegFieldSeq));
    regFormRes->regFormResTBS.formOrReferal.u.regFormData.regTemplate.
         regFieldSeq->regField.fieldName.u.visibleString =
         "registration template field name 1";
    regFormRes->regFormResTBS.formOrReferal.u.regFormData.regTemplate.
         regFieldSeq->regField.fieldName._choice =
         asn1set__FieldName__visibleString;

    regFormRes->regFormResTBS.formOrReferal._choice = asn1set__RegFormOrReferral__regFormData;

    /* ... */

    status = send_set_msg(response, app_ctx, &msg_cache[0], outstream);
    assert(status == NO_ERROR);
    
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.