Lines Matching refs:req

63 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)  in X509_REQ_get_pubkey()  argument
65 if (req == NULL) in X509_REQ_get_pubkey()
67 return X509_PUBKEY_get(req->req_info.pubkey); in X509_REQ_get_pubkey()
70 EVP_PKEY *X509_REQ_get0_pubkey(const X509_REQ *req) in X509_REQ_get0_pubkey() argument
72 if (req == NULL) in X509_REQ_get0_pubkey()
74 return X509_PUBKEY_get0(req->req_info.pubkey); in X509_REQ_get0_pubkey()
77 X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req) in X509_REQ_get_X509_PUBKEY() argument
79 return req->req_info.pubkey; in X509_REQ_get_X509_PUBKEY()
82 int X509_REQ_check_private_key(const X509_REQ *req, EVP_PKEY *pkey) in X509_REQ_check_private_key() argument
84 return ossl_x509_check_private_key(X509_REQ_get0_pubkey(req), pkey); in X509_REQ_check_private_key()
120 static STACK_OF(X509_EXTENSION) *get_extensions_by_nid(const X509_REQ *req, in STACK_OF()
126 int idx = X509_REQ_get_attr_by_NID(req, nid, -1); in STACK_OF()
130 attr = X509_REQ_get_attr(req, idx); in STACK_OF()
142 STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(OSSL_FUTURE_CONST X509_REQ *req) in STACK_OF()
147 if (req == NULL || ext_nids == NULL) in STACK_OF()
150 exts = get_extensions_by_nid(req, *pnid); in STACK_OF()
165 int X509_REQ_add_extensions_nid(X509_REQ *req, in X509_REQ_add_extensions_nid() argument
177 loc = X509at_get_attr_by_NID(req->req_info.attributes, nid, -1); in X509_REQ_add_extensions_nid()
179 if ((mod_exts = get_extensions_by_nid(req, nid)) == NULL) in X509_REQ_add_extensions_nid()
192 X509_ATTRIBUTE *att = X509at_delete_attr(req->req_info.attributes, loc); in X509_REQ_add_extensions_nid()
199 rv = X509_REQ_add1_attr_by_NID(req, nid, V_ASN1_SEQUENCE, ext, extlen); in X509_REQ_add_extensions_nid()
208 int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts) in X509_REQ_add_extensions() argument
210 return X509_REQ_add_extensions_nid(req, exts, NID_ext_req); in X509_REQ_add_extensions()
215 int X509_REQ_get_attr_count(const X509_REQ *req) in X509_REQ_get_attr_count() argument
217 return X509at_get_attr_count(req->req_info.attributes); in X509_REQ_get_attr_count()
220 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos) in X509_REQ_get_attr_by_NID() argument
222 return X509at_get_attr_by_NID(req->req_info.attributes, nid, lastpos); in X509_REQ_get_attr_by_NID()
225 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj, in X509_REQ_get_attr_by_OBJ() argument
228 return X509at_get_attr_by_OBJ(req->req_info.attributes, obj, lastpos); in X509_REQ_get_attr_by_OBJ()
231 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc) in X509_REQ_get_attr() argument
233 return X509at_get_attr(req->req_info.attributes, loc); in X509_REQ_get_attr()
236 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc) in X509_REQ_delete_attr() argument
240 if (req == NULL) { in X509_REQ_delete_attr()
244 attr = X509at_delete_attr(req->req_info.attributes, loc); in X509_REQ_delete_attr()
246 req->req_info.enc.modified = 1; in X509_REQ_delete_attr()
250 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr) in X509_REQ_add1_attr() argument
252 if (req == NULL) { in X509_REQ_add1_attr()
256 if (!X509at_add1_attr(&req->req_info.attributes, attr)) in X509_REQ_add1_attr()
258 req->req_info.enc.modified = 1; in X509_REQ_add1_attr()
262 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, in X509_REQ_add1_attr_by_OBJ() argument
266 if (req == NULL) { in X509_REQ_add1_attr_by_OBJ()
270 if (!X509at_add1_attr_by_OBJ(&req->req_info.attributes, obj, in X509_REQ_add1_attr_by_OBJ()
273 req->req_info.enc.modified = 1; in X509_REQ_add1_attr_by_OBJ()
277 int X509_REQ_add1_attr_by_NID(X509_REQ *req, in X509_REQ_add1_attr_by_NID() argument
281 if (req == NULL) { in X509_REQ_add1_attr_by_NID()
285 if (!X509at_add1_attr_by_NID(&req->req_info.attributes, nid, in X509_REQ_add1_attr_by_NID()
288 req->req_info.enc.modified = 1; in X509_REQ_add1_attr_by_NID()
292 int X509_REQ_add1_attr_by_txt(X509_REQ *req, in X509_REQ_add1_attr_by_txt() argument
296 if (req == NULL) { in X509_REQ_add1_attr_by_txt()
300 if (!X509at_add1_attr_by_txt(&req->req_info.attributes, attrname, in X509_REQ_add1_attr_by_txt()
303 req->req_info.enc.modified = 1; in X509_REQ_add1_attr_by_txt()
307 long X509_REQ_get_version(const X509_REQ *req) in X509_REQ_get_version() argument
309 return ASN1_INTEGER_get(req->req_info.version); in X509_REQ_get_version()
312 X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req) in X509_REQ_get_subject_name() argument
314 return req->req_info.subject; in X509_REQ_get_subject_name()
317 void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, in X509_REQ_get0_signature() argument
321 *psig = req->signature; in X509_REQ_get0_signature()
323 *palg = &req->sig_alg; in X509_REQ_get0_signature()
326 void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig) in X509_REQ_set0_signature() argument
328 if (req->signature) in X509_REQ_set0_signature()
329 ASN1_BIT_STRING_free(req->signature); in X509_REQ_set0_signature()
330 req->signature = psig; in X509_REQ_set0_signature()
333 int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg) in X509_REQ_set1_signature_algo() argument
335 return X509_ALGOR_copy(&req->sig_alg, palg); in X509_REQ_set1_signature_algo()
338 int X509_REQ_get_signature_nid(const X509_REQ *req) in X509_REQ_get_signature_nid() argument
340 return OBJ_obj2nid(req->sig_alg.algorithm); in X509_REQ_get_signature_nid()
343 int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp) in i2d_re_X509_REQ_tbs() argument
345 if (req == NULL) { in i2d_re_X509_REQ_tbs()
349 req->req_info.enc.modified = 1; in i2d_re_X509_REQ_tbs()
350 return i2d_X509_REQ_INFO(&req->req_info, pp); in i2d_re_X509_REQ_tbs()