xref: /openssh-portable/authfile.h (revision 99aa8035)
1*99aa8035Sdjm@openbsd.org /* $OpenBSD: authfile.h,v 1.25 2020/01/25 23:02:13 djm Exp $ */
205764b92SBen Lindstrom 
3e4340be5SDamien Miller /*
48668706dSDamien Miller  * Copyright (c) 2000, 2013 Markus Friedl.  All rights reserved.
5e4340be5SDamien Miller  *
68668706dSDamien Miller  * Redistribution and use in source and binary forms, with or without
78668706dSDamien Miller  * modification, are permitted provided that the following conditions
88668706dSDamien Miller  * are met:
98668706dSDamien Miller  * 1. Redistributions of source code must retain the above copyright
108668706dSDamien Miller  *    notice, this list of conditions and the following disclaimer.
118668706dSDamien Miller  * 2. Redistributions in binary form must reproduce the above copyright
128668706dSDamien Miller  *    notice, this list of conditions and the following disclaimer in the
138668706dSDamien Miller  *    documentation and/or other materials provided with the distribution.
148668706dSDamien Miller  *
158668706dSDamien Miller  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
168668706dSDamien Miller  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
178668706dSDamien Miller  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
188668706dSDamien Miller  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
198668706dSDamien Miller  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
208668706dSDamien Miller  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
218668706dSDamien Miller  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
228668706dSDamien Miller  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
238668706dSDamien Miller  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
248668706dSDamien Miller  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25e4340be5SDamien Miller  */
26389edc4cSDamien Miller 
27eba71babSDamien Miller #ifndef AUTHFILE_H
28eba71babSDamien Miller #define AUTHFILE_H
29eba71babSDamien Miller 
308668706dSDamien Miller struct sshbuf;
318668706dSDamien Miller struct sshkey;
328668706dSDamien Miller 
331195f4cbSdjm@openbsd.org /* XXX document these */
341195f4cbSdjm@openbsd.org /* XXX some of these could probably be merged/retired */
351195f4cbSdjm@openbsd.org 
368668706dSDamien Miller int sshkey_save_private(struct sshkey *, const char *,
378668706dSDamien Miller     const char *, const char *, int, const char *, int);
388668706dSDamien Miller int sshkey_load_cert(const char *, struct sshkey **);
398668706dSDamien Miller int sshkey_load_public(const char *, struct sshkey **, char **);
408668706dSDamien Miller int sshkey_load_private(const char *, const char *, struct sshkey **, char **);
418668706dSDamien Miller int sshkey_load_private_cert(int, const char *, const char *,
426b39a7b4Sdtucker@openbsd.org     struct sshkey **);
438668706dSDamien Miller int sshkey_load_private_type(int, const char *, const char *,
446b39a7b4Sdtucker@openbsd.org     struct sshkey **, char **);
451195f4cbSdjm@openbsd.org int sshkey_load_private_type_fd(int fd, int type, const char *passphrase,
461195f4cbSdjm@openbsd.org     struct sshkey **keyp, char **commentp);
478668706dSDamien Miller int sshkey_perm_ok(int, const char *);
485e39a499Sdjm@openbsd.org int sshkey_in_file(struct sshkey *, const char *, int, int);
495e39a499Sdjm@openbsd.org int sshkey_check_revoked(struct sshkey *key, const char *revoked_keys_file);
50dd8002fbSdjm@openbsd.org int sshkey_advance_past_options(char **cpp);
51878ba435Sdjm@openbsd.org int sshkey_save_public(const struct sshkey *key, const char *path,
52878ba435Sdjm@openbsd.org     const char *comment);
53eba71babSDamien Miller 
54eba71babSDamien Miller #endif
55