1295367Sdes/* $OpenBSD: authfile.h,v 1.21 2015/01/08 10:14:08 djm Exp $ */ 292555Sdes 365668Skris/* 4295367Sdes * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. 565668Skris * 6295367Sdes * Redistribution and use in source and binary forms, with or without 7295367Sdes * modification, are permitted provided that the following conditions 8295367Sdes * are met: 9295367Sdes * 1. Redistributions of source code must retain the above copyright 10295367Sdes * notice, this list of conditions and the following disclaimer. 11295367Sdes * 2. Redistributions in binary form must reproduce the above copyright 12295367Sdes * notice, this list of conditions and the following disclaimer in the 13295367Sdes * documentation and/or other materials provided with the distribution. 14295367Sdes * 15295367Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16295367Sdes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17295367Sdes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18295367Sdes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19295367Sdes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20295367Sdes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21295367Sdes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22295367Sdes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23295367Sdes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24295367Sdes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2565668Skris */ 2669587Sgreen 2760573Skris#ifndef AUTHFILE_H 2860573Skris#define AUTHFILE_H 2960573Skris 30295367Sdesstruct sshbuf; 31295367Sdesstruct sshkey; 3260573Skris 33295367Sdes/* XXX document these */ 34295367Sdes/* XXX some of these could probably be merged/retired */ 35295367Sdes 36295367Sdesint sshkey_save_private(struct sshkey *, const char *, 37295367Sdes const char *, const char *, int, const char *, int); 38295367Sdesint sshkey_load_file(int, struct sshbuf *); 39295367Sdesint sshkey_load_cert(const char *, struct sshkey **); 40295367Sdesint sshkey_load_public(const char *, struct sshkey **, char **); 41295367Sdesint sshkey_load_private(const char *, const char *, struct sshkey **, char **); 42295367Sdesint sshkey_load_private_cert(int, const char *, const char *, 43295367Sdes struct sshkey **, int *); 44295367Sdesint sshkey_load_private_type(int, const char *, const char *, 45295367Sdes struct sshkey **, char **, int *); 46295367Sdesint sshkey_load_private_type_fd(int fd, int type, const char *passphrase, 47295367Sdes struct sshkey **keyp, char **commentp); 48295367Sdesint sshkey_perm_ok(int, const char *); 49295367Sdesint sshkey_in_file(struct sshkey *, const char *, int, int); 50295367Sdesint sshkey_check_revoked(struct sshkey *key, const char *revoked_keys_file); 51295367Sdes 5260573Skris#endif 53