diff --git a/src/libstrongswan/plugins/x509/x509_ocsp_request.c b/src/libstrongswan/plugins/x509/x509_ocsp_request.c index 50e3c6160..58270d3b4 100644 --- a/src/libstrongswan/plugins/x509/x509_ocsp_request.c +++ b/src/libstrongswan/plugins/x509/x509_ocsp_request.c @@ -1,4 +1,5 @@ /* + * Copyright (C) 2017-2019 Tobias Brunner * Copyright (C) 2008-2009 Martin Willi * Copyright (C) 2007-2014 Andreas Steffen * HSR Hochschule fuer Technik Rapperswil @@ -464,6 +465,12 @@ METHOD(certificate_t, destroy, void, } } +METHOD(ocsp_request_t, get_nonce, chunk_t, + private_x509_ocsp_request_t *this) +{ + return this->nonce; +} + /** * create an empty but initialized OCSP request */ @@ -488,6 +495,7 @@ static private_x509_ocsp_request_t *create_empty() .get_ref = _get_ref, .destroy = _destroy, }, + .get_nonce = _get_nonce, }, }, .candidates = linked_list_create(), diff --git a/src/libstrongswan/plugins/x509/x509_ocsp_response.c b/src/libstrongswan/plugins/x509/x509_ocsp_response.c index aa4999cbd..75eb9d779 100644 --- a/src/libstrongswan/plugins/x509/x509_ocsp_response.c +++ b/src/libstrongswan/plugins/x509/x509_ocsp_response.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Tobias Brunner + * Copyright (C) 2017-2019 Tobias Brunner * Copyright (C) 2008-2009 Martin Willi * Copyright (C) 2007-2015 Andreas Steffen * HSR Hochschule fuer Technik Rapperswil @@ -271,6 +271,12 @@ METHOD(ocsp_response_t, create_response_enumerator, enumerator_t*, filter, NULL, NULL); } +METHOD(ocsp_response_t, get_nonce, chunk_t, + private_x509_ocsp_response_t *this) +{ + return this->nonce; +} + /** * ASN.1 definition of singleResponse */ @@ -871,6 +877,7 @@ static x509_ocsp_response_t *load(chunk_t blob) .get_ref = _get_ref, .destroy = _destroy, }, + .get_nonce = _get_nonce, .get_status = _get_status, .create_cert_enumerator = _create_cert_enumerator, .create_response_enumerator = _create_response_enumerator,