Home | History | Annotate | Download | only in net

Lines Matching refs:cert_handle

101 string GetCertNameOrNickname(X509Certificate::OSCertHandle cert_handle) {
102 string name = ProcessIDN(Stringize(CERT_GetCommonName(&cert_handle->subject),
106 return GetNickname(cert_handle);
109 string GetNickname(X509Certificate::OSCertHandle cert_handle) {
111 if (cert_handle->nickname) {
112 name = cert_handle->nickname;
122 string GetTokenName(X509Certificate::OSCertHandle cert_handle) {
123 return psm::GetCertTokenName(cert_handle);
126 string GetVersion(X509Certificate::OSCertHandle cert_handle) {
128 if (SEC_ASN1DecodeInteger(&cert_handle->version, &version) == SECSuccess &&
134 net::CertType GetType(X509Certificate::OSCertHandle cert_handle) {
135 return psm::GetCertType(cert_handle);
138 string GetEmailAddress(X509Certificate::OSCertHandle cert_handle) {
139 if (cert_handle->emailAddr)
140 return cert_handle->emailAddr;
144 void GetUsageStrings(X509Certificate::OSCertHandle cert_handle,
146 psm::GetCertUsageStrings(cert_handle, usages);
149 string GetKeyUsageString(X509Certificate::OSCertHandle cert_handle) {
153 if (CERT_FindKeyUsageExtension(cert_handle, &key_usage) == SECSuccess) {
160 string GetSerialNumberHexified(X509Certificate::OSCertHandle cert_handle,
162 return Stringize(CERT_Hexify(&cert_handle->serialNumber, true),
166 string GetIssuerCommonName(X509Certificate::OSCertHandle cert_handle,
168 return Stringize(CERT_GetCommonName(&cert_handle->issuer), alternative_text);
171 string GetIssuerOrgName(X509Certificate::OSCertHandle cert_handle,
173 return Stringize(CERT_GetOrgName(&cert_handle->issuer), alternative_text);
176 string GetIssuerOrgUnitName(X509Certificate::OSCertHandle cert_handle,
178 return Stringize(CERT_GetOrgUnitName(&cert_handle->issuer), alternative_text);
181 string GetSubjectOrgName(X509Certificate::OSCertHandle cert_handle,
183 return Stringize(CERT_GetOrgName(&cert_handle->subject), alternative_text);
186 string GetSubjectOrgUnitName(X509Certificate::OSCertHandle cert_handle,
188 return Stringize(CERT_GetOrgUnitName(&cert_handle->subject),
192 string GetSubjectCommonName(X509Certificate::OSCertHandle cert_handle,
194 return Stringize(CERT_GetCommonName(&cert_handle->subject), alternative_text);
197 bool GetTimes(X509Certificate::OSCertHandle cert_handle,
200 if (CERT_GetCertTimes(cert_handle, &pr_issued, &pr_expires) == SECSuccess) {
208 string GetTitle(X509Certificate::OSCertHandle cert_handle) {
209 return psm::GetCertTitle(cert_handle);
212 string GetIssuerName(X509Certificate::OSCertHandle cert_handle) {
213 return psm::ProcessName(&cert_handle->issuer);
216 string GetSubjectName(X509Certificate::OSCertHandle cert_handle) {
217 return psm::ProcessName(&cert_handle->subject);
220 void GetEmailAddresses(X509Certificate::OSCertHandle cert_handle,
222 for (const char* addr = CERT_GetFirstEmailAddress(cert_handle);
223 addr; addr = CERT_GetNextEmailAddress(cert_handle, addr)) {
267 std::string GetPkcs11Id(net::X509Certificate::OSCertHandle cert_handle) {
269 SECKEYPrivateKey *priv_key = PK11_FindKeyByAnyCert(cert_handle,
286 X509Certificate::OSCertHandle cert_handle,
288 if (cert_handle->extensions) {
289 for (size_t i = 0; cert_handle->extensions[i] != NULL; ++i) {
291 extension.name = psm::GetOIDText(&cert_handle->extensions[i]->id);
293 critical_label, non_critical_label, cert_handle->extensions[i]);
299 string HashCertSHA256(X509Certificate::OSCertHandle cert_handle) {
300 return HashCert(cert_handle, HASH_AlgSHA256, SHA256_LENGTH);
303 string HashCertSHA1(X509Certificate::OSCertHandle cert_handle) {
304 return HashCert(cert_handle, HASH_AlgSHA1, SHA1_LENGTH);
307 void GetCertChainFromCert(X509Certificate::OSCertHandle cert_handle,
310 CERT_GetCertChainFromCert(cert_handle, PR_Now(), certUsageSSLServer);
327 string GetDerString(X509Certificate::OSCertHandle cert_handle) {
328 return string(reinterpret_cast<const char*>(cert_handle->derCert.data),
329 cert_handle->derCert.len);
383 string ProcessSecAlgorithmSignature(X509Certificate::OSCertHandle cert_handle) {
384 return ProcessSecAlgorithmInternal(&cert_handle->signature);
388 X509Certificate::OSCertHandle cert_handle) {
390 &cert_handle->subjectPublicKeyInfo.algorithm);
394 X509Certificate::OSCertHandle cert_handle) {
396 &cert_handle->signatureWrap.signatureAlgorithm);
399 string ProcessSubjectPublicKeyInfo(X509Certificate::OSCertHandle cert_handle) {
400 return psm::ProcessSubjectPublicKeyInfo(&cert_handle->subjectPublicKeyInfo);
403 string ProcessRawBitsSignatureWrap(X509Certificate::OSCertHandle cert_handle) {
404 return ProcessRawBits(cert_handle->signatureWrap.signature.data,
405 cert_handle->signatureWrap.signature.len);