Add DST_R_OPENSSLFAILURE, which basically means that openssl returned
an error and we don't know why.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
/*
|
||||
* Principal Author: Brian Wellington
|
||||
* $Id: dst_result.c,v 1.14 2000/08/01 01:27:51 tale Exp $
|
||||
* $Id: dst_result.c,v 1.15 2000/08/10 22:28:32 bwelling Exp $
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
static const char *text[DST_R_NRESULTS] = {
|
||||
"algorithm is unsupported", /* 0 */
|
||||
"UNUSED1", /* 1 */
|
||||
"openssl failure", /* 1 */
|
||||
"UNUSED2", /* 2 */
|
||||
"illegal operation for a null key", /* 3 */
|
||||
"public key is invalid", /* 4 */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: result.h,v 1.17 2000/08/01 01:28:00 tale Exp $ */
|
||||
/* $Id: result.h,v 1.18 2000/08/10 22:28:36 bwelling Exp $ */
|
||||
|
||||
#ifndef DST_RESULT_H
|
||||
#define DST_RESULT_H 1
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <isc/result.h> /* Contractual promise. */
|
||||
|
||||
#define DST_R_UNSUPPORTEDALG (ISC_RESULTCLASS_DST + 0)
|
||||
/* 1 is unused */
|
||||
#define DST_R_OPENSSLFAILURE (ISC_RESULTCLASS_DST + 1)
|
||||
/* 2 is unused */
|
||||
#define DST_R_NULLKEY (ISC_RESULTCLASS_DST + 3)
|
||||
#define DST_R_INVALIDPUBLICKEY (ISC_RESULTCLASS_DST + 4)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/*
|
||||
* Principal Author: Brian Wellington
|
||||
* $Id: openssl_link.c,v 1.34 2000/08/08 16:13:39 bwelling Exp $
|
||||
* $Id: openssl_link.c,v 1.35 2000/08/10 22:28:33 bwelling Exp $
|
||||
*/
|
||||
#if defined(OPENSSL)
|
||||
|
||||
@@ -194,11 +194,11 @@ openssldsa_generate(dst_key_t *key, int unused) {
|
||||
NULL, NULL);
|
||||
|
||||
if (dsa == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
return (DST_R_OPENSSLFAILURE);
|
||||
|
||||
if (DSA_generate_key(dsa) == 0) {
|
||||
DSA_free(dsa);
|
||||
return (ISC_R_NOMEMORY);
|
||||
return (DST_R_OPENSSLFAILURE);
|
||||
}
|
||||
|
||||
key->opaque = dsa;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/*
|
||||
* Principal Author: Brian Wellington
|
||||
* $Id: openssldh_link.c,v 1.28 2000/08/08 16:13:40 bwelling Exp $
|
||||
* $Id: openssldh_link.c,v 1.29 2000/08/10 22:28:34 bwelling Exp $
|
||||
*/
|
||||
|
||||
#if defined(OPENSSL)
|
||||
@@ -155,11 +155,11 @@ openssldh_generate(dst_key_t *key, int generator) {
|
||||
NULL, NULL);
|
||||
|
||||
if (dh == NULL)
|
||||
return (DST_R_INVALIDPARAM);
|
||||
return (DST_R_OPENSSLFAILURE);
|
||||
|
||||
if (DH_generate_key(dh) == 0) {
|
||||
DH_free(dh);
|
||||
return (ISC_R_NOMEMORY);
|
||||
return (DST_R_OPENSSLFAILURE);
|
||||
}
|
||||
|
||||
key->opaque = dh;
|
||||
|
||||
Reference in New Issue
Block a user