1294336Sdes/* $OpenBSD: dns.h,v 1.15 2015/05/08 06:45:13 djm Exp $ */ 2124208Sdes 3124208Sdes/* 4124208Sdes * Copyright (c) 2003 Wesley Griffin. All rights reserved. 5124208Sdes * Copyright (c) 2003 Jakob Schlyter. All rights reserved. 6124208Sdes * 7124208Sdes * Redistribution and use in source and binary forms, with or without 8124208Sdes * modification, are permitted provided that the following conditions 9124208Sdes * are met: 10124208Sdes * 1. Redistributions of source code must retain the above copyright 11124208Sdes * notice, this list of conditions and the following disclaimer. 12124208Sdes * 2. Redistributions in binary form must reproduce the above copyright 13124208Sdes * notice, this list of conditions and the following disclaimer in the 14124208Sdes * documentation and/or other materials provided with the distribution. 15124208Sdes * 16124208Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17124208Sdes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18124208Sdes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19124208Sdes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20124208Sdes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21124208Sdes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22124208Sdes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23124208Sdes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24124208Sdes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25124208Sdes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26124208Sdes */ 27124208Sdes 28124208Sdes#ifndef DNS_H 29124208Sdes#define DNS_H 30124208Sdes 31124208Sdesenum sshfp_types { 32240075Sdes SSHFP_KEY_RESERVED = 0, 33240075Sdes SSHFP_KEY_RSA = 1, 34240075Sdes SSHFP_KEY_DSA = 2, 35294328Sdes SSHFP_KEY_ECDSA = 3, 36294336Sdes SSHFP_KEY_ED25519 = 4 37124208Sdes}; 38124208Sdes 39124208Sdesenum sshfp_hashes { 40240075Sdes SSHFP_HASH_RESERVED = 0, 41240075Sdes SSHFP_HASH_SHA1 = 1, 42240075Sdes SSHFP_HASH_SHA256 = 2, 43240075Sdes SSHFP_HASH_MAX = 3 44124208Sdes}; 45124208Sdes 46124208Sdes#define DNS_RDATACLASS_IN 1 47124208Sdes#define DNS_RDATATYPE_SSHFP 44 48124208Sdes 49126274Sdes#define DNS_VERIFY_FOUND 0x00000001 50126274Sdes#define DNS_VERIFY_MATCH 0x00000002 51126274Sdes#define DNS_VERIFY_SECURE 0x00000004 52124208Sdes 53294332Sdesint verify_host_key_dns(const char *, struct sockaddr *, 54294332Sdes struct sshkey *, int *); 55294332Sdesint export_dns_rr(const char *, struct sshkey *, FILE *, int); 56126274Sdes 57124208Sdes#endif /* DNS_H */ 58