libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws-dht-dnssec.h
Go to the documentation of this file.
1/*
2 * libwebsockets - small server side websockets and web server implementation
3 *
4 * Copyright (C) 2010 - 2026 Andy Green <andy@warmcat.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 * IN THE SOFTWARE.
23 */
24
25#if !defined(__LWS_DHT_DNSSEC_H__)
26#define __LWS_DHT_DNSSEC_H__
27
28struct lws_context;
29
31 const char *domain;
32 const char *type; /* e.g. "EC" or "RSA" */
33 const char *curve;
34 int bits;
35};
36
38 const char *domain;
39 const char *hash; /* E.g., "SHA256" */
40};
41
46
48 const char *domain;
49 const char *key1_prefix;
50 const char *key2_prefix; /* optional if only importing 1 key */
51};
52
53typedef void (*lws_dht_dnssec_fetch_cb_t)(void *opaque, const char *domain, int status);
54
56 struct lws_vhost *vhost;
57 const char *domain;
58 const char *cache_dir;
60 void *opaque;
61 int is_cancel; /* If 1, cancel an ongoing fetch for this domain/opaque pair */
62};
63
65 int (*keygen)(struct lws_context *context, struct lws_dht_dnssec_keygen_args *args);
66 int (*dsfromkey)(struct lws_context *context, struct lws_dht_dnssec_dsfromkey_args *args);
67 int (*signzone)(struct lws_context *context, struct lws_dht_dnssec_signzone_args *args);
68 int (*importnsd)(struct lws_context *context, struct lws_dht_dnssec_importnsd_args *args);
69
70 int (*add_temp_zone)(struct lws_context *context, const char *domain, const char *zone_str, int ttl_secs);
71 int (*publish_jws)(struct lws_context *context, const char *jws_filepath);
72 int (*fetch_zone)(struct lws_context *context, struct lws_dht_dnssec_fetch_zone_args *args);
73};
74
75#endif
unsigned int uint32_t
int(* fetch_zone)(struct lws_context *context, struct lws_dht_dnssec_fetch_zone_args *args)
int(* importnsd)(struct lws_context *context, struct lws_dht_dnssec_importnsd_args *args)
int(* add_temp_zone)(struct lws_context *context, const char *domain, const char *zone_str, int ttl_secs)
int(* publish_jws)(struct lws_context *context, const char *jws_filepath)
lws_dht_dnssec_fetch_cb_t cb
int(* keygen)(struct lws_context *context, struct lws_dht_dnssec_keygen_args *args)
void(* lws_dht_dnssec_fetch_cb_t)(void *opaque, const char *domain, int status)
int(* signzone)(struct lws_context *context, struct lws_dht_dnssec_signzone_args *args)
int(* dsfromkey)(struct lws_context *context, struct lws_dht_dnssec_dsfromkey_args *args)