summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-10-21 16:47:01 +0000
committertb <>2021-10-21 16:47:01 +0000
commitd124815d8f44b9f0089b1ac1fa0fa9366c7a5c5b (patch)
tree8e052a6d301964b7ba6b33c17a2c55c667c80e20
parent7407ef96822a37aa07e99916747ae2221fdbbd3d (diff)
downloadopenbsd-d124815d8f44b9f0089b1ac1fa0fa9366c7a5c5b.tar.gz
openbsd-d124815d8f44b9f0089b1ac1fa0fa9366c7a5c5b.tar.bz2
openbsd-d124815d8f44b9f0089b1ac1fa0fa9366c7a5c5b.zip
Set enc.modified if the X509_REQ is going to be modified.
ok jsing
-rw-r--r--src/lib/libcrypto/x509/x509rset.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509rset.c b/src/lib/libcrypto/x509/x509rset.c
index de02a40038..dabeda2a64 100644
--- a/src/lib/libcrypto/x509/x509rset.c
+++ b/src/lib/libcrypto/x509/x509rset.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509rset.c,v 1.7 2018/08/24 19:55:58 tb Exp $ */ 1/* $OpenBSD: x509rset.c,v 1.8 2021/10/21 16:47:01 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -68,6 +68,7 @@ X509_REQ_set_version(X509_REQ *x, long version)
68{ 68{
69 if (x == NULL) 69 if (x == NULL)
70 return (0); 70 return (0);
71 x->req_info->enc.modified = 1;
71 return (ASN1_INTEGER_set(x->req_info->version, version)); 72 return (ASN1_INTEGER_set(x->req_info->version, version));
72} 73}
73 74
@@ -82,6 +83,7 @@ X509_REQ_set_subject_name(X509_REQ *x, X509_NAME *name)
82{ 83{
83 if ((x == NULL) || (x->req_info == NULL)) 84 if ((x == NULL) || (x->req_info == NULL))
84 return (0); 85 return (0);
86 x->req_info->enc.modified = 1;
85 return (X509_NAME_set(&x->req_info->subject, name)); 87 return (X509_NAME_set(&x->req_info->subject, name));
86} 88}
87 89
@@ -96,5 +98,6 @@ X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey)
96{ 98{
97 if ((x == NULL) || (x->req_info == NULL)) 99 if ((x == NULL) || (x->req_info == NULL))
98 return (0); 100 return (0);
101 x->req_info->enc.modified = 1;
99 return (X509_PUBKEY_set(&x->req_info->pubkey, pkey)); 102 return (X509_PUBKEY_set(&x->req_info->pubkey, pkey));
100} 103}