Deep-copy an ASN.1 value by encoding with i2d then decoding with d2i.
Declared in <openssl/asn1.h>
void*
ASN1_dup(
i2d_of_void* i2d,
d2i_of_void* d2i,
void const* x);
Newly allocated copy, or NULL on error.
| Name | Description |
|---|---|
| i2d | Encoder that serializes x to DER (or returns the required length). |
| d2i | Decoder that rebuilds a heap object from that DER. |
| x | Source object to duplicate. |