Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/ttssh2/ttxssh/keyfiles.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9048 - (hide annotations) (download) (as text)
Wed Dec 16 12:24:13 2020 UTC (3 years, 3 months ago) by nmaya
File MIME type: text/x-chdr
File size: 3737 byte(s)
ソースファイルの著作権表記の "最後の発行の年" を削除

ticket #40996
1 maya 3227 /*
2 doda 6841 * Copyright (c) 1998-2001, Robert O'Callahan
3 nmaya 9048 * (C) 2004- TeraTerm Project
4 doda 6841 * All rights reserved.
5     *
6     * Redistribution and use in source and binary forms, with or without
7     * modification, are permitted provided that the following conditions
8     * are met:
9     *
10     * 1. Redistributions of source code must retain the above copyright
11     * notice, this list of conditions and the following disclaimer.
12     * 2. Redistributions in binary form must reproduce the above copyright
13     * notice, this list of conditions and the following disclaimer in the
14     * documentation and/or other materials provided with the distribution.
15     * 3. The name of the author may not be used to endorse or promote products
16     * derived from this software without specific prior written permission.
17     *
18     * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
19     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20     * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21     * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23     * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24     * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27     * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28     */
29 maya 3227
30     /*
31     This code is copyright (C) 1998-1999 Robert O'Callahan.
32     See LICENSE.TXT for the license.
33     */
34    
35     #ifndef __KEYFILES_H
36     #define __KEYFILES_H
37    
38 maya 5056 typedef enum {
39     SSH2_KEYFILE_TYPE_NONE,
40     SSH2_KEYFILE_TYPE_OPENSSH,
41     SSH2_KEYFILE_TYPE_PUTTY,
42     SSH2_KEYFILE_TYPE_SECSH
43     } ssh2_keyfile_type;
44    
45 maya 4307 Key * KEYFILES_read_private_key(PTInstVar pvar,
46     char * relative_name,
47     char * passphrase,
48     BOOL * invalid_passphrase,
49     BOOL is_auto_login);
50 maya 3227
51 maya 4307 Key *read_SSH2_private_key(PTInstVar pvar,
52 maya 5056 FILE * fp,
53 maya 4307 char * passphrase,
54     BOOL * invalid_passphrase,
55     BOOL is_auto_login,
56     char *errmsg,
57     int errmsg_len);
58 maya 3227
59 maya 5056 Key *read_SSH2_PuTTY_private_key(PTInstVar pvar,
60     FILE * fp,
61     char * passphrase,
62     BOOL * invalid_passphrase,
63     BOOL is_auto_login,
64     char *errmsg,
65     int errmsg_len);
66    
67     Key *read_SSH2_SECSH_private_key(PTInstVar pvar,
68     FILE * fp,
69     char * passphrase,
70     BOOL * invalid_passphrase,
71     BOOL is_auto_login,
72     char *errmsg,
73     int errmsg_len);
74    
75     ssh2_keyfile_type get_ssh2_keytype(char *relative_name,
76     FILE **fp,
77     char *errmsg,
78     int errmsg_len);
79    
80 yutakapon 5545 /* openssh private key file format */
81     #define MARK_BEGIN "-----BEGIN OPENSSH PRIVATE KEY-----\n"
82     #define MARK_END "-----END OPENSSH PRIVATE KEY-----\n"
83     #define KDFNAME "bcrypt"
84     #define AUTH_MAGIC "openssh-key-v1"
85     #define SALT_LEN 16
86     #define DEFAULT_CIPHERNAME "aes256-cbc"
87     #define DEFAULT_ROUNDS 16
88    
89     #define MAX_KEY_FILE_SIZE (1024 * 1024)
90    
91 maya 3227 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26