From 5b23427b37d8c082c8050d5cfdba734a5c6026db Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 22 Nov 2019 14:59:49 +0100 Subject: [PATCH] credentials: Add getter for nonce in OCSP request and response interface --- src/libstrongswan/credentials/certificates/ocsp_request.h | 8 ++++++++ .../credentials/certificates/ocsp_response.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/libstrongswan/credentials/certificates/ocsp_request.h b/src/libstrongswan/credentials/certificates/ocsp_request.h index 508a65f3e..d47514bf4 100644 --- a/src/libstrongswan/credentials/certificates/ocsp_request.h +++ b/src/libstrongswan/credentials/certificates/ocsp_request.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2019 Tobias Brunner * Copyright (C) 2008 Martin Willi * HSR Hochschule fuer Technik Rapperswil * @@ -34,6 +35,13 @@ struct ocsp_request_t { * Implements certificate_t interface */ certificate_t interface; + + /** + * Get the nonce sent in this OCSP request. + * + * @return nonce in the request (internal data) + */ + chunk_t (*get_nonce)(ocsp_request_t *this); }; #endif /** OCSP_REQUEST_H_ @}*/ diff --git a/src/libstrongswan/credentials/certificates/ocsp_response.h b/src/libstrongswan/credentials/certificates/ocsp_response.h index e701061d7..581c9da2d 100644 --- a/src/libstrongswan/credentials/certificates/ocsp_response.h +++ b/src/libstrongswan/credentials/certificates/ocsp_response.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2019 Tobias Brunner * Copyright (C) 2008 Martin Willi * HSR Hochschule fuer Technik Rapperswil * @@ -54,6 +55,13 @@ struct ocsp_response_t { */ certificate_t certificate; + /** + * Get the nonce received with this OCSP response. + * + * @return nonce in the response (internal data) + */ + chunk_t (*get_nonce)(ocsp_response_t *this); + /** * Check the status of a certificate by this OCSP response. *