diff --git a/crypto/x509/x509_set.c b/crypto/x509/x509_set.c index 6141af0d9..5f1785198 100644 --- a/crypto/x509/x509_set.c +++ b/crypto/x509/x509_set.c @@ -125,9 +125,9 @@ int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm) return (0); in = x->cert_info->validity->notBefore; if (in != tm) { - in = M_ASN1_TIME_dup(tm); + in = ASN1_STRING_dup(tm); if (in != NULL) { - M_ASN1_TIME_free(x->cert_info->validity->notBefore); + ASN1_TIME_free(x->cert_info->validity->notBefore); x->cert_info->validity->notBefore = in; } } @@ -168,9 +168,9 @@ int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm) return (0); in = x->cert_info->validity->notAfter; if (in != tm) { - in = M_ASN1_TIME_dup(tm); + in = ASN1_STRING_dup(tm); if (in != NULL) { - M_ASN1_TIME_free(x->cert_info->validity->notAfter); + ASN1_TIME_free(x->cert_info->validity->notAfter); x->cert_info->validity->notAfter = in; } } diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c index 04f1f87eb..f207a25c6 100644 --- a/crypto/x509/x509cset.c +++ b/crypto/x509/x509cset.c @@ -87,9 +87,9 @@ int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) return (0); in = x->crl->lastUpdate; if (in != tm) { - in = M_ASN1_TIME_dup(tm); + in = ASN1_STRING_dup(tm); if (in != NULL) { - M_ASN1_TIME_free(x->crl->lastUpdate); + ASN1_TIME_free(x->crl->lastUpdate); x->crl->lastUpdate = in; } } @@ -104,9 +104,9 @@ int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) return (0); in = x->crl->nextUpdate; if (in != tm) { - in = M_ASN1_TIME_dup(tm); + in = ASN1_STRING_dup(tm); if (in != NULL) { - M_ASN1_TIME_free(x->crl->nextUpdate); + ASN1_TIME_free(x->crl->nextUpdate); x->crl->nextUpdate = in; } } @@ -202,9 +202,9 @@ int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) return (0); in = x->revocationDate; if (in != tm) { - in = M_ASN1_TIME_dup(tm); + in = ASN1_STRING_dup(tm); if (in != NULL) { - M_ASN1_TIME_free(x->revocationDate); + ASN1_TIME_free(x->revocationDate); x->revocationDate = in; } }