Return more placeholder version strings.
PyOpenSSL's tests expect all of the outputs to be distinct. OpenSSL also tends to prefix the return values with strings like "compiler:", so do something similar. Change-Id: Ic411c95a276b477641ebad803ac309b3035c1b13 Reviewed-on: https://boringssl-review.googlesource.com/28544 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
9db1a0017a
commit
d6e31f6a56
@ -167,10 +167,20 @@ int CRYPTO_has_asm(void) {
|
||||
const char *SSLeay_version(int which) { return OpenSSL_version(which); }
|
||||
|
||||
const char *OpenSSL_version(int which) {
|
||||
if (which == OPENSSL_VERSION) {
|
||||
return "BoringSSL";
|
||||
switch (which) {
|
||||
case OPENSSL_VERSION:
|
||||
return "BoringSSL";
|
||||
case OPENSSL_CFLAGS:
|
||||
return "compiler: n/a";
|
||||
case OPENSSL_BUILT_ON:
|
||||
return "built on: n/a";
|
||||
case OPENSSL_PLATFORM:
|
||||
return "platform: n/a";
|
||||
case OPENSSL_DIR:
|
||||
return "OPENSSLDIR: n/a";
|
||||
default:
|
||||
return "not available";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
unsigned long SSLeay(void) { return OPENSSL_VERSION_NUMBER; }
|
||||
|
@ -76,7 +76,8 @@ OPENSSL_EXPORT int BORINGSSL_self_test(void);
|
||||
#define OPENSSL_DIR 4
|
||||
|
||||
// OpenSSL_version is a compatibility function that returns the string
|
||||
// "BoringSSL" if |which| is |OPENSSL_VERSION| and "" otherwise.
|
||||
// "BoringSSL" if |which| is |OPENSSL_VERSION| and placeholder strings
|
||||
// otherwise.
|
||||
OPENSSL_EXPORT const char *OpenSSL_version(int which);
|
||||
|
||||
#define SSLEAY_VERSION OPENSSL_VERSION
|
||||
|
Loading…
Reference in New Issue
Block a user