fix up to use global visible to krb_rd_req()
authorJohn Kohl <jtkohl@mit.edu>
Wed, 27 Feb 1991 12:00:29 +0000 (12:00 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Wed, 27 Feb 1991 12:00:29 +0000 (12:00 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1804 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb425/set_key.c

index 4e8964cc42cacd2f5f96b56b3754816e7bd87859..a6345ac257fd6d6c33849bd2e3fd0571ec7c74a7 100644 (file)
@@ -23,20 +23,18 @@ krb_set_key(key, cvt)
 char *key;
 int cvt;
 {
-       static krb5_keyblock keyblock;
-
        if (cvt) {
-               if (keyblock.contents)
-                       xfree(keyblock.contents);
-               mit_des_string_to_key(KEYTYPE_DES, &keyblock, 0, 0);
+               if (_krb425_servkey.contents)
+                       xfree(_krb425_servkey.contents);
+               mit_des_string_to_key(KEYTYPE_DES, &_krb425_servkey, 0, 0);
        } else {
-               if (!keyblock.contents &&
-                   !(keyblock.contents = (krb5_octet *)malloc(8))) {
+               if (!_krb425_servkey.contents &&
+                   !(_krb425_servkey.contents = (krb5_octet *)malloc(8))) {
                        return(KFAILURE);
                }
-               keyblock.length = 8;
-               keyblock.keytype = KEYTYPE_DES;
-               memcpy((char *)keyblock.contents, (char *)key, 8);
+               _krb425_servkey.length = 8;
+               _krb425_servkey.keytype = KEYTYPE_DES;
+               memcpy((char *)_krb425_servkey.contents, (char *)key, 8);
        }
        return(KSUCCESS);
 }