/titanic_50/usr/src/lib/libelfsign/common/ |
H A D | elfcertlib.c | 89 elfcertlib_verifycert(ELFsign_t ess, ELFCert_t cert) in elfcertlib_verifycert() argument 95 if ((cert->c_verified == E_OK) || (cert->c_verified == E_IS_TA)) { in elfcertlib_verifycert() 121 KMF_CERT_DATA_ATTR, &cert->c_cert.certificate, in elfcertlib_verifycert() 131 cert, CACERT); in elfcertlib_verifycert() 132 cert->c_verified = E_OK; in elfcertlib_verifycert() 140 KMF_CERT_DATA_ATTR, &cert->c_cert.certificate, in elfcertlib_verifycert() 150 cert, OBJCACERT); in elfcertlib_verifycert() 151 cert->c_verified = E_OK; in elfcertlib_verifycert() 159 KMF_CERT_DATA_ATTR, &cert->c_cert.certificate, in elfcertlib_verifycert() 169 cert, SECACERT); in elfcertlib_verifycert() [all …]
|
H A D | libelfsign.h | 167 extern char *elfcertlib_getdn(ELFCert_t cert); 168 extern char *elfcertlib_getissuer(ELFCert_t cert); 170 extern boolean_t elfcertlib_loadprivatekey(ELFsign_t ess, ELFCert_t cert, 172 extern boolean_t elfcertlib_loadtokenkey(ELFsign_t ess, ELFCert_t cert, 175 extern boolean_t elfcertlib_sign(ELFsign_t ess, ELFCert_t cert, 179 extern boolean_t elfcertlib_verifycert(ELFsign_t ess, ELFCert_t cert); 180 extern boolean_t elfcertlib_verifysig(ELFsign_t ess, ELFCert_t cert,
|
H A D | elfsignlib.c | 431 ELFCert_t cert = NULL; in elfsign_setcertpath() local 436 &cert, ess->es_action)) { in elfsign_setcertpath() 437 if ((subject = elfcertlib_getdn(cert)) != NULL) { in elfsign_setcertpath() 447 elfcertlib_releasecert(ess, cert); in elfsign_setcertpath() 1029 ELFCert_t cert = NULL; in elfsign_verify_signature() local 1089 if (cert != NULL) in elfsign_verify_signature() 1090 elfcertlib_releasecert(ess, cert); in elfsign_verify_signature() 1096 fsx.fsx_signer_DN, &cert, ess->es_action)) { in elfsign_verify_signature() 1111 !elfcertlib_verifycert(ess, cert)) { in elfsign_verify_signature() 1149 if (elfcertlib_verifysig(ess, cert, in elfsign_verify_signature() [all …]
|
/titanic_50/usr/src/common/net/wanboot/ |
H A D | p12auxutl.c | 116 X509 *cert = NULL; in sunw_PKCS12_create() local 136 cert = sk_X509_value(certs, i); in sunw_PKCS12_create() 139 if ((bag = M_PKCS12_x5092certbag(cert)) == NULL) { in sunw_PKCS12_create() 143 if (cert->aux != NULL && cert->aux->alias != NULL && in sunw_PKCS12_create() 144 cert->aux->alias->type == V_ASN1_UTF8STRING) { in sunw_PKCS12_create() 145 str = utf82ascstr(cert->aux->alias); in sunw_PKCS12_create() 160 if (cert->aux != NULL && cert->aux->keyid != NULL && in sunw_PKCS12_create() 161 cert->aux->keyid->type == V_ASN1_OCTET_STRING) { in sunw_PKCS12_create() 162 str = cert->aux->keyid->data; in sunw_PKCS12_create() 163 len = cert->aux->keyid->length; in sunw_PKCS12_create() [all …]
|
H A D | p12access.c | 76 sunw_use_x509cert(SSL_CTX *ctx, X509 *cert) in sunw_use_x509cert() argument 80 if (ctx == NULL || cert == NULL) { in sunw_use_x509cert() 85 if (SSL_CTX_use_certificate(ctx, cert) != 1) { in sunw_use_x509cert() 197 X509 *cert = NULL; in sunw_p12_use_certfile() local 209 &cert, NULL); in sunw_p12_use_certfile() 210 if (ret > 0 && cert != NULL) { in sunw_p12_use_certfile() 211 if (sunw_use_x509cert(ctx, cert) == -1) { in sunw_p12_use_certfile() 223 if (ret == -1 && cert != NULL) { in sunw_p12_use_certfile() 224 X509_free(cert); in sunw_p12_use_certfile() 225 cert = NULL; in sunw_p12_use_certfile() [all …]
|
H A D | p12auxpars.c | 209 int keyid_len, char *name_str, EVP_PKEY **pkey, X509 **cert, in sunw_PKCS12_parse() argument 224 if (cert) in sunw_PKCS12_parse() 225 *cert = NULL; in sunw_PKCS12_parse() 265 name_str, pkey, cert, ca); in sunw_PKCS12_parse() 276 if (cert && *cert) in sunw_PKCS12_parse() 277 X509_free(*cert); in sunw_PKCS12_parse() 320 int kstr_len, char *name_str, EVP_PKEY **pkey, X509 **cert, in parse_pkcs12() argument 363 work_kl, work_cl, pkey, cert); in parse_pkcs12() 381 pkey, cert); in parse_pkcs12() 393 retval = get_key_cert(0, work_kl, pkey, work_cl, cert); in parse_pkcs12() [all …]
|
H A D | p12misc.c | 263 X509 *cert) in sunw_set_localkeyid() argument 271 if (cert != NULL) { in sunw_set_localkeyid() 272 if (X509_keyid_set1(cert, (uchar_t *)keyid_str, keyid_len) in sunw_set_localkeyid() 633 sunw_print_times(FILE *fp, prnt_actions_t dowhat, char *label, X509 *cert) in sunw_print_times() argument 644 (void) print_time(fp, X509_get_notBefore(cert)); in sunw_print_times() 651 (void) print_time(fp, X509_get_notAfter(cert)); in sunw_print_times() 671 sunw_check_keys(X509 *cert, EVP_PKEY *pkey) in sunw_check_keys() argument 675 if (pkey != NULL && cert != NULL) in sunw_check_keys() 676 retval = X509_check_private_key(cert, pkey); in sunw_check_keys() 707 sunw_issuer_attrs(X509 *cert, char *buf, int len) in sunw_issuer_attrs() argument [all …]
|
H A D | auxutil.c | 329 STACK_OF(X509) *cl, X509 **cert) argument 344 chkcerts = (cert != NULL || pkey != NULL) && cl != NULL; 389 if (cert != NULL) 390 *cert = sk_X509_delete(cl, c); 408 if (found != 0 && cert != NULL) { 416 } else if (cert == NULL) { 496 X509 **cert) argument 513 if (cert != NULL && *cert == NULL) { 515 *cert = sk_X509_delete(cl, n); 516 if (*cert != NULL)
|
/titanic_50/usr/src/lib/libpkg/common/ |
H A D | security.c | 95 get_cert_chain(PKG_ERR *err, X509 *cert, STACK_OF(X509) *clcerts, in get_cert_chain() argument 130 (void) X509_STORE_CTX_init(store_ctx, ca_store, cert, clcerts); in get_cert_chain() 135 get_subject_display_name(cert), in get_cert_chain() 166 *get_subject_display_name(X509 *cert) in get_subject_display_name() argument 172 xname = X509_get_subject_name(cert); in get_subject_display_name() 197 *get_issuer_display_name(X509 *cert) in get_issuer_display_name() argument 203 xname = X509_get_issuer_name(cert); in get_issuer_display_name() 228 *get_serial_num(X509 *cert) in get_serial_num() argument 233 if ((sn = X509_get_serialNumber(cert)) != 0) { in get_serial_num() 256 *get_fingerprint(X509 *cert, const EVP_MD *alg) in get_fingerprint() argument [all …]
|
H A D | p12lib.c | 206 STACK_OF(X509) *, X509 **cert); 277 int keyid_len, char *name_str, EVP_PKEY **pkey, X509 **cert, in sunw_PKCS12_parse() argument 292 if (cert) in sunw_PKCS12_parse() 293 *cert = NULL; in sunw_PKCS12_parse() 333 name_str, pkey, cert, ca); in sunw_PKCS12_parse() 344 if (cert && *cert) in sunw_PKCS12_parse() 345 X509_free(*cert); in sunw_PKCS12_parse() 650 X509 *cert = NULL; in sunw_PKCS12_create() local 670 cert = sk_X509_value(certs, i); in sunw_PKCS12_create() 673 if ((bag = M_PKCS12_x5092certbag(cert)) == NULL) { in sunw_PKCS12_create() [all …]
|
H A D | keystore.c | 128 X509 *cert; in print_certs() local 136 cert = sk_X509_value(keystore->clcerts, i); in print_certs() 137 (void) sunw_get_cert_fname(GETDO_COPY, cert, in print_certs() 144 get_subject_display_name(cert)); in print_certs() 155 (void) print_cert(err, cert, format, in print_certs() 171 cert = sk_X509_value(keystore->cacerts, i); in print_certs() 173 cert, &fname); in print_certs() 179 get_subject_display_name(cert)); in print_certs() 190 (void) print_cert(err, cert, format, in print_certs() 625 EVP_PKEY **key, X509 **cert) in find_key_cert_pair() argument [all …]
|
/titanic_50/usr/src/cmd/svr4pkg/pkgadm/ |
H A D | addcert.c | 85 X509 *cert = NULL; in addcert() local 281 &key, &cert) != 0) { in addcert() 288 if (cert == NULL) { in addcert() 328 cert = sk_X509_value(trustcerts, i); in addcert() 329 if (check_cert(err, cert) != 0) { in addcert() 338 if (check_cert_and_key(err, cert, key) != 0) { in addcert() 357 cert = sk_X509_value(trustcerts, 0); in addcert() 361 switch (verify_trust(cert)) { in addcert() 390 get_subject_display_name(cert)); in addcert() 395 cert = sk_X509_value(trustcerts, i); in addcert() [all …]
|
H A D | certs.c | 80 X509 **cert) in load_cert_and_key() argument 91 if (cert) *cert = NULL; in load_cert_and_key() 118 if (cert && (certs != NULL)) { in load_cert_and_key() 158 if (cert && tmpcert) { in load_cert_and_key() 159 *cert = tmpcert; in load_cert_and_key()
|
/titanic_50/usr/src/lib/libslp/javalib/com/sun/slp/ |
H A D | AuthBlock.java | 35 import java.security.cert.*; 302 X509Certificate cert = getCert(someDN, ks); in canSignAs() local 305 myCert.getSubjectDN().toString(), cert.getSubjectDN()); in canSignAs() 370 X509Certificate cert = getSignAsCert(); in getSignAs() local 373 if (cert == null) { in getSignAs() 378 String DN = cert.getSubjectDN().toString(); in getSignAs() 389 String alg = cert.getPublicKey().getAlgorithm(); in getSignAs() 422 X509Certificate cert = null; in getSignAsCert() local 429 cert = getCert(alias, ks); in getSignAsCert() 432 return cert; in getSignAsCert() [all …]
|
/titanic_50/usr/src/cmd/cmd-crypto/elfsign/ |
H A D | elfsign.c | 85 char *cert; /* -c <certificate_file> | */ member 164 cmd_info.cert = NULL; in main() 217 cmd_info.cert = optarg; in main() 271 cmd_info.cert = optarg; in main() 307 (cmd_info.cert == NULL) || in main() 317 (cmd_info.cert == NULL)) { in main() 323 if ((cmd_info.cert != NULL) == (cmd_info.elfcnt > 0)) { in main() 431 if (cmd_info.cert == NULL) in setcertpath() 433 estatus = elfsign_setcertpath(cmd_info.ess, cmd_info.cert); in setcertpath() 439 if (cmd_info.cert != NULL) { in setcertpath() [all …]
|
/titanic_50/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/ |
H A D | p12split.c | 395 time_check_print(X509 *cert) in time_check_print() argument 400 ret = time_check(cert); in time_check_print() 405 sunw_subject_attrs(cert, buf, sizeof (buf))); in time_check_print() 407 sunw_issuer_attrs(cert, buf, sizeof (buf))); in time_check_print() 422 gettext("\n Cert has expired\n"), cert); in time_check_print() 427 gettext("\n Warning: cert not yet valid\n"), cert); in time_check_print() 438 time_check(X509 *cert) in time_check() argument 442 i = X509_cmp_time(X509_get_notBefore(cert), NULL); in time_check() 449 i = X509_cmp_time(X509_get_notAfter(cert), NULL); in time_check() 527 do_ofile(char *name, EVP_PKEY *pkey, X509 *cert, STACK_OF(X509) *ta) in do_ofile() argument [all …]
|
/titanic_50/usr/src/uts/common/inet/kssl/ |
H A D | ksslioctl.c | 60 certificate_free(Certificate_t *cert) in certificate_free() argument 62 kmem_free(cert->msg, cert->len); in certificate_free() 63 kmem_free(cert, sizeof (struct Certificate)); in certificate_free() 110 Certificate_t *cert; in kssl_free_entry() local 119 if ((cert = kssl_entry->ke_server_certificate) != NULL) { in kssl_free_entry() 120 certificate_free(cert); in kssl_free_entry() 194 Certificate_t *cert; in extract_certificate() local 268 cert = kmem_alloc(sizeof (Certificate_t), KM_SLEEP); in extract_certificate() 269 cert->msg = cert_buf; in extract_certificate() 270 cert->len = cert_buf_len; in extract_certificate() [all …]
|
/titanic_50/usr/src/lib/libkmf/plugins/kmf_nss/common/ |
H A D | nss_spi.c | 467 der.Data = node->cert->derIssuer.data; in nss_find_matching_certs() 468 der.Length = node->cert->derIssuer.len; in nss_find_matching_certs() 481 der.Data = node->cert->derSubject.data; in nss_find_matching_certs() 482 der.Length = node->cert->derSubject.len; in nss_find_matching_certs() 497 sernum = &node->cert->serialNumber; in nss_find_matching_certs() 512 ret = CERT_CertTimesValid(node->cert); in nss_find_matching_certs() 520 ret = CERT_CertTimesValid(node->cert); in nss_find_matching_certs() 568 rv = nss2kmf_cert(node->cert, &kmfcerts[*numcerts]); in convertCertList() 691 CERTCertificate *cert = NULL; in NSS_DeleteCert() local 721 cert = PK11_FindCertFromNickname(certlabel, NULL); in NSS_DeleteCert() [all …]
|
/titanic_50/usr/src/cmd/cmd-crypto/pktool/ |
H A D | download.c | 54 KMF_DATA cert = { 0, NULL }; in pk_download() local 223 ch_rv = kmf_read_input_file(kmfhandle, fullpath, &cert); in pk_download() 229 ch_rv = kmf_pem_to_der(cert.Data, cert.Length, in pk_download() 237 format == KMF_FORMAT_ASN1 ? &cert : &cert_der); in pk_download() 252 kmf_free_data(&cert); in pk_download()
|
/titanic_50/usr/src/lib/libkmf/libkmf/common/ |
H A D | certop.c | 53 get_keyalg_from_cert(KMF_DATA *cert, KMF_KEY_ALG *keyalg) in get_keyalg_from_cert() argument 59 rv = DerDecodeSignedCertificate(cert, &SignerCert); in get_keyalg_from_cert() 112 KMF_DATA *cert = NULL; in kmf_find_prikey_by_cert() local 138 cert = kmf_get_attr_ptr(KMF_CERT_DATA_ATTR, attrlist, numattr); in kmf_find_prikey_by_cert() 139 if (cert == NULL) in kmf_find_prikey_by_cert() 142 ret = get_keyalg_from_cert(cert, &keyalg); in kmf_find_prikey_by_cert() 167 const KMF_DATA *cert, in check_key_usage() argument 175 if (handle == NULL || cert == NULL) in check_key_usage() 181 ret = kmf_get_cert_ku(cert, &keyusage); in check_key_usage() 204 ret = kmf_get_cert_basic_constraint(cert, in check_key_usage() [all …]
|
H A D | certgetsetop.c | 134 KMF_X509_CERTIFICATE *cert = NULL; in kmf_get_cert_extn() local 141 ret = DerDecodeSignedCertificate(certdata, &cert); in kmf_get_cert_extn() 145 if (cert->certificate.extensions.numberOfExtensions == 0) { in kmf_get_cert_extn() 151 i < cert->certificate.extensions.numberOfExtensions; in kmf_get_cert_extn() 153 eptr = &cert->certificate.extensions.extensions[i]; in kmf_get_cert_extn() 163 if (cert != NULL) { in kmf_get_cert_extn() 164 kmf_free_signed_cert(cert); in kmf_get_cert_extn() 165 free(cert); in kmf_get_cert_extn() 189 KMF_X509_CERTIFICATE *cert; in kmf_get_cert_extns() local 201 ret = DerDecodeSignedCertificate(certdata, &cert); in kmf_get_cert_extns() [all …]
|
/titanic_50/usr/src/lib/libkmf/mappers/kmf_mapper_cn/common/ |
H A D | mapper_cn.c | 88 mapper_map_cert_to_name(KMF_HANDLE_T h, KMF_DATA *cert, KMF_DATA *name) in mapper_map_cert_to_name() argument 98 if ((rv = kmf_get_cert_subject_str(h, cert, &dn)) != KMF_OK) in mapper_map_cert_to_name() 147 mapper_match_cert_to_name(KMF_HANDLE_T h, KMF_DATA *cert, in mapper_match_cert_to_name() argument 163 if ((rv = mapper_map_cert_to_name(h, cert, &get_name)) != KMF_OK) in mapper_match_cert_to_name()
|
/titanic_50/usr/src/lib/libldap5/sources/ldap/ssldap/ |
H A D | ldapsinit.c | 740 CERTCertificate *cert; in ldapssl_AuthCertificate() local 758 cert = SSL_PeerCertificate( fd ); in ldapssl_AuthCertificate() 760 rv = CERT_VerifyCertNow(sseip->lssei_certdbh, cert, checkSig, in ldapssl_AuthCertificate() 777 rv = CERT_VerifyCertName(cert, hostname); in ldapssl_AuthCertificate() 817 CERTCertificate *cert; in get_keyandcert() local 820 if (( cert = PK11_FindCertFromNickname( ssip->lssei_certnickname, NULL )) in get_keyandcert() 834 if (( key = PK11_FindKeyByAnyCert( cert, (void *)ssip )) == NULL ) { in get_keyandcert() 835 CERT_DestroyCertificate( cert ); in get_keyandcert() 842 *pRetCert = cert; in get_keyandcert() 883 CERTCertificate *cert = NULL; in check_clientauth_nicknames_and_passwd() local [all …]
|
/titanic_50/usr/src/cmd/sendmail/src/ |
H A D | tls.c | 1177 X509 *cert; local 1195 cert = SSL_get_peer_certificate(ssl); 1200 who, verifyok, (unsigned long) cert); 1201 if (cert != NULL) 1208 subj = X509_get_subject_name(cert); 1209 issuer = X509_get_issuer_name(cert); 1263 if (X509_digest(cert, EVP_md5(), md, &n) != 0 && n > 0) 1292 if (cert != NULL) 1309 if (cert != NULL) 1310 X509_free(cert); [all …]
|
/titanic_50/usr/src/lib/krb5/plugins/preauth/pkinit/ |
H A D | pkinit_crypto_openssl.c | 582 X509 *cert = NULL; in get_cert() local 602 cert = (X509 *) PEM_read_bio_X509(tmp, NULL, NULL, NULL); in get_cert() 603 if (cert == NULL) { in get_cert() 608 *retcert = cert; in get_cert() 873 X509 *cert = NULL; in cms_signeddata_create() local 898 cert = sk_X509_value(id_cryptoctx->my_certs, id_cryptoctx->cert_index); in cms_signeddata_create() 901 sk_X509_push(cert_stack, X509_dup(cert)); in cms_signeddata_create() 914 X509_STORE_CTX_init(&certctx, certstore, cert, in cms_signeddata_create() 938 p7s->cert = cert_stack; in cms_signeddata_create() 946 X509_get_issuer_name(cert))) in cms_signeddata_create() [all …]
|