Node.js
v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
|
Data Structures | |
class | CipherPushContext |
class | PBKDF2Request |
class | RandomBytesRequest |
Functions | |
void | ThrowCryptoError (Environment *env, unsigned long err, const char *default_message=nullptr) |
void | CheckEntropy () |
bool | EntropySource (unsigned char *buffer, size_t length) |
int | SSL_CTX_get_issuer (SSL_CTX *ctx, X509 *cert, X509 **issuer) |
int | SSL_CTX_use_certificate_chain (SSL_CTX *ctx, X509 *x, STACK_OF(X509) *extra_certs, X509 **cert, X509 **issuer) |
int | SSL_CTX_use_certificate_chain (SSL_CTX *ctx, BIO *in, X509 **cert, X509 **issuer) |
void | UseExtraCaCerts (const std::string &file) |
int | compar (const void *a, const void *b) |
int | IsSelfSigned (X509 *cert) |
X509 * | FindRoot (STACK_OF(X509) *sk) |
bool | CertIsStartComOrWoSign (X509_NAME *name) |
bool | CheckStartComOrWoSign (X509_NAME *root_name, X509 *cert) |
CheckResult | CheckWhitelistedServerCert (X509_STORE_CTX *ctx) |
int | VerifyCallback (int preverify_ok, X509_STORE_CTX *ctx) |
void | PBKDF2 (const FunctionCallbackInfo< Value > &args) |
void | RandomBytesWork (uv_work_t *work_req) |
void | RandomBytesCheck (RandomBytesRequest *req, Local< Value >(*argv)[2]) |
void | RandomBytesAfter (uv_work_t *work_req, int status) |
void | RandomBytesProcessSync (Environment *env, RandomBytesRequest *req, Local< Value >(*argv)[2]) |
void | RandomBytes (const FunctionCallbackInfo< Value > &args) |
void | RandomBytesBuffer (const FunctionCallbackInfo< Value > &args) |
void | GetSSLCiphers (const FunctionCallbackInfo< Value > &args) |
void | GetCiphers (const FunctionCallbackInfo< Value > &args) |
void | GetHashes (const FunctionCallbackInfo< Value > &args) |
void | GetCurves (const FunctionCallbackInfo< Value > &args) |
bool | VerifySpkac (const char *data, unsigned int len) |
void | VerifySpkac (const FunctionCallbackInfo< Value > &args) |
char * | ExportPublicKey (const char *data, int len, size_t *size) |
void | ExportPublicKey (const FunctionCallbackInfo< Value > &args) |
const char * | ExportChallenge (const char *data, int len) |
void | ExportChallenge (const FunctionCallbackInfo< Value > &args) |
void | TimingSafeEqual (const FunctionCallbackInfo< Value > &args) |
void | InitCryptoOnce () |
void | SetEngine (const FunctionCallbackInfo< Value > &args) |
void | GetFipsCrypto (const FunctionCallbackInfo< Value > &args) |
void | SetFipsCrypto (const FunctionCallbackInfo< Value > &args) |
void | InitCrypto (Local< Object > target, Local< Value > unused, Local< Context > context, void *priv) |
|
inline |
Definition at line 2776 of file node_crypto.cc.
Referenced by CheckStartComOrWoSign().
|
inline |
Definition at line 288 of file node_crypto.cc.
References status.
Referenced by EntropySource(), and RandomBytesWork().
|
inline |
Definition at line 2795 of file node_crypto.cc.
References CertIsStartComOrWoSign().
Referenced by CheckWhitelistedServerCert().
|
inline |
Definition at line 2812 of file node_crypto.cc.
References CheckStartComOrWoSign(), compar(), FindRoot(), and IsSelfSigned().
Referenced by VerifyCallback().
|
inline |
Definition at line 2755 of file node_crypto.cc.
Referenced by CheckWhitelistedServerCert().
bool node::crypto::EntropySource | ( | unsigned char * | buffer, |
size_t | length | ||
) |
Definition at line 302 of file node_crypto.cc.
References CheckEntropy(), node::Buffer::Data(), node::Buffer::HasInstance(), node::Init(), node::http2::Initialize(), node::Buffer::Length(), method, node::Buffer::New(), s, t, THROW_AND_RETURN_IF_NOT_STRING, and ThrowCryptoError().
Referenced by node::Start().
const char* node::crypto::ExportChallenge | ( | const char * | data, |
int | len | ||
) |
Definition at line 5911 of file node_crypto.cc.
References buf.
Referenced by ExportChallenge(), and InitCrypto().
void node::crypto::ExportChallenge | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5927 of file node_crypto.cc.
References node::BUFFER, node::Buffer::Data(), node::Encode, ExportChallenge(), node::Buffer::Length(), and THROW_AND_RETURN_IF_NOT_BUFFER.
char* node::crypto::ExportPublicKey | ( | const char * | data, |
int | len, | ||
size_t * | size | ||
) |
Definition at line 5845 of file node_crypto.cc.
References buf.
Referenced by ExportPublicKey(), and InitCrypto().
void node::crypto::ExportPublicKey | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5886 of file node_crypto.cc.
References node::Buffer::Data(), ExportPublicKey(), node::Buffer::Length(), node::Buffer::New(), and THROW_AND_RETURN_IF_NOT_BUFFER.
|
inline |
Definition at line 2766 of file node_crypto.cc.
References IsSelfSigned().
Referenced by CheckWhitelistedServerCert().
void node::crypto::GetCiphers | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5759 of file node_crypto.cc.
References CipherPushContext::arr, and ctx.
Referenced by InitCrypto().
void node::crypto::GetCurves | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5775 of file node_crypto.cc.
References node::Buffer::New().
Referenced by InitCrypto().
void node::crypto::GetFipsCrypto | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 6068 of file node_crypto.cc.
Referenced by InitCrypto().
void node::crypto::GetHashes | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5767 of file node_crypto.cc.
References CipherPushContext::arr, and ctx.
Referenced by InitCrypto().
void node::crypto::GetSSLCiphers | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5704 of file node_crypto.cc.
References node::Buffer::New().
Referenced by InitCrypto().
void node::crypto::InitCrypto | ( | Local< Object > | target, |
Local< Value > | unused, | ||
Local< Context > | context, | ||
void * | priv | ||
) |
Definition at line 6092 of file node_crypto.cc.
References ExportChallenge(), ExportPublicKey(), GetCiphers(), GetCurves(), GetFipsCrypto(), GetHashes(), GetSSLCiphers(), InitCryptoOnce(), node::http2::Initialize(), node::Buffer::New(), NODE_MODULE_CONTEXT_AWARE_BUILTIN(), PBKDF2(), RandomBytes(), RandomBytesBuffer(), SetEngine(), SetFipsCrypto(), TimingSafeEqual(), and VerifySpkac().
void node::crypto::InitCryptoOnce | ( | ) |
Definition at line 5970 of file node_crypto.cc.
Referenced by InitCrypto().
|
inline |
Definition at line 2760 of file node_crypto.cc.
Referenced by CheckWhitelistedServerCert(), and FindRoot().
void node::crypto::PBKDF2 | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5335 of file node_crypto.cc.
References PBKDF2Request::After(), node::Buffer::Data(), node::Buffer::Length(), PBKDF2Request::PBKDF2Request(), req, THROW_AND_RETURN_IF_NOT_BUFFER, PBKDF2Request::Work(), and PBKDF2Request::work_req().
Referenced by InitCrypto().
void node::crypto::RandomBytes | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5613 of file node_crypto.cc.
References RandomBytesRequest::FREE_DATA, RandomBytesAfter(), RandomBytesProcessSync(), RandomBytesWork(), and RandomBytesRequest::work_req().
Referenced by InitCrypto().
void node::crypto::RandomBytesAfter | ( | uv_work_t * | work_req, |
int | status | ||
) |
Definition at line 5586 of file node_crypto.cc.
References RandomBytesCheck(), req, and RandomBytesRequest::work_req_.
Referenced by RandomBytes(), and RandomBytesBuffer().
void node::crypto::RandomBytesBuffer | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5658 of file node_crypto.cc.
References node::Buffer::Data(), RandomBytesRequest::DONT_FREE_DATA, RandomBytesAfter(), RandomBytesProcessSync(), RandomBytesWork(), and RandomBytesRequest::work_req().
Referenced by InitCrypto().
void node::crypto::RandomBytesCheck | ( | RandomBytesRequest * | req, |
Local< Value >(*) | argv[2] | ||
) |
Definition at line 5555 of file node_crypto.cc.
References node::Buffer::Data(), data, RandomBytesRequest::error(), node::Buffer::Length(), node::Buffer::New(), RandomBytesRequest::release(), RandomBytesRequest::return_memory(), and RandomBytesRequest::size().
Referenced by RandomBytesAfter(), and RandomBytesProcessSync().
void node::crypto::RandomBytesProcessSync | ( | Environment * | env, |
RandomBytesRequest * | req, | ||
Local< Value >(*) | argv[2] | ||
) |
Definition at line 5600 of file node_crypto.cc.
References RandomBytesCheck(), RandomBytesWork(), req, and RandomBytesRequest::work_req().
Referenced by RandomBytes(), and RandomBytesBuffer().
void node::crypto::RandomBytesWork | ( | uv_work_t * | work_req | ) |
Definition at line 5535 of file node_crypto.cc.
References CheckEntropy(), RandomBytesRequest::data(), req, RandomBytesRequest::set_error(), RandomBytesRequest::size(), and RandomBytesRequest::work_req_.
Referenced by RandomBytes(), RandomBytesBuffer(), and RandomBytesProcessSync().
void node::crypto::SetEngine | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 6028 of file node_crypto.cc.
References ThrowCryptoError().
Referenced by InitCrypto().
void node::crypto::SetFipsCrypto | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 6076 of file node_crypto.cc.
References ThrowCryptoError().
Referenced by InitCrypto().
int node::crypto::SSL_CTX_get_issuer | ( | SSL_CTX * | ctx, |
X509 * | cert, | ||
X509 ** | issuer | ||
) |
Definition at line 523 of file node_crypto.cc.
Referenced by SSL_CTX_use_certificate_chain().
int node::crypto::SSL_CTX_use_certificate_chain | ( | SSL_CTX * | ctx, |
X509 * | x, | ||
STACK_OF(X509) * | extra_certs, | ||
X509 ** | cert, | ||
X509 ** | issuer | ||
) |
Definition at line 541 of file node_crypto.cc.
References SSL_CTX_get_issuer().
Referenced by SSL_CTX_use_certificate_chain(), and UseExtraCaCerts().
int node::crypto::SSL_CTX_use_certificate_chain | ( | SSL_CTX * | ctx, |
BIO * | in, | ||
X509 ** | cert, | ||
X509 ** | issuer | ||
) |
Definition at line 614 of file node_crypto.cc.
References done, SSL_CTX_use_certificate_chain(), and ThrowCryptoError().
void node::crypto::ThrowCryptoError | ( | Environment * | env, |
unsigned long | err, | ||
const char * | default_message = nullptr |
||
) |
Definition at line 254 of file node_crypto.cc.
Referenced by EntropySource(), SetEngine(), SetFipsCrypto(), SSL_CTX_use_certificate_chain(), and VerifyCallback().
void node::crypto::TimingSafeEqual | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5953 of file node_crypto.cc.
References node::Buffer::Data(), node::Buffer::Length(), and THROW_AND_RETURN_IF_NOT_BUFFER.
Referenced by InitCrypto().
void node::crypto::UseExtraCaCerts | ( | const std::string & | file | ) |
Definition at line 837 of file node_crypto.cc.
References node::Buffer::Copy(), node::Buffer::Data(), file, node::Buffer::Length(), node::MakeCallback(), method, node::Buffer::New(), p, node::ProcessEmitWarning(), SSL_CTX_use_certificate_chain(), t, THROW_AND_RETURN_IF_NOT_BUFFER, THROW_AND_RETURN_IF_NOT_STRING, and wrap.
Referenced by node::Start().
|
inline |
Definition at line 2858 of file node_crypto.cc.
References node::BUFFER, CheckWhitelistedServerCert(), node::Buffer::Copy(), node::Buffer::Data(), node::Encode, node::Init(), node::http2::Initialize(), node::Buffer::Length(), node::MakeCallback(), node::Buffer::New(), off, node::ParseEncoding(), node::ProcessEmitWarning(), node::Start(), THROW_AND_RETURN_IF_NOT_BUFFER, THROW_AND_RETURN_IF_NOT_STRING, THROW_AND_RETURN_IF_NOT_STRING_OR_BUFFER, ThrowCryptoError(), node::UCS2, and node::UTF8.
bool node::crypto::VerifySpkac | ( | const char * | data, |
unsigned int | len | ||
) |
Definition at line 5797 of file node_crypto.cc.
Referenced by InitCrypto(), and VerifySpkac().
void node::crypto::VerifySpkac | ( | const FunctionCallbackInfo< Value > & | args | ) |
Definition at line 5823 of file node_crypto.cc.
References node::Buffer::Data(), node::Buffer::Length(), THROW_AND_RETURN_IF_NOT_BUFFER, and VerifySpkac().