| 884 | } |
| 885 | |
| 886 | static void |
| 887 | sctp_hmac_final(uint16_t hmac_algo, sctp_hash_context_t *ctx, |
| 888 | uint8_t *digest) |
| 889 | { |
| 890 | switch (hmac_algo) { |
| 891 | case SCTP_AUTH_HMAC_ID_SHA1: |
| 892 | SCTP_SHA1_FINAL(digest, &ctx->sha1); |
| 893 | break; |
| 894 | case SCTP_AUTH_HMAC_ID_SHA256: |
| 895 | SCTP_SHA256_FINAL(digest, &ctx->sha256); |
| 896 | break; |
| 897 | case SCTP_AUTH_HMAC_ID_RSVD: |
| 898 | default: |
| 899 | /* unknown HMAC algorithm: can't do anything */ |
| 900 | return; |
| 901 | } /* end switch */ |
| 902 | } |
| 903 | |
| 904 | /*- |
| 905 | * Keyed-Hashing for Message Authentication: FIPS 198 (RFC 2104) |
no outgoing calls
no test coverage detected