Commit 8e2c68f6 authored by Daniel Salzman's avatar Daniel Salzman

dnssec: remove obsolete files

parent 7fde8126
......@@ -71,6 +71,8 @@ src/contrib/ucw/mempool.h
src/contrib/wire.h
src/contrib/wire_ctx.h
src/dnssec/contrib/gnutls_error.c
src/dnssec/contrib/vpool.c
src/dnssec/contrib/vpool.h
src/dnssec/lib/binary.c
src/dnssec/lib/crypto.c
src/dnssec/lib/dnssec/binary.h
......@@ -128,8 +130,6 @@ src/dnssec/shared/hex.c
src/dnssec/shared/hex.h
src/dnssec/shared/keyid_gnutls.c
src/dnssec/shared/keyid_gnutls.h
src/dnssec/shared/path.c
src/dnssec/shared/path.h
src/dnssec/shared/pem.c
src/dnssec/shared/pem.h
src/dnssec/shared/shared.h
......
......@@ -29,8 +29,6 @@ libshared_la_SOURCES = \
shared/hex.h \
shared/keyid_gnutls.c \
shared/keyid_gnutls.h \
shared/path.c \
shared/path.h \
shared/pem.c \
shared/pem.h \
shared/shared.h \
......
#!/bin/bash
for zone in $(cat zones); do
for key in K$zone*.private; do
pem=${key/.private}.pem
softhsm-keyconv --topkcs8 --in $key --out $pem;
id=$(openssl rsa -in $pem -pubout -outform DER | sha1sum | cut -f 1 -d " ")
rm -f keys/$id.pem
cp $pem keys/$id.pem;
pub=${key/.private}.key
tag=$(echo $key | sed -e 's/^.*+//;s/\.private$//')
algo=8 #$(echo $key | sed -e 's/^[^+]*+//;s/+[^+]*$//')
public=$(cat $pub | grep -Ev "^;" | cut -f 7- -d ' ' | sed -e 's/ //g')
if grep -q 257 $pub; then
KSK=true
else
KSK=false
fi
if $KSK; then
KSKID=$id
KSKTAG=$tag
KSKALGO=$algo
KSKKEY=$public
else
ZSKID=$id
ZSKTAG=$tag
ZSKALGO=$algo
ZSKKEY=$public
fi
done;
< template.json sed \
-e "s{|KSKID|{${KSKID}{;" \
-e "s{|KSKTAG|{${KSKTAG}{;" \
-e "s{|KSKALGO|{${KSKALGO}{;" \
-e "s{|KSKKEY|{${KSKKEY}{;" \
-e "s{|ZSKID|{${ZSKID}{;" \
-e "s{|ZSKTAG|{${ZSKTAG}{;" \
-e "s{|ZSKALGO|{${ZSKALGO}{;" \
-e "s{|ZSKKEY|{${ZSKKEY}{;" \
> zone_${zone}.json
done
{
"policy": null,
"keys": [
{
"id": "|KSKID|",
"keytag": |KSKTAG|,
"algorithm": |KSKALGO|,
"public_key": "|KSKKEY|",
"ksk": true
},
{
"id": "|ZSKID|",
"keytag": |ZSKTAG|,
"algorithm": |ZSKALGO|,
"public_key": "|ZSKKEY|",
"ksk": false
}
]
}
......@@ -17,6 +17,7 @@
#include <assert.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
......@@ -27,7 +28,6 @@
#include "key.h"
#include "keystore.h"
#include "keystore/internal.h"
#include "path.h"
#include "shared.h"
#define DIR_INIT_MODE 0750
......@@ -172,7 +172,7 @@ static int pkcs8_dir_open(void *_handle, const char *config)
pkcs8_dir_handle_t *handle = _handle;
char *path = path_normalize(config);
char *path = realpath(config, NULL);
if (!path) {
return DNSSEC_NOT_FOUND;
}
......
/* Copyright (C) 2014 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include "path.h"
char *path_normalize(const char *path)
{
return realpath(path, NULL);
}
/* Copyright (C) 2014 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*!
* Normalize path to a file or a directory.
*/
char *path_normalize(const char *path);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment