- * clear any cached key(s) if they match the given key id on an association. * the cached key(s) will be recomputed and re-cached at next use. * ASSUMES TCB_LOCK is already held */
| 1142 | * ASSUMES TCB_LOCK is already held |
| 1143 | */ |
| 1144 | void |
| 1145 | sctp_clear_cachedkeys(struct sctp_tcb *stcb, uint16_t keyid) |
| 1146 | { |
| 1147 | if (stcb == NULL) |
| 1148 | return; |
| 1149 | |
| 1150 | if (keyid == stcb->asoc.authinfo.assoc_keyid) { |
| 1151 | sctp_free_key(stcb->asoc.authinfo.assoc_key); |
| 1152 | stcb->asoc.authinfo.assoc_key = NULL; |
| 1153 | } |
| 1154 | if (keyid == stcb->asoc.authinfo.recv_keyid) { |
| 1155 | sctp_free_key(stcb->asoc.authinfo.recv_key); |
| 1156 | stcb->asoc.authinfo.recv_key = NULL; |
| 1157 | } |
| 1158 | } |
| 1159 | |
| 1160 | /*- |
| 1161 | * clear any cached key(s) if they match the given key id for all assocs on |
no test coverage detected