mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #4542 from SparkiDev/dh_enc_fix
DH encoding: use correct length for inner sequence
This commit is contained in:
@ -8342,8 +8342,8 @@ int wc_DhKeyToDer(DhKey* key, byte* output, word32* outSz, int exportPriv)
|
||||
/* object dhKeyAgreement 1.2.840.113549.1.3.1 */
|
||||
idx += SetObjectId(sizeof(keyDhOid), NULL);
|
||||
idx += sizeof(keyDhOid);
|
||||
/* sequence */
|
||||
idx += SetSequence(idx, NULL);
|
||||
/* sequence - all but pub/priv */
|
||||
idx += SetSequence(idx - keySz, NULL);
|
||||
if (exportPriv) {
|
||||
/* version: 0 (ASN_INTEGER, 0x01, 0x00) */
|
||||
idx += 3;
|
||||
|
Reference in New Issue
Block a user