mirror of
https://github.com/kakwa/uts-server
synced 2025-01-26 05:17:26 +01:00
source formatting
This commit is contained in:
parent
f22c4cfc87
commit
fa7dabcb81
@ -192,7 +192,7 @@ int create_response(rfc3161_context *ct, char *query, int query_len,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE * stream = open_memstream((char **)resp, (size_t *)resp_size);
|
FILE *stream = open_memstream((char **)resp, (size_t *)resp_size);
|
||||||
ret = i2d_TS_RESP_fp(stream, ts_response);
|
ret = i2d_TS_RESP_fp(stream, ts_response);
|
||||||
fflush(stream);
|
fflush(stream);
|
||||||
fclose(stream);
|
fclose(stream);
|
||||||
@ -214,37 +214,36 @@ end:
|
|||||||
uts_logger(ct, LOG_DEBUG, "TimeStamp OpenSSL status: |%s", bptr->data);
|
uts_logger(ct, LOG_DEBUG, "TimeStamp OpenSSL status: |%s", bptr->data);
|
||||||
BUF_MEM_free(bptr);
|
BUF_MEM_free(bptr);
|
||||||
|
|
||||||
|
|
||||||
long status = ASN1_INTEGER_get(ts_response->status_info->status);
|
long status = ASN1_INTEGER_get(ts_response->status_info->status);
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TS_STATUS_GRANTED:
|
case TS_STATUS_GRANTED:
|
||||||
uts_logger(ct, LOG_INFO, "timestamp request granted");
|
uts_logger(ct, LOG_INFO, "timestamp request granted");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
break;
|
break;
|
||||||
case TS_STATUS_GRANTED_WITH_MODS:
|
case TS_STATUS_GRANTED_WITH_MODS:
|
||||||
uts_logger(ct, LOG_NOTICE,
|
uts_logger(ct, LOG_NOTICE,
|
||||||
"timestamp request granted with modification");
|
"timestamp request granted with modification");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
break;
|
break;
|
||||||
case TS_STATUS_REJECTION:
|
case TS_STATUS_REJECTION:
|
||||||
uts_logger(ct, LOG_WARNING, "timestamp request rejected");
|
uts_logger(ct, LOG_WARNING, "timestamp request rejected");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case TS_STATUS_WAITING:
|
case TS_STATUS_WAITING:
|
||||||
uts_logger(ct, LOG_NOTICE, "timestamp request waiting");
|
uts_logger(ct, LOG_NOTICE, "timestamp request waiting");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case TS_STATUS_REVOCATION_WARNING:
|
case TS_STATUS_REVOCATION_WARNING:
|
||||||
uts_logger(ct, LOG_WARNING, "timestamp request revocation warning");
|
uts_logger(ct, LOG_WARNING, "timestamp request revocation warning");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case TS_STATUS_REVOCATION_NOTIFICATION:
|
case TS_STATUS_REVOCATION_NOTIFICATION:
|
||||||
uts_logger(ct, LOG_NOTICE, "timestamp request revovation notification");
|
uts_logger(ct, LOG_NOTICE, "timestamp request revovation notification");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
uts_logger(ct, LOG_ERR, "unknown error code '%d'", status);
|
uts_logger(ct, LOG_ERR, "unknown error code '%d'", status);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((err_code = ERR_get_error())) {
|
while ((err_code = ERR_get_error())) {
|
||||||
@ -258,7 +257,7 @@ end:
|
|||||||
}
|
}
|
||||||
err_code_prev = err_code;
|
err_code_prev = err_code;
|
||||||
}
|
}
|
||||||
//BIO_free_all(status_bio);
|
// BIO_free_all(status_bio);
|
||||||
TS_RESP_free(ts_response);
|
TS_RESP_free(ts_response);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user