summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-12-28 17:27:15 +0000
committerGreg Hudson <ghudson@mit.edu>2010-12-28 17:27:15 +0000
commit4e8010a1030e17110776848530070ac587d650fc (patch)
treec2f4914d97260b52a69589a74041ebbf90ac17d7 /src
parentde6b1720991641529071b73a35542d305460e026 (diff)
downloadkrb5-4e8010a1030e17110776848530070ac587d650fc.tar.gz
krb5-4e8010a1030e17110776848530070ac587d650fc.tar.xz
krb5-4e8010a1030e17110776848530070ac587d650fc.zip
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". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24589 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/crypto/crypto_tests/t_fork.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/crypto/crypto_tests/t_fork.c b/src/lib/crypto/crypto_tests/t_fork.c
index 3a57cb4e0..e1be288da 100644
--- a/src/lib/crypto/crypto_tests/t_fork.c
+++ b/src/lib/crypto/crypto_tests/t_fork.c
@@ -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 @@ main()
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));