dst_api.c revision af20baa9600965efaa6ad1abdba53b0902e84b8d
823N/A#include "dst_internal.h"
823N/Astatic unsigned int dst_entropy_flags = 0;
const char *directory);
unsigned int alg,
unsigned int type,
const char *directory,
unsigned int alg,
unsigned int flags,
unsigned int protocol,
const char *suffix);
#define RETERR(x) \
result = (x); \
goto out; \
return (_r); \
if (size == 0U)
#ifdef BIND9
return (result);
#ifndef OPENSSL_LEAKS
#ifdef BIND9
#ifdef OPENSSL
#ifdef HAVE_OPENSSL_DSA
#ifdef GSSAPI
return (ISC_R_SUCCESS);
out:
return (result);
dst_lib_destroy(void) {
for (i = 0; i < DST_MAX_ALGS; i++)
#ifdef OPENSSL
#ifdef BIND9
return (ISC_FALSE);
return (ISC_TRUE);
return (DST_R_UNSUPPORTEDALG);
return (DST_R_NULLKEY);
return (ISC_R_NOMEMORY);
return (result);
return (ISC_R_SUCCESS);
return (DST_R_NULLKEY);
return (DST_R_NOTPRIVATEKEY);
return (DST_R_NOTPRIVATEKEY);
return (DST_R_NULLKEY);
return (DST_R_NOTPUBLICKEY);
return (DST_R_NULLKEY);
return (DST_R_KEYCANNOTCOMPUTESECRET);
return (DST_R_NOTPRIVATEKEY);
return (DST_R_UNSUPPORTEDALG);
return (ret);
return (ISC_R_SUCCESS);
isc_buffer_t b;
return (result);
return (result);
return (result);
return (DST_R_INVALIDPRIVATEKEY);
return (ISC_R_SUCCESS);
int newfilenamelen = 0;
#ifndef WIN32
return (ISC_R_NOMEMORY);
return (result);
return (result);
return (ISC_R_SUCCESS);
return (result);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
out:
return (result);
return (DST_R_UNSUPPORTEDALG);
return (ISC_R_NOSPACE);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
isc_region_t r;
return (DST_R_INVALIDPUBLICKEY);
return (DST_R_INVALIDPUBLICKEY);
return (result);
return (ISC_R_SUCCESS);
return (result);
return (result);
return (ISC_R_SUCCESS);
return (DST_R_UNSUPPORTEDALG);
out:
return (result);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
return (DST_R_UNSUPPORTEDALG);
return (result);
return (result);
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
return (DST_R_UNSUPPORTEDALG);
return (ret);
return (ret);
return (ISC_R_SUCCESS);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_FALSE);
if (!match_revoked_key)
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
static isc_boolean_t
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
type == 0);
case DST_ALG_RSAMD5:
case DST_ALG_RSASHA1:
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_DSA:
case DST_ALG_NSEC3DSA:
*n = DNS_SIG_DSASIGSIZE;
case DST_ALG_HMACMD5:
case DST_ALG_HMACSHA1:
*n = ISC_SHA1_DIGESTLENGTH;
case DST_ALG_HMACSHA224:
*n = ISC_SHA224_DIGESTLENGTH;
case DST_ALG_HMACSHA256:
*n = ISC_SHA256_DIGESTLENGTH;
case DST_ALG_HMACSHA384:
*n = ISC_SHA384_DIGESTLENGTH;
case DST_ALG_HMACSHA512:
*n = ISC_SHA512_DIGESTLENGTH;
case DST_ALG_GSSAPI:
case DST_ALG_DH:
return (DST_R_UNSUPPORTEDALG);
return (ISC_R_SUCCESS);
return (DST_R_UNSUPPORTEDALG);
return (ISC_R_SUCCESS);
static dst_key_t *
return (NULL);
return (NULL);
return (NULL);
return (key);
isc_buffer_t b;
goto cleanup;
goto cleanup;
goto cleanup; \
#define BADTOKEN() { \
goto cleanup; \
BADTOKEN();
BADTOKEN();
0, NULL);
goto cleanup;
BADTOKEN();
BADTOKEN();
BADTOKEN();
BADTOKEN();
goto cleanup;
goto cleanup;
keyp);
goto cleanup;
return (ret);
static isc_boolean_t
case DST_ALG_RSAMD5:
case DST_ALG_RSASHA1:
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_DSA:
case DST_ALG_NSEC3DSA:
case DST_ALG_DH:
return (ISC_FALSE);
case DST_ALG_HMACMD5:
case DST_ALG_GSSAPI:
return (ISC_TRUE);
return (ISC_FALSE);
const char *output;
time_t t;
t = when;
static isc_result_t
isc_region_t r;
return (ret);
return (DST_R_INVALIDPUBLICKEY);
return (DST_R_INVALIDPUBLICKEY);
return (ret);
return (DST_R_WRITEERROR);
access = 0;
&access);
return (ret);
return (ret);
static isc_result_t
unsigned int len;
return (ISC_R_NOSPACE);
return (ISC_R_NOSPACE);
return (result);
return (ISC_R_NOSPACE);
suffix);
return (ISC_R_SUCCESS);
static isc_result_t
isc_region_t r;
return (ret);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOMEMORY);
return (ret);
return (DST_R_UNSUPPORTEDALG);
return (ret);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
#ifndef OPENSSL
return (DST_R_NOCRYPTO);
return (DST_R_UNSUPPORTEDALG);
static isc_result_t
return (ISC_R_FAILURE);
if (n >= len)
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
#ifdef BIND9
if (pseudo)
return (ISC_R_NOTIMPLEMENTED);
dst__entropy_status(void) {
#ifdef BIND9