| 1121 | } |
| 1122 | |
| 1123 | int |
| 1124 | sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id) |
| 1125 | { |
| 1126 | int i; |
| 1127 | |
| 1128 | if ((list == NULL) || (id == SCTP_AUTH_HMAC_ID_RSVD)) |
| 1129 | return (0); |
| 1130 | |
| 1131 | for (i = 0; i < list->num_algo; i++) |
| 1132 | if (list->hmac[i] == id) |
| 1133 | return (1); |
| 1134 | |
| 1135 | /* not in the list */ |
| 1136 | return (0); |
| 1137 | } |
| 1138 | |
| 1139 | /*- |
| 1140 | * clear any cached key(s) if they match the given key id on an association. |