Lines Matching defs:algorithm
56 /* The algorithm from RFC 4034, Appendix B. */
66 sum = f + ((((uint32_t) dnskey->dnskey.protocol) << 8) + (uint32_t) dnskey->dnskey.algorithm);
408 int algorithm,
422 if (algorithm == DNSSEC_ALGORITHM_ECDSAP256SHA256) {
425 } else if (algorithm == DNSSEC_ALGORITHM_ECDSAP384SHA384) {
551 static int algorithm_to_gcrypt_md(uint8_t algorithm) {
553 /* Translates a DNSSEC signature algorithm into a gcrypt
563 switch (algorithm) {
642 md_algorithm = algorithm_to_gcrypt_md(rrsig->rrsig.algorithm);
750 md_add_uint8(md, rrsig->rrsig.algorithm);
794 switch (rrsig->rrsig.algorithm) {
811 rrsig->rrsig.algorithm,
860 if (dnskey->dnskey.algorithm != rrsig->rrsig.algorithm)
969 /* If the key algorithm is
1025 static int digest_to_gcrypt_md(uint8_t algorithm) {
1027 /* Translates a DNSSEC digest algorithm into a gcrypt digest identifier */
1029 switch (algorithm) {
1068 if (dnskey->dnskey.algorithm != ds->ds.algorithm)
1099 md_add_uint8(md, dnskey->dnskey.algorithm);
1143 return 0; /* The DNSKEY is revoked or otherwise invalid, or we don't support the digest algorithm */
1153 static int nsec3_hash_to_gcrypt_md(uint8_t algorithm) {
1155 /* Translates a DNSSEC NSEC3 hash algorithm into a gcrypt digest identifier */
1157 switch (algorithm) {
1171 int algorithm;
1188 algorithm = nsec3_hash_to_gcrypt_md(nsec3->nsec3.algorithm);
1189 if (algorithm < 0)
1190 return algorithm;
1194 hash_size = gcry_md_get_algo_dlen(algorithm);
1204 gcry_md_open(&md, algorithm, 0);
1253 /* Ignore NSEC3 RRs whose algorithm we don't know */
1254 if (nsec3_hash_to_gcrypt_md(rr->nsec3.algorithm) < 0)
1278 if (rr->nsec3.algorithm != nsec3->nsec3.algorithm)
2195 [DNSSEC_UNSUPPORTED_ALGORITHM] = "unsupported-algorithm",