fix compilation error on older compilers (https://github.com/OPEnSLab-OSU/SSLClient/issues/12)
This commit is contained in:
parent
915535aacf
commit
4bb4e14682
2 changed files with 3 additions and 2 deletions
|
@ -181,7 +181,7 @@ int SSLClient::peek() {
|
|||
|
||||
/* see SSLClient.h */
|
||||
void SSLClient::flush() {
|
||||
if (m_write_idx > 0)
|
||||
if (m_write_idx > 0) {
|
||||
if(m_run_until(BR_SSL_RECVAPP) < 0) {
|
||||
m_error("Could not flush write buffer!", __func__);
|
||||
int error = br_ssl_engine_last_error(&m_sslctx.eng);
|
||||
|
@ -190,6 +190,7 @@ void SSLClient::flush() {
|
|||
if (getWriteError())
|
||||
m_print_ssl_error(getWriteError(), SSL_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* see SSLClient.h */
|
||||
|
|
|
@ -81,7 +81,7 @@ static br_skey_decoder_context make_key_from_der(const std::vector<char>& der) {
|
|||
SSLClientParameters::SSLClientParameters(const char* cert, const size_t cert_len, const char* key, const size_t key_len, bool is_der)
|
||||
: m_cert(is_der ? std::vector<char>(cert, cert + cert_len) : make_vector_pem(cert, cert_len))
|
||||
, m_cert_struct{ const_cast<unsigned char*>(reinterpret_cast<const unsigned char*>(m_cert.data())), m_cert.size() }
|
||||
, m_key_struct{ make_key_from_der( is_der ? std::vector<char>(key, key + key_len) : make_vector_pem(key, key_len) ) } {}
|
||||
, m_key_struct( make_key_from_der( is_der ? std::vector<char>(key, key + key_len) : make_vector_pem(key, key_len) ) ) {}
|
||||
|
||||
/* See SSLClientParams.h */
|
||||
SSLClientParameters SSLClientParameters::fromPEM(const char* cert_pem, const size_t cert_len, const char* key_pem, const size_t key_len) {
|
||||
|
|
Loading…
Reference in a new issue