| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 TEST(BoringSSL, BN) { | 152 TEST(BoringSSL, BN) { |
| 153 TestSimple("bn_test"); | 153 TestSimple("bn_test"); |
| 154 } | 154 } |
| 155 | 155 |
| 156 TEST(BoringSSL, ByteString) { | 156 TEST(BoringSSL, ByteString) { |
| 157 TestSimple("bytestring_test"); | 157 TestSimple("bytestring_test"); |
| 158 } | 158 } |
| 159 | 159 |
| 160 TEST(BoringSSL, ConstantTime) { |
| 161 TestSimple("constant_time_test"); |
| 162 } |
| 163 |
| 160 TEST(BoringSSL, Cipher) { | 164 TEST(BoringSSL, Cipher) { |
| 161 base::FilePath data_file; | 165 base::FilePath data_file; |
| 162 ASSERT_TRUE(CryptoCipherTestPath(&data_file)); | 166 ASSERT_TRUE(CryptoCipherTestPath(&data_file)); |
| 163 data_file = data_file.Append(FILE_PATH_LITERAL("cipher_test.txt")); | 167 data_file = data_file.Append(FILE_PATH_LITERAL("cipher_test.txt")); |
| 164 | 168 |
| 165 std::vector<base::CommandLine::StringType> args; | 169 std::vector<base::CommandLine::StringType> args; |
| 166 args.push_back(data_file.value()); | 170 args.push_back(data_file.value()); |
| 167 | 171 |
| 168 TestProcess("cipher_test", args); | 172 TestProcess("cipher_test", args); |
| 169 } | 173 } |
| 170 | 174 |
| 171 TEST(BoringSSL, CMAC) { | |
| 172 TestSimple("cmac_test"); | |
| 173 } | |
| 174 | |
| 175 TEST(BoringSSL, ConstantTime) { | |
| 176 TestSimple("constant_time_test"); | |
| 177 } | |
| 178 | |
| 179 TEST(BoringSSL, DH) { | 175 TEST(BoringSSL, DH) { |
| 180 TestSimple("dh_test"); | 176 TestSimple("dh_test"); |
| 181 } | 177 } |
| 182 | 178 |
| 183 TEST(BoringSSL, Digest) { | 179 TEST(BoringSSL, Digest) { |
| 184 TestSimple("digest_test"); | 180 TestSimple("digest_test"); |
| 185 } | 181 } |
| 186 | 182 |
| 187 TEST(BoringSSL, DSA) { | 183 TEST(BoringSSL, DSA) { |
| 188 TestSimple("dsa_test"); | 184 TestSimple("dsa_test"); |
| 189 } | 185 } |
| 190 | 186 |
| 191 TEST(BoringSSL, EC) { | 187 TEST(BoringSSL, EC) { |
| 192 TestSimple("ec_test"); | 188 TestSimple("ec_test"); |
| 193 } | 189 } |
| 194 | 190 |
| 195 TEST(BoringSSL, ECDSA) { | 191 TEST(BoringSSL, ECDSA) { |
| 196 TestSimple("ecdsa_test"); | 192 TestSimple("ecdsa_test"); |
| 197 } | 193 } |
| 198 | 194 |
| 199 TEST(BoringSSL, ERR) { | 195 TEST(BoringSSL, ERR) { |
| 200 TestSimple("err_test"); | 196 TestSimple("err_test"); |
| 201 } | 197 } |
| 202 | 198 |
| 203 TEST(BoringSSL, GCM) { | 199 TEST(BoringSSL, GCM) { |
| 204 TestSimple("gcm_test"); | 200 TestSimple("gcm_test"); |
| 205 } | 201 } |
| 206 | 202 |
| 207 TEST(BoringSSL, HMAC) { | 203 TEST(BoringSSL, HMAC) { |
| 208 base::FilePath data_file; | 204 TestSimple("hmac_test"); |
| 209 ASSERT_TRUE(BoringSSLPath(&data_file)); | |
| 210 data_file = data_file.Append(FILE_PATH_LITERAL("crypto")); | |
| 211 data_file = data_file.Append(FILE_PATH_LITERAL("hmac")); | |
| 212 data_file = data_file.Append(FILE_PATH_LITERAL("hmac_tests.txt")); | |
| 213 | |
| 214 std::vector<base::CommandLine::StringType> args; | |
| 215 args.push_back(data_file.value()); | |
| 216 | |
| 217 TestProcess("hmac_test", args); | |
| 218 } | 205 } |
| 219 | 206 |
| 220 TEST(BoringSSL, LH) { | 207 TEST(BoringSSL, LH) { |
| 221 TestSimple("lhash_test"); | 208 TestSimple("lhash_test"); |
| 222 } | 209 } |
| 223 | 210 |
| 224 TEST(BoringSSL, RSA) { | 211 TEST(BoringSSL, RSA) { |
| 225 TestSimple("rsa_test"); | 212 TestSimple("rsa_test"); |
| 226 } | 213 } |
| 227 | 214 |
| 228 TEST(BoringSSL, PKCS7) { | 215 TEST(BoringSSL, PKCS7) { |
| 229 TestSimple("pkcs7_test"); | 216 TestSimple("pkcs7_test"); |
| 230 } | 217 } |
| 231 | 218 |
| 232 TEST(BoringSSL, PKCS12) { | 219 TEST(BoringSSL, PKCS12) { |
| 233 TestSimple("pkcs12_test"); | 220 TestSimple("pkcs12_test"); |
| 234 } | 221 } |
| 235 | 222 |
| 236 TEST(BoringSSL, ExampleMul) { | 223 TEST(BoringSSL, ExampleMul) { |
| 237 TestSimple("example_mul"); | 224 TestSimple("example_mul"); |
| 238 } | 225 } |
| 239 | 226 |
| 240 TEST(BoringSSL, EVP) { | 227 TEST(BoringSSL, EVP) { |
| 241 base::FilePath data_file; | 228 TestSimple("evp_test"); |
| 242 ASSERT_TRUE(BoringSSLPath(&data_file)); | |
| 243 data_file = data_file.Append(FILE_PATH_LITERAL("crypto")); | |
| 244 data_file = data_file.Append(FILE_PATH_LITERAL("evp")); | |
| 245 data_file = data_file.Append(FILE_PATH_LITERAL("evp_tests.txt")); | |
| 246 | |
| 247 std::vector<base::CommandLine::StringType> args; | |
| 248 args.push_back(data_file.value()); | |
| 249 | |
| 250 TestProcess("evp_test", args); | |
| 251 } | |
| 252 | |
| 253 // evp_test is also run on hmac_test's input. | |
| 254 TEST(BoringSSL, EVPHMAC) { | |
| 255 base::FilePath data_file; | |
| 256 ASSERT_TRUE(BoringSSLPath(&data_file)); | |
| 257 data_file = data_file.Append(FILE_PATH_LITERAL("crypto")); | |
| 258 data_file = data_file.Append(FILE_PATH_LITERAL("hmac")); | |
| 259 data_file = data_file.Append(FILE_PATH_LITERAL("hmac_tests.txt")); | |
| 260 | |
| 261 std::vector<base::CommandLine::StringType> args; | |
| 262 args.push_back(data_file.value()); | |
| 263 | |
| 264 TestProcess("evp_test", args); | |
| 265 } | |
| 266 | |
| 267 TEST(BoringSSL, EVPExtra) { | |
| 268 TestSimple("evp_extra_test"); | |
| 269 } | 229 } |
| 270 | 230 |
| 271 TEST(BoringSSL, SSL) { | 231 TEST(BoringSSL, SSL) { |
| 272 TestSimple("ssl_test"); | 232 TestSimple("ssl_test"); |
| 273 } | 233 } |
| 274 | 234 |
| 275 TEST(BoringSSL, PQueue) { | 235 TEST(BoringSSL, PQueue) { |
| 276 TestSimple("pqueue_test"); | 236 TestSimple("pqueue_test"); |
| 277 } | 237 } |
| 278 | 238 |
| 279 TEST(BoringSSL, HKDF) { | 239 TEST(BoringSSL, HKDF) { |
| 280 TestSimple("hkdf_test"); | 240 TestSimple("hkdf_test"); |
| 281 } | 241 } |
| 282 | 242 |
| 283 TEST(BoringSSL, PBKDF) { | 243 TEST(BoringSSL, PBKDF) { |
| 284 TestSimple("pbkdf_test"); | 244 TestSimple("pbkdf_test"); |
| 285 } | 245 } |
| 286 | 246 |
| 287 TEST(BoringSSL, Thread) { | 247 TEST(BoringSSL, Thread) { |
| 288 TestSimple("thread_test"); | 248 TestSimple("thread_test"); |
| 289 } | 249 } |
| OLD | NEW |