@@ -547,9 +547,9 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
547547 // OpenSSL 1.1.0 changed the ticket key size, but the OpenSSL 1.0.x size was
548548 // exposed in the public API. To retain compatibility, install a callback
549549 // 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_ ))) {
553553 return THROW_ERR_CRYPTO_OPERATION_FAILED (
554554 env, " Error generating ticket keys" );
555555 }
@@ -1324,7 +1324,7 @@ int SecureContext::TicketCompatibilityCallback(SSL* ssl,
13241324
13251325 if (enc) {
13261326 memcpy (name, sc->ticket_key_name_ , sizeof (sc->ticket_key_name_ ));
1327- if (CSPRNG (iv, 16 ). is_err ( ) ||
1327+ if (! ncrypto:: CSPRNG (iv, 16 ) ||
13281328 EVP_EncryptInit_ex (
13291329 ectx, EVP_aes_128_cbc (), nullptr , sc->ticket_key_aes_ , iv) <= 0 ||
13301330 HMAC_Init_ex (hctx,
0 commit comments