| 588 | } |
| 589 | |
| 590 | static sctp_sharedkey_t * |
| 591 | sctp_copy_sharedkey(const sctp_sharedkey_t *skey) |
| 592 | { |
| 593 | sctp_sharedkey_t *new_skey; |
| 594 | |
| 595 | if (skey == NULL) |
| 596 | return (NULL); |
| 597 | new_skey = sctp_alloc_sharedkey(); |
| 598 | if (new_skey == NULL) |
| 599 | return (NULL); |
| 600 | if (skey->key != NULL) |
| 601 | new_skey->key = sctp_set_key(skey->key->key, skey->key->keylen); |
| 602 | else |
| 603 | new_skey->key = NULL; |
| 604 | new_skey->keyid = skey->keyid; |
| 605 | return (new_skey); |
| 606 | } |
| 607 | |
| 608 | int |
| 609 | sctp_copy_skeylist(const struct sctp_keyhead *src, struct sctp_keyhead *dest) |
no test coverage detected