LIBDNS_SOURCES = rdata.c util.c rr.c packet.c wire2host.c \
host2str.c buffer.c str2host.c resolver.c \
- net.c host2wire.c dname.c dnssec.c
+ net.c host2wire.c dname.c dnssec.c keys.c
LIBDNS_HEADERS = ldns/error.h \
ldns/packet.h \
ldns/prototype.h \
ldns/net.h \
ldns/dname.h \
ldns/dnssec.h \
+ ldns/keys.h \
util.h
PROG_SOURCES = mx.c
PROG_TARGETS = $(PROG_SOURCES:.c=)
o ldns_lookup_by_name works for types, classes
should be shielded, only use ldns_get_class_by_name/type
o private key type?
+ to many algs:
+ ldns_algorithms[] host2str.c
+ ldns_algorithm dnssec.h
+ ldns_signing_algorithm keys.h (new!?)
+
* See the file LICENSE for the license
*/
+#include <openssl/ssl.h>
+#include <util.h>
+
+enum ldns_enum_signing_algorithm
+{
+ LDNS_SIGN_ALG_RSAMD5 = 1,
+ LDNS_SIGN_ALG_RSASHA1 = 2,
+ LDNS_SIGN_ALG_DSAMD5 = 3,
+ LDNS_SIGN_ALG_DSASHA1 = 4,
+ LDNS_SIGN_ALG_HMACMD5 = 5
+};
+typedef enum ldns_enum_signing_algorithm ldns_signing_algorithm;
+
+ldns_lookup_table ldns_signing_algorithms[] = {
+ { LDNS_SIGN_ALG_RSAMD5, "RSAMD5" },
+ { LDNS_SIGN_ALG_RSASHA1, "RSASHA1" },
+ { LDNS_SIGN_ALG_DSAMD5, "DSAMD5" },
+ { LDNS_SIGN_ALG_DSASHA1, "DSASHA1" },
+ { LDNS_SIGN_ALG_HMACMD5, "hmac-md5.sig-alg.reg.int" },
+ { 0, NULL }
+};
+
+
+struct ldns_struct_key {
+ ldns_signing_algorithm algorithm;
+ union {
+ RSA *rsa;
+ DSA *dsa;
+ unsigned char *hmac;
+ } key;
+};
+typedef struct ldns_struct_key ldns_key;
+