Lines Matching refs:alg

79 static DST_KEY *dst_s_get_key_struct(const char *name, const int alg,
143 dst_check_algorithm(const int alg) in dst_check_algorithm() argument
145 return (dst_t_func[alg] != NULL); in dst_check_algorithm()
163 dst_s_get_key_struct(const char *name, const int alg, const int flags, in dst_s_get_key_struct() argument
168 if (dst_check_algorithm(alg)) /*%< make sure alg is available */ in dst_s_get_key_struct()
179 new_key->dk_alg = alg; in dst_s_get_key_struct()
184 new_key->dk_func = dst_t_func[alg]; in dst_s_get_key_struct()
467 int flags, proto, alg, len, dlen; in dst_s_read_public_key() local
536 if (fscanf(fp, "%d %d %d", &flags, &proto, &alg) != 3) { in dst_s_read_public_key()
573 return dst_buffer_to_key(in_name, alg, flags, proto, deckey, dlen); in dst_s_read_public_key()
648 int alg ; in dst_dnskey_to_key() local
653 alg = (u_int8_t) rdata[DST_KEY_ALG]; in dst_dnskey_to_key()
654 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_dnskey_to_key()
656 alg)); in dst_dnskey_to_key()
663 if ((key_st = dst_s_get_key_struct(in_name, alg, 0, 0, 0)) == NULL) in dst_dnskey_to_key()
685 alg)); in dst_dnskey_to_key()
760 const int alg, /*!< algorithm */ in dst_buffer_to_key() argument
771 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_buffer_to_key()
772 EREPORT(("dst_buffer_to_key(): Algorithm %d not suppored\n", alg)); in dst_buffer_to_key()
776 dkey = dst_s_get_key_struct(key_name, alg, flags, protocol, -1); in dst_buffer_to_key()
825 int cnt, alg, len, major, minor, file_major, file_minor; in dst_s_read_private_key_file() local
887 if (sscanf((char *)p, "%d", &alg) != 1) in dst_s_read_private_key_file()
913 pk_key->dk_alg = alg; in dst_s_read_private_key_file()
954 const int flags, const int protocol, const int alg) in dst_generate_key() argument
963 if (!dst_check_algorithm(alg)) { /*%< make sure alg is available */ in dst_generate_key()
964 EREPORT(("dst_generate_key(): Algorithm %d not suppored\n", alg)); in dst_generate_key()
968 new_key = dst_s_get_key_struct(name, alg, flags, protocol, bits); in dst_generate_key()
975 alg)); in dst_generate_key()