| 989 | } |
| 990 | |
| 991 | void |
| 992 | sctp_fill_random_store(struct sctp_pcb *m) |
| 993 | { |
| 994 | /* |
| 995 | * Here we use the MD5/SHA-1 to hash with our good randomNumbers and |
| 996 | * our counter. The result becomes our good random numbers and we |
| 997 | * then setup to give these out. Note that we do no locking to |
| 998 | * protect this. This is ok, since if competing folks call this we |
| 999 | * will get more gobbled gook in the random store which is what we |
| 1000 | * want. There is a danger that two guys will use the same random |
| 1001 | * numbers, but thats ok too since that is random as well :-> |
| 1002 | */ |
| 1003 | m->store_at = 0; |
| 1004 | (void)sctp_hmac(SCTP_HMAC, (uint8_t *)m->random_numbers, |
| 1005 | sizeof(m->random_numbers), (uint8_t *)&m->random_counter, |
| 1006 | sizeof(m->random_counter), (uint8_t *)m->random_store); |
| 1007 | m->random_counter++; |
| 1008 | } |
| 1009 | |
| 1010 | uint32_t |
| 1011 | sctp_select_initial_TSN(struct sctp_pcb *inp) |
no test coverage detected