997. [func] Add support for RSA-SHA1 keys.

This commit is contained in:
Brian Wellington
2001-09-15 00:01:58 +00:00
parent 967ecc6264
commit 36e37042c6
11 changed files with 59 additions and 25 deletions

View File

@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.88 2001/07/10 21:27:59 bwelling Exp $
* $Id: dst_api.c,v 1.89 2001/09/15 00:01:48 bwelling Exp $
*/
#include <config.h>
@@ -138,6 +138,7 @@ dst_lib_init(isc_mem_t *mctx, isc_entropy_t *ectx, unsigned int eflags) {
#ifdef OPENSSL
RETERR(dst__openssl_init());
RETERR(dst__opensslrsa_init(&dst_t_func[DST_ALG_RSAMD5]));
RETERR(dst__opensslrsa_init(&dst_t_func[DST_ALG_RSASHA1]));
RETERR(dst__openssldsa_init(&dst_t_func[DST_ALG_DSA]));
RETERR(dst__openssldh_init(&dst_t_func[DST_ALG_DH]));
#endif
@@ -697,6 +698,7 @@ dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
switch (key->key_alg) {
case DST_ALG_RSAMD5:
case DST_ALG_RSASHA1:
*n = (key->key_size + 7) / 8;
break;
case DST_ALG_DSA:
@@ -726,6 +728,7 @@ dst_key_secretsize(const dst_key_t *key, unsigned int *n) {
*n = (key->key_size + 7) / 8;
break;
case DST_ALG_RSAMD5:
case DST_ALG_RSASHA1:
case DST_ALG_DSA:
case DST_ALG_HMACMD5:
default: