Lines Matching defs:auth_cfg

69 	emlxs_auth_cfg_t *auth_cfg);
71 emlxs_auth_cfg_t *auth_cfg);
794 node_dhc->auth_cfg.dh_group_priority[1]);
831 while (node_dhc->auth_cfg.dh_group_priority[wnt] != 0xF) {
838 if (node_dhc->auth_cfg.dh_group_priority[i] ==
842 node_dhc->auth_cfg.dh_group_priority[i];
880 SHA1Update(&sha1ctx, (void *) &node_dhc->auth_cfg.local_entity,
1519 if (node_dhc->auth_cfg.hash_priority[1] == 0x00) {
1535 if (node_dhc->auth_cfg.dh_group_priority[1] == 0xf) {
1541 } else if (node_dhc->auth_cfg.dh_group_priority[2] == 0xf) {
1547 } else if (node_dhc->auth_cfg.dh_group_priority[3] == 0xf) {
1553 } else if (node_dhc->auth_cfg.dh_group_priority[4] == 0xf) {
1559 } else if (node_dhc->auth_cfg.dh_group_priority[5] == 0xf) {
1582 if (node_dhc->auth_cfg.hash_priority[1] == 0x00) {
1627 if (node_dhc->auth_cfg.hash_priority[1] == 0x00) {
1683 node_dhc->auth_cfg.hash_priority[0];
1690 (node_dhc->auth_cfg.dh_group_priority[4]);
1692 (node_dhc->auth_cfg.dh_group_priority[3]);
1694 (node_dhc->auth_cfg.dh_group_priority[2]);
1696 (node_dhc->auth_cfg.dh_group_priority[1]);
1698 (node_dhc->auth_cfg.dh_group_priority[0]);
1702 (node_dhc->auth_cfg.dh_group_priority[3]);
1704 (node_dhc->auth_cfg.dh_group_priority[2]);
1706 (node_dhc->auth_cfg.dh_group_priority[1]);
1708 (node_dhc->auth_cfg.dh_group_priority[0]);
1712 (node_dhc->auth_cfg.dh_group_priority[2]);
1714 (node_dhc->auth_cfg.dh_group_priority[1]);
1716 (node_dhc->auth_cfg.dh_group_priority[0]);
1720 (node_dhc->auth_cfg.dh_group_priority[1]);
1722 (node_dhc->auth_cfg.dh_group_priority[0]);
1726 (node_dhc->auth_cfg.dh_group_priority[0]);
1743 (node_dhc->auth_cfg.hash_priority[0]);
1745 (node_dhc->auth_cfg.hash_priority[1]);
1753 (node_dhc->auth_cfg.dh_group_priority[4]);
1755 (node_dhc->auth_cfg.dh_group_priority[3]);
1757 (node_dhc->auth_cfg.dh_group_priority[2]);
1759 (node_dhc->auth_cfg.dh_group_priority[1]);
1761 (node_dhc->auth_cfg.dh_group_priority[0]);
1765 (node_dhc->auth_cfg.dh_group_priority[3]);
1767 (node_dhc->auth_cfg.dh_group_priority[2]);
1769 (node_dhc->auth_cfg.dh_group_priority[1]);
1771 (node_dhc->auth_cfg.dh_group_priority[0]);
1775 (node_dhc->auth_cfg.dh_group_priority[2]);
1777 (node_dhc->auth_cfg.dh_group_priority[1]);
1779 (node_dhc->auth_cfg.dh_group_priority[0]);
1783 (node_dhc->auth_cfg.dh_group_priority[1]);
1785 (node_dhc->auth_cfg.dh_group_priority[0]);
1789 (node_dhc->auth_cfg.dh_group_priority[0]);
1809 (node_dhc->auth_cfg.hash_priority[0]);
1829 (node_dhc->auth_cfg.hash_priority[0]);
1831 (node_dhc->auth_cfg.hash_priority[1]);
1844 node_dhc->auth_cfg.hash_priority[0],
1845 node_dhc->auth_cfg.hash_priority[1],
1956 node_dhc->auth_cfg.authentication_timeout;
2128 ndlp->nlp_DID, node_dhc->auth_cfg.hash_priority[0],
2129 node_dhc->auth_cfg.hash_priority[1],
2130 node_dhc->auth_cfg.hash_priority[2],
2131 node_dhc->auth_cfg.hash_priority[3]);
2547 if (node_dhc->auth_cfg.bidirectional == 0) {
2654 if (node_dhc->auth_cfg.bidirectional == 0) {
3000 /* Or should check ndlp->auth_cfg..... */
3001 if (node_dhc->auth_cfg.bidirectional == 1) {
3159 node_dhc->auth_cfg.authentication_timeout;
3318 if (node_dhc->auth_cfg.bidirectional == 0) {
3647 node_dhc->auth_cfg.authentication_timeout;
4034 node_dhc->auth_cfg.authentication_timeout;
4515 if (node_dhc->auth_cfg.hash_priority[0] == hs_id[0]) {
4516 hash_id = node_dhc->auth_cfg.hash_priority[0];
4517 } else if (node_dhc->auth_cfg.hash_priority[1] == hs_id[0]) {
4518 hash_id = node_dhc->auth_cfg.hash_priority[1];
4534 hash_id = node_dhc->auth_cfg.hash_priority[0];
4859 if (node_dhc->auth_cfg.hash_priority[0] == hs_id[0]) {
4860 hash_id = node_dhc->auth_cfg.hash_priority[0];
4861 } else if (node_dhc->auth_cfg.hash_priority[1] == hs_id[0]) {
4862 hash_id = node_dhc->auth_cfg.hash_priority[1];
4878 hash_id = node_dhc->auth_cfg.hash_priority[0];
6728 emlxs_auth_cfg_t *auth_cfg;
6737 auth_cfg = &(node_dhc->auth_cfg);
6742 bcopy((void *) &auth_cfg->local_entity, (void *)lwwn, 8);
6751 bcopy((void *)&auth_cfg->remote_entity, (void *)rwwn, 8);
6813 emlxs_auth_cfg_t *auth_cfg;
6876 auth_cfg = emlxs_auth_cfg_find(port,
6881 auth_cfg = emlxs_auth_cfg_find(port,
6887 if (!auth_cfg) {
6900 auth_cfg->node = NULL;
6902 node_dhc->parent_auth_cfg = auth_cfg;
6903 auth_cfg->node = ndlp;
6927 switch (auth_cfg->authentication_mode) {
6971 switch (auth_cfg->authentication_mode) {
7006 bzero(&node_dhc->auth_cfg, sizeof (node_dhc->auth_cfg));
7011 (uint8_t *)&node_dhc->auth_cfg.local_entity, 8);
7013 (uint8_t *)&node_dhc->auth_cfg.remote_entity, 8);
7015 node_dhc->auth_cfg.authentication_timeout =
7016 auth_cfg->authentication_timeout;
7017 node_dhc->auth_cfg.authentication_mode =
7018 auth_cfg->authentication_mode;
7025 node_dhc->auth_cfg.bidirectional = 0;
7027 node_dhc->auth_cfg.bidirectional = auth_cfg->bidirectional;
7030 node_dhc->auth_cfg.reauthenticate_time_interval =
7031 auth_cfg->reauthenticate_time_interval;
7034 switch (auth_cfg->authentication_type_priority[i]) {
7036 node_dhc->auth_cfg.authentication_type_priority[i] =
7041 node_dhc->auth_cfg.authentication_type_priority[i] =
7046 node_dhc->auth_cfg.authentication_type_priority[i] =
7051 node_dhc->auth_cfg.authentication_type_priority[i] =
7056 node_dhc->auth_cfg.authentication_type_priority[i] =
7061 switch (auth_cfg->hash_priority[i]) {
7063 node_dhc->auth_cfg.hash_priority[i] = AUTH_SHA1;
7067 node_dhc->auth_cfg.hash_priority[i] = AUTH_MD5;
7071 node_dhc->auth_cfg.hash_priority[i] = 0;
7077 switch (auth_cfg->dh_group_priority[i]) {
7079 node_dhc->auth_cfg.dh_group_priority[i] = GROUP_NULL;
7083 node_dhc->auth_cfg.dh_group_priority[i] = GROUP_1024;
7087 node_dhc->auth_cfg.dh_group_priority[i] = GROUP_1280;
7091 node_dhc->auth_cfg.dh_group_priority[i] = GROUP_1536;
7095 node_dhc->auth_cfg.dh_group_priority[i] = GROUP_2048;
7099 node_dhc->auth_cfg.dh_group_priority[i] = 0xF;
7140 node_dhc->auth_cfg.authentication_timeout;
7327 emlxs_auth_cfg_t *auth_cfg = NULL;
7363 auth_cfg = emlxs_auth_cfg_find(port,
7367 if ((!auth_cfg) || (!auth_key)) {
7389 emlxs_auth_cfg_t *auth_cfg;
7434 auth_cfg = emlxs_auth_cfg_find(port,
7439 auth_cfg = emlxs_auth_cfg_find(port,
7445 if (auth_key && auth_cfg &&
7446 (auth_cfg->authentication_mode == AUTH_MODE_ACTIVE)) {
7493 if (node_dhc->auth_cfg.reauthenticate_time_interval == 0) {
7593 node_dhc->auth_cfg.reauthenticate_time_interval) {
7596 (60 * node_dhc->auth_cfg.reauthenticate_time_interval);
7627 node_dhc->auth_cfg.reauthenticate_time_interval,
7717 emlxs_auth_cfg_t *auth_cfg;
7721 auth_cfg = emlxs_auth_cfg_get(hba,
7724 if (auth_cfg) {
7725 emlxs_auth_cfg_print(hba, auth_cfg);
7726 return (auth_cfg);
7729 auth_cfg = emlxs_auth_cfg_get(hba,
7732 if (auth_cfg) {
7733 emlxs_auth_cfg_print(hba, auth_cfg);
7734 return (auth_cfg);
7738 auth_cfg = emlxs_auth_cfg_get(hba,
7741 if (auth_cfg) {
7742 emlxs_auth_cfg_print(hba, auth_cfg);
7743 return (auth_cfg);
7746 return (&hba->auth_cfg);
7754 emlxs_auth_cfg_t *auth_cfg;
7762 auth_cfg = &hba->auth_cfg;
7763 bzero(auth_cfg, sizeof (emlxs_auth_cfg_t));
7764 auth_cfg->next = auth_cfg;
7765 auth_cfg->prev = auth_cfg;
7768 auth_cfg->authentication_timeout =
7770 auth_cfg->authentication_mode =
7772 auth_cfg->bidirectional =
7774 auth_cfg->authentication_type_priority[0] =
7776 auth_cfg->authentication_type_priority[1] =
7778 auth_cfg->authentication_type_priority[2] =
7780 auth_cfg->authentication_type_priority[3] =
7782 auth_cfg->hash_priority[0] =
7784 auth_cfg->hash_priority[1] =
7786 auth_cfg->hash_priority[2] =
7788 auth_cfg->hash_priority[3] =
7790 auth_cfg->dh_group_priority[0] =
7792 auth_cfg->dh_group_priority[1] =
7794 auth_cfg->dh_group_priority[2] =
7796 auth_cfg->dh_group_priority[3] =
7798 auth_cfg->dh_group_priority[4] =
7800 auth_cfg->dh_group_priority[5] =
7802 auth_cfg->dh_group_priority[6] =
7804 auth_cfg->dh_group_priority[7] =
7806 auth_cfg->reauthenticate_time_interval =
7821 emlxs_auth_cfg_t *auth_cfg = hba->auth_cfg.next;
7826 while (auth_cfg && auth_cfg != &hba->auth_cfg) {
7827 next = auth_cfg->next;
7828 emlxs_auth_cfg_destroy(hba, auth_cfg);
7829 auth_cfg = next;
7840 emlxs_auth_cfg_print(emlxs_hba_t *hba, emlxs_auth_cfg_t *auth_cfg)
7852 (uint8_t *)&auth_cfg->local_entity),
7854 (uint8_t *)&auth_cfg->remote_entity),
7855 auth_cfg->authentication_timeout,
7856 auth_cfg->authentication_mode,
7857 auth_cfg->bidirectional,
7858 auth_cfg->authentication_type_priority[0],
7859 auth_cfg->authentication_type_priority[1],
7860 auth_cfg->authentication_type_priority[2],
7861 auth_cfg->authentication_type_priority[3],
7862 auth_cfg->hash_priority[0],
7863 auth_cfg->hash_priority[1],
7864 auth_cfg->hash_priority[2],
7865 auth_cfg->hash_priority[3],
7866 auth_cfg->dh_group_priority[0],
7867 auth_cfg->dh_group_priority[1],
7868 auth_cfg->dh_group_priority[2],
7869 auth_cfg->dh_group_priority[3],
7870 auth_cfg->dh_group_priority[4],
7871 auth_cfg->dh_group_priority[5],
7872 auth_cfg->dh_group_priority[6],
7873 auth_cfg->dh_group_priority[7],
7874 auth_cfg->reauthenticate_time_interval);
7883 emlxs_auth_cfg_t *auth_cfg;
7892 return (&hba->auth_cfg);
7895 for (auth_cfg = hba->auth_cfg.next;
7896 auth_cfg != &hba->auth_cfg; auth_cfg = auth_cfg->next) {
7900 if (bcmp((void *)&auth_cfg->local_entity,
7907 if (bcmp((void *)&auth_cfg->remote_entity,
7911 return (auth_cfg);
7923 emlxs_auth_cfg_t *auth_cfg;
7926 auth_cfg = emlxs_auth_cfg_get(hba, lwwpn, rwwpn);
7928 if (auth_cfg) {
7929 return (auth_cfg);
7932 auth_cfg = (emlxs_auth_cfg_t *)kmem_zalloc(sizeof (emlxs_auth_cfg_t),
7935 if (!auth_cfg) {
7939 auth_cfg->next = &hba->auth_cfg;
7940 auth_cfg->prev = hba->auth_cfg.prev;
7941 hba->auth_cfg.prev->next = auth_cfg;
7942 hba->auth_cfg.prev = auth_cfg;
7947 bcopy((void *)lwwpn, (void *)&auth_cfg->local_entity, 8);
7950 bcopy((void *)rwwpn, (void *)&auth_cfg->remote_entity, 8);
7952 auth_cfg->auth_status.auth_state = DFC_AUTH_STATE_OFF;
7954 return (auth_cfg);
7961 emlxs_auth_cfg_destroy(emlxs_hba_t *hba, emlxs_auth_cfg_t *auth_cfg)
7964 if (!auth_cfg) {
7967 if (auth_cfg == &hba->auth_cfg) {
7971 auth_cfg->next->prev = auth_cfg->prev;
7972 auth_cfg->prev->next = auth_cfg->next;
7976 if (auth_cfg->node &&
7977 auth_cfg->node->nlp_active &&
7978 (auth_cfg->node->node_dhc.parent_auth_cfg == auth_cfg)) {
7979 auth_cfg->node->node_dhc.parent_auth_cfg = NULL;
7981 bzero(auth_cfg, sizeof (emlxs_auth_cfg_t));
7982 kmem_free(auth_cfg, sizeof (emlxs_auth_cfg_t));
7995 emlxs_auth_cfg_t auth_cfg;
8029 if (emlxs_auth_cfg_parse(hba, &auth_cfg, prop_str) == 0) {
8036 (uint8_t *)&auth_cfg.local_entity,
8037 (uint8_t *)&auth_cfg.remote_entity);
8046 auth_cfg.next = auth_cfg2->next;
8047 auth_cfg.prev = auth_cfg2->prev;
8048 bcopy((uint8_t *)&auth_cfg,
8062 emlxs_auth_cfg_t *auth_cfg,
8076 bzero(auth_cfg, sizeof (emlxs_auth_cfg_t));
8079 np = (uint8_t *)&auth_cfg->local_entity;
8121 np = (uint8_t *)&auth_cfg->remote_entity;
8182 auth_cfg->authentication_timeout = sum;
8210 auth_cfg->authentication_mode = sum;
8238 auth_cfg->bidirectional = sum;
8264 auth_cfg->authentication_type_priority[i] = sum;
8292 auth_cfg->hash_priority[i] = sum;
8320 auth_cfg->dh_group_priority[i] = sum;
8349 auth_cfg->reauthenticate_time_interval = sum;
8357 if (auth_cfg->authentication_timeout < cfg[CFG_AUTH_TMO].low) {
8358 auth_cfg->authentication_timeout = cfg[CFG_AUTH_TMO].current;
8359 } else if (auth_cfg->authentication_timeout > cfg[CFG_AUTH_TMO].hi) {
8360 auth_cfg->authentication_timeout = cfg[CFG_AUTH_TMO].current;
8363 if (auth_cfg->authentication_mode < cfg[CFG_AUTH_MODE].low) {
8364 auth_cfg->authentication_mode = cfg[CFG_AUTH_MODE].current;
8365 } else if (auth_cfg->authentication_mode > cfg[CFG_AUTH_MODE].hi) {
8366 auth_cfg->authentication_mode = cfg[CFG_AUTH_MODE].current;
8369 if (auth_cfg->bidirectional < cfg[CFG_AUTH_BIDIR].low) {
8370 auth_cfg->bidirectional = cfg[CFG_AUTH_BIDIR].current;
8371 } else if (auth_cfg->bidirectional > cfg[CFG_AUTH_BIDIR].hi) {
8372 auth_cfg->bidirectional = cfg[CFG_AUTH_BIDIR].current;
8376 if (auth_cfg->authentication_type_priority[i] >
8379 auth_cfg->authentication_type_priority[i] =
8380 hba->auth_cfg.authentication_type_priority[i];
8382 if (auth_cfg->hash_priority[i] > DFC_AUTH_HASH_MAX) {
8384 auth_cfg->hash_priority[i] =
8385 hba->auth_cfg.hash_priority[i];
8391 if (auth_cfg->dh_group_priority[i] > DFC_AUTH_GROUP_MAX) {
8393 auth_cfg->dh_group_priority[i] =
8394 hba->auth_cfg.dh_group_priority[i];
8399 if (auth_cfg->reauthenticate_time_interval <
8401 auth_cfg->reauthenticate_time_interval =
8403 } else if (auth_cfg->reauthenticate_time_interval >
8405 auth_cfg->reauthenticate_time_interval =
8408 emlxs_auth_cfg_print(hba, auth_cfg);
8413 bzero(auth_cfg, sizeof (emlxs_auth_cfg_t));
9128 emlxs_auth_cfg_t *auth_cfg;
9141 auth_cfg = emlxs_auth_cfg_get(hba,
9144 if (!auth_cfg) {
9157 fcsp_cfg->auth_tov = auth_cfg->authentication_timeout;
9158 fcsp_cfg->auth_mode = auth_cfg->authentication_mode;
9159 fcsp_cfg->auth_bidir = auth_cfg->bidirectional;
9163 auth_cfg->authentication_type_priority[i];
9165 auth_cfg->hash_priority[i];
9169 fcsp_cfg->group_priority[i] = auth_cfg->dh_group_priority[i];
9172 fcsp_cfg->reauth_tov = auth_cfg->reauthenticate_time_interval;
9190 emlxs_auth_cfg_t *auth_cfg;
9227 auth_cfg = emlxs_auth_cfg_create(hba,
9231 if (!auth_cfg) {
9241 auth_cfg->authentication_timeout = fcsp_cfg->auth_tov;
9242 auth_cfg->authentication_mode = fcsp_cfg->auth_mode;
9243 auth_cfg->bidirectional = fcsp_cfg->auth_bidir;
9246 auth_cfg->authentication_type_priority[i] =
9248 auth_cfg->hash_priority[i] =
9253 auth_cfg->dh_group_priority[i] = fcsp_cfg->group_priority[i];
9256 auth_cfg->reauthenticate_time_interval = fcsp_cfg->reauth_tov;
9258 emlxs_auth_cfg_print(hba, auth_cfg);
9314 emlxs_auth_cfg_t *auth_cfg;
9350 auth_cfg = emlxs_auth_cfg_get(hba,
9353 if (!auth_cfg) {
9367 emlxs_auth_cfg_destroy(hba, auth_cfg);
9649 emlxs_auth_cfg_t *auth_cfg;
9665 auth_cfg = emlxs_auth_cfg_get(hba, (uint8_t *)&fcsp_status->lwwpn,
9668 if (!auth_cfg) {
9686 auth_status = &auth_cfg->auth_status;
9687 auth_time = auth_cfg->auth_time;
9688 ndlp = auth_cfg->node;
9734 emlxs_auth_cfg_t *auth_cfg;
9745 for (auth_cfg = hba->auth_cfg.next;
9746 auth_cfg != &hba->auth_cfg;
9747 auth_cfg = auth_cfg->next) {
9748 bcopy((uint8_t *)&auth_cfg->local_entity,
9750 bcopy((uint8_t *)&auth_cfg->remote_entity,
9753 fcsp_cfg->auth_tov = auth_cfg->authentication_timeout;
9754 fcsp_cfg->auth_mode = auth_cfg->authentication_mode;
9755 fcsp_cfg->auth_bidir = auth_cfg->bidirectional;
9759 auth_cfg->authentication_type_priority[i];
9761 auth_cfg->hash_priority[i];
9766 auth_cfg->dh_group_priority[i];
9769 fcsp_cfg->reauth_tov = auth_cfg->reauthenticate_time_interval;