Browse Source

Add CRYPTO_has_asm.

This function will return whether BoringSSL was built with
OPENSSL_NO_ASM. This will allow us to write a test in our internal
codebase which asserts that normal builds should always have assembly
code included.

Change-Id: Ib226bf63199022f0039d590edd50c0cc823927b9
Reviewed-on: https://boringssl-review.googlesource.com/7960
Reviewed-by: David Benjamin <davidben@google.com>
kris/onging/CECPQ3_patch15
Adam Langley 8 years ago
committed by David Benjamin
parent
commit
4fac8d0eae
2 changed files with 12 additions and 0 deletions
  1. +8
    -0
      crypto/crypto.c
  2. +4
    -0
      include/openssl/crypto.h

+ 8
- 0
crypto/crypto.c View File

@@ -131,6 +131,14 @@ int CRYPTO_is_confidential_build(void) {
#endif
}

int CRYPTO_has_asm(void) {
#if defined(OPENSSL_NO_ASM)
return 0;
#else
return 1;
#endif
}

const char *SSLeay_version(int unused) {
return "BoringSSL";
}


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

@@ -50,6 +50,10 @@ OPENSSL_EXPORT void CRYPTO_library_init(void);
* internal version of BoringSSL. */
OPENSSL_EXPORT int CRYPTO_is_confidential_build(void);

/* CRYPTO_has_asm returns one unless BoringSSL was built with OPENSSL_NO_ASM,
* in which case it returns zero. */
OPENSSL_EXPORT int CRYPTO_has_asm(void);


/* Deprecated functions. */



Loading…
Cancel
Save