mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
dtsl-srtp: use PRF according to the DTLS version used
RFC 5764 sec 4.1.2
This commit is contained in:
@@ -1422,10 +1422,11 @@ int wolfSSL_export_dtls_srtp_keying_material(WOLFSSL* ssl,
|
|||||||
XMEMCPY(seed + RAN_LEN, ssl->arrays->serverRandom, RAN_LEN);
|
XMEMCPY(seed + RAN_LEN, ssl->arrays->serverRandom, RAN_LEN);
|
||||||
|
|
||||||
PRIVATE_KEY_UNLOCK();
|
PRIVATE_KEY_UNLOCK();
|
||||||
ret = wc_PRF_TLSv1(out, profile->kdfBits, /* out: generated keys / salt */
|
ret = wc_PRF_TLS(out, profile->kdfBits, /* out: generated keys / salt */
|
||||||
ssl->arrays->masterSecret, SECRET_LEN, /* existing master secret */
|
ssl->arrays->masterSecret, SECRET_LEN, /* existing master secret */
|
||||||
(const byte*)label, (int)XSTRLEN(label),/* label */
|
(const byte*)label, (int)XSTRLEN(label),/* label */
|
||||||
seed, SEED_LEN, /* seed: client/server random */
|
seed, SEED_LEN, /* seed: client/server random */
|
||||||
|
IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm,
|
||||||
ssl->heap, INVALID_DEVID);
|
ssl->heap, INVALID_DEVID);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
*olen = profile->kdfBits;
|
*olen = profile->kdfBits;
|
||||||
|
Reference in New Issue
Block a user