mirror of
https://github.com/kakwa/uts-server
synced 2025-03-12 19:31:06 +01:00
adapt code to newer openssl API
This commit is contained in:
parent
483365a75a
commit
86ece83f51
@ -57,7 +57,6 @@ void free_ssl() {
|
|||||||
CONF_modules_unload(1);
|
CONF_modules_unload(1);
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
// ENGINE_cleanup();
|
// ENGINE_cleanup();
|
||||||
ERR_remove_state(0);
|
|
||||||
CRYPTO_cleanup_all_ex_data();
|
CRYPTO_cleanup_all_ex_data();
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
@ -256,15 +255,16 @@ end:
|
|||||||
|
|
||||||
// recover some status and error messages
|
// recover some status and error messages
|
||||||
BUF_MEM *bptr;
|
BUF_MEM *bptr;
|
||||||
TS_STATUS_INFO_print_bio(status_bio, ts_response->status_info);
|
TS_STATUS_INFO_print_bio(status_bio, TS_RESP_get_status_info(ts_response));
|
||||||
BIO_get_mem_ptr(status_bio, &bptr);
|
BIO_get_mem_ptr(status_bio, &bptr);
|
||||||
|
|
||||||
char *serial_hex = NULL;
|
char *serial_hex = NULL;
|
||||||
*serial_id = calloc(SERIAL_ID_SIZE + 1, sizeof(char));
|
*serial_id = calloc(SERIAL_ID_SIZE + 1, sizeof(char));
|
||||||
// if we have a proper response, we recover the serial to identify the logs
|
// if we have a proper response, we recover the serial to identify the logs
|
||||||
if (ts_response->tst_info != NULL &&
|
if (TS_RESP_get_tst_info(ts_response) != NULL &&
|
||||||
ts_response->tst_info->serial != NULL) {
|
TS_TST_INFO_get_serial(TS_RESP_get_tst_info(ts_response)) != NULL) {
|
||||||
ASN1_INTEGER *serial = ts_response->tst_info->serial;
|
const ASN1_INTEGER *serial =
|
||||||
|
TS_TST_INFO_get_serial(TS_RESP_get_tst_info(ts_response));
|
||||||
BIGNUM *serial_bn = ASN1_INTEGER_to_BN(serial, NULL);
|
BIGNUM *serial_bn = ASN1_INTEGER_to_BN(serial, NULL);
|
||||||
serial_hex = BN_bn2hex(serial_bn);
|
serial_hex = BN_bn2hex(serial_bn);
|
||||||
BN_free(serial_bn);
|
BN_free(serial_bn);
|
||||||
@ -293,7 +293,8 @@ end:
|
|||||||
|
|
||||||
// emit logs according the return value
|
// emit logs according the return value
|
||||||
// and set the return code
|
// and set the return code
|
||||||
long status = ASN1_INTEGER_get(ts_response->status_info->status);
|
long status = ASN1_INTEGER_get(
|
||||||
|
TS_STATUS_INFO_get0_status(TS_RESP_get_status_info(ts_response)));
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TS_STATUS_GRANTED:
|
case TS_STATUS_GRANTED:
|
||||||
uts_logger(ct, LOG_DEBUG, "Request[%s], timestamp request granted",
|
uts_logger(ct, LOG_DEBUG, "Request[%s], timestamp request granted",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user