#ifndef SRC_CRYPTO_CRYPTO_COMMON_H_ #define SRC_CRYPTO_CRYPTO_COMMON_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include #include #include "ncrypto.h" #include "node_crypto.h" #include "v8.h" #include namespace node { namespace crypto { ncrypto::SSLSessionPointer GetTLSSession(const unsigned char* buf, size_t length); v8::MaybeLocal GetValidationErrorReason(Environment* env, int err); v8::MaybeLocal GetValidationErrorCode(Environment* env, int err); v8::MaybeLocal GetCert(Environment* env, const ncrypto::SSLPointer& ssl); v8::MaybeLocal GetCipherInfo(Environment* env, const ncrypto::SSLPointer& ssl); v8::MaybeLocal GetEphemeralKey(Environment* env, const ncrypto::SSLPointer& ssl); v8::MaybeLocal GetPeerCert(Environment* env, const ncrypto::SSLPointer& ssl, bool abbreviated = false, bool is_server = false); v8::MaybeLocal ECPointToBuffer(Environment* env, const EC_GROUP* group, const EC_POINT* point, point_conversion_form_t form); } // namespace crypto } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #endif // SRC_CRYPTO_CRYPTO_COMMON_H_