Lines Matching refs:alg
73 static DST_KEY *dst_s_get_key_struct(const char *name, const int alg,
137 dst_check_algorithm(const int alg) in dst_check_algorithm() argument
139 return (dst_t_func[alg] != NULL); in dst_check_algorithm()
157 dst_s_get_key_struct(const char *name, const int alg, const int flags, in dst_s_get_key_struct() argument
162 if (dst_check_algorithm(alg)) /*%< make sure alg is available */ in dst_s_get_key_struct()
173 new_key->dk_alg = alg; in dst_s_get_key_struct()
178 new_key->dk_func = dst_t_func[alg]; in dst_s_get_key_struct()
461 int flags, proto, alg, len, dlen; in dst_s_read_public_key() local
530 if (fscanf(fp, "%d %d %d", &flags, &proto, &alg) != 3) { in dst_s_read_public_key()
567 return dst_buffer_to_key(in_name, alg, flags, proto, deckey, dlen); in dst_s_read_public_key()
642 int alg ; in dst_dnskey_to_key() local
647 alg = (u_int8_t) rdata[DST_KEY_ALG]; in dst_dnskey_to_key()
648 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_dnskey_to_key()
650 alg)); in dst_dnskey_to_key()
657 if ((key_st = dst_s_get_key_struct(in_name, alg, 0, 0, 0)) == NULL) in dst_dnskey_to_key()
679 alg)); in dst_dnskey_to_key()
754 const int alg, /*!< algorithm */ in dst_buffer_to_key() argument
765 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_buffer_to_key()
766 EREPORT(("dst_buffer_to_key(): Algorithm %d not suppored\n", alg)); in dst_buffer_to_key()
770 dkey = dst_s_get_key_struct(key_name, alg, flags, protocol, -1); in dst_buffer_to_key()
819 int cnt, alg, len, major, minor, file_major, file_minor; in dst_s_read_private_key_file() local
881 if (sscanf((char *)p, "%d", &alg) != 1) in dst_s_read_private_key_file()
907 pk_key->dk_alg = alg; in dst_s_read_private_key_file()
948 const int flags, const int protocol, const int alg) in dst_generate_key() argument
957 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_generate_key()
958 EREPORT(("dst_generate_key(): Algorithm %d not suppored\n", alg)); in dst_generate_key()
962 new_key = dst_s_get_key_struct(name, alg, flags, protocol, bits); in dst_generate_key()
969 alg)); in dst_generate_key()