2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

3317. [func] Add ECDSA support (RFC 6605). [RT #21918]

This commit is contained in:
Mark Andrews
2012-05-02 23:20:17 +10:00
parent c604bc89f3
commit aaaf8d4f48
41 changed files with 1588 additions and 61 deletions

View File

@@ -227,6 +227,10 @@ dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
#ifdef HAVE_OPENSSL_GOST
RETERR(dst__opensslgost_init(&dst_t_func[DST_ALG_ECCGOST]));
#endif
#ifdef HAVE_OPENSSL_ECDSA
RETERR(dst__opensslecdsa_init(&dst_t_func[DST_ALG_ECDSA256]));
RETERR(dst__opensslecdsa_init(&dst_t_func[DST_ALG_ECDSA384]));
#endif
#endif /* OPENSSL */
#ifdef GSSAPI
RETERR(dst__gssapi_init(&dst_t_func[DST_ALG_GSSAPI]));
@@ -1112,6 +1116,12 @@ dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
case DST_ALG_ECCGOST:
*n = DNS_SIG_GOSTSIGSIZE;
break;
case DST_ALG_ECDSA256:
*n = DNS_SIG_ECDSA256SIZE;
break;
case DST_ALG_ECDSA384:
*n = DNS_SIG_ECDSA384SIZE;
break;
case DST_ALG_HMACMD5:
*n = 16;
break;
@@ -1420,6 +1430,8 @@ issymmetric(const dst_key_t *key) {
case DST_ALG_NSEC3DSA:
case DST_ALG_DH:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
return (ISC_FALSE);
case DST_ALG_HMACMD5:
case DST_ALG_GSSAPI:
@@ -1698,7 +1710,8 @@ algorithm_status(unsigned int alg) {
alg == DST_ALG_HMACMD5 || alg == DST_ALG_NSEC3DSA ||
alg == DST_ALG_NSEC3RSASHA1 ||
alg == DST_ALG_RSASHA256 || alg == DST_ALG_RSASHA512 ||
alg == DST_ALG_ECCGOST)
alg == DST_ALG_ECCGOST ||
alg = DST_ALG_ECDSA256 || alg= DST_ALG_ECDSA384)
return (DST_R_NOCRYPTO);
#endif
return (DST_R_UNSUPPORTEDALG);