-/* $OpenBSD: x509_set.c,v 1.24 2023/02/23 18:12:32 job Exp $ */
+/* $OpenBSD: x509_set.c,v 1.25 2023/04/25 10:18:39 job Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if ((x->cert_info->version = ASN1_INTEGER_new()) == NULL)
return (0);
}
+ x->cert_info->enc.modified = 1;
return (ASN1_INTEGER_set(x->cert_info->version, version));
}
LCRYPTO_ALIAS(X509_set_version);
if (in != serial) {
in = ASN1_INTEGER_dup(serial);
if (in != NULL) {
+ x->cert_info->enc.modified = 1;
ASN1_INTEGER_free(x->cert_info->serialNumber);
x->cert_info->serialNumber = in;
}
{
if ((x == NULL) || (x->cert_info == NULL))
return (0);
+ x->cert_info->enc.modified = 1;
return (X509_NAME_set(&x->cert_info->issuer, name));
}
LCRYPTO_ALIAS(X509_set_issuer_name);
{
if (x == NULL || x->cert_info == NULL)
return (0);
+ x->cert_info->enc.modified = 1;
return (X509_NAME_set(&x->cert_info->subject, name));
}
LCRYPTO_ALIAS(X509_set_subject_name);
if (in != tm) {
in = ASN1_STRING_dup(tm);
if (in != NULL) {
+ x->cert_info->enc.modified = 1;
ASN1_TIME_free(x->cert_info->validity->notBefore);
x->cert_info->validity->notBefore = in;
}
if (in != tm) {
in = ASN1_STRING_dup(tm);
if (in != NULL) {
+ x->cert_info->enc.modified = 1;
ASN1_TIME_free(x->cert_info->validity->notAfter);
x->cert_info->validity->notAfter = in;
}
{
if ((x == NULL) || (x->cert_info == NULL))
return (0);
+ x->cert_info->enc.modified = 1;
return (X509_PUBKEY_set(&(x->cert_info->key), pkey));
}
LCRYPTO_ALIAS(X509_set_pubkey);