11cb0ef41Sopenharmony_ci// Flags: --expose-internals 21cb0ef41Sopenharmony_ci'use strict'; 31cb0ef41Sopenharmony_ciconst common = require('../common'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst util = require('internal/util'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciif (!process.versions.openssl) { 81cb0ef41Sopenharmony_ci const expectedError = common.expectsError({ 91cb0ef41Sopenharmony_ci code: 'ERR_NO_CRYPTO', 101cb0ef41Sopenharmony_ci name: 'Error' 111cb0ef41Sopenharmony_ci }); 121cb0ef41Sopenharmony_ci assert.throws(() => util.assertCrypto(), expectedError); 131cb0ef41Sopenharmony_ci} else { 141cb0ef41Sopenharmony_ci util.assertCrypto(); 151cb0ef41Sopenharmony_ci} 16