aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-07-10 21:26:39 -0400
committerJack Lloyd <[email protected]>2019-07-10 21:26:39 -0400
commit7ce479e51f0d43df600c620c6c6de721809b1546 (patch)
tree767c1b89c8a4d46e4f13455579f640ec3e33877c /src
parent874a082f4dacbac0ba65ea457c819392da222027 (diff)
Remove tab chars
Death to \t
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/gcc.txt2
-rw-r--r--src/cli/tls_server.cpp18
-rw-r--r--src/scripts/Dockerfile.android4
-rwxr-xr-xsrc/scripts/docker-android.sh8
-rw-r--r--src/tests/test_dl_group.cpp12
-rw-r--r--src/tests/test_ffi.cpp10
-rw-r--r--src/tests/unit_ecdsa.cpp4
7 files changed, 28 insertions, 30 deletions
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 90e5f4a89..b546d9ce9 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -58,7 +58,7 @@ avx2 -> "-mavx2"
bmi2 -> "-mbmi -mbmi2"
aesni -> "-maes -mpclmul -mssse3"
rdrand -> "-mrdrnd"
-rdseed -> "-mrdseed"
+rdseed -> "-mrdseed"
sha -> "-msha"
altivec -> "-maltivec"
diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp
index 77afd397d..0a133cffd 100644
--- a/src/cli/tls_server.cpp
+++ b/src/cli/tls_server.cpp
@@ -35,7 +35,7 @@ class TLS_Server final : public Command, public Botan::TLS::Callbacks
{
public:
#if SOCKET_ID
- TLS_Server() : Command("tls_server cert key --port=443 --type=tcp --policy= --dump-traces= --max-clients=0 -socket-id=0")
+ TLS_Server() : Command("tls_server cert key --port=443 --type=tcp --policy= --dump-traces= --max-clients=0 --socket-id=0")
#else
TLS_Server() : Command("tls_server cert key --port=443 --type=tcp --policy= --dump-traces= --max-clients=0")
#endif
@@ -67,7 +67,7 @@ class TLS_Server final : public Command, public Botan::TLS::Callbacks
const std::string transport = get_arg("type");
const std::string dump_traces_to = get_arg("dump-traces");
#if SOCKET_ID
- m_socket_id = get_arg_sz("socket-id");
+ m_socket_id = get_arg_sz("socket-id");
#endif
if(transport != "tcp" && transport != "udp")
@@ -101,11 +101,11 @@ class TLS_Server final : public Command, public Botan::TLS::Callbacks
output() << "Listening for new connections on " << transport << " port " << port << std::endl;
- if(!m_sandbox.init())
+ if(!m_sandbox.init())
{
error_output() << "Failed sandboxing\n";
- return;
- }
+ return;
+ }
int server_fd = make_server_socket(port);
size_t clients_served = 0;
@@ -265,19 +265,19 @@ class TLS_Server final : public Command, public Botan::TLS::Callbacks
throw CLI_Error("listen failed");
}
}
- if(m_socket_id > 0)
+ if(m_socket_id > 0)
{
#if SOCKET_ID
-// Other oses could have other means to trace sockets
+ // Other oses could have other means to trace sockets
#if defined(SO_USER_COOKIE)
if(::setsockopt(fd, SOL_SOCKET, SO_USER_COOKIE, reinterpret_cast<const void *>(&m_socket_id), sizeof(m_socket_id)) != 0)
{
// Failed but not world-ending issue
output() << "set socket cookie id failed" << std::endl;
- }
+ }
#endif
#endif
- }
+ }
return fd;
}
diff --git a/src/scripts/Dockerfile.android b/src/scripts/Dockerfile.android
index 4087d6bb3..b55abf63b 100644
--- a/src/scripts/Dockerfile.android
+++ b/src/scripts/Dockerfile.android
@@ -2,9 +2,7 @@ FROM debian:stretch AS debian
ARG ANDORID_SDK_VER
ARG ANDROID_ARCH
ARG ANDROID_TOOLCHAIN_SUF
-RUN apt-get update && apt-get -y --no-install-recommends install \
- make
-
+RUN apt-get update && apt-get -y --no-install-recommends install make
RUN mkdir -p /botan/android
WORKDIR /botan
COPY --from=bitriseio/android-ndk /opt/android-ndk android-ndk
diff --git a/src/scripts/docker-android.sh b/src/scripts/docker-android.sh
index ec23a2cd6..eb7becd7b 100755
--- a/src/scripts/docker-android.sh
+++ b/src/scripts/docker-android.sh
@@ -1,10 +1,10 @@
VERSION=`./configure.py --version`
mkdir -p docker-builds
docker build -f src/scripts/Dockerfile.android --force-rm -t botan-android-${VERSION} \
- --build-arg ANDROID_SDK_VER=${ANDROID_SDK_VER} \
- --build-arg ANDROID_ARCH=${ANDROID_ARCH} \
- --build-arg ANDROID_TOOLCHAIN_SUF=${ANDROID_TOOLCHAIN_SUF} \
- .
+ --build-arg ANDROID_SDK_VER=${ANDROID_SDK_VER} \
+ --build-arg ANDROID_ARCH=${ANDROID_ARCH} \
+ --build-arg ANDROID_TOOLCHAIN_SUF=${ANDROID_TOOLCHAIN_SUF} \
+ .
docker create --name botan-android-${VERSION} botan-android-${VERSION}
docker cp botan-android-${VERSION}:/botan/android docker-builds
docker rm -f botan-android-${VERSION}
diff --git a/src/tests/test_dl_group.cpp b/src/tests/test_dl_group.cpp
index df5aaa8ce..bac0ea82f 100644
--- a/src/tests/test_dl_group.cpp
+++ b/src/tests/test_dl_group.cpp
@@ -45,12 +45,12 @@ class DL_Group_Tests final : public Test
[]() { Botan::DL_Group dl; dl.get_p(); });
#if !defined(BOTAN_HAS_SANITIZER_UNDEFINED)
- result.test_throws("Bad generator param",
- "DL_Group unknown PrimeType",
- []() {
- auto invalid_type = static_cast<Botan::DL_Group::PrimeType>(9);
- Botan::DL_Group dl(Test::rng(), invalid_type, 1024);
- });
+ result.test_throws("Bad generator param",
+ "DL_Group unknown PrimeType",
+ []() {
+ auto invalid_type = static_cast<Botan::DL_Group::PrimeType>(9);
+ Botan::DL_Group dl(Test::rng(), invalid_type, 1024);
+ });
#endif
return result;
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index 6263999d9..5952817ef 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -1108,11 +1108,11 @@ class FFI_Unit_Tests final : public Test
TEST_FFI_RC(0, botan_hash_destroy, (nullptr));
#if !defined(BOTAN_HAS_SANITIZER_UNDEFINED)
- // Confirm that botan_x_destroy checks the argument type
- botan_mp_t mp;
- botan_mp_init(&mp);
- TEST_FFI_RC(BOTAN_FFI_ERROR_INVALID_OBJECT, botan_hash_destroy, (reinterpret_cast<botan_hash_t>(mp)));
- TEST_FFI_RC(0, botan_mp_destroy, (mp));
+ // Confirm that botan_x_destroy checks the argument type
+ botan_mp_t mp;
+ botan_mp_init(&mp);
+ TEST_FFI_RC(BOTAN_FFI_ERROR_INVALID_OBJECT, botan_hash_destroy, (reinterpret_cast<botan_hash_t>(mp)));
+ TEST_FFI_RC(0, botan_mp_destroy, (mp));
#endif
std::set<std::string> errors;
diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp
index d87d54f5e..ee8ffc375 100644
--- a/src/tests/unit_ecdsa.cpp
+++ b/src/tests/unit_ecdsa.cpp
@@ -303,8 +303,8 @@ Test::Result test_encoding_options()
auto invalid_format = static_cast<Botan::PointGFp::Compression_Type>(99);
result.test_throws("Invalid point format throws",
- "Invalid point encoding for EC_PublicKey",
- [&] { key.set_point_encoding(invalid_format); });
+ "Invalid point encoding for EC_PublicKey",
+ [&] { key.set_point_encoding(invalid_format); });
#endif
return result;