Skip to content

Commit

Permalink
fixup! Fix the alert used on a missing key_share
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcaswell committed Aug 8, 2024
1 parent 052ccd9 commit 65f44fa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ssl/statem/extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,15 +1368,15 @@ static int final_key_share(SSL_CONNECTION *s, unsigned int context, int sent)
* fail;
*/
if (!s->server
&& !sent
&& (!s->hit
|| (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0)) {
/* Nothing left we can do - just fail */
if ((s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0)
&& !sent) {
if ((s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0) {
SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_NO_SUITABLE_KEY_SHARE);
else
return 0;
}
if (!s->hit) {
SSLfatal(s, SSL_AD_MISSING_EXTENSION, SSL_R_NO_SUITABLE_KEY_SHARE);
return 0;
return 0;
}
}
/*
* IF
Expand Down

0 comments on commit 65f44fa

Please sign in to comment.