summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-05-18 08:31:03 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-05-18 08:31:03 +0000
commitd394946459ff085eab94b4072298f33f09e50d7d (patch)
treef7cdbee26bfd398d6d495337578d14298572bc12
parentf2ef614d5e97931697346705cbd094b4bba8741c (diff)
Manpage links.
-rw-r--r--lib/libkeynote/Makefile5
-rw-r--r--lib/libkeynote/keynote.311
-rw-r--r--lib/libkeynote/keynote.h3
-rw-r--r--lib/libkeynote/keynote.l13
4 files changed, 25 insertions, 7 deletions
diff --git a/lib/libkeynote/Makefile b/lib/libkeynote/Makefile
index 106e4e06abc..7538b2163ac 100644
--- a/lib/libkeynote/Makefile
+++ b/lib/libkeynote/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2000/01/25 09:08:10 angelos Exp $
+# $OpenBSD: Makefile,v 1.12 2000/05/18 08:31:02 angelos Exp $
LIB= keynote
MAN= keynote.3 keynote.4 keynote.5
@@ -13,7 +13,8 @@ MLINKS= keynote.3 kn_init.3 keynote.3 kn_add_assertion.3 \
kn_encode_base64.3 keynote.3 kn_decode_base64.3 keynote.3 \
kn_encode_hex.3 keynote.3 kn_decode_hex.3 keynote.3 \
kn_encode_key.3 keynote.3 kn_decode_key.3 keynote.3 \
- kn_sign_assertion.3 keynote.3 kn_verify_assertion.3
+ kn_sign_assertion.3 keynote.3 kn_verify_assertion.3 kn_free_key\
+ kn_get_string
NOPIC=
CFLAGS+= -Wall -DCRYPTO -DHAVE_CONFIG_H -I. -I${.CURDIR}
LEXFLAGS = -Cr -Pkn -s -i
diff --git a/lib/libkeynote/keynote.3 b/lib/libkeynote/keynote.3
index 8082558d0ac..1700cb4cabb 100644
--- a/lib/libkeynote/keynote.3
+++ b/lib/libkeynote/keynote.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: keynote.3,v 1.23 2000/05/17 05:38:19 angelos Exp $
+.\" $OpenBSD: keynote.3,v 1.24 2000/05/18 08:31:02 angelos Exp $
.\"
.\" The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
.\"
@@ -114,6 +114,8 @@ struct keynote_keylist
.Fn kn_verify_assertion "char *assertion" "int len"
.Ft void
.Fn kn_free_key "struct keynote_deckey *"
+.Ft char *
+.Fn kn_get_string "char *"
.Fd Link options: -lkeynote -lm -lcrypto
.Sh DESCRIPTION
For more details on
@@ -825,7 +827,12 @@ if the assertion contained a syntactic error, or the cryptographic
algorithm was not supported.
.Pp
.Fn kn_free_key
-frees the key.
+frees a cryptographic key.
+.Pp
+.Fn kn_get_string
+parses the argument, treating it as a
+.Xr keynote 4
+(quoted) string. This is useful for parsing key files.
.Pp
.Sh FILES
.Bl -tag -width libkeynote.a -compact
diff --git a/lib/libkeynote/keynote.h b/lib/libkeynote/keynote.h
index b6290de0bdd..990ec58dbb6 100644
--- a/lib/libkeynote/keynote.h
+++ b/lib/libkeynote/keynote.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: keynote.h,v 1.13 2000/05/17 05:40:03 angelos Exp $ */
+/* $OpenBSD: keynote.h,v 1.14 2000/05/18 08:31:02 angelos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -152,6 +152,7 @@ int kn_get_failed(int, int, int);
int kn_cleanup_action_environment(int);
int kn_close(int);
void kn_free_key(struct keynote_deckey *);
+char *kn_get_string(char *);
/* Simple API */
int kn_query(struct environment *, char **, int, char **, int *, int,
diff --git a/lib/libkeynote/keynote.l b/lib/libkeynote/keynote.l
index d0fd6e11a29..4697a89fe70 100644
--- a/lib/libkeynote/keynote.l
+++ b/lib/libkeynote/keynote.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: keynote.l,v 1.9 2000/05/18 07:58:46 angelos Exp $ */
+/* $OpenBSD: keynote.l,v 1.10 2000/05/18 08:31:02 angelos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -674,7 +674,16 @@ keynote_evaluate_authorizer(struct assertion *as, int flag)
}
/*
- * Parse a private key.
+ * Exportable front-end to keynote_get_private_key().
+ */
+char *
+kn_get_string(char *buf)
+{
+ return keynote_get_private_key(buf);
+}
+
+/*
+ * Parse a private key -- actually, it can deal with any kind of string.
*/
char *
keynote_get_private_key(char *buf)