| 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 | |
| 164 TEST(BoringSSL, Cipher) { | 160 TEST(BoringSSL, Cipher) { |
| 165 base::FilePath data_file; | 161 base::FilePath data_file; |
| 166 ASSERT_TRUE(CryptoCipherTestPath(&data_file)); | 162 ASSERT_TRUE(CryptoCipherTestPath(&data_file)); |
| 167 data_file = data_file.Append(FILE_PATH_LITERAL("cipher_test.txt")); | 163 data_file = data_file.Append(FILE_PATH_LITERAL("cipher_test.txt")); |
| 168 | 164 |
| 169 std::vector<base::CommandLine::StringType> args; | 165 std::vector<base::CommandLine::StringType> args; |
| 170 args.push_back(data_file.value()); | 166 args.push_back(data_file.value()); |
| 171 | 167 |
| 172 TestProcess("cipher_test", args); | 168 TestProcess("cipher_test", args); |
| 173 } | 169 } |
| 174 | 170 |
| 171 TEST(BoringSSL, CMAC) { |
| 172 TestSimple("cmac_test"); |
| 173 } |
| 174 |
| 175 TEST(BoringSSL, ConstantTime) { |
| 176 TestSimple("constant_time_test"); |
| 177 } |
| 178 |
| 175 TEST(BoringSSL, DH) { | 179 TEST(BoringSSL, DH) { |
| 176 TestSimple("dh_test"); | 180 TestSimple("dh_test"); |
| 177 } | 181 } |
| 178 | 182 |
| 179 TEST(BoringSSL, Digest) { | 183 TEST(BoringSSL, Digest) { |
| 180 TestSimple("digest_test"); | 184 TestSimple("digest_test"); |
| 181 } | 185 } |
| 182 | 186 |
| 183 TEST(BoringSSL, DSA) { | 187 TEST(BoringSSL, DSA) { |
| 184 TestSimple("dsa_test"); | 188 TestSimple("dsa_test"); |
| 185 } | 189 } |
| 186 | 190 |
| 187 TEST(BoringSSL, EC) { | 191 TEST(BoringSSL, EC) { |
| 188 TestSimple("ec_test"); | 192 TestSimple("ec_test"); |
| 189 } | 193 } |
| 190 | 194 |
| 191 TEST(BoringSSL, ECDSA) { | 195 TEST(BoringSSL, ECDSA) { |
| 192 TestSimple("ecdsa_test"); | 196 TestSimple("ecdsa_test"); |
| 193 } | 197 } |
| 194 | 198 |
| 195 TEST(BoringSSL, ERR) { | 199 TEST(BoringSSL, ERR) { |
| 196 TestSimple("err_test"); | 200 TestSimple("err_test"); |
| 197 } | 201 } |
| 198 | 202 |
| 199 TEST(BoringSSL, GCM) { | 203 TEST(BoringSSL, GCM) { |
| 200 TestSimple("gcm_test"); | 204 TestSimple("gcm_test"); |
| 201 } | 205 } |
| 202 | 206 |
| 203 TEST(BoringSSL, HMAC) { | 207 TEST(BoringSSL, HMAC) { |
| 204 TestSimple("hmac_test"); | 208 base::FilePath data_file; |
| 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); |
| 205 } | 218 } |
| 206 | 219 |
| 207 TEST(BoringSSL, LH) { | 220 TEST(BoringSSL, LH) { |
| 208 TestSimple("lhash_test"); | 221 TestSimple("lhash_test"); |
| 209 } | 222 } |
| 210 | 223 |
| 211 TEST(BoringSSL, RSA) { | 224 TEST(BoringSSL, RSA) { |
| 212 TestSimple("rsa_test"); | 225 TestSimple("rsa_test"); |
| 213 } | 226 } |
| 214 | 227 |
| 215 TEST(BoringSSL, PKCS7) { | 228 TEST(BoringSSL, PKCS7) { |
| 216 TestSimple("pkcs7_test"); | 229 TestSimple("pkcs7_test"); |
| 217 } | 230 } |
| 218 | 231 |
| 219 TEST(BoringSSL, PKCS12) { | 232 TEST(BoringSSL, PKCS12) { |
| 220 TestSimple("pkcs12_test"); | 233 TestSimple("pkcs12_test"); |
| 221 } | 234 } |
| 222 | 235 |
| 223 TEST(BoringSSL, ExampleMul) { | 236 TEST(BoringSSL, ExampleMul) { |
| 224 TestSimple("example_mul"); | 237 TestSimple("example_mul"); |
| 225 } | 238 } |
| 226 | 239 |
| 227 TEST(BoringSSL, EVP) { | 240 TEST(BoringSSL, EVP) { |
| 228 TestSimple("evp_test"); | 241 base::FilePath data_file; |
| 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"); |
| 229 } | 269 } |
| 230 | 270 |
| 231 TEST(BoringSSL, SSL) { | 271 TEST(BoringSSL, SSL) { |
| 232 TestSimple("ssl_test"); | 272 TestSimple("ssl_test"); |
| 233 } | 273 } |
| 234 | 274 |
| 235 TEST(BoringSSL, PQueue) { | 275 TEST(BoringSSL, PQueue) { |
| 236 TestSimple("pqueue_test"); | 276 TestSimple("pqueue_test"); |
| 237 } | 277 } |
| 238 | 278 |
| 239 TEST(BoringSSL, HKDF) { | 279 TEST(BoringSSL, HKDF) { |
| 240 TestSimple("hkdf_test"); | 280 TestSimple("hkdf_test"); |
| 241 } | 281 } |
| 242 | 282 |
| 243 TEST(BoringSSL, PBKDF) { | 283 TEST(BoringSSL, PBKDF) { |
| 244 TestSimple("pbkdf_test"); | 284 TestSimple("pbkdf_test"); |
| 245 } | 285 } |
| 246 | 286 |
| 247 TEST(BoringSSL, Thread) { | 287 TEST(BoringSSL, Thread) { |
| 248 TestSimple("thread_test"); | 288 TestSimple("thread_test"); |
| 249 } | 289 } |
| OLD | NEW |