Oops, HDB_F_DECRYPT isn't critical; making it so breaks tests.
authorNicolas Williams <nico@cryptonector.com>
Wed, 20 Jul 2011 05:49:01 +0000 (00:49 -0500)
committerNicolas Williams <nico@cryptonector.com>
Fri, 22 Jul 2011 21:07:08 +0000 (16:07 -0500)
lib/hdb/common.c

index 7d20126098aa5eaf44c4bd785e0a7401a5f868a8..bbbfcea29eb51d68e80c1c05083cf3cc0d5eb8f2 100644 (file)
@@ -156,7 +156,7 @@ _hdb_fetch_kvno(krb5_context context, HDB *db, krb5_const_principal principal,
     }
     krb5_data_free(&value);
     if (!db->hdb_master_key_set && (flags & HDB_F_DECRYPT))
-       return HDB_ERR_NO_MKEY;
+       return 0; /* HDB_F_DECRYPT isn't critical, oddly enough */
     if (db->hdb_master_key_set && (flags & HDB_F_DECRYPT) &&
        (flags & HDB_F_ALL_KVNOS)) {
        /* Decrypt the current keys */
@@ -194,7 +194,7 @@ _hdb_fetch_kvno(krb5_context context, HDB *db, krb5_const_principal principal,
        }
     }
 
-    return ret;
+    return 0;
 }
 
 static krb5_error_code