[26350] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

svn rev #25686: trunk/src/lib/krb5/asn.1/

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Sat Feb 11 18:25:02 2012

Date: Sat, 11 Feb 2012 18:25:01 -0500
From: ghudson@mit.edu
Message-Id: <201202112325.q1BNP1Lu001509@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

http://src.mit.edu/fisheye/changelog/krb5/?cs=25686
Commit By: ghudson
Log Message:
Simplify ASN.1 choice type definitions

Union fields always have an offset of 0 relative to the union base,
so we just need tag types for them, not DEFFIELDs.


Changed Files:
U   trunk/src/lib/krb5/asn.1/asn1_k_encode.c
Modified: trunk/src/lib/krb5/asn.1/asn1_k_encode.c
===================================================================
--- trunk/src/lib/krb5/asn.1/asn1_k_encode.c	2012-02-11 23:24:58 UTC (rev 25685)
+++ trunk/src/lib/krb5/asn.1/asn1_k_encode.c	2012-02-11 23:25:00 UTC (rev 25686)
@@ -1434,14 +1434,9 @@
  * krb5_data object; pretend that they are wrapped in IMPLICIT OCTET STRING in
  * order to wrap them in primitive [1] and [2] tags.
  */
-DEFOFFSETTYPE(trusted_ca_0_untagged, union krb5_trusted_ca_choices,
-              principalName, principal);
-DEFTAGGEDTYPE(trusted_ca_0, CONTEXT_SPECIFIC, PRIMITIVE, 0, 0,
-              trusted_ca_0_untagged);
-DEFFIELD_IMPLICIT(trusted_ca_1, union krb5_trusted_ca_choices, caName, 1,
-                  ostring_data);
-DEFFIELD_IMPLICIT(trusted_ca_2, union krb5_trusted_ca_choices,
-                  issuerAndSerial, 2, ostring_data);
+DEFTAGGEDTYPE(trusted_ca_0, CONTEXT_SPECIFIC, PRIMITIVE, 0, 0, principal);
+DEFCTAGGEDTYPE_IMPLICIT(trusted_ca_1, 1, ostring_data);
+DEFCTAGGEDTYPE_IMPLICIT(trusted_ca_2, 2, ostring_data);
 static const struct atype_info *trusted_ca_alternatives[] = {
     &k5_atype_trusted_ca_0, &k5_atype_trusted_ca_1, &k5_atype_trusted_ca_2
 };
@@ -1546,10 +1541,8 @@
 DEFSEQTYPE(reply_key_pack_draft9, krb5_reply_key_pack_draft9,
            reply_key_pack_draft9_fields, NULL);
 
-DEFFIELD(pa_pk_as_rep_0, union krb5_pa_pk_as_rep_choices, dh_Info, 0,
-         dh_rep_info);
-DEFFIELD_IMPLICIT(pa_pk_as_rep_1, union krb5_pa_pk_as_rep_choices, encKeyPack,
-                  1, ostring_data);
+DEFCTAGGEDTYPE(pa_pk_as_rep_0, 0, dh_rep_info);
+DEFCTAGGEDTYPE_IMPLICIT(pa_pk_as_rep_1, 1, ostring_data);
 static const struct atype_info *pa_pk_as_rep_alternatives[] = {
     &k5_atype_pa_pk_as_rep_0, &k5_atype_pa_pk_as_rep_1
 };
@@ -1567,10 +1560,8 @@
  * krb5_data object; pretend that they are wrapped in IMPLICIT OCTET STRING in
  * order to wrap them in primitive [0] and [1] tags.
  */
-DEFFIELD_IMPLICIT(pa_pk_as_rep9_0, union krb5_pa_pk_as_rep_draft9_choices,
-                  dhSignedData, 0, ostring_data);
-DEFFIELD_IMPLICIT(pa_pk_as_rep9_1, union krb5_pa_pk_as_rep_draft9_choices,
-                  encKeyPack, 1, ostring_data);
+DEFCTAGGEDTYPE_IMPLICIT(pa_pk_as_rep9_0, 0, ostring_data);
+DEFCTAGGEDTYPE_IMPLICIT(pa_pk_as_rep9_1, 1, ostring_data);
 static const struct atype_info *pa_pk_as_rep_draft9_alternatives[] = {
     &k5_atype_pa_pk_as_rep9_0, &k5_atype_pa_pk_as_rep9_1
 };

_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post