Fixes issue 28885

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Mon Jan 19 11:55:58 2026
(Merged from https://github.com/openssl/openssl/pull/29297)
This commit is contained in:
shridhar kalavagunta
2025-12-02 17:31:58 -06:00
committed by Matt Caswell
parent c64912cd59
commit 9547ac72f0

View File

@@ -193,12 +193,15 @@ int ssl_srp_server_param_with_username_intern(SSL_CONNECTION *s, int *ad)
OPENSSL_cleanse(b, sizeof(b));
/* Calculate: B = (kv + g^b) % N */
s->srp_ctx.B = SRP_Calc_B_ex(s->srp_ctx.b, s->srp_ctx.N, s->srp_ctx.g,
s->srp_ctx.v, sctx->libctx, sctx->propq);
if (s->srp_ctx.B == NULL) {
BN_clear_free(s->srp_ctx.b);
s->srp_ctx.b = NULL;
return SSL3_AL_FATAL;
}
return ((s->srp_ctx.B = SRP_Calc_B_ex(s->srp_ctx.b, s->srp_ctx.N, s->srp_ctx.g,
s->srp_ctx.v, sctx->libctx, sctx->propq))
!= NULL)
? SSL_ERROR_NONE
: SSL3_AL_FATAL;
return SSL_ERROR_NONE;
}
int SSL_srp_server_param_with_username(SSL *s, int *ad)