Lines Matching refs:req
51 static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, X509_NAME *fsubj,
53 static int prompt_info(X509_REQ *req,
57 static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *sk,
60 static int add_attribute_object(X509_REQ *req, char *text, const char *def,
254 X509_REQ *req = NULL; in req_main() local
747 req = load_csr_autofmt(infile /* if NULL, reads from stdin */, in req_main()
749 if (req == NULL) in req_main()
789 if (req == NULL) { in req_main()
790 req = X509_REQ_new_ex(app_get0_libctx(), app_get0_propq()); in req_main()
791 if (req == NULL) { in req_main()
795 if (!make_REQ(req, pkey, fsubj, multirdn, !gen_x509, chtype)) { in req_main()
802 EVP_PKEY *pub_key = X509_REQ_get0_pubkey(req); in req_main()
806 X509_REQ_get_subject_name(req); in req_main()
808 X509_REQ_get_subject_name(req); in req_main()
841 } else if (!copy_extensions(new_x509, req, ext_copy)) { in req_main()
894 X509V3_set_ctx(&ext_ctx, NULL, NULL, req, NULL, X509V3_CTX_REPLACE); in req_main()
899 && !X509V3_EXT_REQ_add_nconf(req_conf, &ext_ctx, extsect, req)) { in req_main()
906 req)) { in req_main()
910 i = do_X509_REQ_sign(req, pkey, digest, sigopts); in req_main()
919 print_name(out, "Old subject=", X509_REQ_get_subject_name(req)); in req_main()
922 if (!X509_REQ_set_subject_name(req, fsubj)) { in req_main()
928 print_name(out, "New subject=", X509_REQ_get_subject_name(req)); in req_main()
936 tpubkey = X509_REQ_get0_pubkey(req); in req_main()
941 i = do_X509_REQ_verify(req, tpubkey, vfyopts); in req_main()
965 EVP_PKEY *tpubkey = X509_REQ_get0_pubkey(req); in req_main()
978 ret = X509_REQ_print_ex(out, req, get_nameopt(), reqflag); in req_main()
992 : X509_REQ_get_subject_name(req)); in req_main()
1001 tpubkey = X509_REQ_get0_pubkey(req); in req_main()
1022 i = i2d_X509_REQ_bio(out, req); in req_main()
1024 i = PEM_write_bio_X509_REQ_NEW(out, req); in req_main()
1026 i = PEM_write_bio_X509_REQ(out, req); in req_main()
1062 X509_REQ_free(req); in req_main()
1076 static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, X509_NAME *fsubj, in make_REQ() argument
1107 if (!X509_REQ_set_version(req, X509_REQ_VERSION_1)) in make_REQ()
1111 i = X509_REQ_set_subject_name(req, fsubj); in make_REQ()
1113 i = auto_info(req, dn_sk, attr_sk, attribs, chtype); in make_REQ()
1115 i = prompt_info(req, dn_sk, dn_sect, attr_sk, attr_sect, attribs, in make_REQ()
1120 if (!X509_REQ_set_pubkey(req, pkey)) in make_REQ()
1128 static int prompt_info(X509_REQ *req, in prompt_info() argument
1141 X509_NAME *subj = X509_REQ_get_subject_name(req); in prompt_info()
1262 if (!add_attribute_object(req, in prompt_info()
1277 static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk, in auto_info() argument
1287 subj = X509_REQ_get_subject_name(req); in auto_info()
1336 if (!X509_REQ_add1_attr_by_txt(req, v->name, chtype, in auto_info()
1364 static int add_attribute_object(X509_REQ *req, char *text, const char *def, in add_attribute_object() argument
1377 if (!X509_REQ_add1_attr_by_NID(req, nid, chtype, in add_attribute_object()