Lines Matching refs:NULL
128 {NULL}
155 NULL,
160 CONF *conf = NULL; in ts_main()
161 const char *CAfile = NULL, *prog; in ts_main()
162 char *untrusted = NULL; in ts_main()
163 const char *configfile = default_config_file, *engine = NULL; in ts_main()
164 const char *section = NULL, *digestname = NULL; in ts_main()
166 char *password = NULL; in ts_main()
167 char *data = NULL, *digest = NULL, *policy = NULL; in ts_main()
168 char *in = NULL, *out = NULL, *queryfile = NULL, *passin = NULL; in ts_main()
169 char *inkey = NULL, *signer = NULL, *chain = NULL, *CApath = NULL; in ts_main()
170 char *CAstore = NULL; in ts_main()
171 EVP_MD *md = NULL; in ts_main()
175 X509_VERIFY_PARAM *vpm = NULL; in ts_main()
181 if ((vpm = X509_VERIFY_PARAM_new()) == NULL) in ts_main()
294 if (!opt_check_rest_arg(NULL)) in ts_main()
307 !app_passwd(passin, NULL, &password, NULL)) { in ts_main()
312 if ((conf = load_config_file(configfile)) == NULL) in ts_main()
321 if ((data != NULL) && (digest != NULL)) in ts_main()
328 if ((in != NULL) && (queryfile != NULL)) in ts_main()
330 if (in == NULL) { in ts_main()
331 if ((conf == NULL) || (token_in != 0)) in ts_main()
339 if ((in == NULL) || !EXACTLY_ONE(queryfile, data, digest)) in ts_main()
343 vpmtouched ? vpm : NULL); in ts_main()
362 ASN1_OBJECT *oid_obj = NULL; in txt2obj()
364 if ((oid_obj = OBJ_txt2obj(oid, 0)) == NULL) in txt2obj()
374 if (conf != NULL) { in load_config_file()
378 p = app_conf_try_string(conf, NULL, ENV_OID_FILE); in load_config_file()
379 if (p != NULL) { in load_config_file()
402 TS_REQ *query = NULL; in query_command()
403 BIO *in_bio = NULL; in query_command()
404 BIO *data_bio = NULL; in query_command()
405 BIO *out_bio = NULL; in query_command()
408 if (in != NULL) { in query_command()
409 if ((in_bio = bio_open_default(in, 'r', FORMAT_ASN1)) == NULL) in query_command()
411 query = d2i_TS_REQ_bio(in_bio, NULL); in query_command()
413 if (digest == NULL in query_command()
414 && (data_bio = bio_open_default(data, 'r', FORMAT_ASN1)) == NULL) in query_command()
418 if (query == NULL) in query_command()
422 if ((out_bio = bio_open_default(out, 'w', FORMAT_TEXT)) == NULL) in query_command()
427 if ((out_bio = bio_open_default(out, 'w', FORMAT_ASN1)) == NULL) in query_command()
448 TS_REQ *ts_req = NULL; in create_query()
450 TS_MSG_IMPRINT *msg_imprint = NULL; in create_query()
451 X509_ALGOR *algo = NULL; in create_query()
452 unsigned char *data = NULL; in create_query()
453 ASN1_OBJECT *policy_obj = NULL; in create_query()
454 ASN1_INTEGER *nonce_asn1 = NULL; in create_query()
456 if (md == NULL && (md = EVP_get_digestbyname("sha256")) == NULL) in create_query()
458 if ((ts_req = TS_REQ_new()) == NULL) in create_query()
462 if ((msg_imprint = TS_MSG_IMPRINT_new()) == NULL) in create_query()
464 if ((algo = X509_ALGOR_new()) == NULL) in create_query()
466 if ((algo->algorithm = OBJ_nid2obj(EVP_MD_get_type(md))) == NULL) in create_query()
468 if ((algo->parameter = ASN1_TYPE_new()) == NULL) in create_query()
479 if (policy && (policy_obj = txt2obj(policy)) == NULL) in create_query()
485 if (!no_nonce && (nonce_asn1 = create_nonce(NONCE_LENGTH)) == NULL) in create_query()
496 ts_req = NULL; in create_query()
513 EVP_MD_CTX *md_ctx = NULL; in create_digest()
519 if (input != NULL) { in create_digest()
524 if (md_ctx == NULL) in create_digest()
533 if (!EVP_DigestFinal(md_ctx, *md_value, NULL)) in create_digest()
540 if (*md_value == NULL || md_value_len != digest_len) { in create_digest()
550 *md_value = NULL; in create_digest()
560 ASN1_INTEGER *nonce = NULL; in create_nonce()
572 if ((nonce = ASN1_INTEGER_new()) == NULL) in create_nonce()
583 return NULL; in create_nonce()
597 TS_RESP *response = NULL; in reply_command()
598 BIO *in_bio = NULL; in reply_command()
599 BIO *query_bio = NULL; in reply_command()
600 BIO *inkey_bio = NULL; in reply_command()
601 BIO *signer_bio = NULL; in reply_command()
602 BIO *out_bio = NULL; in reply_command()
604 if (in != NULL) { in reply_command()
605 if ((in_bio = BIO_new_file(in, "rb")) == NULL) in reply_command()
610 response = d2i_TS_RESP_bio(in_bio, NULL); in reply_command()
615 if (response != NULL) in reply_command()
620 if (response == NULL) in reply_command()
625 if ((out_bio = bio_open_default(out, 'w', FORMAT_TEXT)) == NULL) in reply_command()
636 if ((out_bio = bio_open_default(out, 'w', FORMAT_ASN1)) == NULL) in reply_command()
665 PKCS7 *token = NULL; in read_PKCS7()
666 TS_TST_INFO *tst_info = NULL; in read_PKCS7()
667 TS_RESP *resp = NULL; in read_PKCS7()
668 TS_STATUS_INFO *si = NULL; in read_PKCS7()
670 if ((token = d2i_PKCS7_bio(in_bio, NULL)) == NULL) in read_PKCS7()
672 if ((tst_info = PKCS7_to_TS_TST_INFO(token)) == NULL) in read_PKCS7()
674 if ((resp = TS_RESP_new()) == NULL) in read_PKCS7()
676 if ((si = TS_STATUS_INFO_new()) == NULL) in read_PKCS7()
683 token = NULL; /* Ownership is lost. */ in read_PKCS7()
684 tst_info = NULL; /* Ownership is lost. */ in read_PKCS7()
692 resp = NULL; in read_PKCS7()
704 TS_RESP *response = NULL; in create_response()
705 BIO *query_bio = NULL; in create_response()
706 TS_RESP_CTX *resp_ctx = NULL; in create_response()
708 if ((query_bio = BIO_new_file(queryfile, "rb")) == NULL) in create_response()
710 if ((section = TS_CONF_get_tsa_section(conf, section)) == NULL) in create_response()
712 if ((resp_ctx = TS_RESP_CTX_new()) == NULL) in create_response()
730 } else if (!TS_CONF_set_signer_digest(conf, section, NULL, resp_ctx)) { in create_response()
752 if ((response = TS_RESP_create_response(resp_ctx, query_bio)) == NULL) in create_response()
759 response = NULL; in create_response()
771 if (serial == NULL) { in serial_cb()
786 BIO *in = NULL; in next_serial()
787 ASN1_INTEGER *serial = NULL; in next_serial()
788 BIGNUM *bn = NULL; in next_serial()
790 if ((serial = ASN1_INTEGER_new()) == NULL) in next_serial()
793 if ((in = BIO_new_file(serialfile, "r")) == NULL) { in next_serial()
806 if ((bn = ASN1_INTEGER_to_BN(serial, NULL)) == NULL) in next_serial()
809 serial = NULL; in next_serial()
812 if ((serial = BN_to_ASN1_INTEGER(bn, NULL)) == NULL) in next_serial()
820 serial = NULL; in next_serial()
830 BIO *out = NULL; in save_ts_serial()
832 if ((out = BIO_new_file(serialfile, "w")) == NULL) in save_ts_serial()
858 BIO *in_bio = NULL; in verify_command()
859 PKCS7 *token = NULL; in verify_command()
860 TS_RESP *response = NULL; in verify_command()
861 TS_VERIFY_CTX *verify_ctx = NULL; in verify_command()
864 if ((in_bio = BIO_new_file(in, "rb")) == NULL) in verify_command()
867 if ((token = d2i_PKCS7_bio(in_bio, NULL)) == NULL) in verify_command()
870 if ((response = d2i_TS_RESP_bio(in_bio, NULL)) == NULL) in verify_command()
876 vpm)) == NULL) in verify_command()
906 TS_VERIFY_CTX *ctx = NULL; in create_verify_ctx()
908 BIO *input = NULL; in create_verify_ctx()
909 TS_REQ *request = NULL; in create_verify_ctx()
913 if (data != NULL || digest != NULL) { in create_verify_ctx()
914 if ((ctx = TS_VERIFY_CTX_new()) == NULL) in create_verify_ctx()
917 if (data != NULL) { in create_verify_ctx()
918 BIO *out = NULL; in create_verify_ctx()
921 if ((out = BIO_new_file(data, "rb")) == NULL) in create_verify_ctx()
927 } else if (digest != NULL) { in create_verify_ctx()
937 } else if (queryfile != NULL) { in create_verify_ctx()
938 if ((input = BIO_new_file(queryfile, "rb")) == NULL) in create_verify_ctx()
940 if ((request = d2i_TS_REQ_bio(input, NULL)) == NULL) in create_verify_ctx()
942 if ((ctx = TS_REQ_to_TS_VERIFY_CTX(request, NULL)) == NULL) in create_verify_ctx()
945 return NULL; in create_verify_ctx()
957 if (untrusted != NULL) { in create_verify_ctx()
958 certs = load_certs_multifile(untrusted, NULL, "extra untrusted certs", in create_verify_ctx()
960 if (certs == NULL || !TS_VERIFY_CTX_set0_certs(ctx, certs)) in create_verify_ctx()
968 ctx = NULL; in create_verify_ctx()
978 X509_STORE *cert_ctx = NULL; in create_cert_store()
979 X509_LOOKUP *lookup = NULL; in create_cert_store()
984 if (cert_ctx == NULL) { in create_cert_store()
986 return NULL; in create_cert_store()
989 if (CApath != NULL) { in create_cert_store()
991 if (lookup == NULL) { in create_cert_store()
1001 if (CAfile != NULL) { in create_cert_store()
1003 if (lookup == NULL) { in create_cert_store()
1014 if (CAstore != NULL) { in create_cert_store()
1016 if (lookup == NULL) { in create_cert_store()
1026 if (vpm != NULL) in create_cert_store()
1033 return NULL; in create_cert_store()