summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-05-17 05:38:20 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-05-17 05:38:20 +0000
commitc9430d8f73aee604487dff420e6a8de3e3888966 (patch)
treec12a48d063a0bfb0b399af51dda8f5953282ecfd
parentccc66614a60810f4ac3f66dab7aebd391b5a107f (diff)
Add kn_free_key()
-rw-r--r--lib/libkeynote/README8
-rw-r--r--lib/libkeynote/auxil.c12
-rw-r--r--lib/libkeynote/keynote.37
-rw-r--r--lib/libkeynote/keynote.h3
4 files changed, 21 insertions, 9 deletions
diff --git a/lib/libkeynote/README b/lib/libkeynote/README
index 707bfde53fb..29ed366b63e 100644
--- a/lib/libkeynote/README
+++ b/lib/libkeynote/README
@@ -1,4 +1,4 @@
-# $OpenBSD: README,v 1.8 1999/11/05 00:27:18 angelos Exp $
+# $OpenBSD: README,v 1.9 2000/05/17 05:38:18 angelos Exp $
This is release 2.2 of the KeyNote trust management library reference
implementation (in case you are wondering, there was never an official 1.0
@@ -19,11 +19,7 @@ A sample application is provided in sample-app.c. To build it, use
Compile tips:
- You need the SSLeay/OpenSSL library if you compile with crypto
- (default), version 0.8.1b or later. You can find it in various
- crypto software repositories, or at:
- ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL/
-
- OpenSSL can be found at:
+ (default), version 0.8.1b or later. OpenSSL can be found at:
http://www.openssl.org/
The Makefile creates the libkeynote.a library and the keynote program.
diff --git a/lib/libkeynote/auxil.c b/lib/libkeynote/auxil.c
index 653a2e9feb0..921502870fe 100644
--- a/lib/libkeynote/auxil.c
+++ b/lib/libkeynote/auxil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auxil.c,v 1.3 2000/02/01 03:17:36 angelos Exp $ */
+/* $OpenBSD: auxil.c,v 1.4 2000/05/17 05:38:18 angelos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -295,6 +295,16 @@ keynote_keylist_free(struct keylist *kl)
}
/*
+ * Free a key.
+ */
+void
+kn_free_key(struct keynote_deckey *dc)
+{
+ if (dc)
+ keynote_free_key(dc->dec_key, dc->dec_algorithm);
+}
+
+/*
* Find the num-th assertion given the authorizer. Return NULL if not found.
*/
struct assertion *
diff --git a/lib/libkeynote/keynote.3 b/lib/libkeynote/keynote.3
index ba93eee1d71..8082558d0ac 100644
--- a/lib/libkeynote/keynote.3
+++ b/lib/libkeynote/keynote.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: keynote.3,v 1.22 2000/04/15 02:15:27 aaron Exp $
+.\" $OpenBSD: keynote.3,v 1.23 2000/05/17 05:38:19 angelos Exp $
.\"
.\" The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
.\"
@@ -112,6 +112,8 @@ struct keynote_keylist
.Fn kn_sign_assertion "char *assertion" "int len" "char *key" "char *algorithm" "int vflag"
.Ft int
.Fn kn_verify_assertion "char *assertion" "int len"
+.Ft void
+.Fn kn_free_key "struct keynote_deckey *"
.Fd Link options: -lkeynote -lm -lcrypto
.Sh DESCRIPTION
For more details on
@@ -822,6 +824,9 @@ if necessary memory could not be allocated, or
if the assertion contained a syntactic error, or the cryptographic
algorithm was not supported.
.Pp
+.Fn kn_free_key
+frees the key.
+.Pp
.Sh FILES
.Bl -tag -width libkeynote.a -compact
.It Pa keynote.h
diff --git a/lib/libkeynote/keynote.h b/lib/libkeynote/keynote.h
index 69b1876b35d..c5164c3c5ac 100644
--- a/lib/libkeynote/keynote.h
+++ b/lib/libkeynote/keynote.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: keynote.h,v 1.11 1999/10/26 22:31:38 angelos Exp $ */
+/* $OpenBSD: keynote.h,v 1.12 2000/05/17 05:38:19 angelos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -151,6 +151,7 @@ int kn_do_query(int, char **, int);
int kn_get_failed(int, int, int);
int kn_cleanup_action_environment(int);
int kn_close(int);
+void kn_free_key(struct keynote_deckey);
/* Simple API */
int kn_query(struct environment *, char **, int, char **, int *, int,