summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/rd_safe.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/krb5/rd_safe.c')
-rw-r--r--crypto/heimdal/lib/krb5/rd_safe.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/crypto/heimdal/lib/krb5/rd_safe.c b/crypto/heimdal/lib/krb5/rd_safe.c
index 62d3646..71271c6 100644
--- a/crypto/heimdal/lib/krb5/rd_safe.c
+++ b/crypto/heimdal/lib/krb5/rd_safe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#include <krb5_locl.h>
-RCSID("$Id: rd_safe.c,v 1.24 2001/05/14 06:14:51 assar Exp $");
+RCSID("$Id: rd_safe.c,v 1.26 2002/02/14 12:47:47 joda Exp $");
static krb5_error_code
verify_checksum(krb5_context context,
@@ -46,13 +46,13 @@ verify_checksum(krb5_context context,
size_t len;
Checksum c;
krb5_crypto crypto;
+ krb5_keyblock *key;
c = safe->cksum;
safe->cksum.cksumtype = 0;
safe->cksum.checksum.data = NULL;
safe->cksum.checksum.length = 0;
-
buf_size = length_KRB_SAFE(safe);
buf = malloc(buf_size);
@@ -66,7 +66,15 @@ verify_checksum(krb5_context context,
buf_size,
safe,
&len);
- ret = krb5_crypto_init(context, auth_context->keyblock, 0, &crypto);
+
+ if (auth_context->remote_subkey)
+ key = auth_context->remote_subkey;
+ else if (auth_context->local_subkey)
+ key = auth_context->local_subkey;
+ else
+ key = auth_context->keyblock;
+
+ ret = krb5_crypto_init(context, key, 0, &crypto);
if (ret)
goto out;
ret = krb5_verify_checksum (context,
OpenPOWER on IntegriCloud