Home | History | Annotate | Download | only in racoon

Lines Matching full:x509

53 #include <openssl/x509.h>
124 static X509 *mem2x509 __P((vchar_t *));
128 /* X509 Certificate */
293 * The following are derived from code in crypto/x509/x509_cmp.c
487 X509 *x509 = NULL;
517 if (info->x509) {
518 X509_STORE_add_cert(cert_ctx, info->x509);
548 x509 = mem2x509(cert);
549 if (x509 == NULL)
555 X509_STORE_CTX_init(csc, cert_ctx, x509, NULL);
574 if (x509 != NULL)
575 X509_free(x509);
665 * get a subjectName from X509 certificate.
671 X509 *x509 = NULL;
676 x509 = mem2x509(cert);
677 if (x509 == NULL)
681 len = i2d_X509_NAME(x509->cert_info->subject, NULL);
687 len = i2d_X509_NAME(x509->cert_info->subject, &bp);
689 X509_free(x509);
699 if (x509 != NULL)
700 X509_free(x509);
706 * get the subjectAltName from X509 certificate.
716 X509 *x509 = NULL;
725 x509 = mem2x509(cert);
726 if (x509 == NULL)
729 gens = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL);
800 if (x509)
801 X509_free(x509);
810 * get a issuerName from X509 certificate.
816 X509 *x509 = NULL;
821 x509 = mem2x509(cert);
822 if (x509 == NULL)
826 len = i2d_X509_NAME(x509->cert_info->issuer, NULL);
833 len = i2d_X509_NAME(x509->cert_info->issuer, &bp);
835 X509_free(x509);
844 if (x509 != NULL)
845 X509_free(x509);
851 * decode a X509 certificate and make a readable text terminated '\n'.
858 X509 *x509 = NULL;
865 x509 = mem2x509(cert);
866 if (x509 == NULL)
873 error = X509_print(bio, x509);
898 if (x509)
899 X509_free(x509);
904 /* get X509 structure from buffer. */
905 static X509 *
909 X509 *x509;
917 x509 = d2i_X509(NULL, (void *)&bp, cert->l - 1);
930 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
934 return x509;
938 * get a X509 certificate from local file.
951 X509 *x509;
963 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
971 x509 = PEM_read_X509(fp, NULL, NULL, NULL);
977 if (x509 == NULL)
980 len = i2d_X509(x509, NULL);
983 X509_free(x509);
988 error = i2d_X509(x509, &bp);
989 X509_free(x509);
1000 * check a X509 signature
1012 X509 *x509;
1016 x509 = mem2x509(cert);
1017 if (x509 == NULL)
1020 evp = X509_get_pubkey(x509);
1023 X509_free(x509);
1030 X509_free(x509);
1122 X509 *x509 = NULL;
1132 x509 = PEM_read_X509(fp, NULL, NULL, NULL);
1136 if (x509 == NULL)
1140 evp = X509_get_pubkey(x509);