Lines Matching refs:X509
53 #include <openssl/x509.h>
123 static X509 *mem2x509 __P((vchar_t *));
127 /* X509 Certificate */
269 * The following are derived from code in crypto/x509/x509_cmp.c
463 X509 *x509 = NULL;
493 if (info->x509) {
494 X509_STORE_add_cert(cert_ctx, info->x509);
524 x509 = mem2x509(cert);
525 if (x509 == NULL)
531 X509_STORE_CTX_init(csc, cert_ctx, x509, NULL);
550 if (x509 != NULL)
551 X509_free(x509);
641 * get a subjectAltName from X509 certificate.
647 X509 *x509 = NULL;
654 x509 = mem2x509(cert);
655 if (x509 == NULL)
659 len = i2d_X509_NAME(x509->cert_info->subject, NULL);
665 len = i2d_X509_NAME(x509->cert_info->subject, &bp);
667 X509_free(x509);
677 if (x509 != NULL)
678 X509_free(x509);
684 * get the subjectAltName from X509 certificate.
694 X509 *x509 = NULL;
703 x509 = mem2x509(cert);
704 if (x509 == NULL)
707 gens = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL);
778 if (x509)
779 X509_free(x509);
789 * decode a X509 certificate and make a readable text terminated '\n'.
796 X509 *x509 = NULL;
803 x509 = mem2x509(cert);
804 if (x509 == NULL)
811 error = X509_print(bio, x509);
836 if (x509)
837 X509_free(x509);
842 /* get X509 structure from buffer. */
843 static X509 *
847 X509 *x509;
855 x509 = d2i_X509(NULL, (void *)&bp, cert->l);
868 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
872 return x509;
876 * get a X509 certificate from local file.
889 X509 *x509;
901 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
909 x509 = PEM_read_X509(fp, NULL, NULL, NULL);
915 if (x509 == NULL)
918 len = i2d_X509(x509, NULL);
921 X509_free(x509);
925 error = i2d_X509(x509, &bp);
926 X509_free(x509);
937 * check a X509 signature
949 X509 *x509;
956 x509 = d2i_X509(NULL, (void *)&bp, cert->l);
957 if (x509 == NULL) {
962 evp = X509_get_pubkey(x509);
965 X509_free(x509);
972 X509_free(x509);
1064 X509 *x509 = NULL;
1074 x509 = PEM_read_X509(fp, NULL, NULL, NULL);
1078 if (x509 == NULL)
1082 evp = X509_get_pubkey(x509);