summaryrefslogtreecommitdiff
path: root/sshkey.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-01-06 22:05:42 +0000
committerDamien Miller <djm@mindrot.org>2022-01-07 09:21:38 +1100
commitfdb1d58d0d3888b042e5a500f6ce524486aaf782 (patch)
treef56afecd30661d4dd3d20d71056dbf1ddd7bf9ad /sshkey.h
parent11e8c4309a5086a45fbbbc87d0af5323c6152914 (diff)
downloadopenssh-git-fdb1d58d0d3888b042e5a500f6ce524486aaf782.tar.gz
upstream: add a helper function to match a key type to a list of
signature algorithms. RSA keys can make signatures with multiple algorithms, so some special handling is required. ok markus@ OpenBSD-Commit-ID: 03b41b2bda06fa4cd9c84cef6095033b9e49b6ff
Diffstat (limited to 'sshkey.h')
-rw-r--r--sshkey.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sshkey.h b/sshkey.h
index 6edc6c5a..094815e0 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.50 2021/07/23 03:37:52 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.51 2022/01/06 22:05:42 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -192,6 +192,10 @@ int sshkey_is_cert(const struct sshkey *);
int sshkey_is_sk(const struct sshkey *);
int sshkey_type_is_cert(int);
int sshkey_type_plain(int);
+
+/* Returns non-zero if key name match sigalgs pattern list. (handles RSA) */
+int sshkey_match_keyname_to_sigalgs(const char *, const char *);
+
int sshkey_to_certified(struct sshkey *);
int sshkey_drop_cert(struct sshkey *);
int sshkey_cert_copy(const struct sshkey *, struct sshkey *);