#include "sldns/keyraw.h"
#include "sldns/sbuffer.h"
+#include "cisco-hash-sigs/hss_verify.h"
+
#if !defined(HAVE_SSL) && !defined(HAVE_NSS) && !defined(HAVE_NETTLE)
#error "Need crypto library to do digital signature cryptography"
#endif
/* we support GOST if it can be loaded */
return sldns_key_EVP_load_gost_id();
#endif
+ case LDNS_HSSLMS:
+ return 1;
default:
return 0;
}
return sec_status_secure;
#endif
+ if (algo == LDNS_HSSLMS) {
+ /* This algorithm is not supported by openssl. Do stuff
+ * directly.
+ */
+ if (!hss_validate_signature(key,
+ (unsigned char*)sldns_buffer_begin(buf),
+ (unsigned int)sldns_buffer_limit(buf),
+ sigblock, sigblock_len, 0)) {
+ return sec_status_bogus;
+ }
+ else {
+ return sec_status_secure;
+ }
+ }
+
if(!setup_key_digest(algo, &evp_key, &digest_type, key, keylen)) {
verbose(VERB_QUERY, "verify: failed to setup key");
*reason = "use of key for crypto failed";