aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ts
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2006-03-19 21:09:48 +0000
committerNils Larsch <nils@openssl.org>2006-03-19 21:09:48 +0000
commitd917188a460d02473ef3e16015ece77ba5489ed4 (patch)
tree0a3170ec8f411bbdc37738d42e0f0671b107cd1c /crypto/ts
parentb4e88ccb2875b414c3882759a1f1c6a4a07df389 (diff)
downloadopenssl-d917188a460d02473ef3e16015ece77ba5489ed4.tar.gz
fix last commit: return NULL is TS_RESP_CTX_set_status_info_cond() failed
Diffstat (limited to 'crypto/ts')
-rw-r--r--crypto/ts/ts_rsp_sign.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c
index 0c8e636fdf..b0f023c9d2 100644
--- a/crypto/ts/ts_rsp_sign.c
+++ b/crypto/ts/ts_rsp_sign.c
@@ -466,18 +466,12 @@ TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio)
if (!result)
{
TSerr(TS_F_TS_RESP_CREATE_RESPONSE, TS_R_RESPONSE_SETUP_ERROR);
- if (ctx != NULL)
+ if (ctx->response != NULL)
{
- TS_RESP_CTX_set_status_info_cond(ctx,
+ if (TS_RESP_CTX_set_status_info_cond(ctx,
TS_STATUS_REJECTION, "Error during response "
- "generation.");
- /* Check if the status info was set. */
- if (ctx->response && ASN1_INTEGER_get(
- TS_RESP_get_status_info(ctx->response)->status)
- == TS_STATUS_GRANTED)
+ "generation.") == 0)
{
- /* Status info wasn't set, don't
- * return a response. */
TS_RESP_free(ctx->response);
ctx->response = NULL;
}