---
name: "libressl-DSA_dup_DH"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-DSA_dup_DH"
---

# libressl-DSA\_dup\_DH(3)

create a DH structure out of DSA structure

## NAME

**DSA\_dup\_DH** – create a DH structure out of DSA structure

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/dsa.h\>**

*DH* *\**\

**DSA\_dup\_DH**(*const DSA \*r*);

## DESCRIPTION

**DSA\_dup\_DH**() duplicates *DSA* parameters/keys as *DH* parameters/keys.

## RETURN VALUES

**DSA\_dup\_DH**() returns the new *DH* structure or NULL on error. The error codes can be obtained by ERR\_get\_error(3).

## SEE ALSO

DH\_new(3), DSA\_get0\_pqg(3), DSA\_new(3)

## HISTORY

**DSA\_dup\_DH**() first appeared in OpenSSL 0.9.4 and has been available since OpenBSD 2.6.

## CAVEATS

Be careful to avoid small subgroup attacks when using this.
