Deleted Added
sdiff udiff text old ( 157016 ) new ( 162852 )
full compact
1/* $OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $ */
2
3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
5 * Copyright (c) 2003 Jakob Schlyter. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 11 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include "includes.h"
29RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $");
30
31#include <netdb.h>
32
33#include "xmalloc.h"
34#include "key.h"
35#include "dns.h"
36#include "log.h"
37
38static const char *errset_text[] = {
39 "success", /* 0 ERRSET_SUCCESS */

--- 77 unchanged lines hidden (view full) ---

117 *algorithm = rdata[0];
118 *digest_type = rdata[1];
119 *digest_len = rdata_len - 2;
120
121 if (*digest_len > 0) {
122 *digest = (u_char *) xmalloc(*digest_len);
123 memcpy(*digest, rdata + 2, *digest_len);
124 } else {
125 *digest = xstrdup("");
126 }
127
128 success = 1;
129 }
130
131 return success;
132}
133

--- 158 unchanged lines hidden ---