Skip to content

Commit

Permalink
explain it to GCC
Browse files Browse the repository at this point in the history
Co-authored-by: René Meusel <rene.meusel@nexenio.com>
  • Loading branch information
Hannes Rantzsch and reneme committed Mar 18, 2022
1 parent 8b68663 commit 9e7242c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/lib/tls/msg_certificate_13.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include <botan/tls_messages.h>

#include <botan/credentials_manager.h>
#include <botan/ocsp.h>
#include <botan/tls_callbacks.h>
#include <botan/tls_messages.h>
#include <botan/tls_extensions.h>
#include <botan/tls_exceptn.h>
#include <botan/tls_alert.h>
Expand Down Expand Up @@ -59,7 +61,9 @@ void Certificate_13::verify(Callbacks& callbacks,
// construction of the OCSP response.
ocsp_responses.push_back(entry.extensions.get<Certificate_Status_Request>()->get_ocsp_response());
else
ocsp_responses.push_back(std::nullopt);
// Note: The make_optional instead of simply nullopt is necessary to work around a GCC <= 10.0 bug
// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
ocsp_responses.push_back(std::make_optional<OCSP::Response>());
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/lib/tls/tls_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <botan/tls_ciphersuite.h>
#include <botan/pk_keys.h>
#include <botan/x509cert.h>
#include <botan/ocsp.h>

#if defined(BOTAN_HAS_CECPQ1)
#include <botan/cecpq1.h>
Expand All @@ -34,6 +33,10 @@ namespace Botan {
class Public_Key;
class Credentials_Manager;

namespace OCSP {
class Response;
}

namespace TLS {

class Session;
Expand Down

0 comments on commit 9e7242c

Please sign in to comment.