Actions
Bug #12704
closedFix typo in ossl_ocspreq_sign
Description
The code of ossl_ocspreq_sign reads:
static VALUE
ossl_ocspreq_sign(int argc, VALUE *argv, VALUE self)
{
VALUE signer_cert, signer_key, certs, flags, digest;
OCSP_REQUEST *req;
X509 *signer;
EVP_PKEY *key;
STACK_OF(X509) *x509s = NULL;
unsigned long flg = 0;
const EVP_MD *md;
int ret;
...
if (NIL_P(certs))
flags |= OCSP_NOCERTS;
The last line is wrong since it uses "flags" instead of "flg".
The fix seems to be:
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index c0f2dfe..baea202 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -399,7 +399,7 @@ ossl_ocspreq_sign(int argc, VALUE *argv, VALUE self)
else
md = GetDigestPtr(digest);
if (NIL_P(certs))
- flags |= OCSP_NOCERTS;
+ flg |= OCSP_NOCERTS;
else
x509s = ossl_x509_ary2sk(certs);
Which is also what ossl_ocspbres_sign does.
Actions
Like0
Like0Like0