Add a stub for SSL_get_shared_ciphers().

This stub returns an empty string rather than NULL (since some callers
might assume that NULL means there are no shared ciphers).

Change-Id: I9537fa0a80c76559b293d8518599b68fd9977dd8
Reviewed-on: https://boringssl-review.googlesource.com/7196
Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
Emily Stark 2016-02-25 21:12:28 -08:00 committed by David Benjamin
parent 6f0c4db90e
commit 95a79eec40
2 changed files with 12 additions and 0 deletions

View File

@ -3064,6 +3064,10 @@ OPENSSL_EXPORT int SSL_renegotiate(SSL *ssl);
/* SSL_set_state does nothing. */
OPENSSL_EXPORT void SSL_set_state(SSL *ssl, int state);
/* SSL_get_shared_ciphers writes an empty string to |buf| and returns a
* pointer to |buf|, or NULL if |len| is less than or equal to zero. */
OPENSSL_EXPORT char *SSL_get_shared_ciphers(const SSL *ssl, char *buf, int len);
/* SSL_MODE_HANDSHAKE_CUTTHROUGH is the same as SSL_MODE_ENABLE_FALSE_START. */
#define SSL_MODE_HANDSHAKE_CUTTHROUGH SSL_MODE_ENABLE_FALSE_START

View File

@ -1981,6 +1981,14 @@ int SSL_state(const SSL *ssl) { return ssl->state; }
void SSL_set_state(SSL *ssl, int state) { }
char *SSL_get_shared_ciphers(const SSL *ssl, char *buf, int len) {
if (len <= 0) {
return NULL;
}
buf[0] = '\0';
return buf;
}
void SSL_set_verify_result(SSL *ssl, long result) {
ssl->verify_result = result;
}