Lines Matching refs:cert
51 int SSL_CTX_get_issuer(SSL_CTX* ctx, X509* cert, X509** issuer) { in SSL_CTX_get_issuer() argument
57 X509_STORE_CTX_get1_issuer(issuer, store_ctx.get(), cert) == 1; in SSL_CTX_get_issuer()
281 X509* cert = SSL_get_certificate(ssl.get()); in GetCert() local
282 if (cert == nullptr) in GetCert()
285 MaybeLocal<Object> maybe_cert = X509ToObject(env, cert); in GetCert()
343 StackOfX509 CloneSSLCerts(X509Pointer&& cert, in CloneSSLCerts() argument
346 if (cert) in CloneSSLCerts()
347 sk_X509_push(peer_certs.get(), cert.release()); in CloneSSLCerts()
349 X509Pointer cert(X509_dup(sk_X509_value(ssl_certs, i))); in CloneSSLCerts() local
350 if (!cert || !sk_X509_push(peer_certs.get(), cert.get())) in CloneSSLCerts()
353 cert.release(); in CloneSSLCerts()
359 X509Pointer* cert, in AddIssuerChainToObject() argument
364 cert->reset(sk_X509_delete(peer_certs.get(), 0)); in AddIssuerChainToObject()
369 if (X509_check_issued(ca, cert->get()) != X509_V_OK) in AddIssuerChainToObject()
383 cert->reset(sk_X509_delete(peer_certs.get(), i)); in AddIssuerChainToObject()
395 X509Pointer* cert, in GetLastIssuedCert() argument
400 while (X509_check_issued(cert->get(), cert->get()) != X509_V_OK) { in GetLastIssuedCert()
402 if (SSL_CTX_get_issuer(SSL_get_SSL_CTX(ssl.get()), cert->get(), &ca) <= 0) in GetLastIssuedCert()
415 cert->reset(ca); in GetLastIssuedCert()
420 MaybeLocal<Object> GetRawDERCertificate(Environment* env, X509* cert) { in GetRawDERCertificate() argument
421 int size = i2d_X509(cert, nullptr); in GetRawDERCertificate()
426 i2d_X509(cert, &serialized); in GetRawDERCertificate()
430 MaybeLocal<Value> GetSerialNumber(Environment* env, X509* cert) { in GetSerialNumber() argument
431 if (ASN1_INTEGER* serial_number = X509_get_serialNumber(cert)) { in GetSerialNumber()
443 MaybeLocal<Value> GetKeyUsage(Environment* env, X509* cert) { in GetKeyUsage() argument
445 X509_get_ext_d2i(cert, NID_ext_key_usage, nullptr, nullptr))); in GetKeyUsage()
813 X509* cert) { in GetSubjectAltNameString() argument
814 int index = X509_get_ext_by_NID(cert, NID_subject_alt_name, -1); in GetSubjectAltNameString()
818 X509_EXTENSION* ext = X509_get_ext(cert, index); in GetSubjectAltNameString()
832 X509* cert) { in GetInfoAccessString() argument
833 int index = X509_get_ext_by_NID(cert, NID_info_access, -1); in GetInfoAccessString()
837 X509_EXTENSION* ext = X509_get_ext(cert, index); in GetInfoAccessString()
849 static MaybeLocal<Value> GetX509NameObject(Environment* env, X509* cert) { in GetX509NameObject() argument
850 X509_NAME* name = get_name(cert); in GetX509NameObject()
939 X509* cert) { in GetFingerprintDigest() argument
944 if (X509_digest(cert, method, md, &md_size)) { in GetFingerprintDigest()
953 X509* cert, in GetValidTo() argument
955 ASN1_TIME_print(bio.get(), X509_get0_notAfter(cert)); in GetValidTo()
961 X509* cert, in GetValidFrom() argument
963 ASN1_TIME_print(bio.get(), X509_get0_notBefore(cert)); in GetValidFrom()
1052 X509* cert) { in GetIssuerString() argument
1053 X509_NAME* issuer_name = X509_get_issuer_name(cert); in GetIssuerString()
1065 X509* cert) { in GetSubject() argument
1068 X509_get_subject_name(cert), in GetSubject()
1241 X509Pointer cert(is_server ? SSL_get_peer_certificate(ssl.get()) : nullptr); in GetPeerCert() local
1243 if (!cert && (ssl_certs == nullptr || sk_X509_num(ssl_certs) == 0)) in GetPeerCert()
1249 X509ToObject(env, cert ? cert.get() : sk_X509_value(ssl_certs, 0)); in GetPeerCert()
1253 StackOfX509 peer_certs = CloneSSLCerts(std::move(cert), ssl_certs); in GetPeerCert()
1269 &cert, in GetPeerCert()
1278 &cert, in GetPeerCert()
1288 if (X509_check_issued(cert.get(), cert.get()) == X509_V_OK && in GetPeerCert()
1301 X509* cert, in X509ToObject() argument
1316 GetSubject(env, bio, cert)) || in X509ToObject()
1320 GetIssuerString(env, bio, cert))) { in X509ToObject()
1327 GetX509NameObject<X509_get_subject_name>(env, cert)) || in X509ToObject()
1331 GetX509NameObject<X509_get_issuer_name>(env, cert))) { in X509ToObject()
1339 GetSubjectAltNameString(env, bio, cert)) || in X509ToObject()
1343 GetInfoAccessString(env, bio, cert))) { in X509ToObject()
1347 EVPKeyPointer pkey(X509_get_pubkey(cert)); in X509ToObject()
1422 GetValidFrom(env, cert, bio)) || in X509ToObject()
1426 GetValidTo(env, cert, bio))) { in X509ToObject()
1436 GetFingerprintDigest(env, EVP_sha1(), cert)) || in X509ToObject()
1440 GetFingerprintDigest(env, EVP_sha256(), cert)) || in X509ToObject()
1444 GetKeyUsage(env, cert)) || in X509ToObject()
1448 GetSerialNumber(env, cert)) || in X509ToObject()
1452 GetRawDERCertificate(env, cert))) { in X509ToObject()