Remove SAM encoders and structures
authorGreg Hudson <ghudson@mit.edu>
Sat, 7 Jan 2012 15:50:14 +0000 (15:50 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 7 Jan 2012 15:50:14 +0000 (15:50 +0000)
r24403 removed the old SAM support, but left behind the structures,
free functions, and ASN.1 encoders/decoders.  Remove those now.
(SAM-2 support is still present.)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25618 dc483132-0cff-0310-8789-dd5450dbe970

16 files changed:
src/include/k5-int.h
src/lib/krb5/asn.1/asn1_k_decode.h
src/lib/krb5/asn.1/asn1_k_decode_sam.c
src/lib/krb5/asn.1/asn1_k_encode.c
src/lib/krb5/asn.1/krb5_decode.c
src/lib/krb5/krb/kfree.c
src/lib/krb5/libkrb5.exports
src/tests/asn.1/krb5_decode_leak.c
src/tests/asn.1/krb5_decode_test.c
src/tests/asn.1/krb5_encode_test.c
src/tests/asn.1/ktest.c
src/tests/asn.1/ktest.h
src/tests/asn.1/ktest_equal.c
src/tests/asn.1/ktest_equal.h
src/tests/asn.1/reference_encode.out
src/tests/asn.1/trval_reference.out

index f25c4fa20f5836b4378d46b93e5ac2c1ad37db8b..c10d8aaac69a281416121d537dc7e747ae131b97 100644 (file)
@@ -422,30 +422,6 @@ typedef struct _krb5_etype_list {
     krb5_enctype    *etypes;
 } krb5_etype_list;
 
-/*
- * a sam_challenge is returned for alternate preauth
- */
-/*
-  SAMFlags ::= BIT STRING {
-  use-sad-as-key[0],
-  send-encrypted-sad[1],
-  must-pk-encrypt-sad[2]
-  }
-*/
-/*
-  PA-SAM-CHALLENGE ::= SEQUENCE {
-  sam-type[0]                 INTEGER,
-  sam-flags[1]                SAMFlags,
-  sam-type-name[2]            GeneralString OPTIONAL,
-  sam-track-id[3]             GeneralString OPTIONAL,
-  sam-challenge-label[4]      GeneralString OPTIONAL,
-  sam-challenge[5]            GeneralString OPTIONAL,
-  sam-response-prompt[6]      GeneralString OPTIONAL,
-  sam-pk-for-sad[7]           EncryptionKey OPTIONAL,
-  sam-nonce[8]                INTEGER OPTIONAL,
-  sam-cksum[9]                Checksum OPTIONAL
-  }
-*/
 /* sam_type values -- informational only */
 #define PA_SAM_TYPE_ENIGMA     1   /*  Enigma Logic */
 #define PA_SAM_TYPE_DIGI_PATH  2   /*  Digital Pathways */
@@ -462,54 +438,6 @@ typedef struct _krb5_etype_list {
 #define PA_SAM_TYPE_GRAIL               (PA_SAM_TYPE_EXP_BASE+0) /* testing */
 #define PA_SAM_TYPE_SECURID_PREDICT     (PA_SAM_TYPE_EXP_BASE+1) /* special */
 
-typedef struct _krb5_predicted_sam_response {
-    krb5_magic      magic;
-    krb5_keyblock   sam_key;
-    krb5_flags      sam_flags; /* Makes key munging easier */
-    krb5_timestamp  stime;  /* time on server, for replay detection */
-    krb5_int32      susec;
-    krb5_principal  client;
-    krb5_data       msd;    /* mechanism specific data */
-} krb5_predicted_sam_response;
-
-typedef struct _krb5_sam_challenge {
-    krb5_magic      magic;
-    krb5_int32      sam_type; /* information */
-    krb5_flags      sam_flags; /* KRB5_SAM_* values */
-    krb5_data       sam_type_name;
-    krb5_data       sam_track_id;
-    krb5_data       sam_challenge_label;
-    krb5_data       sam_challenge;
-    krb5_data       sam_response_prompt;
-    krb5_data       sam_pk_for_sad;
-    krb5_int32      sam_nonce;
-    krb5_checksum   sam_cksum;
-} krb5_sam_challenge;
-
-typedef struct _krb5_sam_key {  /* reserved for future use */
-    krb5_magic      magic;
-    krb5_keyblock   sam_key;
-} krb5_sam_key;
-
-typedef struct _krb5_enc_sam_response_enc {
-    krb5_magic      magic;
-    krb5_int32      sam_nonce;
-    krb5_timestamp  sam_timestamp;
-    krb5_int32      sam_usec;
-    krb5_data       sam_sad;
-} krb5_enc_sam_response_enc;
-
-typedef struct _krb5_sam_response {
-    krb5_magic      magic;
-    krb5_int32      sam_type; /* informational */
-    krb5_flags      sam_flags; /* KRB5_SAM_* values */
-    krb5_data       sam_track_id; /* copied */
-    krb5_enc_data   sam_enc_key; /* krb5_sam_key - future use */
-    krb5_enc_data   sam_enc_nonce_or_ts; /* krb5_enc_sam_response_enc */
-    krb5_int32      sam_nonce;
-    krb5_timestamp  sam_patimestamp;
-} krb5_sam_response;
-
 typedef struct _krb5_sam_challenge_2 {
     krb5_data       sam_challenge_2_body;
     krb5_checksum   **sam_cksum;            /* Array of checksums */
@@ -1122,33 +1050,18 @@ void KRB5_CALLCONV krb5_preauth_prepare_request(krb5_context,
 void KRB5_CALLCONV krb5_preauth_request_context_init(krb5_context);
 void KRB5_CALLCONV krb5_preauth_request_context_fini(krb5_context);
 
-void KRB5_CALLCONV
-krb5_free_sam_challenge(krb5_context, krb5_sam_challenge *);
-
 void KRB5_CALLCONV
 krb5_free_sam_challenge_2(krb5_context, krb5_sam_challenge_2 *);
 
 void KRB5_CALLCONV
 krb5_free_sam_challenge_2_body(krb5_context, krb5_sam_challenge_2_body *);
 
-void KRB5_CALLCONV
-krb5_free_sam_response(krb5_context, krb5_sam_response *);
-
 void KRB5_CALLCONV
 krb5_free_sam_response_2(krb5_context, krb5_sam_response_2 *);
 
-void KRB5_CALLCONV
-krb5_free_predicted_sam_response(krb5_context, krb5_predicted_sam_response *);
-
-void KRB5_CALLCONV
-krb5_free_enc_sam_response_enc(krb5_context, krb5_enc_sam_response_enc *);
-
 void KRB5_CALLCONV
 krb5_free_enc_sam_response_enc_2(krb5_context, krb5_enc_sam_response_enc_2 *);
 
-void KRB5_CALLCONV
-krb5_free_sam_challenge_contents(krb5_context, krb5_sam_challenge *);
-
 void KRB5_CALLCONV
 krb5_free_sam_challenge_2_contents(krb5_context, krb5_sam_challenge_2 *);
 
@@ -1156,20 +1069,9 @@ void KRB5_CALLCONV
 krb5_free_sam_challenge_2_body_contents(krb5_context,
                                         krb5_sam_challenge_2_body *);
 
-void KRB5_CALLCONV
-krb5_free_sam_response_contents(krb5_context, krb5_sam_response *);
-
 void KRB5_CALLCONV
 krb5_free_sam_response_2_contents(krb5_context, krb5_sam_response_2 *);
 
-void KRB5_CALLCONV
-krb5_free_predicted_sam_response_contents(krb5_context,
-                                          krb5_predicted_sam_response * );
-
-void KRB5_CALLCONV
-krb5_free_enc_sam_response_enc_contents(krb5_context,
-                                        krb5_enc_sam_response_enc * );
-
 void KRB5_CALLCONV
 krb5_free_enc_sam_response_enc_2_contents(krb5_context,
                                           krb5_enc_sam_response_enc_2 * );
@@ -1691,19 +1593,6 @@ encode_krb5_etype_info2(krb5_etype_info_entry *const *, krb5_data **code);
 krb5_error_code
 encode_krb5_pa_enc_ts(const krb5_pa_enc_ts *, krb5_data **);
 
-krb5_error_code
-encode_krb5_sam_challenge(const krb5_sam_challenge * , krb5_data **);
-
-krb5_error_code
-encode_krb5_sam_key(const krb5_sam_key * , krb5_data **);
-
-krb5_error_code
-encode_krb5_enc_sam_response_enc(const krb5_enc_sam_response_enc *,
-                                 krb5_data **);
-
-krb5_error_code
-encode_krb5_sam_response(const krb5_sam_response *, krb5_data **);
-
 krb5_error_code
 encode_krb5_sam_challenge_2(const krb5_sam_challenge_2 * , krb5_data **);
 
@@ -1718,10 +1607,6 @@ encode_krb5_enc_sam_response_enc_2(const krb5_enc_sam_response_enc_2 *,
 krb5_error_code
 encode_krb5_sam_response_2(const krb5_sam_response_2 * , krb5_data **);
 
-krb5_error_code
-encode_krb5_predicted_sam_response(const krb5_predicted_sam_response *,
-                                   krb5_data **);
-
 struct krb5_setpw_req {
     krb5_principal target;
     krb5_data password;
@@ -1783,23 +1668,6 @@ encode_krb5_ad_signedpath_data(const krb5_ad_signedpath_data *, krb5_data **);
  * End of prototypes for krb5_encode.c
  *************************************************************************/
 
-krb5_error_code
-decode_krb5_sam_challenge(const krb5_data *, krb5_sam_challenge **);
-
-krb5_error_code
-decode_krb5_enc_sam_key(const krb5_data *, krb5_sam_key **);
-
-krb5_error_code
-decode_krb5_enc_sam_response_enc(const krb5_data *,
-                                 krb5_enc_sam_response_enc **);
-
-krb5_error_code
-decode_krb5_sam_response(const krb5_data *, krb5_sam_response **);
-
-krb5_error_code
-decode_krb5_predicted_sam_response(const krb5_data *,
-                                   krb5_predicted_sam_response **);
-
 krb5_error_code
 decode_krb5_sam_challenge_2(const krb5_data *, krb5_sam_challenge_2 **);
 
@@ -1924,9 +1792,6 @@ decode_krb5_enc_data(const krb5_data *output, krb5_enc_data **rep);
 krb5_error_code
 decode_krb5_pa_enc_ts(const krb5_data *output, krb5_pa_enc_ts **rep);
 
-krb5_error_code
-decode_krb5_sam_key(const krb5_data *, krb5_sam_key **);
-
 krb5_error_code
 decode_krb5_setpw_req(const krb5_data *, krb5_data **, krb5_principal *);
 
index 34055eaddd6ff09c5adda4dfcd7cbf772131703d..362d942df4351167e94e6b31f2ef84f89a2eb384 100644 (file)
@@ -145,26 +145,16 @@ asn1_error_code asn1_decode_passwdsequence(asn1buf *buf,
                                            passwd_phrase_element *val);
 asn1_error_code asn1_decode_passwdsequence_ptr(asn1buf *buf,
                                                passwd_phrase_element **valptr);
-asn1_error_code asn1_decode_sam_challenge(asn1buf *buf,
-                                          krb5_sam_challenge *val);
 asn1_error_code asn1_decode_sam_challenge_2(asn1buf *buf,
                                             krb5_sam_challenge_2 *val);
 asn1_error_code
 asn1_decode_sam_challenge_2_body(asn1buf *buf,
                                  krb5_sam_challenge_2_body *val);
-asn1_error_code asn1_decode_enc_sam_key(asn1buf *buf, krb5_sam_key *val);
-asn1_error_code
-asn1_decode_enc_sam_response_enc(asn1buf *buf,
-                                 krb5_enc_sam_response_enc *val);
 asn1_error_code
 asn1_decode_enc_sam_response_enc_2(asn1buf *buf,
                                    krb5_enc_sam_response_enc_2 *val);
-asn1_error_code asn1_decode_sam_response(asn1buf *buf, krb5_sam_response *val);
 asn1_error_code asn1_decode_sam_response_2(asn1buf *buf,
                                            krb5_sam_response_2 *val);
-asn1_error_code
-asn1_decode_predicted_sam_response(asn1buf *buf,
-                                   krb5_predicted_sam_response *val);
 asn1_error_code asn1_decode_external_principal_identifier(
     asn1buf *buf, krb5_external_principal_identifier *val);
 asn1_error_code asn1_decode_external_principal_identifier_ptr(
index 70405eb2f7e1a6d49470f03ec7cde6dada57af18..c6a4daf6917b1749a1d0eacf88bd8ac9571aba30 100644 (file)
@@ -38,36 +38,6 @@ asn1_decode_sam_flags(asn1buf *buf, krb5_flags *val)
         get_field_body(var,decoder); }          \
     else var.length = 0
 
-asn1_error_code
-asn1_decode_sam_challenge(asn1buf *buf, krb5_sam_challenge *val)
-{
-    setup();
-    val->sam_type_name.data = NULL;
-    val->sam_track_id.data = NULL;
-    val->sam_challenge_label.data = NULL;
-    val->sam_response_prompt.data = NULL;
-    val->sam_pk_for_sad.data = NULL;
-    val->sam_cksum.contents = NULL;
-    { begin_structure();
-        get_field(val->sam_type,0,asn1_decode_int32);
-        get_field(val->sam_flags,1,asn1_decode_sam_flags);
-        opt_string(val->sam_type_name,2,asn1_decode_charstring);
-        opt_string(val->sam_track_id,3,asn1_decode_charstring);
-        opt_string(val->sam_challenge_label,4,asn1_decode_charstring);
-        opt_string(val->sam_challenge,5,asn1_decode_charstring);
-        opt_string(val->sam_response_prompt,6,asn1_decode_charstring);
-        opt_string(val->sam_pk_for_sad,7,asn1_decode_charstring);
-        opt_field(val->sam_nonce,8,asn1_decode_int32,0);
-        opt_cksum(val->sam_cksum,9,asn1_decode_checksum);
-        end_structure();
-        val->magic = KV5M_SAM_CHALLENGE;
-    }
-    return 0;
-error_out:
-    krb5_free_sam_challenge_contents(NULL, val);
-    return retval;
-}
-
 asn1_error_code
 asn1_decode_sam_challenge_2(asn1buf *buf, krb5_sam_challenge_2 *val)
 {
@@ -137,40 +107,6 @@ error_out:
     krb5_free_sam_challenge_2_body_contents(NULL, val);
     return retval;
 }
-asn1_error_code
-asn1_decode_enc_sam_key(asn1buf *buf, krb5_sam_key *val)
-{
-    setup();
-    val->sam_key.contents = NULL;
-    { begin_structure();
-        get_field(val->sam_key,0,asn1_decode_encryption_key);
-        end_structure();
-        val->magic = KV5M_SAM_KEY;
-    }
-    return 0;
-error_out:
-    krb5_free_keyblock_contents(NULL, &val->sam_key);
-    return retval;
-}
-
-asn1_error_code
-asn1_decode_enc_sam_response_enc(asn1buf *buf, krb5_enc_sam_response_enc *val)
-{
-    setup();
-    val->sam_sad.data = NULL;
-    { begin_structure();
-        opt_field(val->sam_nonce,0,asn1_decode_int32,0);
-        opt_field(val->sam_timestamp,1,asn1_decode_kerberos_time,0);
-        opt_field(val->sam_usec,2,asn1_decode_int32,0);
-        opt_string(val->sam_sad,3,asn1_decode_charstring);
-        end_structure();
-        val->magic = KV5M_ENC_SAM_RESPONSE_ENC;
-    }
-    return 0;
-error_out:
-    krb5_free_enc_sam_response_enc_contents(NULL, val);
-    return retval;
-}
 
 asn1_error_code
 asn1_decode_enc_sam_response_enc_2(asn1buf *buf, krb5_enc_sam_response_enc_2 *val)
@@ -200,30 +136,6 @@ error_out:
         fld.ciphertext.length = 0;              \
     }
 
-asn1_error_code
-asn1_decode_sam_response(asn1buf *buf, krb5_sam_response *val)
-{
-    setup();
-    val->sam_track_id.data = NULL;
-    val->sam_enc_key.ciphertext.data = NULL;
-    val->sam_enc_nonce_or_ts.ciphertext.data = NULL;
-    { begin_structure();
-        get_field(val->sam_type,0,asn1_decode_int32);
-        get_field(val->sam_flags,1,asn1_decode_sam_flags);
-        opt_string(val->sam_track_id,2,asn1_decode_charstring);
-        opt_encfield(val->sam_enc_key,3,asn1_decode_encrypted_data);
-        get_field(val->sam_enc_nonce_or_ts,4,asn1_decode_encrypted_data);
-        opt_field(val->sam_nonce,5,asn1_decode_int32,0);
-        opt_field(val->sam_patimestamp,6,asn1_decode_kerberos_time,0);
-        end_structure();
-        val->magic = KV5M_SAM_RESPONSE;
-    }
-    return 0;
-error_out:
-    krb5_free_sam_response_contents(NULL, val);
-    return retval;
-}
-
 asn1_error_code
 asn1_decode_sam_response_2(asn1buf *buf, krb5_sam_response_2 *val)
 {
@@ -244,29 +156,3 @@ error_out:
     krb5_free_sam_response_2_contents(NULL, val);
     return retval;
 }
-
-asn1_error_code
-asn1_decode_predicted_sam_response(asn1buf *buf,
-                                   krb5_predicted_sam_response *val)
-{
-    setup();
-    val->sam_key.contents = NULL;
-    val->client = NULL;
-    val->msd.data = NULL;
-    { begin_structure();
-        get_field(val->sam_key,0,asn1_decode_encryption_key);
-        get_field(val->sam_flags,1,asn1_decode_sam_flags);
-        get_field(val->stime,2,asn1_decode_kerberos_time);
-        get_field(val->susec,3,asn1_decode_int32);
-        alloc_principal(val->client);
-        get_field(val->client,4,asn1_decode_realm);
-        get_field(val->client,5,asn1_decode_principal_name);
-        opt_string(val->msd,6,asn1_decode_charstring); /* should be octet */
-        end_structure();
-        val->magic = KV5M_PREDICTED_SAM_RESPONSE;
-    }
-    return 0;
-error_out:
-    krb5_free_predicted_sam_response_contents(NULL, val);
-    return retval;
-}
index 1b9c21d98e53d1506e9161fcc8000ab52a333675..425853cdaaa9a045e326c2ac8657a0356d2bcdf1 100644 (file)
@@ -464,45 +464,6 @@ DEFPTRTYPE(passwdsequence_ptr, passwdsequence);
 DEFNONEMPTYNULLTERMSEQOFTYPE(seqof_passwdsequence, passwdsequence_ptr);
 DEFPTRTYPE(ptr_seqof_passwdsequence, seqof_passwdsequence);
 
-
-static const struct field_info sam_challenge_fields[] = {
-    FIELDOF_NORM(krb5_sam_challenge, int32, sam_type, 0, 0),
-    FIELDOF_NORM(krb5_sam_challenge, krb5_flags, sam_flags, 1, 0),
-    FIELDOF_OPT(krb5_sam_challenge, ostring_data, sam_type_name, 2, 0, 2),
-    FIELDOF_OPT(krb5_sam_challenge, ostring_data, sam_track_id, 3, 0, 3),
-    FIELDOF_OPT(krb5_sam_challenge, ostring_data, sam_challenge_label,
-                4, 0, 4),
-    FIELDOF_OPT(krb5_sam_challenge, ostring_data, sam_challenge, 5, 0, 5),
-    FIELDOF_OPT(krb5_sam_challenge, ostring_data, sam_response_prompt,
-                6, 0, 6),
-    FIELDOF_OPT(krb5_sam_challenge, ostring_data, sam_pk_for_sad, 7, 0, 7),
-    FIELDOF_OPT(krb5_sam_challenge, int32, sam_nonce, 8, 0, 8),
-    FIELDOF_OPT(krb5_sam_challenge, checksum, sam_cksum, 9, 0, 9),
-};
-static unsigned int
-optional_sam_challenge(const void *p)
-{
-    const krb5_sam_challenge *val = p;
-    unsigned int optional = 0;
-
-    if (val->sam_cksum.length)
-        optional |= (1u << 9);
-
-    if (val->sam_nonce)
-        optional |= (1u << 8);
-
-    if (val->sam_pk_for_sad.length > 0) optional |= (1u << 7);
-    if (val->sam_response_prompt.length > 0) optional |= (1u << 6);
-    if (val->sam_challenge.length > 0) optional |= (1u << 5);
-    if (val->sam_challenge_label.length > 0) optional |= (1u << 4);
-    if (val->sam_track_id.length > 0) optional |= (1u << 3);
-    if (val->sam_type_name.length > 0) optional |= (1u << 2);
-
-    return optional;
-}
-DEFSEQTYPE(sam_challenge,krb5_sam_challenge,sam_challenge_fields,
-           optional_sam_challenge);
-
 static const struct field_info sam_challenge_2_fields[] = {
     FIELDOF_NORM(krb5_sam_challenge_2, opaque_data, sam_challenge_2_body,
                  0, 0),
@@ -546,32 +507,6 @@ optional_sam_challenge_2_body(const void *p)
 DEFSEQTYPE(sam_challenge_2_body,krb5_sam_challenge_2_body,sam_challenge_2_body_fields,
            optional_sam_challenge_2_body);
 
-
-static const struct field_info sam_key_fields[] = {
-    FIELDOF_NORM(krb5_sam_key, encryption_key, sam_key, 0, 0),
-};
-DEFSEQTYPE(sam_key, krb5_sam_key, sam_key_fields, 0);
-
-static const struct field_info enc_sam_response_enc_fields[] = {
-    FIELDOF_NORM(krb5_enc_sam_response_enc, int32, sam_nonce, 0, 0),
-    FIELDOF_NORM(krb5_enc_sam_response_enc, kerberos_time, sam_timestamp,
-                 1, 0),
-    FIELDOF_NORM(krb5_enc_sam_response_enc, int32, sam_usec, 2, 0),
-    FIELDOF_OPT(krb5_enc_sam_response_enc, ostring_data, sam_sad, 3, 0, 3),
-};
-static unsigned int
-optional_enc_sam_response_enc(const void *p)
-{
-    const krb5_enc_sam_response_enc *val = p;
-    unsigned int optional = 0;
-
-    if (val->sam_sad.length > 0) optional |= (1u << 3);
-
-    return optional;
-}
-DEFSEQTYPE(enc_sam_response_enc, krb5_enc_sam_response_enc,
-           enc_sam_response_enc_fields, optional_enc_sam_response_enc);
-
 static const struct field_info enc_sam_response_enc_2_fields[] = {
     FIELDOF_NORM(krb5_enc_sam_response_enc_2, int32, sam_nonce, 0, 0),
     FIELDOF_OPT(krb5_enc_sam_response_enc_2, ostring_data, sam_sad, 1, 0, 1),
@@ -589,34 +524,6 @@ optional_enc_sam_response_enc_2(const void *p)
 DEFSEQTYPE(enc_sam_response_enc_2, krb5_enc_sam_response_enc_2,
            enc_sam_response_enc_2_fields, optional_enc_sam_response_enc_2);
 
-static const struct field_info sam_response_fields[] = {
-    FIELDOF_NORM(krb5_sam_response, int32, sam_type, 0, 0),
-    FIELDOF_NORM(krb5_sam_response, krb5_flags, sam_flags, 1, 0),
-    FIELDOF_OPT(krb5_sam_response, ostring_data, sam_track_id, 2, 0, 2),
-    FIELDOF_OPT(krb5_sam_response, encrypted_data, sam_enc_key, 3, 0, 3),
-    FIELDOF_NORM(krb5_sam_response, encrypted_data, sam_enc_nonce_or_ts, 4, 0),
-    FIELDOF_OPT(krb5_sam_response, int32, sam_nonce, 5, 0, 5),
-    FIELDOF_OPT(krb5_sam_response, kerberos_time, sam_patimestamp, 6, 0, 6),
-};
-static unsigned int
-optional_sam_response(const void *p)
-{
-    const krb5_sam_response *val = p;
-    unsigned int optional = 0;
-
-    if (val->sam_patimestamp)
-        optional |= (1u << 6);
-    if (val->sam_nonce)
-        optional |= (1u << 5);
-    if (val->sam_enc_key.ciphertext.length)
-        optional |= (1u << 3);
-    if (val->sam_track_id.length > 0) optional |= (1u << 2);
-
-    return optional;
-}
-DEFSEQTYPE(sam_response, krb5_sam_response, sam_response_fields,
-           optional_sam_response);
-
 static const struct field_info sam_response_2_fields[] = {
     FIELDOF_NORM(krb5_sam_response_2, int32, sam_type, 0, 0),
     FIELDOF_NORM(krb5_sam_response_2, krb5_flags, sam_flags, 1, 0),
@@ -638,30 +545,6 @@ optional_sam_response_2(const void *p)
 DEFSEQTYPE(sam_response_2, krb5_sam_response_2, sam_response_2_fields,
            optional_sam_response_2);
 
-static const struct field_info predicted_sam_response_fields[] = {
-    FIELDOF_NORM(krb5_predicted_sam_response, encryption_key, sam_key, 0, 0),
-    FIELDOF_NORM(krb5_predicted_sam_response, krb5_flags, sam_flags, 1, 0),
-    FIELDOF_NORM(krb5_predicted_sam_response, kerberos_time, stime, 2, 0),
-    FIELDOF_NORM(krb5_predicted_sam_response, int32, susec, 3, 0),
-    FIELDOF_NORM(krb5_predicted_sam_response, realm_of_principal, client,
-                 4, 0),
-    FIELDOF_NORM(krb5_predicted_sam_response, principal, client, 5, 0),
-    FIELDOF_OPT(krb5_predicted_sam_response, ostring_data, msd, 6, 0, 6),
-};
-static unsigned int
-optional_predicted_sam_response(const void *p)
-{
-    const krb5_predicted_sam_response *val = p;
-    unsigned int optional = 0;
-
-    if (val->msd.length > 0) optional |= (1u << 6);
-
-    return optional;
-}
-DEFSEQTYPE(predicted_sam_response, krb5_predicted_sam_response,
-           predicted_sam_response_fields,
-           optional_predicted_sam_response);
-
 static const struct field_info krb5_authenticator_fields[] = {
     /* Authenticator ::= [APPLICATION 2] SEQUENCE */
     /* authenticator-vno[0]     INTEGER */
@@ -1438,19 +1321,12 @@ MAKE_FULL_ENCODER(encode_krb5_pwd_sequence, passwdsequence);
 MAKE_FULL_ENCODER(encode_krb5_pwd_data, pwd_data);
 MAKE_FULL_ENCODER(encode_krb5_padata_sequence, seq_of_pa_data);
 /* sam preauth additions */
-MAKE_FULL_ENCODER(encode_krb5_sam_challenge, sam_challenge);
 MAKE_FULL_ENCODER(encode_krb5_sam_challenge_2, sam_challenge_2);
 MAKE_FULL_ENCODER(encode_krb5_sam_challenge_2_body,
                   sam_challenge_2_body);
-MAKE_FULL_ENCODER(encode_krb5_sam_key, sam_key);
-MAKE_FULL_ENCODER(encode_krb5_enc_sam_response_enc,
-                  enc_sam_response_enc);
 MAKE_FULL_ENCODER(encode_krb5_enc_sam_response_enc_2,
                   enc_sam_response_enc_2);
-MAKE_FULL_ENCODER(encode_krb5_sam_response, sam_response);
 MAKE_FULL_ENCODER(encode_krb5_sam_response_2, sam_response_2);
-MAKE_FULL_ENCODER(encode_krb5_predicted_sam_response,
-                  predicted_sam_response);
 MAKE_FULL_ENCODER(encode_krb5_setpw_req, setpw_req);
 MAKE_FULL_ENCODER(encode_krb5_pa_for_user, pa_for_user);
 MAKE_FULL_ENCODER(encode_krb5_s4u_userid, s4u_userid);
index 5ac6db999dce4fcb6c156e548952f9e790fd0b60..87ef34f625cb84687b65c4374f2189e097c7a58d 100644 (file)
@@ -662,18 +662,6 @@ decode_krb5_pa_enc_ts(const krb5_data *code, krb5_pa_enc_ts **repptr)
     cleanup(free);
 }
 
-krb5_error_code
-decode_krb5_sam_challenge(const krb5_data *code, krb5_sam_challenge **repptr)
-{
-    setup_buf_only(krb5_sam_challenge *);
-    alloc_field(rep);
-
-    retval = asn1_decode_sam_challenge(&buf,rep);
-    if (retval) clean_return(retval);
-
-    cleanup(free);
-}
-
 krb5_error_code
 decode_krb5_sam_challenge_2(const krb5_data *code,
                             krb5_sam_challenge_2 **repptr)
@@ -700,31 +688,6 @@ decode_krb5_sam_challenge_2_body(const krb5_data *code,
     cleanup(free);
 }
 
-krb5_error_code
-decode_krb5_enc_sam_key(const krb5_data *code, krb5_sam_key **repptr)
-{
-    setup_buf_only(krb5_sam_key *);
-    alloc_field(rep);
-
-    retval = asn1_decode_enc_sam_key(&buf,rep);
-    if (retval) clean_return(retval);
-
-    cleanup(free);
-}
-
-krb5_error_code
-decode_krb5_enc_sam_response_enc(const krb5_data *code,
-                                 krb5_enc_sam_response_enc **repptr)
-{
-    setup_buf_only(krb5_enc_sam_response_enc *);
-    alloc_field(rep);
-
-    retval = asn1_decode_enc_sam_response_enc(&buf,rep);
-    if (retval) clean_return(retval);
-
-    cleanup(free);
-}
-
 krb5_error_code
 decode_krb5_enc_sam_response_enc_2(const krb5_data *code,
                                    krb5_enc_sam_response_enc_2 **repptr)
@@ -738,19 +701,6 @@ decode_krb5_enc_sam_response_enc_2(const krb5_data *code,
     cleanup(free);
 }
 
-krb5_error_code
-decode_krb5_sam_response(const krb5_data *code,
-                         krb5_sam_response **repptr)
-{
-    setup_buf_only(krb5_sam_response *);
-    alloc_field(rep);
-
-    retval = asn1_decode_sam_response(&buf,rep);
-    if (retval) clean_return(retval);
-
-    cleanup(free);
-}
-
 krb5_error_code
 decode_krb5_sam_response_2(const krb5_data *code,
                            krb5_sam_response_2 **repptr)
@@ -764,19 +714,6 @@ decode_krb5_sam_response_2(const krb5_data *code,
     cleanup(free);
 }
 
-krb5_error_code
-decode_krb5_predicted_sam_response(const krb5_data *code,
-                                   krb5_predicted_sam_response **repptr)
-{
-    setup_buf_only(krb5_predicted_sam_response *);           /* preallocated */
-    alloc_field(rep);
-
-    retval = asn1_decode_predicted_sam_response(&buf,rep);
-    if (retval) clean_return(retval);
-
-    cleanup(free);
-}
-
 krb5_error_code
 decode_krb5_setpw_req(const krb5_data *code, krb5_data **repptr,
                       krb5_principal *principal)
index c6dd0debe9a13f8c1596d3fc69ec204e73a8344a..6208a9be90f1e9e322d8d8d391a0b9b04fdb36fc 100644 (file)
@@ -536,15 +536,6 @@ krb5_free_string(krb5_context context, char *val)
     free(val);
 }
 
-void KRB5_CALLCONV
-krb5_free_sam_challenge(krb5_context ctx, krb5_sam_challenge *sc)
-{
-    if (!sc)
-        return;
-    krb5_free_sam_challenge_contents(ctx, sc);
-    free(sc);
-}
-
 void KRB5_CALLCONV
 krb5_free_sam_challenge_2(krb5_context ctx, krb5_sam_challenge_2 *sc2)
 {
@@ -554,27 +545,6 @@ krb5_free_sam_challenge_2(krb5_context ctx, krb5_sam_challenge_2 *sc2)
     free(sc2);
 }
 
-void KRB5_CALLCONV
-krb5_free_sam_challenge_contents(krb5_context ctx, krb5_sam_challenge *sc)
-{
-    if (!sc)
-        return;
-    if (sc->sam_type_name.data)
-        krb5_free_data_contents(ctx, &sc->sam_type_name);
-    if (sc->sam_track_id.data)
-        krb5_free_data_contents(ctx, &sc->sam_track_id);
-    if (sc->sam_challenge_label.data)
-        krb5_free_data_contents(ctx, &sc->sam_challenge_label);
-    if (sc->sam_challenge.data)
-        krb5_free_data_contents(ctx, &sc->sam_challenge);
-    if (sc->sam_response_prompt.data)
-        krb5_free_data_contents(ctx, &sc->sam_response_prompt);
-    if (sc->sam_pk_for_sad.data)
-        krb5_free_data_contents(ctx, &sc->sam_pk_for_sad);
-    free(sc->sam_cksum.contents);
-    sc->sam_cksum.contents = 0;
-}
-
 void KRB5_CALLCONV
 krb5_free_sam_challenge_2_contents(krb5_context ctx,
                                    krb5_sam_challenge_2 *sc2)
@@ -626,15 +596,6 @@ krb5_free_sam_challenge_2_body_contents(krb5_context ctx,
         krb5_free_data_contents(ctx, &sc2->sam_pk_for_sad);
 }
 
-void KRB5_CALLCONV
-krb5_free_sam_response(krb5_context ctx, krb5_sam_response *sr)
-{
-    if (!sr)
-        return;
-    krb5_free_sam_response_contents(ctx, sr);
-    free(sr);
-}
-
 void KRB5_CALLCONV
 krb5_free_sam_response_2(krb5_context ctx, krb5_sam_response_2 *sr2)
 {
@@ -644,19 +605,6 @@ krb5_free_sam_response_2(krb5_context ctx, krb5_sam_response_2 *sr2)
     free(sr2);
 }
 
-void KRB5_CALLCONV
-krb5_free_sam_response_contents(krb5_context ctx, krb5_sam_response *sr)
-{
-    if (!sr)
-        return;
-    if (sr->sam_track_id.data)
-        krb5_free_data_contents(ctx, &sr->sam_track_id);
-    if (sr->sam_enc_key.ciphertext.data)
-        krb5_free_data_contents(ctx, &sr->sam_enc_key.ciphertext);
-    if (sr->sam_enc_nonce_or_ts.ciphertext.data)
-        krb5_free_data_contents(ctx, &sr->sam_enc_nonce_or_ts.ciphertext);
-}
-
 void KRB5_CALLCONV
 krb5_free_sam_response_2_contents(krb5_context ctx, krb5_sam_response_2 *sr2)
 {
@@ -668,40 +616,6 @@ krb5_free_sam_response_2_contents(krb5_context ctx, krb5_sam_response_2 *sr2)
         krb5_free_data_contents(ctx, &sr2->sam_enc_nonce_or_sad.ciphertext);
 }
 
-void KRB5_CALLCONV
-krb5_free_predicted_sam_response(krb5_context ctx,
-                                 krb5_predicted_sam_response *psr)
-{
-    if (!psr)
-        return;
-    krb5_free_predicted_sam_response_contents(ctx, psr);
-    free(psr);
-}
-
-void KRB5_CALLCONV
-krb5_free_predicted_sam_response_contents(krb5_context ctx,
-                                          krb5_predicted_sam_response *psr)
-{
-    if (!psr)
-        return;
-    if (psr->sam_key.contents)
-        krb5_free_keyblock_contents(ctx, &psr->sam_key);
-    krb5_free_principal(ctx, psr->client);
-    psr->client = 0;
-    if (psr->msd.data)
-        krb5_free_data_contents(ctx, &psr->msd);
-}
-
-void KRB5_CALLCONV
-krb5_free_enc_sam_response_enc(krb5_context ctx,
-                               krb5_enc_sam_response_enc *esre)
-{
-    if (!esre)
-        return;
-    krb5_free_enc_sam_response_enc_contents(ctx, esre);
-    free(esre);
-}
-
 void KRB5_CALLCONV
 krb5_free_enc_sam_response_enc_2(krb5_context ctx,
                                  krb5_enc_sam_response_enc_2 *esre2)
@@ -712,16 +626,6 @@ krb5_free_enc_sam_response_enc_2(krb5_context ctx,
     free(esre2);
 }
 
-void KRB5_CALLCONV
-krb5_free_enc_sam_response_enc_contents(krb5_context ctx,
-                                        krb5_enc_sam_response_enc *esre)
-{
-    if (!esre)
-        return;
-    if (esre->sam_sad.data)
-        krb5_free_data_contents(ctx, &esre->sam_sad);
-}
-
 void KRB5_CALLCONV
 krb5_free_enc_sam_response_enc_2_contents(krb5_context ctx,
                                           krb5_enc_sam_response_enc_2 *esre2)
index a62bcf9cceb2502172993964b5b36bf8d0982619..066ee276f4e2e7faa39a4593ad3ae7764e7a9baa 100644 (file)
@@ -14,7 +14,6 @@ decode_krb5_enc_cred_part
 decode_krb5_enc_data
 decode_krb5_enc_kdc_rep_part
 decode_krb5_enc_priv_part
-decode_krb5_enc_sam_response_enc
 decode_krb5_enc_sam_response_enc_2
 decode_krb5_enc_tkt_part
 decode_krb5_encryption_key
@@ -33,15 +32,12 @@ decode_krb5_pa_fx_fast_request
 decode_krb5_pa_pac_req
 decode_krb5_pa_s4u_x509_user
 decode_krb5_padata_sequence
-decode_krb5_predicted_sam_response
 decode_krb5_priv
 decode_krb5_pwd_data
 decode_krb5_pwd_sequence
 decode_krb5_safe
-decode_krb5_sam_challenge
 decode_krb5_sam_challenge_2
 decode_krb5_sam_challenge_2_body
-decode_krb5_sam_response
 decode_krb5_sam_response_2
 decode_krb5_setpw_req
 decode_krb5_tgs_rep
@@ -65,7 +61,6 @@ encode_krb5_enc_cred_part
 encode_krb5_enc_data
 encode_krb5_enc_kdc_rep_part
 encode_krb5_enc_priv_part
-encode_krb5_enc_sam_response_enc
 encode_krb5_enc_sam_response_enc_2
 encode_krb5_enc_tkt_part
 encode_krb5_encryption_key
@@ -84,17 +79,13 @@ encode_krb5_pa_server_referral_data
 encode_krb5_pa_svr_referral_data
 encode_krb5_padata_sequence
 encode_krb5_pkinit_supp_pub_info
-encode_krb5_predicted_sam_response
 encode_krb5_priv
 encode_krb5_pwd_data
 encode_krb5_pwd_sequence
 encode_krb5_s4u_userid
 encode_krb5_safe
-encode_krb5_sam_challenge
 encode_krb5_sam_challenge_2
 encode_krb5_sam_challenge_2_body
-encode_krb5_sam_key
-encode_krb5_sam_response
 encode_krb5_sam_response_2
 encode_krb5_sp80056a_other_info
 encode_krb5_tgs_rep
@@ -288,10 +279,8 @@ krb5_free_data_contents
 krb5_free_default_realm
 krb5_free_enc_data
 krb5_free_enc_kdc_rep_part
-krb5_free_enc_sam_response_enc
 krb5_free_enc_sam_response_enc_2
 krb5_free_enc_sam_response_enc_2_contents
-krb5_free_enc_sam_response_enc_contents
 krb5_free_enc_tkt_part
 krb5_free_error
 krb5_free_error_message
@@ -319,8 +308,6 @@ krb5_free_pa_s4u_x509_user
 krb5_free_pa_server_referral_data
 krb5_free_pa_svr_referral_data
 krb5_free_passwd_phrase_element
-krb5_free_predicted_sam_response
-krb5_free_predicted_sam_response_contents
 krb5_free_principal
 krb5_free_priv
 krb5_free_priv_enc_part
@@ -328,16 +315,12 @@ krb5_free_pwd_data
 krb5_free_pwd_sequences
 krb5_free_realm_tree
 krb5_free_safe
-krb5_free_sam_challenge
 krb5_free_sam_challenge_2
 krb5_free_sam_challenge_2_body
 krb5_free_sam_challenge_2_body_contents
 krb5_free_sam_challenge_2_contents
-krb5_free_sam_challenge_contents
-krb5_free_sam_response
 krb5_free_sam_response_2
 krb5_free_sam_response_2_contents
-krb5_free_sam_response_contents
 krb5_free_string
 krb5_free_tgt_creds
 krb5_free_ticket
index e0bd32c79252ddd76495f3bff198e5608a0cb2bc..c179b2f3281c55ab4a8ba7586993338d446d04de 100644 (file)
@@ -606,16 +606,6 @@ main(int argc, char **argv)
         ktest_destroy_enc_data(&enc_data);
     }
     /****************************************************************/
-    /* encode_krb5_sam_challenge */
-    {
-        krb5_sam_challenge sam_ch, *tmp;
-
-        ktest_make_sample_sam_challenge(&sam_ch);
-        leak_test(sam_ch, encode_krb5_sam_challenge, decode_krb5_sam_challenge,
-                  krb5_free_sam_challenge);
-        ktest_empty_sam_challenge(&sam_ch);
-    }
-    /****************************************************************/
     /* encode_krb5_sam_challenge_2 */
     {
         krb5_sam_challenge_2 sam_ch2, *tmp;
@@ -637,38 +627,6 @@ main(int argc, char **argv)
         ktest_empty_sam_challenge_2_body(&body);
     }
     /****************************************************************/
-    /* encode_krb5_sam_response */
-    {
-        krb5_sam_response sam_ch, *tmp;
-
-        ktest_make_sample_sam_response(&sam_ch);
-        leak_test(sam_ch, encode_krb5_sam_response, decode_krb5_sam_response,
-                  krb5_free_sam_response);
-        ktest_empty_sam_response(&sam_ch);
-    }
-    /****************************************************************/
-    /* encode_krb5_enc_sam_response_enc */
-    {
-        krb5_enc_sam_response_enc sam_ch, *tmp;
-
-        ktest_make_sample_enc_sam_response_enc(&sam_ch);
-        leak_test(sam_ch, encode_krb5_enc_sam_response_enc,
-                  decode_krb5_enc_sam_response_enc,
-                  krb5_free_enc_sam_response_enc);
-        ktest_empty_enc_sam_response_enc(&sam_ch);
-    }
-    /****************************************************************/
-    /* encode_krb5_predicted_sam_response */
-    {
-        krb5_predicted_sam_response sam_ch, *tmp;
-
-        ktest_make_sample_predicted_sam_response(&sam_ch);
-        leak_test(sam_ch, encode_krb5_predicted_sam_response,
-                  decode_krb5_predicted_sam_response,
-                  krb5_free_predicted_sam_response);
-        ktest_empty_predicted_sam_response(&sam_ch);
-    }
-    /****************************************************************/
     /* encode_krb5_sam_response_2 */
     {
         krb5_sam_response_2 sam_ch2, *tmp;
index ffa10a08afc40eafe8cff906171be586b01cec86..42011ce0c6519e79d8ac88975ac1707cbc43f43a 100644 (file)
@@ -876,23 +876,6 @@ int main(argc, argv)
         ktest_destroy_enc_data(&ref);
     }
 
-    /****************************************************************/
-    /* decode_sam_challenge */
-    {
-        setup(krb5_sam_challenge,ktest_make_sample_sam_challenge);
-        decode_run("sam_challenge","","30 78 A0 03 02 01 2A A1 07 03 05 00 80 00 00 00 A2 0B 04 09 74 79 70 65 20 6E 61 6D 65 A3 02 04 00 A4 11 04 0F 63 68 61 6C 6C 65 6E 67 65 20 6C 61 62 65 6C A5 10 04 0E 63 68 61 6C 6C 65 6E 67 65 20 69 70 73 65 A6 16 04 14 72 65 73 70 6F 6E 73 65 5F 70 72 6F 6D 70 74 20 69 70 73 65 A7 02 04 00 A8 05 02 03 54 32 10 A9 0F 30 0D A0 03 02 01 01 A1 06 04 04 31 32 33 34",decode_krb5_sam_challenge,ktest_equal_sam_challenge,krb5_free_sam_challenge);
-        ktest_empty_sam_challenge(&ref);
-
-    }
-
-    /****************************************************************/
-    /* decode_sam_challenge */
-    {
-        setup(krb5_sam_challenge,ktest_make_sample_sam_challenge);
-        decode_run("sam_challenge","","30 70 A0 03 02 01 2A A1 07 03 05 00 80 00 00 00 A2 0B 04 09 74 79 70 65 20 6E 61 6D 65 A4 11 04 0F 63 68 61 6C 6C 65 6E 67 65 20 6C 61 62 65 6C A5 10 04 0E 63 68 61 6C 6C 65 6E 67 65 20 69 70 73 65 A6 16 04 14 72 65 73 70 6F 6E 73 65 5F 70 72 6F 6D 70 74 20 69 70 73 65 A8 05 02 03 54 32 10 A9 0F 30 0D A0 03 02 01 01 A1 06 04 04 31 32 33 34",decode_krb5_sam_challenge,ktest_equal_sam_challenge,krb5_free_sam_challenge);
-        ktest_empty_sam_challenge(&ref);
-    }
-
     /****************************************************************/
     /* decode_sam_challenge_2 */
     {
@@ -911,15 +894,6 @@ int main(argc, argv)
 
     }
 
-    /****************************************************************/
-    /* decode_sam_response */
-    {
-        setup(krb5_sam_response,ktest_make_sample_sam_response);
-        decode_run("sam_response","","30 6A A0 03 02 01 2A A1 07 03 05 00 80 00 00 00 A2 0C 04 0A 74 72 61 63 6B 20 64 61 74 61 A3 14 30 12 A0 03 02 01 01 A1 04 02 02 07 96 A2 05 04 03 6B 65 79 A4 1C 30 1A A0 03 02 01 01 A1 04 02 02 0D 36 A2 0D 04 0B 6E 6F 6E 63 65 20 6F 72 20 74 73 A5 05 02 03 54 32 10 A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A",decode_krb5_sam_response,ktest_equal_sam_response,krb5_free_sam_response);
-
-        ktest_empty_sam_response(&ref);
-    }
-
     /****************************************************************/
     /* decode_pa_for_user */
     {
index 34f94d732b8abf0f44d0d005b3d2515b730a3ee9..7f21c0cc37fa88ade9dbff02be6278e5a18ed438 100644 (file)
@@ -635,15 +635,6 @@ main(argc, argv)
         ktest_destroy_enc_data(&enc_data);
     }
     /****************************************************************/
-    /* encode_krb5_sam_challenge */
-    {
-        krb5_sam_challenge sam_ch;
-        ktest_make_sample_sam_challenge(&sam_ch);
-        encode_run(sam_ch,krb5_sam_challenge,"sam_challenge","",
-                   encode_krb5_sam_challenge);
-        ktest_empty_sam_challenge(&sam_ch);
-    }
-    /****************************************************************/
     /* encode_krb5_sam_challenge_2 */
     {
         krb5_sam_challenge_2 sam_ch2;
@@ -662,42 +653,6 @@ main(argc, argv)
         ktest_empty_sam_challenge_2_body(&body);
     }
     /****************************************************************/
-    /* encode_krb5_sam_response */
-    {
-        krb5_sam_response sam_ch;
-        ktest_make_sample_sam_response(&sam_ch);
-        encode_run(sam_ch,krb5_sam_response,"sam_response","",
-                   encode_krb5_sam_response);
-        ktest_empty_sam_response(&sam_ch);
-    }
-    /****************************************************************/
-    /* encode_krb5_sam_key */
-    {
-        krb5_sam_key sam_ch;
-        ktest_make_sample_sam_key(&sam_ch);
-        encode_run(sam_ch,krb5_sam_key,"sam_key","",
-                   encode_krb5_sam_key);
-        ktest_empty_sam_key(&sam_ch);
-    }
-    /****************************************************************/
-    /* encode_krb5_enc_sam_response_enc */
-    {
-        krb5_enc_sam_response_enc sam_ch;
-        ktest_make_sample_enc_sam_response_enc(&sam_ch);
-        encode_run(sam_ch,krb5_enc_sam_response_enc,"enc_sam_response_enc","",
-                   encode_krb5_enc_sam_response_enc);
-        ktest_empty_enc_sam_response_enc(&sam_ch);
-    }
-    /****************************************************************/
-    /* encode_krb5_predicted_sam_response */
-    {
-        krb5_predicted_sam_response sam_ch;
-        ktest_make_sample_predicted_sam_response(&sam_ch);
-        encode_run(sam_ch,krb5_predicted_sam_response,"predicted_sam_response","",
-                   encode_krb5_predicted_sam_response);
-        ktest_empty_predicted_sam_response(&sam_ch);
-    }
-    /****************************************************************/
     /* encode_krb5_sam_response_2 */
     {
         krb5_sam_response_2 sam_ch2;
index 4f348f4bb3fb8e2ffe2fbda2a3ff8952b0016cd0..8f1b045c3c301a259f9d889d0bba2eec772aad49 100644 (file)
@@ -514,22 +514,6 @@ ktest_make_sample_pa_enc_ts(krb5_pa_enc_ts *pa_enc)
     pa_enc->pausec = SAMPLE_USEC;
 }
 
-void
-ktest_make_sample_sam_challenge(krb5_sam_challenge *p)
-{
-    p->magic = KV5M_SAM_CHALLENGE;
-    p->sam_type = 42; /* information */
-    p->sam_flags = KRB5_SAM_USE_SAD_AS_KEY; /* KRB5_SAM_* values */
-    krb5_data_parse(&p->sam_type_name, "type name");
-    p->sam_track_id = empty_data();
-    krb5_data_parse(&p->sam_challenge_label, "challenge label");
-    krb5_data_parse(&p->sam_challenge, "challenge ipse");
-    krb5_data_parse(&p->sam_response_prompt, "response_prompt ipse");
-    p->sam_pk_for_sad = empty_data();
-    p->sam_nonce = 0x543210;
-    ktest_make_sample_checksum(&p->sam_cksum);
-}
-
 void
 ktest_make_sample_sam_challenge_2(krb5_sam_challenge_2 *p)
 {
@@ -557,23 +541,6 @@ ktest_make_sample_sam_challenge_2_body(krb5_sam_challenge_2_body *p)
     p->sam_etype = ENCTYPE_DES_CBC_CRC;
 }
 
-void
-ktest_make_sample_sam_response(krb5_sam_response *p)
-{
-    p->magic = KV5M_SAM_RESPONSE;
-    p->sam_type = 42; /* information */
-    p->sam_flags = KRB5_SAM_USE_SAD_AS_KEY; /* KRB5_SAM_* values */
-    krb5_data_parse(&p->sam_track_id, "track data");
-    krb5_data_parse(&p->sam_enc_key.ciphertext, "key");
-    p->sam_enc_key.enctype = ENCTYPE_DES_CBC_CRC;
-    p->sam_enc_key.kvno = 1942;
-    krb5_data_parse(&p->sam_enc_nonce_or_ts.ciphertext, "nonce or ts");
-    p->sam_enc_nonce_or_ts.enctype = ENCTYPE_DES_CBC_CRC;
-    p->sam_enc_nonce_or_ts.kvno = 3382;
-    p->sam_nonce = 0x543210;
-    p->sam_patimestamp = SAMPLE_TIME;
-}
-
 void
 ktest_make_sample_sam_response_2(krb5_sam_response_2 *p)
 {
@@ -587,23 +554,6 @@ ktest_make_sample_sam_response_2(krb5_sam_response_2 *p)
     p->sam_nonce = 0x543210;
 }
 
-void
-ktest_make_sample_sam_key(krb5_sam_key *p)
-{
-    p->magic = 99;
-    ktest_make_sample_keyblock(&p->sam_key);
-}
-
-void
-ktest_make_sample_enc_sam_response_enc(krb5_enc_sam_response_enc *p)
-{
-    p->magic = 78;
-    p->sam_nonce = 78634;
-    p->sam_timestamp = 99999;
-    p->sam_usec = 399;
-    krb5_data_parse(&p->sam_sad, "enc_sam_response_enc");
-}
-
 void
 ktest_make_sample_enc_sam_response_enc_2(krb5_enc_sam_response_enc_2 *p)
 {
@@ -949,18 +899,6 @@ ktest_make_sample_ldap_seqof_key_data(ldap_seqof_key_data *p)
 }
 #endif
 
-void
-ktest_make_sample_predicted_sam_response(krb5_predicted_sam_response *p)
-{
-    p->magic = 79;
-    ktest_make_sample_keyblock(&p->sam_key);
-    p->sam_flags = 9;
-    p->stime = 17;
-    p->susec = 18;
-    ktest_make_sample_principal(&p->client);
-    krb5_data_parse(&p->msd, "hello");
-}
-
 
 /****************************************************************/
 /* destructors */
@@ -1424,19 +1362,6 @@ ktest_empty_alt_method(krb5_alt_method *am)
     am->data = NULL;
 }
 
-void
-ktest_empty_sam_challenge(krb5_sam_challenge *p)
-{
-    ktest_empty_data(&p->sam_type_name);
-    ktest_empty_data(&p->sam_track_id);
-    ktest_empty_data(&p->sam_challenge_label);
-    ktest_empty_data(&p->sam_challenge);
-    ktest_empty_data(&p->sam_response_prompt);
-    ktest_empty_data(&p->sam_pk_for_sad);
-    free(p->sam_cksum.contents);
-    p->sam_cksum.contents = NULL;
-}
-
 void
 ktest_empty_sam_challenge_2(krb5_sam_challenge_2 *p)
 {
@@ -1462,34 +1387,6 @@ ktest_empty_sam_challenge_2_body(krb5_sam_challenge_2_body *p)
     ktest_empty_data(&p->sam_pk_for_sad);
 }
 
-void
-ktest_empty_sam_response(krb5_sam_response *p)
-{
-    ktest_empty_data(&p->sam_track_id);
-    ktest_empty_data(&p->sam_enc_key.ciphertext);
-    ktest_empty_data(&p->sam_enc_nonce_or_ts.ciphertext);
-}
-
-void
-ktest_empty_sam_key(krb5_sam_key *p)
-{
-    free(p->sam_key.contents);
-}
-
-void
-ktest_empty_predicted_sam_response(krb5_predicted_sam_response *p)
-{
-    ktest_empty_keyblock(&p->sam_key);
-    ktest_destroy_principal(&p->client);
-    ktest_empty_data(&p->msd);
-}
-
-void
-ktest_empty_enc_sam_response_enc(krb5_enc_sam_response_enc *p)
-{
-    ktest_empty_data(&p->sam_sad);
-}
-
 void
 ktest_empty_sam_response_2(krb5_sam_response_2 *p)
 {
index 3811f964f3a9a0a36a65c5404b0f466f01165aa2..bd81cf48697c04d67c86c2d07a283522f5b2ce41 100644 (file)
@@ -80,14 +80,9 @@ void ktest_make_sample_alt_method(krb5_alt_method *am);
 void ktest_make_sample_etype_info(krb5_etype_info_entry ***p);
 void ktest_make_sample_etype_info2(krb5_etype_info_entry ***p);
 void ktest_make_sample_pa_enc_ts(krb5_pa_enc_ts *am);
-void ktest_make_sample_sam_challenge(krb5_sam_challenge *p);
 void ktest_make_sample_sam_challenge_2(krb5_sam_challenge_2 *p);
 void ktest_make_sample_sam_challenge_2_body(krb5_sam_challenge_2_body *p);
-void ktest_make_sample_sam_response(krb5_sam_response *p);
 void ktest_make_sample_sam_response_2(krb5_sam_response_2 *p);
-void ktest_make_sample_sam_key(krb5_sam_key *p);
-void ktest_make_sample_enc_sam_response_enc(krb5_enc_sam_response_enc *p);
-void ktest_make_sample_predicted_sam_response(krb5_predicted_sam_response *p);
 void ktest_make_sample_enc_sam_response_enc_2(krb5_enc_sam_response_enc_2 *p);
 void ktest_make_sample_pa_for_user(krb5_pa_for_user *p);
 void ktest_make_sample_pa_s4u_x509_user(krb5_pa_s4u_x509_user *p);
@@ -169,13 +164,8 @@ void ktest_empty_ap_rep_enc_part(krb5_ap_rep_enc_part *arep);
 void ktest_empty_passwd_phrase_element(passwd_phrase_element *ppe);
 void ktest_empty_pwd_data(krb5_pwd_data *pd);
 void ktest_empty_alt_method(krb5_alt_method *am);
-void ktest_empty_sam_challenge(krb5_sam_challenge *p);
 void ktest_empty_sam_challenge_2(krb5_sam_challenge_2 *p);
 void ktest_empty_sam_challenge_2_body(krb5_sam_challenge_2_body *p);
-void ktest_empty_sam_response(krb5_sam_response *p);
-void ktest_empty_sam_key(krb5_sam_key *p);
-void ktest_empty_enc_sam_response_enc(krb5_enc_sam_response_enc *p);
-void ktest_empty_predicted_sam_response(krb5_predicted_sam_response *p);
 void ktest_empty_sam_response_2(krb5_sam_response_2 *p);
 void ktest_empty_enc_sam_response_enc_2(krb5_enc_sam_response_enc_2 *p);
 void ktest_empty_pa_for_user(krb5_pa_for_user *p);
index 019bbeb1f03898f714fcd582cc1acdb0957bdcf1..f3fbe67b22375da8b995b138963cdd26fd5803e3 100644 (file)
@@ -501,24 +501,6 @@ ktest_equal_krb5_pa_enc_ts(krb5_pa_enc_ts *ref, krb5_pa_enc_ts *var)
 
 #define equal_str(f) struct_equal(f,ktest_equal_data)
 
-int
-ktest_equal_sam_challenge(krb5_sam_challenge *ref, krb5_sam_challenge *var)
-{
-    int p = TRUE;
-    if (ref == var) return TRUE;
-    else if (ref == NULL || var == NULL) return FALSE;
-    p = p && scalar_equal(sam_type);
-    p = p && scalar_equal(sam_flags);
-    p = p && scalar_equal(sam_nonce);
-    p = p && ktest_equal_checksum(&ref->sam_cksum,&var->sam_cksum);
-    p = p && equal_str(sam_track_id);
-    p = p && equal_str(sam_challenge_label);
-    p = p && equal_str(sam_challenge);
-    p = p && equal_str(sam_response_prompt);
-    p = p && equal_str(sam_pk_for_sad);
-    return p;
-}
-
 int
 ktest_equal_sam_challenge_2_body(krb5_sam_challenge_2_body *ref,
                                  krb5_sam_challenge_2_body *var)
@@ -551,22 +533,6 @@ ktest_equal_sam_challenge_2(krb5_sam_challenge_2 *ref,
     return p;
 }
 
-int
-ktest_equal_sam_response(krb5_sam_response *ref, krb5_sam_response *var)
-{
-    int p = TRUE;
-    if (ref == var) return TRUE;
-    else if (ref == NULL || var == NULL) return FALSE;
-    p = p && scalar_equal(sam_type);
-    p = p && scalar_equal(sam_flags);
-    p = p && equal_str(sam_track_id);
-    p = p && struct_equal(sam_enc_key,ktest_equal_enc_data);
-    p = p && struct_equal(sam_enc_nonce_or_ts,ktest_equal_enc_data);
-    p = p && scalar_equal(sam_nonce);
-    p = p && scalar_equal(sam_patimestamp);
-    return p;
-}
-
 int
 ktest_equal_pa_for_user(krb5_pa_for_user *ref, krb5_pa_for_user *var)
 {
index 999730dae02974a58cf39da61cda174efbdcb7cb..ec8db0634ae10b84d63962732d96c1b0ed8e0d10 100644 (file)
@@ -84,10 +84,8 @@ generic(ktest_equal_krb5_pwd_data,krb5_pwd_data);
 generic(ktest_equal_krb5_alt_method,krb5_alt_method);
 generic(ktest_equal_krb5_pa_enc_ts,krb5_pa_enc_ts);
 
-generic(ktest_equal_sam_challenge,krb5_sam_challenge);
 generic(ktest_equal_sam_challenge_2,krb5_sam_challenge_2);
 generic(ktest_equal_sam_challenge_2_body,krb5_sam_challenge_2_body);
-generic(ktest_equal_sam_response,krb5_sam_response);
 
 int ktest_equal_last_req(krb5_last_req_entry **ref, krb5_last_req_entry **var);
 int ktest_equal_sequence_of_ticket(krb5_ticket **ref, krb5_ticket **var);
index 40587e3d0b8f453cf99d920a79812fa887f85c41..5feb7b48474c52b5b20ead584e0c71f127f74489 100644 (file)
@@ -50,13 +50,8 @@ encode_krb5_etype_info2 (only 1): 30 20 30 1E A0 03 02 01 00 A1 0D 1B 0B 4D 6F 7
 encode_krb5_pa_enc_ts: 30 1A A0 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A1 05 02 03 01 E2 40
 encode_krb5_pa_enc_ts (no usec): 30 13 A0 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A
 encode_krb5_enc_data: 30 23 A0 03 02 01 00 A1 03 02 01 05 A2 17 04 15 6B 72 62 41 53 4E 2E 31 20 74 65 73 74 20 6D 65 73 73 61 67 65
-encode_krb5_sam_challenge: 30 70 A0 03 02 01 2A A1 07 03 05 00 80 00 00 00 A2 0B 04 09 74 79 70 65 20 6E 61 6D 65 A4 11 04 0F 63 68 61 6C 6C 65 6E 67 65 20 6C 61 62 65 6C A5 10 04 0E 63 68 61 6C 6C 65 6E 67 65 20 69 70 73 65 A6 16 04 14 72 65 73 70 6F 6E 73 65 5F 70 72 6F 6D 70 74 20 69 70 73 65 A8 05 02 03 54 32 10 A9 0F 30 0D A0 03 02 01 01 A1 06 04 04 31 32 33 34
 encode_krb5_sam_challenge_2: 30 22 A0 0D 30 0B 04 09 63 68 61 6C 6C 65 6E 67 65 A1 11 30 0F 30 0D A0 03 02 01 01 A1 06 04 04 31 32 33 34
 encode_krb5_sam_challenge_2_body: 30 64 A0 03 02 01 2A A1 07 03 05 00 80 00 00 00 A2 0B 04 09 74 79 70 65 20 6E 61 6D 65 A4 11 04 0F 63 68 61 6C 6C 65 6E 67 65 20 6C 61 62 65 6C A5 10 04 0E 63 68 61 6C 6C 65 6E 67 65 20 69 70 73 65 A6 16 04 14 72 65 73 70 6F 6E 73 65 5F 70 72 6F 6D 70 74 20 69 70 73 65 A8 05 02 03 54 32 10 A9 03 02 01 01
-encode_krb5_sam_response: 30 6A A0 03 02 01 2A A1 07 03 05 00 80 00 00 00 A2 0C 04 0A 74 72 61 63 6B 20 64 61 74 61 A3 14 30 12 A0 03 02 01 01 A1 04 02 02 07 96 A2 05 04 03 6B 65 79 A4 1C 30 1A A0 03 02 01 01 A1 04 02 02 0D 36 A2 0D 04 0B 6E 6F 6E 63 65 20 6F 72 20 74 73 A5 05 02 03 54 32 10 A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A
-encode_krb5_sam_key: 30 15 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38
-encode_krb5_enc_sam_response_enc: 30 38 A0 05 02 03 01 33 2A A1 11 18 0F 31 39 37 30 30 31 30 32 30 33 34 36 33 39 5A A2 04 02 02 01 8F A3 16 04 14 65 6E 63 5F 73 61 6D 5F 72 65 73 70 6F 6E 73 65 5F 65 6E 63
-encode_krb5_predicted_sam_response: 30 6D A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 07 03 05 00 00 00 00 09 A2 11 18 0F 31 39 37 30 30 31 30 31 30 30 30 30 31 37 5A A3 03 02 01 12 A4 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A5 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A6 07 04 05 68 65 6C 6C 6F
 encode_krb5_sam_response_2: 30 42 A0 03 02 01 2B A1 07 03 05 00 80 00 00 00 A2 0C 04 0A 74 72 61 63 6B 20 64 61 74 61 A3 1D 30 1B A0 03 02 01 01 A1 04 02 02 0D 36 A2 0E 04 0C 6E 6F 6E 63 65 20 6F 72 20 73 61 64 A4 05 02 03 54 32 10
 encode_krb5_enc_sam_response_enc_2: 30 1F A0 03 02 01 58 A1 18 04 16 65 6E 63 5F 73 61 6D 5F 72 65 73 70 6F 6E 73 65 5F 65 6E 63 5F 32
 encode_krb5_pa_for_user: 30 4B A0 1A 30 18 A0 03 02 01 01 A1 11 30 0F 1B 06 68 66 74 73 61 69 1B 05 65 78 74 72 61 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 0F 30 0D A0 03 02 01 01 A1 06 04 04 31 32 33 34 A3 0A 1B 08 6B 72 62 35 64 61 74 61
index 69656170e8b7a57938bf5b61936b8dea4b4fb94c..0d3716267fedab06430717be355cf3f53f195847 100644 (file)
@@ -1175,20 +1175,6 @@ encode_krb5_enc_data:
 .  [kvno] [Integer] 5
 .  [cipher] [Octet String] "krbASN.1 test message"
 
-encode_krb5_sam_challenge:
-
-[Sequence/Sequence Of] 
-.  [0] [Integer] 42
-.  [1] [Bit String] 0x80000000
-.  [2] [Octet String] "type name"
-.  [4] [Octet String] "challenge label"
-.  [5] [Octet String] "challenge ipse"
-.  [6] [Octet String] "response_prompt ipse"
-.  [8] [Integer] 5517840
-.  [9] [Sequence/Sequence Of] 
-.  .  [0] [Integer] 1
-.  .  [1] [Octet String] "1234"
-
 encode_krb5_sam_challenge_2:
 
 [Sequence/Sequence Of] 
@@ -1211,55 +1197,6 @@ encode_krb5_sam_challenge_2_body:
 .  [8] [Integer] 5517840
 .  [9] [Integer] 1
 
-encode_krb5_sam_response:
-
-[Sequence/Sequence Of] 
-.  [0] [Integer] 42
-.  [1] [Bit String] 0x80000000
-.  [2] [Octet String] "track data"
-.  [3] [Sequence/Sequence Of] 
-.  .  [0] [Integer] 1
-.  .  [1] [Integer] 1942
-.  .  [2] [Octet String] "key"
-.  [4] [Sequence/Sequence Of] 
-.  .  [0] [Integer] 1
-.  .  [1] [Integer] 3382
-.  .  [2] [Octet String] "nonce or ts"
-.  [5] [Integer] 5517840
-.  [6] [Generalized Time] "19940610060317Z"
-
-encode_krb5_sam_key:
-
-[Sequence/Sequence Of] 
-.  [0] [Sequence/Sequence Of] 
-.  .  [0] [Integer] 1
-.  .  [1] [Octet String] "12345678"
-
-encode_krb5_enc_sam_response_enc:
-
-[Sequence/Sequence Of] 
-.  [0] [Integer] 78634
-.  [1] [Generalized Time] "19700102034639Z"
-.  [2] [Integer] 399
-.  [3] [Octet String] "enc_sam_response_enc"
-
-encode_krb5_predicted_sam_response:
-
-[Sequence/Sequence Of] 
-.  [0] [Sequence/Sequence Of] 
-.  .  [0] [Integer] 1
-.  .  [1] [Octet String] "12345678"
-.  [1] [Bit String] 0x9
-.  [2] [Generalized Time] "19700101000017Z"
-.  [3] [Integer] 18
-.  [4] [General string] "ATHENA.MIT.EDU"
-.  [5] [Sequence/Sequence Of] 
-.  .  [0] [Integer] 1
-.  .  [1] [Sequence/Sequence Of] 
-.  .  .  [General string] "hftsai"
-.  .  .  [General string] "extra"
-.  [6] [Octet String] "hello"
-
 encode_krb5_sam_response_2:
 
 [Sequence/Sequence Of]