Lines Matching refs:alg
81 static DST_KEY *dst_s_get_key_struct(const char *name, const int alg,
147 dst_check_algorithm(const int alg) in dst_check_algorithm() argument
149 return (dst_t_func[alg] != NULL); in dst_check_algorithm()
167 dst_s_get_key_struct(const char *name, const int alg, const int flags, in dst_s_get_key_struct() argument
172 if (dst_check_algorithm(alg)) /*%< make sure alg is available */ in dst_s_get_key_struct()
183 new_key->dk_alg = alg; in dst_s_get_key_struct()
188 new_key->dk_func = dst_t_func[alg]; in dst_s_get_key_struct()
473 int flags, proto, alg, dlen; in dst_s_read_public_key() local
543 if (fscanf(fp, "%d %d %d", &flags, &proto, &alg) != 3) { in dst_s_read_public_key()
579 return dst_buffer_to_key(in_name, alg, flags, proto, deckey, dlen); in dst_s_read_public_key()
655 int alg ; in dst_dnskey_to_key() local
660 alg = (u_int8_t) rdata[DST_KEY_ALG]; in dst_dnskey_to_key()
661 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_dnskey_to_key()
663 alg)); in dst_dnskey_to_key()
670 if ((key_st = dst_s_get_key_struct(in_name, alg, 0, 0, 0)) == NULL) in dst_dnskey_to_key()
692 alg)); in dst_dnskey_to_key()
766 const int alg, /*!< algorithm */ in dst_buffer_to_key() argument
777 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_buffer_to_key()
778 EREPORT(("%s: Algorithm %d not supported\n", __func__, alg)); in dst_buffer_to_key()
782 dkey = dst_s_get_key_struct(key_name, alg, flags, protocol, -1); in dst_buffer_to_key()
831 int alg, major, minor, file_major, file_minor; in dst_s_read_private_key_file() local
895 if (sscanf((char *)p, "%d", &alg) != 1) in dst_s_read_private_key_file()
923 pk_key->dk_alg = alg; in dst_s_read_private_key_file()
964 const int flags, const int protocol, const int alg) in dst_generate_key() argument
973 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_generate_key()
974 EREPORT(("%s: Algorithm %d not supported\n", __func__, alg)); in dst_generate_key()
978 new_key = dst_s_get_key_struct(name, alg, flags, protocol, bits); in dst_generate_key()
984 EREPORT(("%s: Unsupported algorithm %d\n", __func__, alg)); in dst_generate_key()