diff options
| author | Greg Hudson <ghudson@mit.edu> | 2012-01-06 21:17:14 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2012-01-06 21:17:14 +0000 |
| commit | a20df816b34da7a36b5b518793e0d9ccfd26f547 (patch) | |
| tree | 2f9d0c6926c9684bc85aa6d6289abb9ccf74c22f /src/include | |
| parent | b5143ff810a937e12491ba678575c09948d78300 (diff) | |
| download | krb5-a20df816b34da7a36b5b518793e0d9ccfd26f547.tar.gz krb5-a20df816b34da7a36b5b518793e0d9ccfd26f547.tar.xz krb5-a20df816b34da7a36b5b518793e0d9ccfd26f547.zip | |
Convert all remaining macro-coded ASN.1 encoders
Use data-driven encoders for all of the remaining types which still
used macros (primarily PKINIT types), and get rid of the macros. Do
not change any encoding behavior, but add some comments where behavior
differs from the spec.
DEFFNTYPE is now unused except for the kdc_req_body hack.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25617 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/k5-int-pkinit.h | 16 | ||||
| -rw-r--r-- | src/include/k5-int.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/include/k5-int-pkinit.h b/src/include/k5-int-pkinit.h index 3ad5f51062..b5b0863d7c 100644 --- a/src/include/k5-int-pkinit.h +++ b/src/include/k5-int-pkinit.h @@ -89,13 +89,13 @@ typedef struct _krb5_external_principal_identifier { /* TrustedCas */ typedef struct _krb5_trusted_ca { - enum { + enum krb5_trusted_ca_selection { choice_trusted_cas_UNKNOWN = -1, choice_trusted_cas_principalName = 0, choice_trusted_cas_caName = 1, choice_trusted_cas_issuerAndSerial = 2 } choice; - union { + union krb5_trusted_ca_choices { krb5_principal principalName; krb5_data caName; /* fully-qualified X.500 "Name" as defined by X.509 (der-encoded) */ krb5_data issuerAndSerial; /* Optional -- IssuerAndSerialNumber (der-encoded) */ @@ -151,12 +151,12 @@ typedef struct _krb5_reply_key_pack_draft9 { /* PA-PK-AS-REP (Draft 9 -- PA TYPE 15) */ typedef struct _krb5_pa_pk_as_rep_draft9 { - enum { + enum krb5_pa_pk_as_rep_draft9_selection { choice_pa_pk_as_rep_draft9_UNKNOWN = -1, choice_pa_pk_as_rep_draft9_dhSignedData = 0, choice_pa_pk_as_rep_draft9_encKeyPack = 1 } choice; - union { + union krb5_pa_pk_as_rep_draft9_choices { krb5_data dhSignedData; krb5_data encKeyPack; } u; @@ -164,12 +164,12 @@ typedef struct _krb5_pa_pk_as_rep_draft9 { /* PA-PK-AS-REP (rfc4556 -- PA TYPE 17) */ typedef struct _krb5_pa_pk_as_rep { - enum { + enum krb5_pa_pk_as_rep_selection { choice_pa_pk_as_rep_UNKNOWN = -1, choice_pa_pk_as_rep_dhInfo = 0, choice_pa_pk_as_rep_encKeyPack = 1 } choice; - union { + union krb5_pa_pk_as_rep_choices { krb5_dh_rep_info dh_Info; krb5_data encKeyPack; } u; @@ -230,11 +230,11 @@ encode_krb5_reply_key_pack_draft9(const krb5_reply_key_pack_draft9 *, krb5_data **code); krb5_error_code -encode_krb5_td_trusted_certifiers(const krb5_external_principal_identifier **, +encode_krb5_td_trusted_certifiers(krb5_external_principal_identifier *const *, krb5_data **code); krb5_error_code -encode_krb5_td_dh_parameters(const krb5_algorithm_identifier **, +encode_krb5_td_dh_parameters(krb5_algorithm_identifier *const *, krb5_data **code); krb5_error_code diff --git a/src/include/k5-int.h b/src/include/k5-int.h index f1bd1faabc..f25c4fa20f 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1677,7 +1677,7 @@ krb5_error_code encode_krb5_padata_sequence(krb5_pa_data *const *rep, krb5_data **code); krb5_error_code -encode_krb5_typed_data(const krb5_pa_data *const *rep, krb5_data **code); +encode_krb5_typed_data(krb5_pa_data *const *rep, krb5_data **code); krb5_error_code encode_krb5_alt_method(const krb5_alt_method *, krb5_data **code); |
