/** * @ingroup proxypolicy * * Makes a copy of the proxypolicy - this function * allocates space for a new PROXYPOLICY, so the * returned PROXYPOLICY must be freed when * its no longer needed * * @param policy the proxy policy to copy * * @return the new PROXYPOLICY */ PROXYPOLICY * PROXYPOLICY_dup( PROXYPOLICY * policy) { return ((PROXYPOLICY *) ASN1_dup(gt_i2d_cast i2d_PROXYPOLICY, gt_d2i_cast d2i_PROXYPOLICY, (char *)policy)); }
/** * @ingroup proxypolicy * * Makes a copy of the proxypolicy - this function * allocates space for a new PROXYPOLICY, so the * returned PROXYPOLICY must be freed when * its no longer needed * * @param policy the proxy policy to copy * * @return the new PROXYPOLICY */ PROXYPOLICY * PROXYPOLICY_dup( PROXYPOLICY * policy) { return ((PROXYPOLICY *) ASN1_dup((int (*)())i2d_PROXYPOLICY, (char *(*)())d2i_PROXYPOLICY, (char *)policy)); }
static PKCS7_RECIP_INFO * ossl_PKCS7_RECIP_INFO_dup(const PKCS7_RECIP_INFO *si) { return (PKCS7_RECIP_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO, (d2i_of_void *)d2i_PKCS7_RECIP_INFO, (char *)si); }
int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509) { ASN1_INTEGER_set(p7i->version,0); X509_NAME_set(&p7i->issuer_and_serial->issuer, X509_get_issuer_name(x509)); M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial); p7i->issuer_and_serial->serial= M_ASN1_INTEGER_dup(X509_get_serialNumber(x509)); X509_ALGOR_free(p7i->key_enc_algor); p7i->key_enc_algor=(X509_ALGOR *)ASN1_dup((i2d_func_t)i2d_X509_ALGOR, (char *(*)())d2i_X509_ALGOR, (char *)x509->cert_info->key->algor); CRYPTO_add(&x509->references,1,CRYPTO_LOCK_X509); p7i->cert=x509; return(1); }
X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne) { return((X509_NAME_ENTRY *)ASN1_dup((int (*)())i2d_X509_NAME_ENTRY, (char *(*)())d2i_X509_NAME_ENTRY,(char *)ne)); }
X509_NAME *X509_NAME_dup(X509_NAME *xn) { return((X509_NAME *)ASN1_dup((int (*)())i2d_X509_NAME, (char *(*)())d2i_X509_NAME,(char *)xn)); }
X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn) { return((X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR, (char *(*)())d2i_X509_ALGOR,(char *)xn)); }
RSA *RSAPrivateKey_dup(RSA *rsa) { return((RSA *)ASN1_dup((int (*)())i2d_RSAPrivateKey, (char *(*)())d2i_RSAPrivateKey,(char *)rsa)); }
X509_REQ *X509_REQ_dup(X509_REQ *req) { return((X509_REQ *)ASN1_dup((int (*)())i2d_X509_REQ, (char *(*)())d2i_X509_REQ,(char *)req)); }
PKCS7 *PKCS7_dup(PKCS7 *p7) { return((PKCS7 *)ASN1_dup((int (*)())i2d_PKCS7, (char *(*)())d2i_PKCS7,(char *)p7)); }
X509_CRL *X509_CRL_dup(X509_CRL *crl) { return((X509_CRL *)ASN1_dup((int (*)())i2d_X509_CRL, (char *(*)())d2i_X509_CRL,(char *)crl)); }
X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex) { return((X509_EXTENSION *)ASN1_dup( (int (*)())i2d_X509_EXTENSION, (char *(*)())d2i_X509_EXTENSION,(char *)ex)); }
X509 *X509_dup(X509 *x509) { return((X509 *)ASN1_dup((int (*)())i2d_X509, (char *(*)())d2i_X509,(char *)x509)); }
X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa) { return((X509_ATTRIBUTE *)ASN1_dup((int (*)())i2d_X509_ATTRIBUTE, (char *(*)())d2i_X509_ATTRIBUTE,(char *)xa)); }
GENERAL_NAME *GENERAL_NAME_dup(const GENERAL_NAME *a) { return (GENERAL_NAME *)ASN1_dup((i2d_of_void *)i2d_GENERAL_NAME, (d2i_of_void *)d2i_GENERAL_NAME, (char *)a); }