diff options
author | William Ahern <william@25thandclement.com> | 2016-10-29 14:08:49 -0700 |
---|---|---|
committer | William Ahern <william@25thandclement.com> | 2016-10-29 14:08:49 -0700 |
commit | 1f22a801dc65ec03c543695115fcba4cc0e39ef7 (patch) | |
tree | 153dfd879c4cd80f6c73cb0623c86668d12f7be1 /src | |
parent | 2391a59e43de4ccc685b7790d84a9a4705750dd3 (diff) | |
download | luaossl-1f22a801dc65ec03c543695115fcba4cc0e39ef7.tar.gz luaossl-1f22a801dc65ec03c543695115fcba4cc0e39ef7.tar.bz2 luaossl-1f22a801dc65ec03c543695115fcba4cc0e39ef7.zip |
must use i2d_re_X509_REQ_tbs to dirty the X509_REQ cached encoding
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c index f5d9343..b95fccf 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -143,6 +143,10 @@ #define HAVE_GENERAL_NAME_SET0_VALUE OPENSSL_PREREQ(1,1,0) #endif +#ifndef HAVE_I2D_RE_X509_REQ_TBS +#define HAVE_I2D_RE_X509_REQ_TBS OPENSSL_PREREQ(1,1,0) +#endif + #ifndef HAVE_RSA_GET0_CRT_PARAMS #define HAVE_RSA_GET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) #endif @@ -5954,7 +5958,11 @@ static int xr_setExtensionByNid(lua_State *L, X509_REQ *csr, int target_nid, voi * We have to mark the encoded form as invalid, otherwise when we * write it out again it will use the loaded version. */ +#if HAVE_I2D_RE_X509_REQ_TBS + (void)i2d_re_X509_REQ_tbs(csr, NULL); /* sets csr->req_info->enc.modified */ +#else csr->req_info->enc.modified = 1; +#endif lua_pushboolean(L, 1); |