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 */
#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 */
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 *);
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 * );
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 **);
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;
* 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 **);
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 *);
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(
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)
{
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)
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)
{
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;
-}
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),
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),
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),
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 */
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);
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)
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)
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)
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)
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)
{
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)
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)
{
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)
{
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)
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)
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
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
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
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
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
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
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
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;
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;
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 */
{
}
- /****************************************************************/
- /* 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 */
{
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;
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;
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)
{
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)
{
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)
{
}
#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 */
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)
{
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)
{
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);
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);
#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)
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)
{
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);
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
. [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]
. [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]