x509: Add getter for nonce in OCSP request/response implementations

This commit is contained in:
Tobias Brunner 2019-11-22 15:04:01 +01:00
parent 5b23427b37
commit 5333db58ac
2 changed files with 16 additions and 1 deletions

View File

@ -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(),

View File

@ -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,