svn rev #24589: trunk/src/lib/crypto/crypto_tests/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Dec 28 12:27:15 EST 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24589
Commit By: ghudson
Log Message:
Don't use a krb5 context in t_fork, since we don't set up a krb5.conf
in the crypto test directory's "make check".



Changed Files:
U   trunk/src/lib/crypto/crypto_tests/t_fork.c
Modified: trunk/src/lib/crypto/crypto_tests/t_fork.c
===================================================================
--- trunk/src/lib/crypto/crypto_tests/t_fork.c	2010-12-22 21:00:01 UTC (rev 24588)
+++ trunk/src/lib/crypto/crypto_tests/t_fork.c	2010-12-28 17:27:15 UTC (rev 24589)
@@ -34,7 +34,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-static krb5_context ctx;
+static krb5_context ctx = NULL;
 
 static void
 t(krb5_error_code code)
@@ -65,9 +65,12 @@
     pid_t pid;
     int status;
 
+    /* Seed the PRNG instead of creating a context, so we don't need
+     * krb5.conf. */
+    t(krb5_c_random_seed(ctx, &plain));
+
     /* Create AES and RC4 ciphertexts with random keys.  Use cipher state for
      * RC4. */
-    t(krb5_init_context(&ctx));
     t(krb5_c_make_random_key(ctx, ENCTYPE_AES256_CTS_HMAC_SHA1_96, &kb_aes));
     t(krb5_c_make_random_key(ctx, ENCTYPE_ARCFOUR_HMAC, &kb_rc4));
     t(krb5_k_create_key(ctx, &kb_aes, &key_aes));




More information about the cvs-krb5 mailing list