diff options
-rw-r--r-- | doc/api_ref/tls.rst | 20 | ||||
-rw-r--r-- | src/lib/tls/tls_channel.cpp | 2 | ||||
-rw-r--r-- | src/lib/utils/compiler.h | 5 |
3 files changed, 25 insertions, 2 deletions
diff --git a/doc/api_ref/tls.rst b/doc/api_ref/tls.rst index 35df6a676..1da40c58f 100644 --- a/doc/api_ref/tls.rst +++ b/doc/api_ref/tls.rst @@ -132,6 +132,26 @@ information about the connection. The default implementation returns the empty string all of the time, effectively disabling ALPN responses. + .. cpp:function:: void tls_session_activated() + + Optional. By default does nothing. This is called when the session is + activated, that is once it is possible to send or receive data on the + channel. In particular it is possible for an implementation of this + function to perform an initial write on the channel. + + .. cpp:function:: std::vector<uint8_t> tls_provide_cert_status(const std::vector<X509_Certificate>& chain, \ + const Certificate_Status_Request& csr) + + Optional. This can return a cached OCSP response. This is only + used on the server side, and only if the client requests OCSP + stapling. + + .. cpp:function:: std::string tls_peer_network_identity() + + Optional. Return a string that identifies the peer in some unique way + (for example, by formatting the remote IP and port into a string). + This is currently used to bind DTLS cookies to the network identity. + .. cpp:function:: void tls_inspect_handshake_msg(const Handshake_Message&) This callback is optional, and can be used to inspect all handshake messages diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp index 9bff836f2..ced5dd3f1 100644 --- a/src/lib/tls/tls_channel.cpp +++ b/src/lib/tls/tls_channel.cpp @@ -447,7 +447,7 @@ void Channel::process_handshake_ccs(const secure_vector<uint8_t>& record, record_sequence); } } - else if(record_sequence == 0) + else { create_handshake_state(record_version); } diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index abb2a79f0..8629435d9 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -83,7 +83,10 @@ /* * Define BOTAN_MALLOC_FN */ -#if defined(__clang__) || (BOTAN_GCC_VERSION >= 500) +#if defined(__ibmxl__) + // XLC pretends to be both Clang and GCC, but is neither + #define BOTAN_MALLOC_FN __attribute__ ((malloc)) +#elif defined(__clang__) || (BOTAN_GCC_VERSION >= 500) #define BOTAN_MALLOC_FN __attribute__ ((malloc, returns_nonnull, alloc_size(1,2))) #elif defined(__GNUG__) #define BOTAN_MALLOC_FN __attribute__ ((malloc, alloc_size(1,2))) |