Lines Matching full:x509
72 #include <openssl/x509.h>
199 static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
205 static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
212 static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
218 static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
219 static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
225 static int do_revoke(X509 *x509, CA_DB *db, int ext, char *extval);
298 X509 *x509=NULL, *x509p = NULL;
299 X509 *x=NULL;
313 STACK_OF(X509) *cert_sk=NULL;
767 x509=load_cert(bio_err, certfile, FORMAT_PEM, NULL, e,
769 if (x509 == NULL)
772 if (!X509_check_private_key(x509,pkey))
778 if (!selfsign) x509p = x509;
1173 j=certify_spkac(&x,spkac_file,pkey,x509,dgst,attribs,db,
1197 j=certify_cert(&x,ss_cert_file,pkey,x509,dgst,attribs,
1404 if (!X509_CRL_set_issuer_name(crl, X509_get_subject_name(x509))) goto err;
1454 X509V3_set_ctx(&crlctx, x509, NULL, NULL, crl, 0);
1504 X509 *revcert;
1541 if (x509) X509_free(x509);
1555 static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
1613 ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn, email_dn,
1623 static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
1630 X509 *req=NULL;
1667 ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
1677 static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1689 X509 *ret=NULL;
1792 CAname=X509_NAME_dup(x509->cert_info->subject);
2000 /* Make it an X509 v3 certificate. */
2013 if (!X509_set_issuer_name(ret,X509_get_subject_name(x509)))
2053 X509V3_set_ctx(&ctx, x509, ret, req, NULL, 0);
2218 static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext)
2242 static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
2284 * Now create a dummy X509 request structure. We don't actually
2285 * have an X509 request, but we have many of the components
2287 * put these components into the right X509 request structure
2288 * and we can use the same code as if you had a real X509 request.
2369 ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
2386 static int do_revoke(X509 *x509, CA_DB *db, int type, char *value)
2396 row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
2397 bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
2421 tm=X509_get_notAfter(x509);
2464 ok = do_revoke(x509,db, type, value);