Home
last modified time | relevance | path

Searched refs:alg (Results 1 – 25 of 44) sorted by relevance

12

/titanic_50/usr/src/cmd/cmd-inet/usr.lib/mdnsd/
H A DCryptoAlg.c51 mDNSexport mStatus CryptoAlgInit(mDNSu8 alg, AlgFuncs *func) in CryptoAlgInit() argument
53 if (alg >= CRYPTO_ALG_MAX) in CryptoAlgInit()
55 LogMsg("CryptoAlgInit: alg %d exceeds bounds", alg); in CryptoAlgInit()
60 if (alg != CRYPTO_RSA_SHA1 && alg != CRYPTO_RSA_SHA256 && alg != CRYPTO_RSA_SHA512 && in CryptoAlgInit()
61 alg != CRYPTO_DSA_NSEC3_SHA1 && alg != CRYPTO_RSA_NSEC3_SHA1) in CryptoAlgInit()
63 LogMsg("CryptoAlgInit: alg %d not supported", alg); in CryptoAlgInit()
67 CryptoAlgFuncs[alg] = func; in CryptoAlgInit()
71 mDNSexport mStatus EncAlgInit(mDNSu8 alg, AlgFuncs *func) in EncAlgInit() argument
73 if (alg >= ENC_ALG_MAX) in EncAlgInit()
75 LogMsg("EncAlgInit: alg %d exceeds bounds", alg); in EncAlgInit()
[all …]
H A DCryptoAlg.h31 mDNSu8 alg; member
53 extern AlgContext *AlgCreate(AlgType type, mDNSu8 alg);
/titanic_50/usr/src/uts/common/inet/ilb/
H A Dilb_alg_hash.c274 hash_t *alg = (hash_t *)alg_data; in hash_server_enable() local
277 mutex_enter(&alg->hash_lock); in hash_server_enable()
279 for (i = 0; i < alg->hash_servers; i++) { in hash_server_enable()
280 if (alg->hash_tbl[i].server == host) { in hash_server_enable()
281 if (alg->hash_tbl[i].enabled) { in hash_server_enable()
282 mutex_exit(&alg->hash_lock); in hash_server_enable()
289 if (i == alg->hash_servers) { in hash_server_enable()
290 mutex_exit(&alg->hash_lock); in hash_server_enable()
299 for (j = 0; j < alg->hash_enabled_servers; j++) { in hash_server_enable()
300 if (alg->hash_enabled_tbl[j].server == host) { in hash_server_enable()
[all …]
H A Dilb_alg_rr.c188 ilb_alg_data_t *alg; in ilb_alg_rr_init() local
191 if ((alg = kmem_alloc(sizeof (ilb_alg_data_t), KM_NOSLEEP)) == NULL) in ilb_alg_rr_init()
194 kmem_free(alg, sizeof (ilb_alg_data_t)); in ilb_alg_rr_init()
198 alg->ilb_alg_lb = rr_lb; in ilb_alg_rr_init()
199 alg->ilb_alg_server_del = rr_server_del; in ilb_alg_rr_init()
200 alg->ilb_alg_server_add = rr_server_add; in ilb_alg_rr_init()
201 alg->ilb_alg_server_enable = rr_server_enable; in ilb_alg_rr_init()
202 alg->ilb_alg_server_disable = rr_server_disable; in ilb_alg_rr_init()
203 alg->ilb_alg_fini = rr_fini; in ilb_alg_rr_init()
204 alg->ilb_alg_data = rr_alg; in ilb_alg_rr_init()
[all …]
/titanic_50/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/
H A Dipsecalgs.c168 synch_emit_alg(struct ipsecalgent *alg) in synch_emit_alg() argument
173 EMIT(sync_req_attr, SPD_ATTR_ALG_ID, alg->a_alg_num); in synch_emit_alg()
174 EMIT(sync_req_attr, SPD_ATTR_ALG_PROTO, alg->a_proto_num); in synch_emit_alg()
175 EMIT(sync_req_attr, SPD_ATTR_ALG_INCRBITS, alg->a_key_increment); in synch_emit_alg()
177 nkey_sizes = num_sizes(alg->a_key_sizes); in synch_emit_alg()
180 EMIT(sync_req_attr, SPD_ATTR_ALG_KEYSIZE, alg->a_key_sizes[i]); in synch_emit_alg()
182 nblock_sizes = num_sizes(alg->a_block_sizes); in synch_emit_alg()
183 nparams = num_sizes(alg->a_mech_params); in synch_emit_alg()
187 alg->a_block_sizes[i]); in synch_emit_alg()
192 alg->a_mech_params[i]); in synch_emit_alg()
[all …]
H A Dipsecconf.c601 alginfo_t alg = {0, 0, 0, 0, 0}; in fetch_algorithms() local
670 known_algs[algtype][ipsec_nalgs[algtype]] = alg; in fetch_algorithms()
677 alg.minkeybits = attr->spd_attr_value; in fetch_algorithms()
683 alg.maxkeybits = attr->spd_attr_value; in fetch_algorithms()
689 alg.defkeybits = attr->spd_attr_value; in fetch_algorithms()
695 alg.incr = attr->spd_attr_value; in fetch_algorithms()
701 alg.id = attr->spd_attr_value; in fetch_algorithms()
1726 struct ipsecalgent *alg; in print_alg() local
1735 alg = getipsecalgbynum(algreq->alg_id, proto_num, NULL); in print_alg()
1736 if (alg == NULL) { in print_alg()
[all …]
/titanic_50/usr/src/lib/libc/port/gen/
H A Dcrypt.c113 static void free_crypt_alg(struct crypt_alg_s *alg);
146 struct crypt_alg_s *alg; in crypt() local
181 alg = getalgbyname(algname, &found); in crypt()
182 if ((alg == NULL) || !found) { in crypt()
190 ciphertext = alg->a_genhash(ctbuffer, CRYPT_MAXCIPHERTEXTLEN, in crypt()
191 plaintext, salt, (const char **)alg->a_params); in crypt()
195 free_crypt_alg(alg); in crypt()
219 struct crypt_alg_s *alg = NULL; in crypt_gensalt() local
249 alg = getalgbyname(algname, &found); in crypt_gensalt()
250 if (alg == NULL || !found) { in crypt_gensalt()
[all …]
/titanic_50/usr/src/lib/libresolv2/common/dst/
H A Ddst_api.c77 static DST_KEY *dst_s_get_key_struct(const char *name, const int alg,
141 dst_check_algorithm(const int alg) in dst_check_algorithm() argument
143 return (dst_t_func[alg] != NULL); in dst_check_algorithm()
161 dst_s_get_key_struct(const char *name, const int alg, const int flags, in dst_s_get_key_struct() argument
166 if (dst_check_algorithm(alg)) /*%< make sure alg is available */ in dst_s_get_key_struct()
177 new_key->dk_alg = alg; in dst_s_get_key_struct()
182 new_key->dk_func = dst_t_func[alg]; in dst_s_get_key_struct()
465 int flags, proto, alg, len, dlen; in dst_s_read_public_key() local
534 if (fscanf(fp, "%d %d %d", &flags, &proto, &alg) != 3) { in dst_s_read_public_key()
571 return dst_buffer_to_key(in_name, alg, flags, proto, deckey, dlen); in dst_s_read_public_key()
[all …]
H A Dsupport.c267 int alg, const char *suffix, size_t filename_length) in dst_s_build_filename() argument
280 sprintf(filename, "K%s+%03d+%05d.%s", name, alg, my_id, in dst_s_build_filename()
/titanic_50/usr/src/lib/libipsecutil/common/
H A Dalgs.c125 alg_has_pkg(ipsec_proto_t *proto, struct ipsecalgent *alg) in alg_has_pkg() argument
133 if (proto->proto_algs_pkgs[i].alg_num == alg->a_alg_num) in alg_has_pkg()
189 struct ipsecalgent *alg; in write_new_algfile() local
249 alg = protos[i].proto_algs[j]; in write_new_algfile()
252 alg_pkg = alg_has_pkg(&protos[i], alg); in write_new_algfile()
260 alg->a_proto_num, alg->a_alg_num)); in write_new_algfile()
263 for (k = 0; alg->a_names[k] != NULL; k++) { in write_new_algfile()
264 FPRINTF_ERR(fprintf(f, "%s", alg->a_names[k])); in write_new_algfile()
265 if (alg->a_names[k+1] != NULL) in write_new_algfile()
270 FPRINTF_ERR(fprintf(f, "|%s|", alg->a_mech_name)); in write_new_algfile()
[all …]
/titanic_50/usr/src/uts/common/inet/ip/
H A Dspdsock.c2349 ipsec_alginfo_t *alg = in spdsock_alglist() local
2351 uint_t minbits = alg->alg_minbits; in spdsock_alglist()
2352 uint_t maxbits = alg->alg_maxbits; in spdsock_alglist()
2353 uint_t defbits = alg->alg_default_bits; in spdsock_alglist()
2354 uint_t incr = alg->alg_increment; in spdsock_alglist()
2400 ipsec_alginfo_t *alg; in spdsock_dumpalgs() local
2427 alg = ipss->ipsec_alglists[algtype][algid]; in spdsock_dumpalgs()
2429 (ATTRPERALG + alg->alg_nkey_sizes + in spdsock_dumpalgs()
2430 alg->alg_nblock_sizes + alg->alg_nparams) + in spdsock_dumpalgs()
2491 alg = ipss->ipsec_alglists[algtype][algid]; in spdsock_dumpalgs()
[all …]
H A Dspd.c774 ipsec_alg_reg(ipsec_algtype_t algtype, ipsec_alginfo_t *alg, netstack_t *ns) in ipsec_alg_reg() argument
780 ASSERT(ipss->ipsec_alglists[algtype][alg->alg_id] == NULL); in ipsec_alg_reg()
781 ipsec_alg_fix_min_max(alg, algtype, ns); in ipsec_alg_reg()
782 ipss->ipsec_alglists[algtype][alg->alg_id] = alg; in ipsec_alg_reg()
785 alg_insert_sortlist(algtype, alg->alg_id, ns); in ipsec_alg_reg()
1264 #define SET_EXP_MINMAX(type, wild, alg, min, max, ipss) \ in ipsec_act_wildcard_expand() argument
1267 if (ipss->ipsec_alglists[type][alg] != NULL) \ in ipsec_act_wildcard_expand()
4693 ipsec_alg_fix_min_max(ipsec_alginfo_t *alg, ipsec_algtype_t alg_type, in ipsec_alg_fix_min_max() argument
4715 alg->alg_default_bits = alg->alg_key_sizes[0]; in ipsec_alg_fix_min_max()
4716 alg->alg_default = 0; in ipsec_alg_fix_min_max()
[all …]
/titanic_50/usr/src/uts/common/io/comstar/port/iscsit/
H A Discsit_auth.c290 uint64_t alg; in auth_chap_select_alg() local
299 rc = ddi_strtoull(alg_string, NULL, 0, (u_longlong_t *)&alg); in auth_chap_select_alg()
300 if (rc == 0 && alg == 5) { in auth_chap_select_alg()
310 alg = 0; in auth_chap_select_alg()
318 (uint32_t)alg); in auth_chap_select_alg()
323 if (alg == 0) { in auth_chap_select_alg()
473 uint32_t alg; in auth_chap_expect_r() local
477 &alg); in auth_chap_expect_r()
479 if (alg != 0) { in auth_chap_expect_r()
/titanic_50/usr/src/cmd/cmd-inet/usr.lib/wpad/
H A Ddriver_wifi.c192 wpa_alg alg, unsigned char *addr, int key_idx, boolean_t set_tx, in wpa_driver_wifi_set_key() argument
201 if (alg == WPA_ALG_NONE) in wpa_driver_wifi_set_key()
204 switch (alg) { in wpa_driver_wifi_set_key()
219 " unknown/unsupported algorithm %d", alg); in wpa_driver_wifi_set_key()
H A Dwpa.c1003 int keyidx, tx, key_rsc_len = 0, alg; in wpa_supplicant_process_3_of_4_gtk() local
1036 alg = WPA_ALG_CCMP; in wpa_supplicant_process_3_of_4_gtk()
1045 alg = WPA_ALG_TKIP; in wpa_supplicant_process_3_of_4_gtk()
1053 alg = WPA_ALG_WEP; in wpa_supplicant_process_3_of_4_gtk()
1061 alg = WPA_ALG_WEP; in wpa_supplicant_process_3_of_4_gtk()
1082 if (wpa_s->driver->set_key(wpa_s->handle, wpa_s->linkid, alg, in wpa_supplicant_process_3_of_4_gtk()
1088 } else if (wpa_s->driver->set_key(wpa_s->handle, wpa_s->linkid, alg, in wpa_supplicant_process_3_of_4_gtk()
1249 int alg, keylen, rsclen; in wpa_supplicant_process_3_of_4() local
1253 alg = WPA_ALG_CCMP; in wpa_supplicant_process_3_of_4()
1258 alg = WPA_ALG_TKIP; in wpa_supplicant_process_3_of_4()
[all …]
/titanic_50/usr/src/lib/libresolv2/common/nameser/
H A Dns_verify.c142 char name[MAXDNAME], alg[MAXDNAME]; in ns_verify() local
182 n = dn_expand(msg, eom, cp, alg, MAXDNAME); in ns_verify()
185 if (ns_samename(alg, NS_TSIG_ALG_HMAC_MD5) != 1) in ns_verify()
267 n = ns_name_pton(alg, buf2, sizeof(buf2)); in ns_verify()
348 char name[MAXDNAME], alg[MAXDNAME]; in ns_verify_tcp() local
409 n = dn_expand(msg, eom, cp, alg, MAXDNAME); in ns_verify_tcp()
412 if (ns_samename(alg, NS_TSIG_ALG_HMAC_MD5) != 1) in ns_verify_tcp()
H A Dns_sign.c96 u_char *alg; in ns_sign2() local
143 alg = cp; in ns_sign2()
190 n = ns_name_ntol(alg, buf, sizeof(buf)); in ns_sign2()
/titanic_50/usr/src/cmd/cvcd/sparc/sun4u/starcat/
H A Dcvcd.c398 cvcd_alg_t *alg; local
400 for (alg = algs; alg->arg_name != NULL && arg != NULL; alg++) {
401 if (strncmp(alg->arg_name, arg, strlen(alg->arg_name) + 1)
403 return (alg->alg_id);
/titanic_50/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_mip.c654 uint16_t alg, spi_hi, spi_low; in key_ext() local
661 (void) memcpy(&alg, p, sizeof (alg)); in key_ext()
662 alg = ntohs(alg); in key_ext()
663 switch (alg) { in key_ext()
678 "Algorithm = 0x%x: %s", alg, alg_string); in key_ext()
679 p += sizeof (alg); in key_ext()
680 this_ext_len -= sizeof (alg); in key_ext()
/titanic_50/usr/src/lib/libpkg/common/
H A Dsecurity.c256 *get_fingerprint(X509 *cert, const EVP_MD *alg) in get_fingerprint() argument
264 if (!X509_digest(cert, alg, md, &n)) { in get_fingerprint()
/titanic_50/usr/src/lib/pkcs11/pkcs11_tpm/common/
H A Dasn1.c839 CK_BYTE *alg = NULL; in ber_decode_PrivateKeyInfo() local
858 rc = ber_decode_SEQUENCE(buf + offset, &alg, &len, &field_len); in ber_decode_PrivateKeyInfo()
862 *algorithm = alg; in ber_decode_PrivateKeyInfo()
865 rc = ber_decode_OCTET_STRING(alg + len, priv_key, &buf_len, &field_len); in ber_decode_PrivateKeyInfo()
1073 CK_BYTE *alg = NULL; in ber_decode_RSAPrivateKey() local
1080 rc = ber_decode_PrivateKeyInfo(data, data_len, &alg, in ber_decode_RSAPrivateKey()
1085 if (memcmp(alg, ber_rsaEncryption, ber_rsaEncryptionLen) != 0) { in ber_decode_RSAPrivateKey()
H A Dkey_mgr.c37 CK_BYTE *alg = NULL; in key_mgr_get_private_key_type() local
42 rc = ber_decode_PrivateKeyInfo(keydata, keylen, &alg, in key_mgr_get_private_key_type()
48 if (memcmp(alg, ber_rsaEncryption, in key_mgr_get_private_key_type()
/titanic_50/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/
H A Difconfig.c1111 struct ipsecalgent *alg; in rparsealg() local
1126 alg = getipsecalgbynum(alg_value, proto_num, NULL); in rparsealg()
1127 if (alg != NULL) { in rparsealg()
1128 (void) strlcpy(numprint, alg->a_names[0], sizeof (numprint)); in rparsealg()
1129 freeipsecalgent(alg); in rparsealg()
1140 struct ipsecalgent *alg; in parsealg() local
1160 alg = getipsecalgbyname(algname, proto_num, NULL); in parsealg()
1161 if (alg != NULL) { in parsealg()
1162 invalue = alg->a_alg_num; in parsealg()
1163 freeipsecalgent(alg); in parsealg()
[all …]
/titanic_50/usr/src/lib/libslp/javalib/com/sun/slp/
H A DAuthBlock.java389 String alg = cert.getPublicKey().getAlgorithm(); in getSignAs() local
391 if (alg.equals("DSA")) { in getSignAs()
393 } else if (alg.equals("RSA")) { in getSignAs()
397 new Object[] {alg}); in getSignAs()
/titanic_50/usr/src/lib/libkmf/libkmf/common/
H A Dcsrcrlop.c204 KMF_OID *alg; in kmf_set_csr_sig_alg() local
209 alg = x509_algid_to_algoid(sigAlg); in kmf_set_csr_sig_alg()
211 if (alg != NULL) { in kmf_set_csr_sig_alg()
214 (KMF_DATA *)alg); in kmf_set_csr_sig_alg()

12