Browse Source

Add SSL_CIPHER_is_static_RSA.

Change-Id: Id0013a2441da206b051a05a39aa13e4eca937e03
Reviewed-on: https://boringssl-review.googlesource.com/13109
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 years ago
committed by Adam Langley
parent
commit
745745df03
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      include/openssl/ssl.h
  2. +4
    -0
      ssl/ssl_cipher.c

+ 4
- 0
include/openssl/ssl.h View File

@@ -1195,6 +1195,10 @@ OPENSSL_EXPORT int SSL_CIPHER_is_DHE(const SSL_CIPHER *cipher);
/* SSL_CIPHER_is_ECDHE returns one if |cipher| uses ECDHE. */
OPENSSL_EXPORT int SSL_CIPHER_is_ECDHE(const SSL_CIPHER *cipher);

/* SSL_CIPHER_is_static_RSA returns one if |cipher| uses the static RSA key
* exchange. */
OPENSSL_EXPORT int SSL_CIPHER_is_static_RSA(const SSL_CIPHER *cipher);

/* SSL_CIPHER_get_min_version returns the minimum protocol version required
* for |cipher|. */
OPENSSL_EXPORT uint16_t SSL_CIPHER_get_min_version(const SSL_CIPHER *cipher);


+ 4
- 0
ssl/ssl_cipher.c View File

@@ -1525,6 +1525,10 @@ int SSL_CIPHER_is_ECDHE(const SSL_CIPHER *cipher) {
return (cipher->algorithm_mkey & SSL_kECDHE) != 0;
}

int SSL_CIPHER_is_static_RSA(const SSL_CIPHER *cipher) {
return (cipher->algorithm_mkey & SSL_kRSA) != 0;
}

uint16_t SSL_CIPHER_get_min_version(const SSL_CIPHER *cipher) {
if (cipher->algorithm_mkey == SSL_kGENERIC ||
cipher->algorithm_auth == SSL_aGENERIC) {


Loading…
Cancel
Save