xref: /netbsd-src/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.h (revision 2e1539dfc7f69bd2ffc890039f7f6c881ec9adf1)
1*2e1539dfSagc /*-
2*2e1539dfSagc  * Copyright (c) 2009 The NetBSD Foundation, Inc.
3*2e1539dfSagc  * All rights reserved.
4*2e1539dfSagc  *
5*2e1539dfSagc  * This code is derived from software contributed to The NetBSD Foundation
6*2e1539dfSagc  * by Alistair Crooks (agc@NetBSD.org)
7*2e1539dfSagc  *
8*2e1539dfSagc  * Redistribution and use in source and binary forms, with or without
9*2e1539dfSagc  * modification, are permitted provided that the following conditions
10*2e1539dfSagc  * are met:
11*2e1539dfSagc  * 1. Redistributions of source code must retain the above copyright
12*2e1539dfSagc  *    notice, this list of conditions and the following disclaimer.
13*2e1539dfSagc  * 2. Redistributions in binary form must reproduce the above copyright
14*2e1539dfSagc  *    notice, this list of conditions and the following disclaimer in the
15*2e1539dfSagc  *    documentation and/or other materials provided with the distribution.
16*2e1539dfSagc  *
17*2e1539dfSagc  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18*2e1539dfSagc  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19*2e1539dfSagc  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20*2e1539dfSagc  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21*2e1539dfSagc  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22*2e1539dfSagc  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23*2e1539dfSagc  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*2e1539dfSagc  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25*2e1539dfSagc  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26*2e1539dfSagc  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27*2e1539dfSagc  * POSSIBILITY OF SUCH DAMAGE.
28*2e1539dfSagc  */
29*2e1539dfSagc #ifndef SSH2PGP_H_
30*2e1539dfSagc #define SSH2PGP_H_
31*2e1539dfSagc 
32*2e1539dfSagc #include "keyring.h"
33*2e1539dfSagc #include "types.h"
34*2e1539dfSagc 
35*2e1539dfSagc int pgp_ssh2pubkey(pgp_io_t *, const char *, pgp_key_t *, pgp_hash_alg_t);
36*2e1539dfSagc int pgp_ssh2seckey(pgp_io_t *, const char *, pgp_key_t *, pgp_pubkey_t *, pgp_hash_alg_t);
37*2e1539dfSagc 
38*2e1539dfSagc int pgp_ssh2_readkeys(pgp_io_t *, pgp_keyring_t *, pgp_keyring_t *,
39*2e1539dfSagc 		const char *, const char *, unsigned);
40*2e1539dfSagc 
41*2e1539dfSagc #endif
42