[#ASN1_dup]
= ASN1&lowbar;dup
:mrdocs:

Deep&hyphen;copy an ASN&period;1 value by encoding with `i2d` then decoding with `d2i&period;`

== Synopsis

Declared in `&lt;openssl&sol;asn1&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void*
ASN1&lowbar;dup(
    xref:i2d_of_void.adoc[i2d&lowbar;of&lowbar;void]* i2d,
    xref:d2i_of_void.adoc[d2i&lowbar;of&lowbar;void]* d2i,
    void const* x);
----

== Return Value

Newly allocated copy, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *i2d*
| Encoder that serializes `x` to DER (or returns the required length)&period;
| *d2i*
| Decoder that rebuilds a heap object from that DER&period;
| *x*
| Source object to duplicate&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
