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 | |
| 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
| -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 @@ | |||
| 143 | #define HAVE_GENERAL_NAME_SET0_VALUE OPENSSL_PREREQ(1,1,0) | 143 | #define HAVE_GENERAL_NAME_SET0_VALUE OPENSSL_PREREQ(1,1,0) |
| 144 | #endif | 144 | #endif |
| 145 | 145 | ||
| 146 | #ifndef HAVE_I2D_RE_X509_REQ_TBS | ||
| 147 | #define HAVE_I2D_RE_X509_REQ_TBS OPENSSL_PREREQ(1,1,0) | ||
| 148 | #endif | ||
| 149 | |||
| 146 | #ifndef HAVE_RSA_GET0_CRT_PARAMS | 150 | #ifndef HAVE_RSA_GET0_CRT_PARAMS |
| 147 | #define HAVE_RSA_GET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) | 151 | #define HAVE_RSA_GET0_CRT_PARAMS OPENSSL_PREREQ(1,1,0) |
| 148 | #endif | 152 | #endif |
| @@ -5954,7 +5958,11 @@ static int xr_setExtensionByNid(lua_State *L, X509_REQ *csr, int target_nid, voi | |||
| 5954 | * We have to mark the encoded form as invalid, otherwise when we | 5958 | * We have to mark the encoded form as invalid, otherwise when we |
| 5955 | * write it out again it will use the loaded version. | 5959 | * write it out again it will use the loaded version. |
| 5956 | */ | 5960 | */ |
| 5961 | #if HAVE_I2D_RE_X509_REQ_TBS | ||
| 5962 | (void)i2d_re_X509_REQ_tbs(csr, NULL); /* sets csr->req_info->enc.modified */ | ||
| 5963 | #else | ||
| 5957 | csr->req_info->enc.modified = 1; | 5964 | csr->req_info->enc.modified = 1; |
| 5965 | #endif | ||
| 5958 | 5966 | ||
| 5959 | lua_pushboolean(L, 1); | 5967 | lua_pushboolean(L, 1); |
| 5960 | 5968 | ||
