Path: blob/main/crypto/krb5/src/tests/asn.1/ktest.h
34907 views
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */1/* tests/asn.1/ktest.h */2/*3* Copyright (C) 1994 by the Massachusetts Institute of Technology.4* All rights reserved.5*6* Export of this software from the United States of America may7* require a specific license from the United States Government.8* It is the responsibility of any person or organization contemplating9* export to obtain such a license before exporting.10*11* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and12* distribute this software and its documentation for any purpose and13* without fee is hereby granted, provided that the above copyright14* notice appear in all copies and that both that copyright notice and15* this permission notice appear in supporting documentation, and that16* the name of M.I.T. not be used in advertising or publicity pertaining17* to distribution of the software without specific, written prior18* permission. Furthermore if you modify this software you must label19* your software as modified software and not distribute it in such a20* fashion that it might be confused with the original M.I.T. software.21* M.I.T. makes no representations about the suitability of22* this software for any purpose. It is provided "as is" without express23* or implied warranty.24*/2526#ifndef __KTEST_H__27#define __KTEST_H__2829#include "k5-int.h"30#include "k5-spake.h"31#include "kdb.h"3233#define SAMPLE_USEC 12345634#define SAMPLE_TIME 771228197 /* Fri Jun 10 6:03:17 GMT 1994 */35#define SAMPLE_SEQ_NUMBER 1736#define SAMPLE_NONCE 4237#define SAMPLE_FLAGS 0xFEDCBA9838#define SAMPLE_ERROR 0x3C;3940void ktest_make_sample_data(krb5_data *d);41void ktest_make_sample_authenticator(krb5_authenticator *a);42void ktest_make_sample_principal(krb5_principal *p);43void ktest_make_sample_checksum(krb5_checksum *cs);44void ktest_make_sample_keyblock(krb5_keyblock *kb);45void ktest_make_sample_ticket(krb5_ticket *tkt);46void ktest_make_sample_enc_data(krb5_enc_data *ed);47void ktest_make_sample_enc_tkt_part(krb5_enc_tkt_part *etp);48void ktest_make_sample_transited(krb5_transited *t);49void ktest_make_sample_ticket_times(krb5_ticket_times *tt);50void ktest_make_sample_addresses(krb5_address ***caddrs);51void ktest_make_sample_address(krb5_address *a);52void ktest_make_sample_authorization_data(krb5_authdata ***ad);53void ktest_make_sample_authdata(krb5_authdata *ad);54void ktest_make_sample_enc_kdc_rep_part(krb5_enc_kdc_rep_part *ekr);55void ktest_make_sample_kdc_req(krb5_kdc_req *kr);5657void ktest_make_sample_last_req(krb5_last_req_entry ***lr);58void ktest_make_sample_last_req_entry(krb5_last_req_entry **lre);59void ktest_make_sample_kdc_rep(krb5_kdc_rep *kdcr);60void ktest_make_sample_pa_data_array(krb5_pa_data ***pad);61void ktest_make_sample_empty_pa_data_array(krb5_pa_data ***pad);62void ktest_make_sample_pa_data(krb5_pa_data *pad);63void ktest_make_sample_ap_req(krb5_ap_req *ar);64void ktest_make_sample_ap_rep(krb5_ap_rep *ar);65void ktest_make_sample_ap_rep_enc_part(krb5_ap_rep_enc_part *arep);66void ktest_make_sample_kdc_req_body(krb5_kdc_req *krb);67void ktest_make_sample_safe(krb5_safe *s);68void ktest_make_sample_priv(krb5_priv *p);69void ktest_make_sample_priv_enc_part(krb5_priv_enc_part *pep);70void ktest_make_sample_cred(krb5_cred *c);71void ktest_make_sample_cred_enc_part(krb5_cred_enc_part *cep);72void ktest_make_sample_sequence_of_ticket(krb5_ticket ***sot);73void ktest_make_sample_error(krb5_error *kerr);74void ktest_make_sequence_of_cred_info(krb5_cred_info ***soci);75void ktest_make_sample_cred_info(krb5_cred_info *ci);7677void ktest_make_sample_etype_info(krb5_etype_info_entry ***p);78void ktest_make_sample_etype_info2(krb5_etype_info_entry ***p);79void ktest_make_sample_pa_enc_ts(krb5_pa_enc_ts *am);80void ktest_make_sample_sam_challenge_2(krb5_sam_challenge_2 *p);81void ktest_make_sample_sam_challenge_2_body(krb5_sam_challenge_2_body *p);82void ktest_make_sample_sam_response_2(krb5_sam_response_2 *p);83void ktest_make_sample_enc_sam_response_enc_2(krb5_enc_sam_response_enc_2 *p);84void ktest_make_sample_pa_for_user(krb5_pa_for_user *p);85void ktest_make_sample_pa_s4u_x509_user(krb5_pa_s4u_x509_user *p);86void ktest_make_sample_ad_kdcissued(krb5_ad_kdcissued *p);87void ktest_make_sample_iakerb_header(krb5_iakerb_header *p);88void ktest_make_sample_iakerb_finished(krb5_iakerb_finished *p);89void ktest_make_sample_fast_response(krb5_fast_response *p);90void ktest_make_sha256_alg(krb5_algorithm_identifier *p);91void ktest_make_sha1_alg(krb5_algorithm_identifier *p);92void ktest_make_minimal_otp_tokeninfo(krb5_otp_tokeninfo *p);93void ktest_make_maximal_otp_tokeninfo(krb5_otp_tokeninfo *p);94void ktest_make_minimal_pa_otp_challenge(krb5_pa_otp_challenge *p);95void ktest_make_maximal_pa_otp_challenge(krb5_pa_otp_challenge *p);96void ktest_make_minimal_pa_otp_req(krb5_pa_otp_req *p);97void ktest_make_maximal_pa_otp_req(krb5_pa_otp_req *p);9899#ifndef DISABLE_PKINIT100void ktest_make_sample_pa_pk_as_req(krb5_pa_pk_as_req *p);101void ktest_make_sample_pa_pk_as_rep_dhInfo(krb5_pa_pk_as_rep *p);102void ktest_make_sample_pa_pk_as_rep_encKeyPack(krb5_pa_pk_as_rep *p);103void ktest_make_sample_auth_pack(krb5_auth_pack *p);104void ktest_make_sample_kdc_dh_key_info(krb5_kdc_dh_key_info *p);105void ktest_make_sample_reply_key_pack(krb5_reply_key_pack *p);106void ktest_make_sample_sp80056a_other_info(krb5_sp80056a_other_info *p);107void ktest_make_sample_pkinit_supp_pub_info(krb5_pkinit_supp_pub_info *p);108#endif109110#ifdef ENABLE_LDAP111void ktest_make_sample_ldap_seqof_key_data(ldap_seqof_key_data *p);112#endif113114void ktest_make_sample_kkdcp_message(krb5_kkdcp_message *p);115void ktest_make_minimal_cammac(krb5_cammac *p);116void ktest_make_maximal_cammac(krb5_cammac *p);117void ktest_make_sample_secure_cookie(krb5_secure_cookie *p);118void ktest_make_minimal_spake_factor(krb5_spake_factor *p);119void ktest_make_maximal_spake_factor(krb5_spake_factor *p);120void ktest_make_support_pa_spake(krb5_pa_spake *p);121void ktest_make_challenge_pa_spake(krb5_pa_spake *p);122void ktest_make_response_pa_spake(krb5_pa_spake *p);123void ktest_make_encdata_pa_spake(krb5_pa_spake *p);124125/*----------------------------------------------------------------------*/126127void ktest_empty_authorization_data(krb5_authdata **ad);128void ktest_destroy_authorization_data(krb5_authdata ***ad);129void ktest_destroy_authorization_data(krb5_authdata ***ad);130void ktest_empty_addresses(krb5_address **a);131void ktest_destroy_addresses(krb5_address ***a);132void ktest_destroy_address(krb5_address **a);133void ktest_empty_pa_data_array(krb5_pa_data **pad);134void ktest_destroy_pa_data_array(krb5_pa_data ***pad);135void ktest_destroy_pa_data(krb5_pa_data **pad);136137void ktest_destroy_data(krb5_data **d);138void ktest_empty_data(krb5_data *d);139void ktest_destroy_principal(krb5_principal *p);140void ktest_destroy_checksum(krb5_checksum **cs);141void ktest_empty_keyblock(krb5_keyblock *kb);142void ktest_destroy_keyblock(krb5_keyblock **kb);143void ktest_destroy_authdata(krb5_authdata **ad);144void ktest_destroy_sequence_of_integer(long **soi);145void ktest_destroy_sequence_of_ticket(krb5_ticket ***sot);146void ktest_destroy_ticket(krb5_ticket **tkt);147void ktest_empty_ticket(krb5_ticket *tkt);148void ktest_destroy_enc_data(krb5_enc_data *ed);149void ktest_empty_error(krb5_error *kerr);150void ktest_destroy_etype_info_entry(krb5_etype_info_entry *i);151void ktest_destroy_etype_info(krb5_etype_info_entry **info);152153void ktest_empty_kdc_req(krb5_kdc_req *kr);154void ktest_empty_kdc_rep(krb5_kdc_rep *kr);155156void ktest_empty_authenticator(krb5_authenticator *a);157void ktest_empty_enc_tkt_part(krb5_enc_tkt_part *etp);158void ktest_destroy_enc_tkt_part(krb5_enc_tkt_part **etp);159void ktest_empty_enc_kdc_rep_part(krb5_enc_kdc_rep_part *ekr);160void ktest_destroy_transited(krb5_transited *t);161void ktest_empty_ap_rep(krb5_ap_rep *ar);162void ktest_empty_ap_req(krb5_ap_req *ar);163void ktest_empty_cred_enc_part(krb5_cred_enc_part *cep);164void ktest_destroy_cred_info(krb5_cred_info **ci);165void ktest_destroy_sequence_of_cred_info(krb5_cred_info ***soci);166void ktest_empty_safe(krb5_safe *s);167void ktest_empty_priv(krb5_priv *p);168void ktest_empty_priv_enc_part(krb5_priv_enc_part *pep);169void ktest_empty_cred(krb5_cred *c);170void ktest_destroy_last_req(krb5_last_req_entry ***lr);171void ktest_empty_ap_rep_enc_part(krb5_ap_rep_enc_part *arep);172void ktest_empty_sam_challenge_2(krb5_sam_challenge_2 *p);173void ktest_empty_sam_challenge_2_body(krb5_sam_challenge_2_body *p);174void ktest_empty_sam_response_2(krb5_sam_response_2 *p);175void ktest_empty_enc_sam_response_enc_2(krb5_enc_sam_response_enc_2 *p);176void ktest_empty_pa_for_user(krb5_pa_for_user *p);177void ktest_empty_pa_s4u_x509_user(krb5_pa_s4u_x509_user *p);178void ktest_empty_ad_kdcissued(krb5_ad_kdcissued *p);179void ktest_empty_iakerb_header(krb5_iakerb_header *p);180void ktest_empty_iakerb_finished(krb5_iakerb_finished *p);181void ktest_empty_fast_response(krb5_fast_response *p);182void ktest_empty_otp_tokeninfo(krb5_otp_tokeninfo *p);183void ktest_empty_pa_otp_challenge(krb5_pa_otp_challenge *p);184void ktest_empty_pa_otp_req(krb5_pa_otp_req *p);185186#ifndef DISABLE_PKINIT187void ktest_empty_pa_pk_as_req(krb5_pa_pk_as_req *p);188void ktest_empty_pa_pk_as_rep(krb5_pa_pk_as_rep *p);189void ktest_empty_auth_pack(krb5_auth_pack *p);190void ktest_empty_kdc_dh_key_info(krb5_kdc_dh_key_info *p);191void ktest_empty_reply_key_pack(krb5_reply_key_pack *p);192void ktest_empty_sp80056a_other_info(krb5_sp80056a_other_info *p);193void ktest_empty_pkinit_supp_pub_info(krb5_pkinit_supp_pub_info *p);194#endif195196#ifdef ENABLE_LDAP197void ktest_empty_ldap_seqof_key_data(ldap_seqof_key_data *p);198#endif199200void ktest_empty_kkdcp_message(krb5_kkdcp_message *p);201void ktest_empty_cammac(krb5_cammac *p);202void ktest_empty_secure_cookie(krb5_secure_cookie *p);203void ktest_empty_spake_factor(krb5_spake_factor *p);204void ktest_empty_pa_spake(krb5_pa_spake *p);205206extern krb5_context test_context;207extern char *sample_principal_name;208209#endif210211212