summaryrefslogtreecommitdiffstats
path: root/src/tests/verify
diff options
context:
space:
mode:
authorRichard Basch <probe@mit.edu>1996-05-06 16:25:53 +0000
committerRichard Basch <probe@mit.edu>1996-05-06 16:25:53 +0000
commit6761a0be6fb8e64f7c7e7ba5d7c0fc756f176a54 (patch)
tree3f4e9b675b42d67c69e479f1c903f80e33e236fc /src/tests/verify
parentbcd479a756450b34f25612961f68d7e01c717de4 (diff)
downloadkrb5-6761a0be6fb8e64f7c7e7ba5d7c0fc756f176a54.tar.gz
krb5-6761a0be6fb8e64f7c7e7ba5d7c0fc756f176a54.tar.xz
krb5-6761a0be6fb8e64f7c7e7ba5d7c0fc756f176a54.zip
Fixed the abstraction violation, where the code knew the details about the
cryptosystem structure. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7907 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/verify')
-rw-r--r--src/tests/verify/ChangeLog5
-rw-r--r--src/tests/verify/kdb5_verify.c21
2 files changed, 14 insertions, 12 deletions
diff --git a/src/tests/verify/ChangeLog b/src/tests/verify/ChangeLog
index eeafcf245b..96182d999c 100644
--- a/src/tests/verify/ChangeLog
+++ b/src/tests/verify/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 2 21:16:40 1996 Richard Basch <basch@lehman.com>
+
+ * kdb5_verify.c: fixed various abstraction violations where the
+ code "knew" the cryptosystem_entry structure
+
Sat Dec 23 01:05:33 1995 <tytso@rsts-11.mit.edu>
* configure.in (withval): Add check for DBM/db libraries.
diff --git a/src/tests/verify/kdb5_verify.c b/src/tests/verify/kdb5_verify.c
index 1684ea5bae..fed870a7ec 100644
--- a/src/tests/verify/kdb5_verify.c
+++ b/src/tests/verify/kdb5_verify.c
@@ -103,7 +103,6 @@ char *argv[];
krb5_error_code retval;
char *dbname = 0;
int enctypedone = 0;
- register krb5_cryptosystem_entry *csentry;
int num_to_check;
char principal_string[BUFSIZ];
char *suffix = 0;
@@ -171,7 +170,6 @@ char *argv[];
}
krb5_use_enctype(context, &master_encblock, master_keyblock.enctype);
- csentry = master_encblock.crypto_entry;
if (!dbname)
dbname = DEFAULT_KDB_FILE; /* XXX? */
@@ -212,8 +210,9 @@ char *argv[];
else
fprintf(stdout, "\nNo errors.\n");
- (void) (*csentry->finish_key)(&master_encblock);
- (void) (*csentry->finish_random_key)(&master_random);
+ krb5_finish_random_key(context, &master_encblock, &master_random);
+ krb5_finish_key(context, &master_encblock);
+
retval = krb5_db_fini(context);
memset((char *)master_keyblock.contents, 0, master_keyblock.length);
if (retval && retval != KRB5_KDB_DBNOTINITED) {
@@ -357,11 +356,8 @@ set_dbname_help(context, pname, dbname)
krb5_error_code retval;
int nentries;
krb5_boolean more;
- register krb5_cryptosystem_entry *csentry;
krb5_data pwd, scratch;
- csentry = master_encblock.crypto_entry;
-
if (retval = krb5_db_set_name(context, dbname)) {
com_err(pname, retval, "while setting active database to '%s'",
dbname);
@@ -430,16 +426,17 @@ set_dbname_help(context, pname, dbname)
return(1);
}
- if (retval = (*csentry->process_key)(&master_encblock,
- &master_keyblock)) {
+ if (retval = krb5_process_key(context,
+ &master_encblock, &master_keyblock)) {
com_err(pname, retval, "while processing master key");
(void) krb5_db_fini(context);
return(1);
}
- if (retval = (*csentry->init_random_key)(&master_keyblock,
- &master_random)) {
+ if (retval = krb5_init_random_key(context,
+ &master_encblock, &master_keyblock,
+ &master_random)) {
com_err(pname, retval, "while initializing random key generator");
- (void) (*csentry->finish_key)(&master_encblock);
+ krb5_finish_key(context, &master_encblock);
(void) krb5_db_fini(context);
return(1);
}