diff options
Diffstat (limited to 'lib/krb5/test_crypto_wrapping.c')
| -rw-r--r-- | lib/krb5/test_crypto_wrapping.c | 32 | 
1 files changed, 17 insertions, 15 deletions
| diff --git a/lib/krb5/test_crypto_wrapping.c b/lib/krb5/test_crypto_wrapping.c index 1618fdf11797..81905a8eadd7 100644 --- a/lib/krb5/test_crypto_wrapping.c +++ b/lib/krb5/test_crypto_wrapping.c @@ -1,18 +1,18 @@  /* - * Copyright (c) 2005 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden).  - * All rights reserved.  + * Copyright (c) 2005 Kungliga Tekniska Högskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved.   * - * Redistribution and use in source and binary forms, with or without  - * modification, are permitted provided that the following conditions  - * are met:  + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met:   * - * 1. Redistributions of source code must retain the above copyright  - *    notice, this list of conditions and the following disclaimer.  + * 1. Redistributions of source code must retain the above copyright + *    notice, this list of conditions and the following disclaimer.   * - * 2. Redistributions in binary form must reproduce the above copyright  - *    notice, this list of conditions and the following disclaimer in the  - *    documentation and/or other materials provided with the distribution.  + * 2. Redistributions in binary form must reproduce the above copyright + *    notice, this list of conditions and the following disclaimer in the + *    documentation and/or other materials provided with the distribution.   *   * 3. Neither the name of KTH nor the names of its contributors may be   *    used to endorse or promote products derived from this software without @@ -34,8 +34,6 @@  #include <err.h>  #include <getarg.h> -RCSID("$Id: test_crypto_wrapping.c 18809 2006-10-22 07:11:43Z lha $"); -  static void  test_wrapping(krb5_context context,  	      size_t min_size, @@ -124,10 +122,12 @@ main(int argc, char **argv)      krb5_error_code ret;      int i, optidx = 0; -    krb5_enctype enctypes[] = {  +    krb5_enctype enctypes[] = { +#ifdef HEIM_WEAK_CRYPTO  	ETYPE_DES_CBC_CRC,  	ETYPE_DES_CBC_MD4,  	ETYPE_DES_CBC_MD5, +#endif  	ETYPE_DES3_CBC_SHA1,  	ETYPE_ARCFOUR_HMAC_MD5,  	ETYPE_AES128_CTS_HMAC_SHA1_96, @@ -138,7 +138,7 @@ main(int argc, char **argv)      if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))  	usage(1); -     +      if (help_flag)  	usage (0); @@ -155,6 +155,8 @@ main(int argc, char **argv)  	errx (1, "krb5_init_context failed: %d", ret);      for (i = 0; i < sizeof(enctypes)/sizeof(enctypes[0]); i++) { +	krb5_enctype_enable(context, enctypes[i]); +  	test_wrapping(context, 0, 1024, 1, enctypes[i]);  	test_wrapping(context, 1024, 1024 * 100, 1024, enctypes[i]);      } | 
