summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/tests
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/asn.1/krb5_decode_leak.c78
-rw-r--r--src/tests/asn.1/krb5_decode_test.c88
-rw-r--r--src/tests/asn.1/krb5_encode_test.c98
-rw-r--r--src/tests/asn.1/ktest.c28
-rw-r--r--src/tests/asn.1/t_trval.c12
-rw-r--r--src/tests/asn.1/trval.c89
-rw-r--r--src/tests/asn.1/utility.c4
-rw-r--r--src/tests/create/kdb5_mkdums.c35
-rw-r--r--src/tests/dejagnu/t_inetd.c9
-rw-r--r--src/tests/dump.c6
-rw-r--r--src/tests/gss-threads/gss-client.c34
-rw-r--r--src/tests/gss-threads/gss-misc.c36
-rw-r--r--src/tests/gss-threads/gss-misc.h4
-rw-r--r--src/tests/gss-threads/gss-server.c34
-rw-r--r--src/tests/gssapi/t_imp_name.c17
-rw-r--r--src/tests/gssapi/t_namingexts.c1
-rw-r--r--src/tests/gssapi/t_s4u.c1
-rw-r--r--src/tests/hammer/kdc5_hammer.c46
-rw-r--r--src/tests/misc/test_getsockname.c12
-rw-r--r--src/tests/misc/test_nfold.c8
-rw-r--r--src/tests/resolve/addrinfo-test.c6
-rw-r--r--src/tests/resolve/resolve.c26
-rw-r--r--src/tests/test1.c20
-rw-r--r--src/tests/threads/gss-perf.c2
-rw-r--r--src/tests/threads/t_rcache.c6
-rw-r--r--src/tests/verify/kdb5_verify.c35
26 files changed, 363 insertions, 372 deletions
diff --git a/src/tests/asn.1/krb5_decode_leak.c b/src/tests/asn.1/krb5_decode_leak.c
index 3eb6f3c66..1b90bf769 100644
--- a/src/tests/asn.1/krb5_decode_leak.c
+++ b/src/tests/asn.1/krb5_decode_leak.c
@@ -49,7 +49,7 @@ main(int argc, char **argv)
exit(1);
}
init_access(argv[0]);
-
+
#define setup(value, typestring, constructor) \
retval = constructor(&(value)); \
if (retval) { \
@@ -83,7 +83,7 @@ main(int argc, char **argv)
freefn(test_context, tmp); \
} \
krb5_free_data(test_context, code);
-
+
/****************************************************************/
/* encode_krb5_authenticator */
{
@@ -105,7 +105,7 @@ main(int argc, char **argv)
decode_krb5_authenticator, krb5_free_authenticator);
ktest_empty_authenticator(&authent);
}
-
+
/****************************************************************/
/* encode_krb5_ticket */
{
@@ -126,8 +126,8 @@ main(int argc, char **argv)
leak_test(keyblk, encode_krb5_encryption_key,
decode_krb5_encryption_key, krb5_free_keyblock);
ktest_empty_keyblock(&keyblk);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_enc_tkt_part */
{
@@ -143,23 +143,23 @@ main(int argc, char **argv)
leak_test(*(tkt.enc_part2), encode_krb5_enc_tkt_part,
decode_krb5_enc_tkt_part, krb5_free_enc_tkt_part);
-
+
tkt.enc_part2->times.starttime = 0;
tkt.enc_part2->times.renew_till = 0;
ktest_destroy_address(&(tkt.enc_part2->caddrs[1]));
ktest_destroy_address(&(tkt.enc_part2->caddrs[0]));
ktest_destroy_authdata(&(tkt.enc_part2->authorization_data[1]));
ktest_destroy_authdata(&(tkt.enc_part2->authorization_data[0]));
-
+
/* ISODE version fails on the empty caddrs field */
ktest_destroy_addresses(&(tkt.enc_part2->caddrs));
ktest_destroy_authorization_data(&(tkt.enc_part2->authorization_data));
-
+
leak_test(*(tkt.enc_part2), encode_krb5_enc_tkt_part,
decode_krb5_enc_tkt_part, krb5_free_enc_tkt_part);
ktest_empty_ticket(&tkt);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_enc_kdc_rep_part */
{
@@ -167,26 +167,26 @@ main(int argc, char **argv)
krb5_enc_kdc_rep_part *tmp;
memset(&kdcr, 0, sizeof(kdcr));
-
+
kdcr.enc_part2 = calloc(1, sizeof(krb5_enc_kdc_rep_part));
if (kdcr.enc_part2 == NULL)
com_err("allocating enc_kdc_rep_part", errno, "");
setup(*(kdcr.enc_part2), "enc_kdc_rep_part",
ktest_make_sample_enc_kdc_rep_part);
-
+
leak_test(*(kdcr.enc_part2), encode_krb5_enc_kdc_rep_part,
decode_krb5_enc_kdc_rep_part, krb5_free_enc_kdc_rep_part);
-
+
kdcr.enc_part2->key_exp = 0;
kdcr.enc_part2->times.starttime = 0;
kdcr.enc_part2->flags &= ~TKT_FLG_RENEWABLE;
ktest_destroy_addresses(&(kdcr.enc_part2->caddrs));
-
+
leak_test(*(kdcr.enc_part2), encode_krb5_enc_kdc_rep_part,
decode_krb5_enc_kdc_rep_part, krb5_free_enc_kdc_rep_part);
ktest_empty_kdc_rep(&kdcr);
- }
+ }
/****************************************************************/
/* encode_krb5_as_rep */
@@ -197,15 +197,15 @@ main(int argc, char **argv)
kdcr.msg_type = KRB5_AS_REP;
leak_test(kdcr, encode_krb5_as_rep, decode_krb5_as_rep,
krb5_free_kdc_rep);
-
+
ktest_destroy_pa_data_array(&(kdcr.padata));
leak_test(kdcr, encode_krb5_as_rep, decode_krb5_as_rep,
krb5_free_kdc_rep);
ktest_empty_kdc_rep(&kdcr);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_tgs_rep */
{
@@ -222,8 +222,8 @@ main(int argc, char **argv)
ktest_empty_kdc_rep(&kdcr);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_ap_req */
{
@@ -233,7 +233,7 @@ main(int argc, char **argv)
leak_test(apreq, encode_krb5_ap_req, decode_krb5_ap_req,
krb5_free_ap_req);
ktest_empty_ap_req(&apreq);
- }
+ }
/****************************************************************/
/* encode_krb5_ap_rep */
@@ -244,7 +244,7 @@ main(int argc, char **argv)
leak_test(aprep, encode_krb5_ap_rep, decode_krb5_ap_rep,
krb5_free_ap_rep);
ktest_empty_ap_rep(&aprep);
- }
+ }
/****************************************************************/
/* encode_krb5_ap_rep_enc_part */
@@ -254,14 +254,14 @@ main(int argc, char **argv)
setup(apenc, "ap_rep_enc_part", ktest_make_sample_ap_rep_enc_part);
leak_test(apenc, encode_krb5_ap_rep_enc_part,
decode_krb5_ap_rep_enc_part, krb5_free_ap_rep_enc_part);
-
+
ktest_destroy_keyblock(&(apenc.subkey));
apenc.seq_number = 0;
leak_test(apenc, encode_krb5_ap_rep_enc_part,
decode_krb5_ap_rep_enc_part, krb5_free_ap_rep_enc_part);
ktest_empty_ap_rep_enc_part(&apenc);
}
-
+
/****************************************************************/
/* encode_krb5_as_req */
{
@@ -295,7 +295,7 @@ main(int argc, char **argv)
krb5_free_kdc_req);
ktest_empty_kdc_req(&asreq);
}
-
+
/****************************************************************/
/* encode_krb5_tgs_req */
{
@@ -329,7 +329,7 @@ main(int argc, char **argv)
krb5_free_kdc_req);
ktest_empty_kdc_req(&tgsreq);
}
-
+
/****************************************************************/
/* encode_krb5_kdc_req_body */
{
@@ -362,7 +362,7 @@ main(int argc, char **argv)
krb5_free_kdc_req);
ktest_empty_kdc_req(&kdcrb);
}
-
+
/****************************************************************/
/* encode_krb5_safe */
{
@@ -378,7 +378,7 @@ main(int argc, char **argv)
leak_test(s, encode_krb5_safe, decode_krb5_safe, krb5_free_safe);
ktest_empty_safe(&s);
}
-
+
/****************************************************************/
/* encode_krb5_priv */
{
@@ -388,7 +388,7 @@ main(int argc, char **argv)
leak_test(p, encode_krb5_priv, decode_krb5_priv, krb5_free_priv);
ktest_empty_priv(&p);
}
-
+
/****************************************************************/
/* encode_krb5_enc_priv_part */
{
@@ -406,7 +406,7 @@ main(int argc, char **argv)
krb5_free_priv_enc_part);
ktest_empty_priv_enc_part(&ep);
}
-
+
/****************************************************************/
/* encode_krb5_cred */
{
@@ -416,12 +416,12 @@ main(int argc, char **argv)
leak_test(c, encode_krb5_cred, decode_krb5_cred, krb5_free_cred);
ktest_empty_cred(&c);
}
-
+
/****************************************************************/
/* encode_krb5_enc_cred_part */
{
krb5_cred_enc_part cep, *tmp;
-
+
setup(cep, "cred_enc_part", ktest_make_sample_cred_enc_part);
leak_test(cep, encode_krb5_enc_cred_part, decode_krb5_enc_cred_part,
free_cred_enc_part_whole);
@@ -442,7 +442,7 @@ main(int argc, char **argv)
free_cred_enc_part_whole);
ktest_empty_cred_enc_part(&cep);
}
-
+
/****************************************************************/
/* encode_krb5_error */
{
@@ -459,7 +459,7 @@ main(int argc, char **argv)
ktest_empty_error(&kerr);
}
-
+
/****************************************************************/
/* encode_krb5_authdata */
{
@@ -470,7 +470,7 @@ main(int argc, char **argv)
krb5_free_authdata);
ktest_destroy_authorization_data(&ad);
}
-
+
/****************************************************************/
/* encode_pwd_sequence */
{
@@ -497,7 +497,7 @@ main(int argc, char **argv)
/* encode_padata_sequence */
{
krb5_pa_data **pa, **tmp;
-
+
setup(pa, "PreauthData", ktest_make_sample_pa_data_array);
leak_test(*pa, encode_krb5_padata_sequence,
decode_krb5_padata_sequence, krb5_free_pa_data);
@@ -508,7 +508,7 @@ main(int argc, char **argv)
/* encode_padata_sequence (empty) */
{
krb5_pa_data **pa, **tmp;
-
+
setup(pa,"EmptyPreauthData",ktest_make_sample_empty_pa_data_array);
leak_test(*pa, encode_krb5_padata_sequence,
decode_krb5_padata_sequence, krb5_free_pa_data);
@@ -536,7 +536,7 @@ main(int argc, char **argv)
/* encode_etype_info */
{
krb5_etype_info_entry **info, **tmp;
-
+
setup(info, "etype_info", ktest_make_sample_etype_info);
leak_test(*info, encode_krb5_etype_info, decode_krb5_etype_info,
krb5_free_etype_info);
@@ -556,7 +556,7 @@ main(int argc, char **argv)
/* encode_etype_info 2*/
{
krb5_etype_info_entry **info, **tmp;
-
+
setup(info, "etype_info2", ktest_make_sample_etype_info2);
leak_test(*info, encode_krb5_etype_info2, decode_krb5_etype_info2,
krb5_free_etype_info);
diff --git a/src/tests/asn.1/krb5_decode_test.c b/src/tests/asn.1/krb5_decode_test.c
index 401b26240..903697292 100644
--- a/src/tests/asn.1/krb5_decode_test.c
+++ b/src/tests/asn.1/krb5_decode_test.c
@@ -11,7 +11,7 @@ krb5_context test_context;
int error_count = 0;
void krb5_ktest_free_alt_method(krb5_context context, krb5_alt_method *val);
-void krb5_ktest_free_pwd_sequence(krb5_context context,
+void krb5_ktest_free_pwd_sequence(krb5_context context,
passwd_phrase_element *val);
void krb5_ktest_free_enc_data(krb5_context context, krb5_enc_data *val);
@@ -21,14 +21,14 @@ int main(argc, argv)
{
krb5_data code;
krb5_error_code retval;
-
+
retval = krb5_init_context(&test_context);
if (retval) {
com_err(argv[0], retval, "while initializing krb5");
exit(1);
}
init_access(argv[0]);
-
+
#define setup(type,typestring,constructor) \
type ref, *var; \
@@ -236,12 +236,12 @@ int main(argc, argv)
decode_run("authenticator","(optionals empty)","62 4F 30 4D A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A4 05 02 03 01 E2 40 A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A",decode_krb5_authenticator,ktest_equal_authenticator,krb5_free_authenticator);
ktest_destroy_authorization_data(&(ref.authorization_data));
-
+
decode_run("authenticator","(optionals NULL)","62 4F 30 4D A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A4 05 02 03 01 E2 40 A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A",decode_krb5_authenticator,ktest_equal_authenticator,krb5_free_authenticator);
ktest_empty_authenticator(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_ticket */
{
@@ -320,14 +320,14 @@ int main(argc, argv)
decode_run("encryption_key","(enctype = 2147483647)","30 14 A0 06 02 04 7F FF FF FF A1 0A 04 08 31 32 33 34 35 36 37 38",decode_krb5_encryption_key,ktest_equal_encryption_key,krb5_free_keyblock);
ktest_empty_keyblock(&ref);
- }
-
+ }
+
/****************************************************************/
/* decode_krb5_enc_tkt_part */
{
setup(krb5_enc_tkt_part,"krb5_enc_tkt_part",ktest_make_sample_enc_tkt_part);
decode_run("enc_tkt_part","","63 82 01 14 30 82 01 10 A0 07 03 05 00 FE DC BA 98 A1 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A2 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A3 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 A4 2E 30 2C A0 03 02 01 01 A1 25 04 23 45 44 55 2C 4D 49 54 2E 2C 41 54 48 45 4E 41 2E 2C 57 41 53 48 49 4E 47 54 4F 4E 2E 45 44 55 2C 43 53 2E A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A9 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 AA 24 30 22 30 0F A0 03 02 01 01 A1 08 04 06 66 6F 6F 62 61 72 30 0F A0 03 02 01 01 A1 08 04 06 66 6F 6F 62 61 72",decode_krb5_enc_tkt_part,ktest_equal_enc_tkt_part,krb5_free_enc_tkt_part);
-
+
/* ref.times.starttime = 0; */
ref.times.starttime = ref.times.authtime;
ref.times.renew_till = 0;
@@ -338,7 +338,7 @@ int main(argc, argv)
/* ISODE version fails on the empty caddrs field */
ktest_destroy_addresses(&(ref.caddrs));
ktest_destroy_authorization_data(&(ref.authorization_data));
-
+
decode_run("enc_tkt_part","(optionals NULL)","63 81 A5 30 81 A2 A0 07 03 05 00 FE DC BA 98 A1 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A2 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A3 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 A4 2E 30 2C A0 03 02 01 01 A1 25 04 23 45 44 55 2C 4D 49 54 2E 2C 41 54 48 45 4E 41 2E 2C 57 41 53 48 49 4E 47 54 4F 4E 2E 45 44 55 2C 43 53 2E A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A",decode_krb5_enc_tkt_part,ktest_equal_enc_tkt_part, krb5_free_enc_tkt_part);
decode_run("enc_tkt_part","(optionals NULL + bitstring enlarged to 38 bits)","63 81 A6 30 81 A3 A0 08 03 06 02 FE DC BA 98 DC A1 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A2 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A3 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 A4 2E 30 2C A0 03 02 01 01 A1 25 04 23 45 44 55 2C 4D 49 54 2E 2C 41 54 48 45 4E 41 2E 2C 57 41 53 48 49 4E 47 54 4F 4E 2E 45 44 55 2C 43 53 2E A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A",decode_krb5_enc_tkt_part,ktest_equal_enc_tkt_part,krb5_free_enc_tkt_part);
@@ -352,26 +352,26 @@ int main(argc, argv)
decode_run("enc_tkt_part","(optionals NULL + bitstring reduced to 24 bits)","63 81 A4 30 81 A1 A0 06 03 04 00 FE DC BA A1 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A2 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A3 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 A4 2E 30 2C A0 03 02 01 01 A1 25 04 23 45 44 55 2C 4D 49 54 2E 2C 41 54 48 45 4E 41 2E 2C 57 41 53 48 49 4E 47 54 4F 4E 2E 45 44 55 2C 43 53 2E A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A",decode_krb5_enc_tkt_part,ktest_equal_enc_tkt_part,krb5_free_enc_tkt_part);
ktest_empty_enc_tkt_part(&ref);
- }
-
+ }
+
/****************************************************************/
/* decode_krb5_enc_kdc_rep_part */
{
setup(krb5_enc_kdc_rep_part,"krb5_enc_kdc_rep_part",ktest_make_sample_enc_kdc_rep_part);
-
+
#ifdef KRB5_GENEROUS_LR_TYPE
decode_run("enc_kdc_rep_part","(compat_lr_type)","7A 82 01 10 30 82 01 0C A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 38 30 36 30 19 A0 04 02 02 00 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A 30 19 A0 04 02 02 00 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A2 03 02 01 2A A3 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A4 07 03 05 00 FE DC BA 98 A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A9 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 AA 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 AB 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_kdc_rep_part,ktest_equal_enc_kdc_rep_part,krb5_free_enc_kdc_rep_part);
#endif
-
+
decode_run("enc_kdc_rep_part","","7A 82 01 0E 30 82 01 0A A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 36 30 34 30 18 A0 03 02 01 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A 30 18 A0 03 02 01 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A2 03 02 01 2A A3 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A4 07 03 05 00 FE DC BA 98 A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A6 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A8 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A9 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 AA 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 AB 20 30 1E 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_kdc_rep_part,ktest_equal_enc_kdc_rep_part,krb5_free_enc_kdc_rep_part);
-
+
ref.key_exp = 0;
/* ref.times.starttime = 0;*/
ref.times.starttime = ref.times.authtime;
ref.times.renew_till = 0;
ref.flags &= ~TKT_FLG_RENEWABLE;
ktest_destroy_addresses(&(ref.caddrs));
-
+
#ifdef KRB5_GENEROUS_LR_TYPE
decode_run("enc_kdc_rep_part","(optionals NULL)(compat lr_type)","7A 81 B4 30 81 B1 A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 38 30 36 30 19 A0 04 02 02 00 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A 30 19 A0 04 02 02 00 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A2 03 02 01 2A A4 07 03 05 00 FE 5C BA 98 A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A9 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 AA 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",decode_krb5_enc_kdc_rep_part,ktest_equal_enc_kdc_rep_part,krb5_free_enc_kdc_rep_part);
#endif
@@ -379,7 +379,7 @@ int main(argc, argv)
decode_run("enc_kdc_rep_part","(optionals NULL)","7A 81 B2 30 81 AF A0 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A1 36 30 34 30 18 A0 03 02 01 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A 30 18 A0 03 02 01 FB A1 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A2 03 02 01 2A A4 07 03 05 00 FE 5C BA 98 A5 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A7 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A9 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 AA 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",decode_krb5_enc_kdc_rep_part,ktest_equal_enc_kdc_rep_part,krb5_free_enc_kdc_rep_part);
ktest_empty_enc_kdc_rep_part(&ref);
- }
+ }
/****************************************************************/
/* decode_krb5_as_rep */
@@ -443,8 +443,8 @@ int main(argc, argv)
decode_run("as_rep","(optionals NULL)","6B 81 C2 30 81 BF A0 03 02 01 05 A1 03 02 01 0B A3 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A4 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 A5 5E 61 5C 30 5A A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A3 25 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 A6 25 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",decode_krb5_as_rep,ktest_equal_as_rep,krb5_free_kdc_rep);
ktest_empty_kdc_rep(&ref);
- }
-
+ }
+
/****************************************************************/
/* decode_krb5_tgs_rep */
{
@@ -457,8 +457,8 @@ int main(argc, argv)
decode_run("tgs_rep","(optionals NULL)","6D 81 C2 30 81 BF A0 03 02 01 05 A1 03 02 01 0D A3 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A4 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 A5 5E 61 5C 30 5A A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A3 25 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 A6 25 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",decode_krb5_tgs_rep,ktest_equal_tgs_rep,krb5_free_kdc_rep);
ktest_empty_kdc_rep(&ref);
- }
-
+ }
+
/****************************************************************/
/* decode_krb5_ap_req */
{
@@ -466,7 +466,7 @@ int main(argc, argv)
decode_run("ap_req","","6E 81 9D 30 81 9A A0 03 02 01 05 A1 03 02 01 0E A2 07 03 05 00 FE DC BA 98 A3 5E 61 5C 30 5A A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A3 25 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 A4 25 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",decode_krb5_ap_req,ktest_equal_ap_req,krb5_free_ap_req);
ktest_empty_ap_req(&ref);
- }
+ }
/****************************************************************/
/* decode_krb5_ap_rep */
@@ -474,7 +474,7 @@ int main(argc, argv)
setup(krb5_ap_rep,"krb5_ap_rep",ktest_make_sample_ap_rep);
decode_run("ap_rep","","6F 33 30 31 A0 03 02 01 05 A1 03 02 01 0F A2 25 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",decode_krb5_ap_rep,ktest_equal_ap_rep,krb5_free_ap_rep);
ktest_empty_ap_rep(&ref);
- }
+ }
/****************************************************************/
/* decode_krb5_ap_rep_enc_part */
@@ -482,7 +482,7 @@ int main(argc, argv)
setup(krb5_ap_rep_enc_part,"krb5_ap_rep_enc_part",ktest_make_sample_ap_rep_enc_part);
decode_run("ap_rep_enc_part","","7B 36 30 34 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 A2 13 30 11 A0 03 02 01 01 A1 0A 04 08 31 32 33 34 35 36 37 38 A3 03 02 01 11",decode_krb5_ap_rep_enc_part,ktest_equal_ap_rep_enc_part,krb5_free_ap_rep_enc_part);
-
+
ktest_destroy_keyblock(&(ref.subkey));
ref.seq_number = 0;
decode_run("ap_rep_enc_part","(optionals NULL)","7B 1C 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",decode_krb5_ap_rep_enc_part,ktest_equal_ap_rep_enc_part,krb5_free_ap_rep_enc_part);
@@ -504,7 +504,7 @@ int main(argc, argv)
ktest_empty_ap_rep_enc_part(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_as_req */
{
@@ -536,7 +536,7 @@ int main(argc, argv)
}
-
+
/****************************************************************/
/* decode_krb5_tgs_req */
{
@@ -567,7 +567,7 @@ int main(argc, argv)
ktest_empty_kdc_req(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_kdc_req_body */
{
@@ -606,7 +606,7 @@ int main(argc, argv)
ktest_empty_kdc_req(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_safe */
{
@@ -621,7 +621,7 @@ int main(argc, argv)
ktest_empty_safe(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_priv */
{
@@ -629,7 +629,7 @@ int main(argc, argv)
decode_run("priv","","75 33 30 31 A0 03 02 01 05 A1 03 02 01 15 A3 25 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",decode_krb5_priv,ktest_equal_priv,krb5_free_priv);
ktest_empty_priv(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_enc_priv_part */
{
@@ -643,7 +643,7 @@ int main(argc, argv)
decode_run("enc_priv_part","(optionals NULL)","7C 1F 30 1D A0 0A 04 08 6B 72 62 35 64 61 74 61 A4 0F 30 0D A0 03 02 01 02 A1 06 04 04 12 D0 00 23",decode_krb5_enc_priv_part,ktest_equal_enc_priv_part,krb5_free_priv_enc_part);
ktest_empty_priv_enc_part(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_cred */
{
@@ -651,7 +651,7 @@ int main(argc, argv)
decode_run("cred","","76 81 F6 30 81 F3 A0 03 02 01 05 A1 03 02 01 16 A2 81 BF 30 81 BC 61 5C 30 5A A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A3 25 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 61 5C 30 5A A0 03 02 01 05 A1 10 1B 0E 41 54 48 45 4E 41 2E 4D 49 54 2E 45 44 55 A2 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 A3 25 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 A3 25 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",decode_krb5_cred,ktest_equal_cred,krb5_free_cred);
ktest_empty_cred(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_enc_cred_part */
{
@@ -678,7 +678,7 @@ int main(argc, argv)
ktest_empty_cred_enc_part(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_error */
{
@@ -693,7 +693,7 @@ int main(argc, argv)
ktest_empty_error(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_authdata */
{
@@ -715,7 +715,7 @@ int main(argc, argv)
krb5_free_authdata(test_context, var);
ktest_destroy_authorization_data(&ref);
}
-
+
/****************************************************************/
/* decode_pwd_sequence */
{
@@ -753,7 +753,7 @@ int main(argc, argv)
krb5_free_data_contents(test_context, &code);
ktest_destroy_pa_data_array(&ref);
}
-
+
/****************************************************************/
/* decode_krb5_padata_sequence (empty) */
{
@@ -775,7 +775,7 @@ int main(argc, argv)
krb5_free_data_contents(test_context, &code);
ktest_destroy_pa_data_array(&ref);
}
-
+
/****************************************************************/
/* decode_pwd_sequence */
{
@@ -812,7 +812,7 @@ int main(argc, argv)
ktest_destroy_etype_info_entry(ref[2]); ref[2] = 0;
ktest_destroy_etype_info_entry(ref[1]); ref[1] = 0;
krb5_free_data_contents(test_context, &code);
-
+
retval = krb5_data_hex_parse(&code,"30 16 30 14 A0 03 02 01 00 A1 0D 04 0B 4D 6F 72 74 6F 6E 27 73 20 23 30");
if (retval) {
com_err("krb5_decode_test", retval,
@@ -825,11 +825,11 @@ int main(argc, argv)
"while decoding etype_info (only one)");
}
test(ktest_equal_etype_info(ref,var),"etype_info (only one)\n");
-
+
ktest_destroy_etype_info(var);
ktest_destroy_etype_info_entry(ref[0]); ref[0] = 0;
krb5_free_data_contents(test_context, &code);
-
+
retval = krb5_data_hex_parse(&code,"30 00");
if (retval) {
com_err("krb5_decode_test", retval,
@@ -856,7 +856,7 @@ int main(argc, argv)
ref.pausec = 0;
decode_run("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",decode_krb5_pa_enc_ts,ktest_equal_krb5_pa_enc_ts,krb5_free_pa_enc_ts);
}
-
+
/****************************************************************/
/* decode_enc_data */
{
@@ -864,7 +864,7 @@ int main(argc, argv)
decode_run("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",decode_krb5_enc_data,ktest_equal_enc_data,krb5_ktest_free_enc_data);
ktest_destroy_enc_data(&ref);
}
-
+
/****************************************************************/
/* decode_sam_challenge */
{
@@ -873,7 +873,7 @@ int main(argc, argv)
ktest_empty_sam_challenge(&ref);
}
-
+
/****************************************************************/
/* decode_sam_challenge */
{
@@ -881,7 +881,7 @@ int main(argc, argv)
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_response */
{
@@ -931,7 +931,7 @@ void krb5_ktest_free_alt_method(krb5_context context, krb5_alt_method *val)
free(val);
}
-void krb5_ktest_free_pwd_sequence(krb5_context context,
+void krb5_ktest_free_pwd_sequence(krb5_context context,
passwd_phrase_element *val)
{
krb5_free_data(context, val->passwd);
diff --git a/src/tests/asn.1/krb5_encode_test.c b/src/tests/asn.1/krb5_encode_test.c
index c010af9ab..db99f1080 100644
--- a/src/tests/asn.1/krb5_encode_test.c
+++ b/src/tests/asn.1/krb5_encode_test.c
@@ -50,13 +50,13 @@ static void encoder_print_results(code, typestring, description)
free(code_string);
}
ktest_destroy_data(&code);
-}
+}
static void PRS(argc, argv)
int argc;
char **argv;
{
- extern char *optarg;
+ extern char *optarg;
int optchar;
extern int print_types, print_krb5_types, print_id_and_len,
print_constructed_length, print_skip_context,
@@ -95,21 +95,21 @@ main(argc, argv)
krb5_error_code retval;
PRS(argc, argv);
-
+
retval = krb5_init_context(&test_context);
if (retval) {
com_err(argv[0], retval, "while initializing krb5");
exit(1);
}
init_access(argv[0]);
-
+
#define setup(value,type,typestring,constructor) \
retval = constructor(&(value)); \
if (retval) { \
com_err("krb5_encode_test", retval, "while making sample %s", typestring); \
exit(1); \
}
-
+
#define encode_run(value,type,typestring,description,encoder) \
retval = encoder(&(value),&(code)); \
if (retval) { \
@@ -117,7 +117,7 @@ main(argc, argv)
exit(1); \
} \
encoder_print_results(code, typestring, description);
-
+
/****************************************************************/
/* encode_krb5_authenticator */
{
@@ -136,7 +136,7 @@ main(argc, argv)
encode_run(authent,authenticator,"authenticator","(optionals NULL)",encode_krb5_authenticator);
ktest_empty_authenticator(&authent);
}
-
+
/****************************************************************/
/* encode_krb5_ticket */
{
@@ -154,8 +154,8 @@ main(argc, argv)
current_appl_type = 1005;
encode_run(keyblk,keyblock,"keyblock","",encode_krb5_encryption_key);
ktest_empty_keyblock(&keyblk);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_enc_tkt_part */
{
@@ -164,69 +164,69 @@ main(argc, argv)
tkt.enc_part2 = (krb5_enc_tkt_part*)calloc(1,sizeof(krb5_enc_tkt_part));
if (tkt.enc_part2 == NULL) com_err("allocating enc_tkt_part",errno,"");
setup(*(tkt.enc_part2),enc_tkt_part,"enc_tkt_part",ktest_make_sample_enc_tkt_part);
-
+
encode_run(*(tkt.enc_part2),enc_tkt_part,"enc_tkt_part","",encode_krb5_enc_tkt_part);
-
+
tkt.enc_part2->times.starttime = 0;
tkt.enc_part2->times.renew_till = 0;
ktest_destroy_address(&(tkt.enc_part2->caddrs[1]));
ktest_destroy_address(&(tkt.enc_part2->caddrs[0]));
ktest_destroy_authdata(&(tkt.enc_part2->authorization_data[1]));
ktest_destroy_authdata(&(tkt.enc_part2->authorization_data[0]));
-
+
/* ISODE version fails on the empty caddrs field */
ktest_destroy_addresses(&(tkt.enc_part2->caddrs));
ktest_destroy_authorization_data(&(tkt.enc_part2->authorization_data));
-
+
encode_run(*(tkt.enc_part2),enc_tkt_part,"enc_tkt_part","(optionals NULL)",encode_krb5_enc_tkt_part);
ktest_empty_ticket(&tkt);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_enc_kdc_rep_part */
{
krb5_kdc_rep kdcr;
memset(&kdcr, 0, sizeof(kdcr));
-
+
kdcr.enc_part2 = (krb5_enc_kdc_rep_part*)
calloc(1,sizeof(krb5_enc_kdc_rep_part));
if (kdcr.enc_part2 == NULL) com_err("allocating enc_kdc_rep_part",errno,"");
setup(*(kdcr.enc_part2),enc_kdc_rep_part,"enc_kdc_rep_part",ktest_make_sample_enc_kdc_rep_part);
-
+
encode_run(*(kdcr.enc_part2),enc_kdc_rep_part,"enc_kdc_rep_part","",encode_krb5_enc_kdc_rep_part);
-
+
kdcr.enc_part2->key_exp = 0;
kdcr.enc_part2->times.starttime = 0;
kdcr.enc_part2->flags &= ~TKT_FLG_RENEWABLE;
ktest_destroy_addresses(&(kdcr.enc_part2->caddrs));
-
+
encode_run(*(kdcr.enc_part2),enc_kdc_rep_part,"enc_kdc_rep_part","(optionals NULL)",encode_krb5_enc_kdc_rep_part);
ktest_empty_kdc_rep(&kdcr);
- }
+ }
/****************************************************************/
/* encode_krb5_as_rep */
{
krb5_kdc_rep kdcr;
setup(kdcr,kdc_rep,"kdc_rep",ktest_make_sample_kdc_rep);
-
+
/* kdcr.msg_type = KRB5_TGS_REP;
test(encode_krb5_as_rep(&kdcr,&code) == KRB5_BADMSGTYPE,
"encode_krb5_as_rep type check\n");
ktest_destroy_data(&code);*/
-
+
kdcr.msg_type = KRB5_AS_REP;
encode_run(kdcr,as_rep,"as_rep","",encode_krb5_as_rep);
-
+
ktest_destroy_pa_data_array(&(kdcr.padata));
encode_run(kdcr,as_rep,"as_rep","(optionals NULL)",encode_krb5_as_rep);
ktest_empty_kdc_rep(&kdcr);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_tgs_rep */
{
@@ -236,7 +236,7 @@ main(argc, argv)
/* kdcr.msg_type = KRB5_AS_REP;
test(encode_krb5_tgs_rep(&kdcr,&code) == KRB5_BADMSGTYPE,
"encode_krb5_tgs_rep type check\n");*/
-
+
kdcr.msg_type = KRB5_TGS_REP;
encode_run(kdcr,tgs_rep,"tgs_rep","",encode_krb5_tgs_rep);
@@ -245,8 +245,8 @@ main(argc, argv)
ktest_empty_kdc_rep(&kdcr);
- }
-
+ }
+
/****************************************************************/
/* encode_krb5_ap_req */
{
@@ -254,7 +254,7 @@ main(argc, argv)
setup(apreq,ap_req,"ap_req",ktest_make_sample_ap_req);
encode_run(apreq,ap_req,"ap_req","",encode_krb5_ap_req);
ktest_empty_ap_req(&apreq);
- }
+ }
/****************************************************************/
/* encode_krb5_ap_rep */
@@ -263,7 +263,7 @@ main(argc, argv)
setup(aprep,ap_rep,"ap_rep",ktest_make_sample_ap_rep);
encode_run(aprep,ap_rep,"ap_rep","",encode_krb5_ap_rep);
ktest_empty_ap_rep(&aprep);
- }
+ }
/****************************************************************/
/* encode_krb5_ap_rep_enc_part */
@@ -271,13 +271,13 @@ main(argc, argv)
krb5_ap_rep_enc_part apenc;
setup(apenc,ap_rep_enc_part,"ap_rep_enc_part",ktest_make_sample_ap_rep_enc_part);
encode_run(apenc,ap_rep_enc_part,"ap_rep_enc_part","",encode_krb5_ap_rep_enc_part);
-
+
ktest_destroy_keyblock(&(apenc.subkey));
apenc.seq_number = 0;
encode_run(apenc,ap_rep_enc_part,"ap_rep_enc_part","(optionals NULL)",encode_krb5_ap_rep_enc_part);
ktest_empty_ap_rep_enc_part(&apenc);
}
-
+
/****************************************************************/
/* encode_krb5_as_req */
{
@@ -306,7 +306,7 @@ main(argc, argv)
encode_run(asreq,as_req,"as_req","(optionals NULL except server)",encode_krb5_as_req);
ktest_empty_kdc_req(&asreq);
}
-
+
/****************************************************************/
/* encode_krb5_tgs_req */
{
@@ -337,7 +337,7 @@ main(argc, argv)
ktest_empty_kdc_req(&tgsreq);
}
-
+
/****************************************************************/
/* encode_krb5_kdc_req_body */
{
@@ -370,7 +370,7 @@ main(argc, argv)
ktest_empty_kdc_req(&kdcrb);
}
-
+
/****************************************************************/
/* encode_krb5_safe */
{
@@ -386,7 +386,7 @@ main(argc, argv)
ktest_empty_safe(&s);
}
-
+
/****************************************************************/
/* encode_krb5_priv */
{
@@ -395,7 +395,7 @@ main(argc, argv)
encode_run(p,priv,"priv","",encode_krb5_priv);
ktest_empty_priv(&p);
}
-
+
/****************************************************************/
/* encode_krb5_enc_priv_part */
{
@@ -411,7 +411,7 @@ main(argc, argv)
ktest_empty_priv_enc_part(&ep);
}
-
+
/****************************************************************/
/* encode_krb5_cred */
{
@@ -420,7 +420,7 @@ main(argc, argv)
encode_run(c,cred,"cred","",encode_krb5_cred);
ktest_empty_cred(&c);
}
-
+
/****************************************************************/
/* encode_krb5_enc_cred_part */
{
@@ -444,7 +444,7 @@ main(argc, argv)
ktest_empty_cred_enc_part(&cep);
}
-
+
/****************************************************************/
/* encode_krb5_error */
{
@@ -460,7 +460,7 @@ main(argc, argv)
ktest_empty_error(&kerr);
}
-
+
/****************************************************************/
/* encode_krb5_authdata */
{
@@ -477,7 +477,7 @@ main(argc, argv)
ktest_destroy_authorization_data(&ad);
}
-
+
/****************************************************************/
/* encode_pwd_sequence */
{
@@ -500,7 +500,7 @@ main(argc, argv)
/* encode_padata_sequence */
{
krb5_pa_data **pa;
-
+
setup(pa,krb5_pa_data,"PreauthData",ktest_make_sample_pa_data_array);
retval = encode_krb5_padata_sequence(pa,&(code));
if (retval) {
@@ -508,7 +508,7 @@ main(argc, argv)
exit(1);
}
encoder_print_results(code, "padata_sequence", "");
-
+
ktest_destroy_pa_data_array(&pa);
}
@@ -516,7 +516,7 @@ main(argc, argv)
/* encode_padata_sequence (empty) */
{
krb5_pa_data **pa;
-
+
setup(pa,krb5_pa_data,"EmptyPreauthData",ktest_make_sample_empty_pa_data_array);
retval = encode_krb5_padata_sequence(pa,&(code));
if (retval) {
@@ -547,7 +547,7 @@ main(argc, argv)
/* encode_etype_info */
{
krb5_etype_info_entry **info;
-
+
setup(info,krb5_etype_info_entry **,"etype_info",
ktest_make_sample_etype_info);
retval = encode_krb5_etype_info(info,&(code));
@@ -567,7 +567,7 @@ main(argc, argv)
encoder_print_results(code, "etype_info (only 1)", "");
ktest_destroy_etype_info_entry(info[0]); info[0] = 0;
-
+
retval = encode_krb5_etype_info(info,&(code));
if (retval) {
com_err("encoding etype_info (no info)",retval,"");
@@ -581,7 +581,7 @@ main(argc, argv)
/* encode_etype_info 2*/
{
krb5_etype_info_entry **info;
-
+
setup(info,krb5_etype_info_entry **,"etype_info2",
ktest_make_sample_etype_info2);
retval = encode_krb5_etype_info2(info,&(code));
@@ -602,7 +602,7 @@ main(argc, argv)
ktest_destroy_etype_info(info);
/* ktest_destroy_etype_info_entry(info[0]); info[0] = 0;*/
-
+
}
/****************************************************************/
diff --git a/src/tests/asn.1/ktest.c b/src/tests/asn.1/ktest.c
index f41347c0f..6ca9652ab 100644
--- a/src/tests/asn.1/ktest.c
+++ b/src/tests/asn.1/ktest.c
@@ -404,7 +404,7 @@ krb5_error_code ktest_make_sample_kdc_req_body(krb)
if (retval) return retval;
return 0;
}
-
+
krb5_error_code ktest_make_sample_safe(s)
krb5_safe * s;
{
@@ -765,7 +765,7 @@ krb5_error_code ktest_make_sample_sam_response(p)
p->sam_enc_key.kvno = 1942;
p->sam_enc_nonce_or_ts.ciphertext.data = strdup("nonce or ts");
if (p->sam_enc_nonce_or_ts.ciphertext.data == NULL) return ENOMEM;
- p->sam_enc_nonce_or_ts.ciphertext.length =
+ p->sam_enc_nonce_or_ts.ciphertext.length =
strlen(p->sam_enc_nonce_or_ts.ciphertext.data);
p->sam_enc_nonce_or_ts.enctype = ENCTYPE_DES_CBC_CRC;
p->sam_enc_nonce_or_ts.kvno = 3382;
@@ -785,7 +785,7 @@ krb5_error_code ktest_make_sample_sam_response_2(p)
p->sam_track_id.length = strlen(p->sam_track_id.data);
p->sam_enc_nonce_or_sad.ciphertext.data = strdup("nonce or sad");
if (p->sam_enc_nonce_or_sad.ciphertext.data == NULL) return ENOMEM;
- p->sam_enc_nonce_or_sad.ciphertext.length =
+ p->sam_enc_nonce_or_sad.ciphertext.length =
strlen(p->sam_enc_nonce_or_sad.ciphertext.data);
p->sam_enc_nonce_or_sad.enctype = ENCTYPE_DES_CBC_CRC;
p->sam_enc_nonce_or_sad.kvno = 3382;
@@ -931,7 +931,7 @@ void ktest_empty_data(d)
d->data = NULL;
d->length = 0;
}
-}
+}
void ktest_destroy_checksum(cs)
krb5_checksum ** cs;
@@ -1038,7 +1038,7 @@ void ktest_empty_addresses(a)
for (i=0; a[i] != NULL; i++)
ktest_destroy_address(&(a[i]));
-}
+}
void ktest_destroy_addresses(a)
krb5_address *** a;
@@ -1096,7 +1096,7 @@ void ktest_destroy_ticket(tkt)
/* ktest_empty_enc_tkt_part(((*tkt)->enc_part2));*/
free(*tkt);
*tkt = NULL;
-}
+}
void ktest_empty_ticket(tkt)
krb5_ticket * tkt;
@@ -1107,7 +1107,7 @@ void ktest_empty_ticket(tkt)
if (tkt->enc_part2) {
ktest_destroy_enc_tkt_part(&(tkt->enc_part2));
}
-}
+}
void ktest_destroy_enc_data(ed)
krb5_enc_data * ed;
@@ -1134,7 +1134,7 @@ void ktest_destroy_etype_info(info)
ktest_destroy_etype_info_entry(info[i]);
free(info);
}
-
+
void ktest_empty_kdc_req(kr)
krb5_kdc_req *kr;
@@ -1185,7 +1185,7 @@ void ktest_empty_authenticator(a)
krb5_authenticator * a;
{
- if (a->client)
+ if (a->client)
ktest_destroy_principal(&(a->client));
if (a->checksum)
ktest_destroy_checksum(&(a->checksum));
@@ -1201,7 +1201,7 @@ void ktest_empty_enc_tkt_part(etp)
if (etp->session)
ktest_destroy_keyblock(&(etp->session));
- if (etp->client)
+ if (etp->client)
ktest_destroy_principal(&(etp->client));
if (etp->caddrs)
ktest_destroy_addresses(&(etp->caddrs));
@@ -1227,7 +1227,7 @@ void ktest_empty_enc_kdc_rep_part(ekr)
if (ekr->session)
ktest_destroy_keyblock(&(ekr->session));
- if (ekr->server)
+ if (ekr->server)
ktest_destroy_principal(&(ekr->server));
if (ekr->caddrs)
@@ -1275,9 +1275,9 @@ void ktest_destroy_cred_info(ci)
{
if ((*ci)->session)
ktest_destroy_keyblock(&((*ci)->session));
- if ((*ci)->client)
+ if ((*ci)->client)
ktest_destroy_principal(&((*ci)->client));
- if ((*ci)->server)
+ if ((*ci)->server)
ktest_destroy_principal(&((*ci)->server));
if ((*ci)->caddrs)
ktest_destroy_addresses(&((*ci)->caddrs));
@@ -1380,7 +1380,7 @@ void ktest_empty_pwd_data(pd)
}
}
free(pd->element);
-
+
}
void ktest_empty_alt_method(am)
diff --git a/src/tests/asn.1/t_trval.c b/src/tests/asn.1/t_trval.c
index 75dcc0caa..d1b261fab 100644
--- a/src/tests/asn.1/t_trval.c
+++ b/src/tests/asn.1/t_trval.c
@@ -3,13 +3,13 @@
*
* Permission to include this software in the Kerberos V5 distribution
* was graciously provided by Trusted Information Systems.
- *
+ *
* Trusted Information Systems makes no representation about the
* suitability of this software for any purpose. It is provided
* "as is" without express or implied warranty.
- *
+ *
* Copyright (C) 1994 Massachusetts Institute of Technology
- *
+ *
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
@@ -28,7 +28,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*/
/* Split out from "#ifdef STANDALONE" code previously in trval.c, so
@@ -67,7 +67,7 @@ int main(argc, argv)
int optflg = 1;
FILE *fp;
int r = 0;
-
+
while (--argc > 0) {
argv++;
if (optflg && *(argv)[0] == '-') {
@@ -102,6 +102,6 @@ int main(argc, argv)
}
}
if (optflg) r = trval(stdin, stdout);
-
+
exit(r);
}
diff --git a/src/tests/asn.1/trval.c b/src/tests/asn.1/trval.c
index 99c0c3846..4d80ed587 100644
--- a/src/tests/asn.1/trval.c
+++ b/src/tests/asn.1/trval.c
@@ -3,13 +3,13 @@
*
* Permission to include this software in the Kerberos V5 distribution
* was graciously provided by Trusted Information Systems.
- *
+ *
* Trusted Information Systems makes no representation about the
* suitability of this software for any purpose. It is provided
* "as is" without express or implied warranty.
- *
+ *
* Copyright (C) 1994 Massachusetts Institute of Technology
- *
+ *
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
@@ -28,7 +28,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*/
/*****************************************************************************
@@ -43,21 +43,21 @@
#define OK 0
#define NOTOK (-1)
-
+
/* IDENTIFIER OCTET = TAG CLASS | FORM OF ENCODING | TAG NUMBER */
-
+
/* TAG CLASSES */
#define ID_CLASS 0xc0 /* bits 8 and 7 */
#define CLASS_UNIV 0x00 /* 0 = universal */
#define CLASS_APPL 0x40 /* 1 = application */
#define CLASS_CONT 0x80 /* 2 = context-specific */
#define CLASS_PRIV 0xc0 /* 3 = private */
-
+
/* FORM OF ENCODING */
#define ID_FORM 0x20 /* bit 6 */
#define FORM_PRIM 0x00 /* 0 = primitive */
#define FORM_CONS 0x20 /* 1 = constructed */
-
+
/* TAG NUMBERS */
#define ID_TAG 0x1f /* bits 5-1 */
#define PRIM_BOOL 0x01 /* Boolean */
@@ -84,17 +84,17 @@
#define DEFN_VISS 0x1a /* Visible string */
#define DEFN_GENS 0x1b /* General string */
#define DEFN_CHRS 0x1c /* Character string */
-
+
#define LEN_XTND 0x80 /* long or indefinite form */
#define LEN_SMAX 127 /* largest short form */
#define LEN_MASK 0x7f /* mask to get number of bytes in length */
#define LEN_INDF (-1) /* indefinite length */
#define KRB5 /* Do krb5 application types */
-
+
int print_types = 0;
int print_id_and_len = 1;
-int print_constructed_length = 1;
+int print_constructed_length = 1;
int print_primitive_length = 1;
int print_skip_context = 0;
int print_skip_tagnum = 1;
@@ -140,7 +140,7 @@ int trval(fin, fout)
int cc, cc2, n1, n2;
int r;
int rlen;
-
+
maxlen = BUFSIZ;
p = (unsigned char *)malloc(maxlen);
len = 0;
@@ -184,10 +184,10 @@ int trval2(fp, enc, len, lev, rlen)
fprintf(fp, "missing id and length octets (%d)\n", len);
return(NOTOK);
}
-
+
fprintf(fp, "\n");
for (l=0; l<lev; l++) fprintf(fp, ". ");
-
+
context_restart:
eid = enc[0];
elen = enc[1];
@@ -196,13 +196,13 @@ context_restart:
fprintf(fp, "%02x ", eid);
fprintf(fp, "%02x ", elen);
}
-
+
if (elen == LEN_XTND) {
fprintf(fp,
"indefinite length encoding not implemented (0x%02x)\n", elen);
return(NOTOK);
}
-
+
xlen = 0;
if (elen & LEN_XTND) {
xlen = elen & LEN_MASK;
@@ -212,12 +212,12 @@ context_restart:
}
elen = decode_len(fp, enc+2, xlen);
}
-
+
if (elen > len - 2 - xlen) {
fprintf(fp, "length too long (%d > %d - 2 - %d)\n", elen, len, xlen);
return(NOTOK);
}
-
+
print_tag_type(fp, eid, lev);
if (print_context_shortcut &&
@@ -241,7 +241,7 @@ context_restart:
*rlen = 2 + xlen + rlen2 + rlen_ext;
break;
}
-
+
return(r);
}
@@ -252,7 +252,7 @@ int decode_len(fp, enc, len)
{
int rlen;
int i;
-
+
if (print_id_and_len)
fprintf(fp, "%02x ", enc[0]);
rlen = enc[0];
@@ -367,9 +367,9 @@ int do_prim(fp, tag, enc, len, lev)
if (print_primitive_length)
fprintf(fp, "<%d>", len);
-
+
width = (80 - (lev * 3) - 8) / 4;
-
+
for (n = 0; n < len; n++) {
if ((n % width) == 0) {
fprintf(fp, "\n");
@@ -501,30 +501,30 @@ struct typestring_table krb5_fields[] = {
{ 1000, 1, "name-string"},
{ 1001, 0, "etype"}, /* Encrypted data */
- { 1001, 1, "kvno"},
+ { 1001, 1, "kvno"},
{ 1001, 2, "cipher"},
{ 1002, 0, "addr-type"}, /* HostAddress */
- { 1002, 1, "address"},
+ { 1002, 1, "address"},
{ 1003, 0, "addr-type"}, /* HostAddresses */
- { 1003, 1, "address"},
+ { 1003, 1, "address"},
{ 1004, 0, "ad-type"}, /* AuthorizationData */
- { 1004, 1, "ad-data"},
+ { 1004, 1, "ad-data"},
{ 1005, 0, "keytype"}, /* EncryptionKey */
- { 1005, 1, "keyvalue"},
+ { 1005, 1, "keyvalue"},
{ 1006, 0, "cksumtype"}, /* Checksum */
{ 1006, 1, "checksum"},
{ 1007, 0, "kdc-options"}, /* KDC-REQ-BODY */
- { 1007, 1, "cname", 1000},
+ { 1007, 1, "cname", 1000},
{ 1007, 2, "realm"},
- { 1007, 3, "sname", 1000},
+ { 1007, 3, "sname", 1000},
{ 1007, 4, "from"},
- { 1007, 5, "till"},
+ { 1007, 5, "till"},
{ 1007, 6, "rtime"},
{ 1007, 7, "nonce"},
{ 1007, 8, "etype"},
@@ -536,9 +536,9 @@ struct typestring_table krb5_fields[] = {
{ 1008, 2, "pa-data"},
{ 1009, 0, "user-data"}, /* KRB-SAFE-BODY */
- { 1009, 1, "timestamp"},
+ { 1009, 1, "timestamp"},
{ 1009, 2, "usec"},
- { 1009, 3, "seq-number"},
+ { 1009, 3, "seq-number"},
{ 1009, 4, "s-address", 1002},
{ 1009, 5, "r-address", 1002},
@@ -546,11 +546,11 @@ struct typestring_table krb5_fields[] = {
{ 1010, 1, "lr-value"},
{ 1011, 0, "key", 1005}, /* KRB-CRED-INFO */
- { 1011, 1, "prealm"},
+ { 1011, 1, "prealm"},
{ 1011, 2, "pname", 1000},
- { 1011, 3, "flags"},
+ { 1011, 3, "flags"},
{ 1011, 4, "authtime"},
- { 1011, 5, "startime"},
+ { 1011, 5, "startime"},
{ 1011, 6, "endtime"},
{ 1011, 7, "renew-till"},
{ 1011, 8, "srealm"},
@@ -619,7 +619,7 @@ struct typestring_table krb5_fields[] = {
{ 15, 0, "pvno"}, /* AP-REP */
{ 15, 1, "msg-type"},
{ 15, 2, "enc-part", 1001},
-
+
{ 20, 0, "pvno"}, /* KRB-SAFE */
{ 20, 1, "msg-type"},
{ 20, 2, "safe-body", 1009},
@@ -646,7 +646,7 @@ struct typestring_table krb5_fields[] = {
{ 25, 9, "srealm"},
{ 25, 10, "sname", 1000},
{ 25, 11, "caddr", 1003},
-
+
{ 26, 0, "key", 1005}, /* EncTGSRepPart */
{ 26, 1, "last-req", 1010},
{ 26, 2, "nonce"},
@@ -659,7 +659,7 @@ struct typestring_table krb5_fields[] = {
{ 26, 9, "srealm"},
{ 26, 10, "sname", 1000},
{ 26, 11, "caddr", 1003},
-
+
{ 27, 0, "ctime"}, /* EncApRepPart */
{ 27, 1, "cusec"},
{ 27, 2, "subkey", 1005},
@@ -692,7 +692,7 @@ struct typestring_table krb5_fields[] = {
{ 30, 10, "sname", 1000},
{ 30, 11, "e-text"},
{ 30, 12, "e-data"},
-
+
{ -1, -1, 0}
};
#endif
@@ -707,7 +707,7 @@ void print_tag_type(fp, eid, lev)
char *str;
fprintf(fp, "[");
-
+
switch(eid & ID_CLASS) {
case CLASS_UNIV:
if (print_types && print_skip_tagnum)
@@ -748,7 +748,7 @@ void print_tag_type(fp, eid, lev)
fprintf(fp, "PRIV %d", tag);
break;
}
-
+
if (print_types && ((eid & ID_CLASS) == CLASS_UNIV)) {
if (do_space)
fputs(" ", fp);
@@ -758,10 +758,9 @@ void print_tag_type(fp, eid, lev)
else
fprintf(fp, "UNIV %d???", eid & ID_TAG);
}
-
+
fprintf(fp, "] ");
-
-}
-/*****************************************************************************/
+}
+/*****************************************************************************/
diff --git a/src/tests/asn.1/utility.c b/src/tests/asn.1/utility.c
index 00d7f6298..1b2e9827b 100644
--- a/src/tests/asn.1/utility.c
+++ b/src/tests/asn.1/utility.c
@@ -13,7 +13,7 @@ asn1_error_code asn1_krb5_data_unparse(code, s)
char ** s;
{
if (*s != NULL) free(*s);
-
+
if (code==NULL) {
*s = strdup("<NULL>");
if (*s == NULL) return ENOMEM;
@@ -105,7 +105,7 @@ void asn1buf_print(buf)
char *s=NULL;
int length;
int i;
-
+
bufcopy.base = bufcopy.next = buf->next;
bufcopy.bound = buf->bound;
length = asn1buf_len(&bufcopy);
diff --git a/src/tests/create/kdb5_mkdums.c b/src/tests/create/kdb5_mkdums.c
index 8e3eae637..2f78a3001 100644
--- a/src/tests/create/kdb5_mkdums.c
+++ b/src/tests/create/kdb5_mkdums.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Edit a KDC database.
*/
@@ -86,7 +86,7 @@ main(argc, argv)
int argc;
char *argv[];
{
- extern char *optarg;
+ extern char *optarg;
int optchar, i, n;
char tmp[4096], tmp2[BUFSIZ], *str_newprinc;
@@ -169,14 +169,14 @@ main(argc, argv)
if ((retval = krb5_get_default_realm(test_context, &cur_realm))) {
com_err(progname, retval, "while retrieving default realm name");
exit(1);
- }
+ }
}
if ((retval = set_dbname_help(progname, dbname)))
exit(retval);
for (n = 1; n <= num_to_create; n++) {
/* build the new principal name */
- /* we can't pick random names because we need to generate all the names
+ /* we can't pick random names because we need to generate all the names
again given a prefix and count to test the db lib and kdb */
(void) snprintf(suffix, suffix_size, "%d", n);
(void) snprintf(tmp, sizeof(tmp), "%s-DEPTH-1", principal_string);
@@ -195,7 +195,7 @@ main(argc, argv)
}
retval = krb5_db_fini(test_context);
- memset(master_keyblock.contents, 0,
+ memset(master_keyblock.contents, 0,
(size_t) master_keyblock.length);
if (retval && retval != KRB5_KDB_DBNOTINITED) {
com_err(progname, retval, "while closing database");
@@ -232,10 +232,10 @@ add_princ(context, str_newprinc)
newentry.max_renewable_life = mblock.max_rlife;
newentry.expiration = mblock.expiration;
newentry.pw_expiration = mblock.expiration;
-
+
/* Add princ to db entry */
if ((retval = krb5_copy_principal(context, newprinc, &newentry.princ))) {
- com_err(progname, retval, "while encoding princ to db entry for '%s'",
+ com_err(progname, retval, "while encoding princ to db entry for '%s'",
princ_name);
krb5_free_principal(context, newprinc);
goto error;
@@ -275,7 +275,7 @@ add_princ(context, str_newprinc)
pwd.length = strlen(princ_name);
pwd.data = princ_name; /* must be able to regenerate */
- if ((retval = krb5_c_string_to_key(context, master_keyblock.enctype,
+ if ((retval = krb5_c_string_to_key(context, master_keyblock.enctype,
&pwd, &salt, &key))) {
com_err(progname,retval,"while converting password to key for '%s'",
princ_name);
@@ -291,10 +291,10 @@ add_princ(context, str_newprinc)
goto error;
}
- if ((retval = krb5_dbekd_encrypt_key_data(context,&master_keyblock,
- &key, NULL, 1,
+ if ((retval = krb5_dbekd_encrypt_key_data(context,&master_keyblock,
+ &key, NULL, 1,
newentry.key_data))) {
- com_err(progname, retval, "while encrypting key for '%s'",
+ com_err(progname, retval, "while encrypting key for '%s'",
princ_name);
free(key.contents);
goto error;
@@ -338,7 +338,7 @@ char *dbname;
/* assemble & parse the master key name */
- if ((retval = krb5_db_setup_mkey_name(test_context, mkey_name, cur_realm,
+ if ((retval = krb5_db_setup_mkey_name(test_context, mkey_name, cur_realm,
0, &master_princ))) {
com_err(pname, retval, "while setting up master key name");
return(1);
@@ -362,8 +362,8 @@ char *dbname;
}
free(scratch.data);
} else {
- if ((retval = krb5_db_fetch_mkey(test_context, master_princ,
- master_keyblock.enctype, manual_mkey,
+ if ((retval = krb5_db_fetch_mkey(test_context, master_princ,
+ master_keyblock.enctype, manual_mkey,
FALSE, 0, NULL, NULL,
&master_keyblock))) {
com_err(pname, retval, "while reading master key");
@@ -391,14 +391,14 @@ char *dbname;
/* Done with args */
free(args[0]);
- if ((retval = krb5_db_verify_master_key(test_context, master_princ,
+ if ((retval = krb5_db_verify_master_key(test_context, master_princ,
IGNORE_VNO, &master_keyblock))){
com_err(pname, retval, "while verifying master key");
(void) krb5_db_fini(test_context);
return(1);
}
nentries = 1;
- if ((retval = krb5_db_get_principal(test_context, master_princ,
+ if ((retval = krb5_db_get_principal(test_context, master_princ,
&master_entry, &nentries, &more))) {
com_err(pname, retval, "while retrieving master entry");
(void) krb5_db_fini(test_context);
@@ -424,4 +424,3 @@ char *dbname;
krb5_db_free_principal(test_context, &master_entry, nentries);
return 0;
}
-
diff --git a/src/tests/dejagnu/t_inetd.c b/src/tests/dejagnu/t_inetd.c
index aa369d4f1..702f0256e 100644
--- a/src/tests/dejagnu/t_inetd.c
+++ b/src/tests/dejagnu/t_inetd.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,15 +22,15 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* A simple program to simulate starting a process from inetd.
*
- * Unlike a proper inetd situation, environment variables are passed
+ * Unlike a proper inetd situation, environment variables are passed
* to the client.
*
* usage: t_inetd port program argv0 ...
- *
+ *
*/
#include "autoconf.h"
@@ -137,4 +137,3 @@ main(argc, argv)
fprintf(stderr, "t_inetd: Could not exec %s\n", path);
exit(1);
}
-
diff --git a/src/tests/dump.c b/src/tests/dump.c
index 1e40ffeda..3f49c46e5 100644
--- a/src/tests/dump.c
+++ b/src/tests/dump.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Dump out a krb5_data to stderr (for debugging purposes).
*/
@@ -39,5 +39,5 @@ void dump_data (data)
fprintf(stderr, "%02x ", ptr[i]);
if ((i % 16) == 15) fprintf(stderr, "\n");
}
- fprintf(stderr, "\n");
+ fprintf(stderr, "\n");
}
diff --git a/src/tests/gss-threads/gss-client.c b/src/tests/gss-threads/gss-client.c
index 1057c05c4..098718400 100644
--- a/src/tests/gss-threads/gss-client.c
+++ b/src/tests/gss-threads/gss-client.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -110,7 +110,7 @@ static int get_server_info(host, port)
fprintf(stderr, "Unknown host: %s\n", host);
return -1;
}
-
+
saddr.sin_family = hp->h_addrtype;
memcpy(&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr));
saddr.sin_port = htons(port);
@@ -171,13 +171,13 @@ static int connect_to_server()
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* service_name is imported as a GSS-API name and a GSS-API context is
* established with the corresponding service; the service should be
* listening on the TCP connection s. The default GSS-API mechanism
* is used, and mutual authentication and replay detection are
* requested.
- *
+ *
* If successful, the context handle is returned in context. If
* unsuccessful, the GSS-API error messages are displayed on stderr
* and -1 is returned.
@@ -211,7 +211,7 @@ static int client_establish_context(s, service_name, gss_flags, auth_flag,
display_status("parsing name", maj_stat, min_stat);
return -1;
}
-
+
if (!v1_format) {
if (send_token(s, TOKEN_NOOP|TOKEN_CONTEXT_NEXT, empty_token) < 0) {
(void) gss_release_name(&min_stat, &target_name);
@@ -228,13 +228,13 @@ static int client_establish_context(s, service_name, gss_flags, auth_flag,
* transmitted to the server; every received token is stored in
* recv_tok, which token_ptr is then set to, to be processed by
* the next call to gss_init_sec_context.
- *
+ *
* GSS-API guarantees that send_tok's length will be non-zero
* if and only if the server is expecting another token from us,
* and that gss_init_sec_context returns GSS_S_CONTINUE_NEEDED if
* and only if the server has another token to send us.
*/
-
+
token_ptr = GSS_C_NO_BUFFER;
*gss_context = GSS_C_NO_CONTEXT;
@@ -273,7 +273,7 @@ static int client_establish_context(s, service_name, gss_flags, auth_flag,
}
}
(void) gss_release_buffer(&min_stat, &send_tok);
-
+
if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED) {
display_status("initializing context", maj_stat,
init_sec_min_stat);
@@ -283,7 +283,7 @@ static int client_establish_context(s, service_name, gss_flags, auth_flag,
GSS_C_NO_BUFFER);
return -1;
}
-
+
if (maj_stat == GSS_S_CONTINUE_NEEDED) {
if (verbose)
printf("continue needed...");
@@ -313,7 +313,7 @@ static void read_file(file_name, in_buf)
{
int fd, count;
struct stat stat_buf;
-
+
if ((fd = open(file_name, O_RDONLY, 0)) < 0) {
perror("open");
fprintf(stderr, "Couldn't open file %s\n", file_name);
@@ -371,7 +371,7 @@ static void read_file(file_name, in_buf)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* call_server opens a TCP connection to <host:port> and establishes a
* GSS-API context with service_name over the connection. It then
* seals msg in a GSS-API token with gss_wrap, sends it to the server,
@@ -605,7 +605,7 @@ static void parse_oid(char *mechanism, gss_OID *oid)
char *mechstr = 0, *cp;
gss_buffer_desc tok;
OM_uint32 maj_stat, min_stat;
-
+
if (isdigit((int) mechanism[0])) {
if (asprintf(&mechstr, "{ %s }", mechanism) < 0) {
fprintf(stderr, "Couldn't allocate mechanism scratch!\n");
@@ -773,13 +773,13 @@ int main(argc, argv)
argc--; argv++;
if (!argc) usage();
mechanism = *argv;
- }
+ }
#if defined(_WIN32) || 1
else if (strcmp(*argv, "-threads") == 0) {
argc--; argv++;
if (!argc) usage();
max_threads = atoi(*argv);
- }
+ }
#endif
else if (strcmp(*argv, "-d") == 0) {
gss_flags |= GSS_C_DELEG_FLAG;
@@ -871,7 +871,7 @@ int main(argc, argv)
if (oid != GSS_C_NULL_OID)
(void) gss_release_oid(&min_stat, &oid);
-
+
#ifdef _WIN32
CleanupHandles();
#else
diff --git a/src/tests/gss-threads/gss-misc.c b/src/tests/gss-threads/gss-misc.c
index 27a8af6a5..c456f4944 100644
--- a/src/tests/gss-threads/gss-misc.c
+++ b/src/tests/gss-threads/gss-misc.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -184,8 +184,8 @@ int send_token(s, flags, tok)
return -1;
} else if (ret != 4) {
if (display_file)
- fprintf(display_file,
- "sending token length: %d of %d bytes written\n",
+ fprintf(display_file,
+ "sending token length: %d of %d bytes written\n",
ret, 4);
return -1;
}
@@ -196,12 +196,12 @@ int send_token(s, flags, tok)
return -1;
} else if (ret != tok->length) {
if (display_file)
- fprintf(display_file,
- "sending token data: %d of %d bytes written\n",
+ fprintf(display_file,
+ "sending token data: %d of %d bytes written\n",
ret, (int) tok->length);
return -1;
}
-
+
return 0;
}
@@ -219,7 +219,7 @@ int send_token(s, flags, tok)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* recv_token reads the token flags (a single byte, even though
* they're stored into an integer, then reads the token length (as a
* network long), allocates memory to hold the data, and then reads
@@ -257,8 +257,8 @@ int recv_token(s, flags, tok)
return -1;
} else if (ret != 3) {
if (display_file)
- fprintf(display_file,
- "reading token length: %d of %d bytes read\n",
+ fprintf(display_file,
+ "reading token length: %d of %d bytes read\n",
ret, 3);
return -1;
}
@@ -270,8 +270,8 @@ int recv_token(s, flags, tok)
return -1;
} else if (ret != 4) {
if (display_file)
- fprintf(display_file,
- "reading token length: %d of %d bytes read\n",
+ fprintf(display_file,
+ "reading token length: %d of %d bytes read\n",
ret, 4);
return -1;
}
@@ -284,7 +284,7 @@ int recv_token(s, flags, tok)
tok->value = (char *) malloc(tok->length ? tok->length : 1);
if (tok->length && tok->value == NULL) {
if (display_file)
- fprintf(display_file,
+ fprintf(display_file,
"Out of memory allocating token data\n");
return -1;
}
@@ -295,7 +295,7 @@ int recv_token(s, flags, tok)
free(tok->value);
return -1;
} else if (ret != tok->length) {
- fprintf(stderr, "sending token data: %d of %d bytes written\n",
+ fprintf(stderr, "sending token data: %d of %d bytes written\n",
ret, (int) tok->length);
free(tok->value);
return -1;
@@ -312,7 +312,7 @@ static void display_status_1(m, code, type)
OM_uint32 maj_stat, min_stat;
gss_buffer_desc msg;
OM_uint32 msg_ctx;
-
+
msg_ctx = 0;
while (1) {
maj_stat = gss_display_status(&min_stat, code,
@@ -320,9 +320,9 @@ static void display_status_1(m, code, type)
&msg_ctx, &msg);
if (display_file)
fprintf(display_file, "GSS-API error %s: %s\n", m,
- (char *)msg.value);
+ (char *)msg.value);
(void) gss_release_buffer(&min_stat, &msg);
-
+
if (!msg_ctx)
break;
}
diff --git a/src/tests/gss-threads/gss-misc.h b/src/tests/gss-threads/gss-misc.h
index 35b3b7390..77d8190f9 100644
--- a/src/tests/gss-threads/gss-misc.h
+++ b/src/tests/gss-threads/gss-misc.h
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/src/tests/gss-threads/gss-server.c b/src/tests/gss-threads/gss-server.c
index bc22f83e5..a751bf209 100644
--- a/src/tests/gss-threads/gss-server.c
+++ b/src/tests/gss-threads/gss-server.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -116,7 +116,7 @@ static int server_acquire_creds(service_name, server_creds)
name_buf.value = service_name;
name_buf.length = strlen(name_buf.value) + 1;
- maj_stat = gss_import_name(&min_stat, &name_buf,
+ maj_stat = gss_import_name(&min_stat, &name_buf,
(gss_OID) gss_nt_service_name, &server_name);
if (maj_stat != GSS_S_COMPLETE) {
display_status("importing name", maj_stat, min_stat);
@@ -159,7 +159,7 @@ static int server_acquire_creds(service_name, server_creds)
* in client_name and 0 is returned. If unsuccessful, an error
* message is displayed and -1 is returned.
*/
-static int server_establish_context(s, server_creds, context, client_name,
+static int server_establish_context(s, server_creds, context, client_name,
ret_flags)
int s;
gss_cred_id_t server_creds;
@@ -242,7 +242,7 @@ static int server_establish_context(s, server_creds, context, client_name,
GSS_C_NO_BUFFER);
return -1;
}
-
+
if (verbose && logfile) {
if (maj_stat == GSS_S_CONTINUE_NEEDED)
fprintf(logfile, "continue needed...\n");
@@ -309,7 +309,7 @@ static int create_socket(port)
struct sockaddr_in saddr;
int s;
int on = 1;
-
+
saddr.sin_family = AF_INET;
saddr.sin_port = htons(port);
saddr.sin_addr.s_addr = INADDR_ANY;
@@ -351,7 +351,7 @@ static int test_import_export_context(context)
OM_uint32 min_stat, maj_stat;
gss_buffer_desc context_token, copied_token;
struct timeval tm1, tm2;
-
+
/*
* Attempt to save and then restore the context.
*/
@@ -364,7 +364,7 @@ static int test_import_export_context(context)
gettimeofday(&tm2, (struct timezone *)0);
if (verbose && logfile)
fprintf(logfile, "Exported context: %d bytes, %7.4f seconds\n",
- (int) context_token.length,
+ (int) context_token.length,
timeval_subtract(&tm2, &tm1));
copied_token.length = context_token.length;
copied_token.value = malloc(context_token.length);
@@ -400,7 +400,7 @@ static int test_import_export_context(context)
* service_name (r) the ASCII name of the GSS-API service to
* establish a context as
* export (r) whether to test context exporting
- *
+ *
* Returns: -1 on error
*
* Effects:
@@ -506,7 +506,7 @@ static int sign_server(s, server_creds, export)
cp = msg_buf.value;
if ((isprint((int) cp[0]) || isspace((int) cp[0])) &&
(isprint((int) cp[1]) || isspace((int) cp[1]))) {
- fprintf(logfile, "\"%.*s\"\n", (int) msg_buf.length,
+ fprintf(logfile, "\"%.*s\"\n", (int) msg_buf.length,
(char *) msg_buf.value);
} else {
fprintf(logfile, "\n");
@@ -674,7 +674,7 @@ worker_bee(void * param)
struct _work_plan *work = (struct _work_plan *) param;
/* this return value is not checked, because there's
- * not really anything to do if it fails
+ * not really anything to do if it fails
*/
sign_server(work->s, work->server_creds, work->export);
closesocket(work->s);
@@ -709,13 +709,13 @@ main(argc, argv)
argc--; argv++;
if (!argc) usage();
port = atoi(*argv);
- }
+ }
#if defined _WIN32 || 1
else if (strcmp(*argv, "-threads") == 0) {
argc--; argv++;
if (!argc) usage();
max_threads = atoi(*argv);
- }
+ }
#endif
else if (strcmp(*argv, "-verbose") == 0) {
verbose = 1;
@@ -769,7 +769,7 @@ main(argc, argv)
if (server_acquire_creds(service_name, &server_creds) < 0)
return -1;
-
+
if (do_inetd) {
close(1);
close(2);
@@ -796,13 +796,13 @@ main(argc, argv)
perror("accepting connection");
continue;
}
-
+
work->server_creds = server_creds;
work->export = export;
if (max_threads == 1) {
worker_bee((void *)work);
- }
+ }
#if defined _WIN32 || 1
else {
if ( WaitAndIncrementThreadCounter() ) {
diff --git a/src/tests/gssapi/t_imp_name.c b/src/tests/gssapi/t_imp_name.c
index b7001b216..e64a1f559 100644
--- a/src/tests/gssapi/t_imp_name.c
+++ b/src/tests/gssapi/t_imp_name.c
@@ -6,7 +6,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -23,7 +23,7 @@
*
* Simple test program for testing how GSSAPI import name works. (May
* be made into a more full-fledged test program later.)
- *
+ *
*/
#include <unistd.h>
@@ -71,7 +71,7 @@ static int test_import_name(name)
display_status("parsing name", maj_stat, min_stat);
return -1;
}
-
+
maj_stat = gss_display_name(&min_stat, gss_name, &buffer_name,
&name_oid);
if (maj_stat != GSS_S_COMPLETE) {
@@ -99,8 +99,8 @@ static void display_buffer(buffer)
gss_buffer_desc buffer;
{
char *namebuf;
-
- namebuf = malloc(buffer.length+1);
+
+ namebuf = malloc(buffer.length+1);
if (!namebuf) {
fprintf(stderr, "display_buffer: couldn't allocate buffer!\n");
exit(1);
@@ -132,7 +132,7 @@ static void display_status_1(m, code, type)
#else /* GSSAPI_V2 */
int msg_ctx;
#endif /* GSSAPI_V2 */
-
+
msg_ctx = 0;
while (1) {
(void) gss_display_status(&min_stat, code,
@@ -140,11 +140,10 @@ static void display_status_1(m, code, type)
&msg_ctx, &msg);
if (display_file)
fprintf(display_file, "GSS-API error %s: %s\n", m,
- (char *)msg.value);
+ (char *)msg.value);
(void) gss_release_buffer(&min_stat, &msg);
-
+
if (!msg_ctx)
break;
}
}
-
diff --git a/src/tests/gssapi/t_namingexts.c b/src/tests/gssapi/t_namingexts.c
index 3dae0a1c7..1f771c44b 100644
--- a/src/tests/gssapi/t_namingexts.c
+++ b/src/tests/gssapi/t_namingexts.c
@@ -485,4 +485,3 @@ out:
return GSS_ERROR(major) ? 1 : 0;
}
-
diff --git a/src/tests/gssapi/t_s4u.c b/src/tests/gssapi/t_s4u.c
index 394313a68..08cf84f18 100644
--- a/src/tests/gssapi/t_s4u.c
+++ b/src/tests/gssapi/t_s4u.c
@@ -548,4 +548,3 @@ out:
return GSS_ERROR(major) ? 1 : 0;
}
-
diff --git a/src/tests/hammer/kdc5_hammer.c b/src/tests/hammer/kdc5_hammer.c
index d5bab36b4..63ac31e2a 100644
--- a/src/tests/hammer/kdc5_hammer.c
+++ b/src/tests/hammer/kdc5_hammer.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Initialize a credentials cache.
*/
@@ -53,12 +53,12 @@ static char *cur_realm = 0;
static int do_timer = 0;
krb5_data tgtname = {
- 0,
+ 0,
KRB5_TGS_NAME_SIZE,
KRB5_TGS_NAME
};
-int verify_cs_pair
+int verify_cs_pair
(krb5_context,
char *,
krb5_principal,
@@ -67,7 +67,7 @@ int verify_cs_pair
int, int, int,
krb5_ccache);
-int get_tgt
+int get_tgt
(krb5_context,
char *,
krb5_principal *,
@@ -171,7 +171,7 @@ main(argc, argv)
case 'c':
if (ccache == NULL) {
cache_name = optarg;
-
+
code = krb5_cc_resolve (test_context, cache_name, &ccache);
if (code != 0) {
com_err (prog, code, "resolving %s", cache_name);
@@ -195,7 +195,7 @@ main(argc, argv)
if ((retval = krb5_get_default_realm(test_context, &cur_realm))) {
com_err(prog, retval, "while retrieving default realm name");
exit(1);
- }
+ }
}
if (ccache == NULL) {
@@ -213,7 +213,7 @@ main(argc, argv)
for (n = 1; n <= num_to_check; n++) {
/* build the new principal name */
- /* we can't pick random names because we need to generate all the names
+ /* we can't pick random names because we need to generate all the names
again given a prefix and count to test the db lib and kdb */
ctmp[0] = '\0';
for (i = 1; i <= depth; i++) {
@@ -239,7 +239,7 @@ main(argc, argv)
strncat(stmp, stmp2, sizeof(stmp) - 1 - strlen(stmp));
stmp[sizeof(stmp) - 1] = '\0';
snprintf(server, sizeof(server), "%s@%s", stmp, cur_realm);
- if (verify_cs_pair(test_context, client, client_princ,
+ if (verify_cs_pair(test_context, client, client_princ,
stmp, cur_realm, n, i, j, ccache))
errors++;
n_tried++;
@@ -251,7 +251,7 @@ main(argc, argv)
fprintf (stderr, "\nTried %d. Got %d errors.\n", n_tried, errors);
if (do_timer) {
if (in_tkt_times.ht_observations)
- fprintf(stderr,
+ fprintf(stderr,
"%8d AS_REQ requests: %9.6f average (min: %9.6f, max:%9.6f)\n",
in_tkt_times.ht_observations,
in_tkt_times.ht_cumulative /
@@ -259,7 +259,7 @@ main(argc, argv)
in_tkt_times.ht_min,
in_tkt_times.ht_max);
if (tgs_req_times.ht_observations)
- fprintf(stderr,
+ fprintf(stderr,
"%8d TGS_REQ requests: %9.6f average (min: %9.6f, max:%9.6f)\n",
tgs_req_times.ht_observations,
tgs_req_times.ht_cumulative /
@@ -276,7 +276,7 @@ main(argc, argv)
}
-static krb5_error_code
+static krb5_error_code
get_server_key(context, server, enctype, key)
krb5_context context;
krb5_principal server;
@@ -302,7 +302,7 @@ get_server_key(context, server, enctype, key)
krb5_use_enctype(context, &eblock, enctype);
if ((retval = krb5_string_to_key(context, &eblock, *key, &pwd, &salt)))
free(*key);
- } else
+ } else
retval = ENOMEM;
free(string);
@@ -312,7 +312,7 @@ cleanup_salt:
return retval;
}
-int verify_cs_pair(context, p_client_str, p_client, service, hostname,
+int verify_cs_pair(context, p_client_str, p_client, service, hostname,
p_num, c_depth, s_depth, ccache)
krb5_context context;
char *p_client_str;
@@ -333,10 +333,10 @@ int verify_cs_pair(context, p_client_str, p_client, service, hostname,
float dt;
if (brief)
- fprintf(stderr, "\tprinc (%d) client (%d) for server (%d)\n",
+ fprintf(stderr, "\tprinc (%d) client (%d) for server (%d)\n",
p_num, c_depth, s_depth);
else
- fprintf(stderr, "\tclient %s for server %s\n", p_client_str,
+ fprintf(stderr, "\tclient %s for server %s\n", p_client_str,
service);
/* Initialize variables */
@@ -398,9 +398,9 @@ int verify_cs_pair(context, p_client_str, p_client, service, hostname,
goto cleanup_keyblock;
}
- if ((retval = krb5_rd_req(context, &auth_context, &request_data,
- NULL /* server */, 0, NULL, &ticket))) {
- com_err(prog, retval, "while decoding AP_REQ for %s", hostname);
+ if ((retval = krb5_rd_req(context, &auth_context, &request_data,
+ NULL /* server */, 0, NULL, &ticket))) {
+ com_err(prog, retval, "while decoding AP_REQ for %s", hostname);
krb5_auth_con_free(context, auth_context);
goto cleanup_keyblock;
}
@@ -419,9 +419,9 @@ int verify_cs_pair(context, p_client_str, p_client, service, hostname,
if (!(krb5_principal_compare(context,ticket->enc_part2->client,p_client))){
char *returned_client;
- if ((retval = krb5_unparse_name(context, ticket->enc_part2->client,
- &returned_client)))
- com_err (prog, retval,
+ if ((retval = krb5_unparse_name(context, ticket->enc_part2->client,
+ &returned_client)))
+ com_err (prog, retval,
"Client not as expected, but cannot unparse client name");
else
com_err (prog, 0, "Client not as expected (%s).", returned_client);
@@ -467,7 +467,7 @@ int get_tgt (context, p_client_str, p_client, ccache)
}
memset(&my_creds, 0, sizeof(my_creds));
-
+
if ((code = krb5_parse_name (context, p_client_str, p_client))) {
com_err (prog, code, "when parsing name %s", p_client_str);
return(-1);
diff --git a/src/tests/misc/test_getsockname.c b/src/tests/misc/test_getsockname.c
index 5f59da468..6254cca59 100644
--- a/src/tests/misc/test_getsockname.c
+++ b/src/tests/misc/test_getsockname.c
@@ -1,6 +1,6 @@
/*
* test_getsockname.c
- *
+ *
* This routine demonstrates a bug in the socket emulation library of
* Solaris and other monstrosities that uses STREAMS. On other
* machines with a real networking layer, it prints the local
@@ -29,7 +29,7 @@ main(argc, argv)
struct hostent *host;
struct sockaddr_in s_sock; /* server address */
struct sockaddr_in c_sock; /* client address */
-
+
char *hostname;
if (argc == 2) {
@@ -54,7 +54,7 @@ main(argc, argv)
#endif
s_sock.sin_family = AF_INET;
s_sock.sin_port = htons(5555);
-
+
/* Open a socket */
if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("socket");
@@ -69,14 +69,14 @@ main(argc, argv)
perror("bind");
exit(1);
}
-
+
/* "connect" the datagram socket; this is necessary to get a local address
properly bound for getsockname() below. */
if (connect(sock, (struct sockaddr *)&s_sock, sizeof(s_sock)) == -1) {
perror("connect");
exit(1);
}
-
+
/* Get my address */
memset(&c_sock, 0, sizeof(c_sock));
i = sizeof(c_sock);
@@ -86,6 +86,6 @@ main(argc, argv)
}
printf("My interface address is: %s\n", inet_ntoa(c_sock.sin_addr));
-
+
exit(0);
}
diff --git a/src/tests/misc/test_nfold.c b/src/tests/misc/test_nfold.c
index 7a0bffe07..dc26b3958 100644
--- a/src/tests/misc/test_nfold.c
+++ b/src/tests/misc/test_nfold.c
@@ -1,13 +1,13 @@
/*
* Copyright (C) 1998 by the FundsXpress, INC.
- *
+ *
* All rights reserved.
- *
+ *
* Export of this software from the United States of America may require
* a specific license from the United States Government. It is the
* responsibility of any person or organization contemplating export to
* obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -18,7 +18,7 @@
* permission. FundsXpress makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/src/tests/resolve/addrinfo-test.c b/src/tests/resolve/addrinfo-test.c
index dff8df1dd..f011b6ad4 100644
--- a/src/tests/resolve/addrinfo-test.c
+++ b/src/tests/resolve/addrinfo-test.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* A simple program to test the functionality of the getaddrinfo function.
*
@@ -73,7 +73,7 @@ static const char *protoname (int p) {
snprintf(buf, sizeof(buf), " %-2d", p);
return buf;
-}
+}
static const char *socktypename (int t) {
static char buf[30];
diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c
index 0be8244a2..09be1486e 100644
--- a/src/tests/resolve/resolve.c
+++ b/src/tests/resolve/resolve.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,14 +22,14 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* A simple program to test the functionality of the resolver library.
- * It simply will try to get the IP address of the host, and then look
+ * It simply will try to get the IP address of the host, and then look
* up the name from the address. If the resulting name does not contain the
* domain name, then the resolve library is broken.
*
- * Warning: It is possible to fool this program into thinking everything is
+ * Warning: It is possible to fool this program into thinking everything is
* alright byt a clever use of /etc/hosts - but this is better than nothing.
*
* Usage:
@@ -88,7 +88,7 @@ main(argc, argv)
if ((strcmp(*argv, "--quiet") == 0) ||
(strcmp(*argv, "-q") == 0)) {
quiet++;
- } else
+ } else
break;
argc--; argv++;
}
@@ -101,13 +101,13 @@ main(argc, argv)
exit(1);
}
}
-
+
myname[MAXHOSTNAMELEN] = '\0'; /* for safety */
-
+
/* Look up the address... */
if (!quiet)
printf("Hostname: %s\n", myname);
-
+
/* Set the hosts db to close each time - effectively rewinding file */
sethostent(0);
@@ -118,11 +118,11 @@ main(argc, argv)
myname);
exit(2);
}
-
+
ptr = host->h_addr_list[0];
#define UC(a) (((int)a)&0xff)
if (!quiet)
- printf("Host address: %d.%d.%d.%d\n",
+ printf("Host address: %d.%d.%d.%d\n",
UC(ptr[0]), UC(ptr[1]), UC(ptr[2]), UC(ptr[3]));
memcpy(&addrcopy.s_addr, ptr, 4);
@@ -132,12 +132,12 @@ main(argc, argv)
fprintf(stderr, "Error looking up IP address - fatal\n");
exit(2);
}
-
+
if (quiet)
printf("%s\n", host->h_name);
else
printf("FQDN: %s\n", host->h_name);
-
+
/*
* The host name must have at least one '.' in the name, and
* if there is only one '.', it must not be at the end of the
@@ -168,5 +168,3 @@ main(argc, argv)
exit(0);
}
-
-
diff --git a/src/tests/test1.c b/src/tests/test1.c
index bb142ead4..5ecac0ecf 100644
--- a/src/tests/test1.c
+++ b/src/tests/test1.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Regression tests for the kerberos library.
*/
@@ -45,7 +45,7 @@ tkt_test_1()
krb5_address addr_1;
static krb5_octet ip_addr_1[4] = { 18, 72, 0, 122 };
char *out;
-
+
/*
* fill in some values on the "in" side of the ticket
*/
@@ -58,13 +58,13 @@ tkt_test_1()
serv_k.enctype = 1; /* XXX symbolic constant */
serv_k.length = 8; /* XXX symbolic constant */
serv_k.contents = key_one;
-
+
sess_k.enctype = 1; /* XXX symbolic constant */
sess_k.length = 8; /* XXX symbolic constant */
sess_k.contents = key_two;
tk_in.etype = 1; /* XXX symbolic constant here */
- tk_in.skvno = 4;
+ tk_in.skvno = 4;
tk_in.enc_part2 = &tk_in_enc;
@@ -74,7 +74,7 @@ tkt_test_1()
tk_in_enc.times.authtime = 42;
tk_in_enc.times.starttime = 43;
tk_in_enc.times.endtime = 44;
-
+
code = krb5_parse_name ("client/test/1@BOGUS.ORG", &tk_in_enc.client);
if (code != 0) {
com_err("tkt_test_1", code, " parsing client principal");
@@ -89,7 +89,7 @@ tkt_test_1()
addr_list[0] = &addr_1;
addr_list[1] = 0;
-
+
tk_in_enc.caddrs = addr_list;
tk_in_enc.authorization_data = 0;
@@ -99,8 +99,8 @@ tkt_test_1()
return;
}
- data = 0;
-
+ data = 0;
+
code = krb5_encode_ticket (&tk_in, &data);
if (code != 0) {
com_err ("tkt_test_1", code, " encoding ticket");
@@ -136,7 +136,7 @@ tkt_test_1()
}
free(out);
out = 0;
-
+
/* decode the ciphertext */
code = krb5_decrypt_tkt_part (&serv_k, tk_out);
if (code != 0) {
diff --git a/src/tests/threads/gss-perf.c b/src/tests/threads/gss-perf.c
index 5e5fab9e1..5c7cd2fb7 100644
--- a/src/tests/threads/gss-perf.c
+++ b/src/tests/threads/gss-perf.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
diff --git a/src/tests/threads/t_rcache.c b/src/tests/threads/t_rcache.c
index 3a654a4b3..eb94b2eaf 100644
--- a/src/tests/threads/t_rcache.c
+++ b/src/tests/threads/t_rcache.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,8 +22,8 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
+ *
+ *
*
*/
diff --git a/src/tests/verify/kdb5_verify.c b/src/tests/verify/kdb5_verify.c
index 01ba3e32f..a2a0f906f 100644
--- a/src/tests/verify/kdb5_verify.c
+++ b/src/tests/verify/kdb5_verify.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Edit a KDC database.
*/
@@ -86,7 +86,7 @@ main(argc, argv)
int argc;
char *argv[];
{
- extern char *optarg;
+ extern char *optarg;
int optchar, i, n;
char tmp[4096], tmp2[BUFSIZ], *str_princ;
@@ -172,7 +172,7 @@ main(argc, argv)
if ((retval = krb5_get_default_realm(context, &cur_realm))) {
com_err(progname, retval, "while retrieving default realm name");
exit(1);
- }
+ }
}
if ((retval = set_dbname_help(context, progname, dbname)))
exit(retval);
@@ -183,7 +183,7 @@ main(argc, argv)
for (n = 1; n <= num_to_check; n++) {
/* build the new principal name */
- /* we can't pick random names because we need to generate all the names
+ /* we can't pick random names because we need to generate all the names
again given a prefix and count to test the db lib and kdb */
(void) snprintf(suffix, suffix_size, "%d", n);
(void) snprintf(tmp, sizeof(tmp), "%s-DEPTH-1", principal_string);
@@ -256,9 +256,9 @@ check_princ(context, str_princ)
goto out;
}
- if ((retval = krb5_string_to_key(context, &master_encblock,
+ if ((retval = krb5_string_to_key(context, &master_encblock,
&pwd_key, &pwd, &salt))) {
- com_err(progname, retval, "while converting password to key for '%s'",
+ com_err(progname, retval, "while converting password to key for '%s'",
princ_name);
krb5_free_data_contents(context, &salt);
krb5_free_principal(context, princ);
@@ -266,7 +266,7 @@ check_princ(context, str_princ)
}
krb5_free_data_contents(context, &salt);
- if ((retval = krb5_db_get_principal(context, princ, &kdbe,
+ if ((retval = krb5_db_get_principal(context, princ, &kdbe,
&nprincs, &more))) {
com_err(progname, retval, "while attempting to verify principal's existence");
krb5_free_principal(context, princ);
@@ -280,7 +280,7 @@ check_princ(context, str_princ)
goto errout;
}
- if ((retval = krb5_dbekd_decrypt_key_data(context, &master_keyblock,
+ if ((retval = krb5_dbekd_decrypt_key_data(context, &master_keyblock,
kdbe.key_data, &db_key, NULL))) {
com_err(progname, retval, "while decrypting key for '%s'", princ_name);
goto errout;
@@ -295,9 +295,9 @@ errout:
return(-1);
}
else {
- if (memcmp((char *)pwd_key.contents, (char *) db_key.contents,
+ if (memcmp((char *)pwd_key.contents, (char *) db_key.contents,
(size_t) pwd_key.length)) {
- fprintf(stderr, "\t key did not match stored value for %s\n",
+ fprintf(stderr, "\t key did not match stored value for %s\n",
princ_name);
goto errout;
}
@@ -312,13 +312,13 @@ errout:
}
if (kdbe.max_life != mblock.max_life) {
- fprintf(stderr, "\tmax life did not match stored value for %s.\n",
+ fprintf(stderr, "\tmax life did not match stored value for %s.\n",
princ_name);
goto errout;
}
if (kdbe.max_renewable_life != mblock.max_rlife) {
- fprintf(stderr,
+ fprintf(stderr,
"\tmax renewable life did not match stored value for %s.\n",
princ_name);
goto errout;
@@ -383,7 +383,7 @@ set_dbname_help(context, pname, dbname)
com_err(pname, retval, "while calculated master key salt");
return(1);
}
- if ((retval = krb5_string_to_key(context, &master_encblock,
+ if ((retval = krb5_string_to_key(context, &master_encblock,
&master_keyblock, &pwd, &scratch))) {
com_err(pname, retval,
"while transforming master key from password");
@@ -418,14 +418,14 @@ set_dbname_help(context, pname, dbname)
com_err(pname, retval, "while initializing database");
return(1);
}
- if ((retval = krb5_db_verify_master_key(context, master_princ,
+ if ((retval = krb5_db_verify_master_key(context, master_princ,
IGNORE_VNO, &master_keyblock))) {
com_err(pname, retval, "while verifying master key");
(void) krb5_db_fini(context);
return(1);
}
nentries = 1;
- if ((retval = krb5_db_get_principal(context, master_princ, &master_entry,
+ if ((retval = krb5_db_get_principal(context, master_princ, &master_entry,
&nentries, &more))) {
com_err(pname, retval, "while retrieving master entry");
(void) krb5_db_fini(context);
@@ -441,7 +441,7 @@ set_dbname_help(context, pname, dbname)
return(1);
}
- if ((retval = krb5_unparse_name(context, master_princ,
+ if ((retval = krb5_unparse_name(context, master_princ,
&str_master_princ))) {
com_err(pname, retval, "while unparsing master principal");
krb5_db_fini(context);
@@ -471,4 +471,3 @@ set_dbname_help(context, pname, dbname)
krb5_db_free_principal(context, &master_entry, nentries);
return 0;
}
-