BUG/MINOR: ssl: Fix compilation with OpenSSL 1.0.2 (missing ECDSA_SIG_set0)
This function was introduced in OpenSSL 1.1.0. Prior to that, the ECDSA_SIG structure was public. This function was used in commit5a8f02ae
"BUG/MEDIUM: jwt: Properly process ecdsa signatures (concatenated R and S params)". This patch needs to be backported up to branch 2.5 alongside commit5a8f02ae
.
This commit is contained in:
parent
2edc6d0301
commit
bb35e1f5aa
@ -325,6 +325,19 @@ static inline X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx)
|
||||
{
|
||||
return ctx->cert;
|
||||
}
|
||||
|
||||
static inline int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
|
||||
{
|
||||
if (r == NULL || s == NULL)
|
||||
return 0;
|
||||
BN_clear_free(sig->r);
|
||||
BN_clear_free(sig->s);
|
||||
|
||||
sig->r = r;
|
||||
sig->s = s;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if (HA_OPENSSL_VERSION_NUMBER < 0x3000000fL)
|
||||
|
Loading…
Reference in New Issue
Block a user