@@ -547,9 +547,9 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
547
547
// OpenSSL 1.1.0 changed the ticket key size, but the OpenSSL 1.0.x size was
548
548
// exposed in the public API. To retain compatibility, install a callback
549
549
// which restores the old algorithm.
550
- if (CSPRNG (sc->ticket_key_name_ , sizeof (sc->ticket_key_name_ )). is_err ( ) ||
551
- CSPRNG (sc->ticket_key_hmac_ , sizeof (sc->ticket_key_hmac_ )). is_err ( ) ||
552
- CSPRNG (sc->ticket_key_aes_ , sizeof (sc->ticket_key_aes_ )). is_err ( )) {
550
+ if (! ncrypto:: CSPRNG (sc->ticket_key_name_ , sizeof (sc->ticket_key_name_ )) ||
551
+ ! ncrypto:: CSPRNG (sc->ticket_key_hmac_ , sizeof (sc->ticket_key_hmac_ )) ||
552
+ ! ncrypto:: CSPRNG (sc->ticket_key_aes_ , sizeof (sc->ticket_key_aes_ ))) {
553
553
return THROW_ERR_CRYPTO_OPERATION_FAILED (
554
554
env, " Error generating ticket keys" );
555
555
}
@@ -1324,7 +1324,7 @@ int SecureContext::TicketCompatibilityCallback(SSL* ssl,
1324
1324
1325
1325
if (enc) {
1326
1326
memcpy (name, sc->ticket_key_name_ , sizeof (sc->ticket_key_name_ ));
1327
- if (CSPRNG (iv, 16 ). is_err ( ) ||
1327
+ if (! ncrypto:: CSPRNG (iv, 16 ) ||
1328
1328
EVP_EncryptInit_ex (
1329
1329
ectx, EVP_aes_128_cbc (), nullptr , sc->ticket_key_aes_ , iv) <= 0 ||
1330
1330
HMAC_Init_ex (hctx,
0 commit comments