Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/ttssh2/ttxssh/dns.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9125 - (show annotations) (download) (as text)
Sat Jan 16 05:20:14 2021 UTC (3 years, 4 months ago) by zmatsuo
File MIME type: text/x-chdr
File size: 2471 byte(s)
dnsapi.dll の DnsQuery_A(), DnsFree() を遅延ロード指定なしで使えるようにした

- compat_win に追加
1 /*
2 * (C) 2011- TeraTerm Project
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef __TTSSH_DNS_H
30 #define __TTSSH_DNS_H
31
32 #define DNS_TYPE_SSHFP 44
33
34 enum sshfp_types {
35 SSHFP_KEY_RESERVED = 0, // RFC4255
36 SSHFP_KEY_RSA = 1, // RFC4255
37 SSHFP_KEY_DSA = 2, // RFC4255
38 SSHFP_KEY_ECDSA = 3, // RFC6594
39 SSHFP_KEY_ED25519 = 4 // RFC7479
40 };
41
42 enum sshfp_hashes {
43 SSHFP_HASH_RESERVED = 0, // RFC4255
44 SSHFP_HASH_SHA1 = 1, // RFC4255
45 SSHFP_HASH_SHA256 = 2 // RFC6594
46 };
47
48 enum verifydns_result {
49 DNS_VERIFY_NONE,
50 DNS_VERIFY_NOTFOUND,
51 DNS_VERIFY_MATCH,
52 DNS_VERIFY_MISMATCH,
53 DNS_VERIFY_DIFFERENTTYPE,
54 DNS_VERIFY_AUTH_MATCH,
55 DNS_VERIFY_AUTH_MISMATCH,
56 DNS_VERIFY_AUTH_DIFFERENTTYPE
57 };
58
59 typedef struct {
60 BYTE Algorithm;
61 BYTE DigestType;
62 BYTE Digest[1];
63 } DNS_SSHFP_DATA, *PDNS_SSHFP_DATA;
64
65 int is_numeric_hostname(const char *hostname);
66 int verify_hostkey_dns(PTInstVar pvar, char *hostname, Key *key);
67
68 #endif // __TTSSH_DNS_H

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