Lines Matching refs:req

1 /* apps/req.c */
92 #define SECTION "req"
131 static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *dn, int mutlirdn,
133 static int build_subject(X509_REQ *req, char *subj, unsigned long chtype,
135 static int prompt_info(X509_REQ *req,
139 static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *sk,
142 static int add_attribute_object(X509_REQ *req, char *text, const char *def,
168 X509_REQ *req = NULL;
425 " -x509 output a x509 structure instead of a cert. req.\n");
743 req = d2i_X509_REQ_bio(in, NULL);
745 req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
751 if (req == NULL) {
763 if (req == NULL) {
764 req = X509_REQ_new();
765 if (req == NULL) {
769 i = make_REQ(req, pkey, subj, multirdn, !x509, chtype);
772 && !sk_X509_ATTRIBUTE_num(req->req_info->attributes)) {
773 sk_X509_ATTRIBUTE_free(req->req_info->attributes);
774 req->req_info->attributes = NULL;
798 if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req)))
805 (x509ss, X509_REQ_get_subject_name(req)))
807 tmppkey = X509_REQ_get_pubkey(req);
836 X509V3_set_ctx(&ext_ctx, NULL, NULL, req, NULL, 0);
842 req)) {
847 i = do_X509_REQ_sign(bio_err, req, pkey, digest, sigopts);
864 X509_REQ_get_subject_name(req), nmflag);
867 if (build_subject(req, subj, chtype, multirdn) == 0) {
873 req->req_info->enc.modified = 1;
877 X509_REQ_get_subject_name(req), nmflag);
885 pkey = X509_REQ_get_pubkey(req);
891 i = X509_REQ_verify(req, pkey);
932 tpubkey = X509_REQ_get_pubkey(req);
946 X509_REQ_print_ex(out, req, nmflag, reqflag);
954 print_name(out, "subject=", X509_REQ_get_subject_name(req),
964 tpubkey = X509_REQ_get_pubkey(req);
982 i = i2d_X509_REQ_bio(out, req);
985 i = PEM_write_bio_X509_REQ_NEW(out, req);
987 i = PEM_write_bio_X509_REQ(out, req);
1037 X509_REQ_free(req);
1050 static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn,
1089 if (!X509_REQ_set_version(req, 0L))
1093 i = auto_info(req, dn_sk, attr_sk, attribs, chtype);
1096 i = build_subject(req, subj, chtype, multirdn);
1098 i = prompt_info(req, dn_sk, dn_sect, attr_sk, attr_sect, attribs,
1104 if (!X509_REQ_set_pubkey(req, pkey))
1116 static int build_subject(X509_REQ *req, char *subject, unsigned long chtype,
1124 if (!X509_REQ_set_subject_name(req, n)) {
1132 static int prompt_info(X509_REQ *req,
1146 subj = X509_REQ_get_subject_name(req);
1285 if (!add_attribute_object(req,
1300 static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
1310 subj = X509_REQ_get_subject_name(req);
1355 if (!X509_REQ_add1_attr_by_txt(req, v->name, chtype,
1421 static int add_attribute_object(X509_REQ *req, char *text, const char *def,
1472 if (!X509_REQ_add1_attr_by_NID(req, nid, chtype,