File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1334,14 +1334,14 @@ int basic_read(SSL *ssl, uint8_t **in_data)
1334
1334
goto error ;
1335
1335
}
1336
1336
1337
- /* all encrypted from now on */
1338
- SET_SSL_FLAG (SSL_RX_ENCRYPTED );
1339
1337
if (set_key_block (ssl , 0 ) < 0 )
1340
1338
{
1341
1339
ret = SSL_ERROR_INVALID_HANDSHAKE ;
1342
1340
goto error ;
1343
1341
}
1344
1342
1343
+ /* all encrypted from now on */
1344
+ SET_SSL_FLAG (SSL_RX_ENCRYPTED );
1345
1345
memset (ssl -> read_sequence , 0 , 8 );
1346
1346
break ;
1347
1347
@@ -1441,11 +1441,12 @@ int send_change_cipher_spec(SSL *ssl)
1441
1441
{
1442
1442
int ret = send_packet (ssl , PT_CHANGE_CIPHER_SPEC ,
1443
1443
g_chg_cipher_spec_pkt , sizeof (g_chg_cipher_spec_pkt ));
1444
- SET_SSL_FLAG (SSL_TX_ENCRYPTED );
1445
1444
1446
1445
if (ret >= 0 && set_key_block (ssl , 1 ) < 0 )
1447
1446
ret = SSL_ERROR_INVALID_HANDSHAKE ;
1448
-
1447
+
1448
+ if (ssl -> cipher_info )
1449
+ SET_SSL_FLAG (SSL_TX_ENCRYPTED );
1449
1450
memset (ssl -> write_sequence , 0 , 8 );
1450
1451
return ret ;
1451
1452
}
You can’t perform that action at this time.
0 commit comments