Skip to content

Commit

Permalink
Remove unnecessary starboardizations from Crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert committed Dec 19, 2023
1 parent ebd0e67 commit 9f019fd
Show file tree
Hide file tree
Showing 62 changed files with 118 additions and 84 deletions.
3 changes: 2 additions & 1 deletion crypto/aead.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

#include "crypto/aead.h"

#include <stddef.h>
#include <stdint.h>
#include <string>

#include "base/strings/string_util.h"
#include "crypto/openssl_util.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/aes.h"
#include "third_party/boringssl/src/include/openssl/evp.h"

Expand Down
3 changes: 2 additions & 1 deletion crypto/aead.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#ifndef CRYPTO_AEAD_H_
#define CRYPTO_AEAD_H_

#include <stddef.h>

#include <string>

#include "base/strings/string_piece.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"

struct evp_aead_st;

Expand Down
1 change: 0 additions & 1 deletion crypto/apple_keychain.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "base/macros.h"
#include "build/build_config.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
4 changes: 1 addition & 3 deletions crypto/capi_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

#include "crypto/capi_util.h"

#include <stddef.h>
#include <stdlib.h>

#include "starboard/memory.h"
#include "starboard/types.h"

namespace crypto {

void* WINAPI CryptAlloc(size_t size) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/capi_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#define CRYPTO_CAPI_UTIL_H_

#include <windows.h>
#include <stddef.h>

#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
4 changes: 3 additions & 1 deletion crypto/ec_private_key.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

#include "crypto/ec_private_key.h"

#include <stddef.h>
#include <stdint.h>

#include <utility>

#include "base/logging.h"
#include "crypto/openssl_util.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/bn.h"
#include "third_party/boringssl/src/include/openssl/bytestring.h"
#include "third_party/boringssl/src/include/openssl/ec.h"
Expand Down
4 changes: 3 additions & 1 deletion crypto/ec_private_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
#ifndef CRYPTO_EC_PRIVATE_KEY_H_
#define CRYPTO_EC_PRIVATE_KEY_H_

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <string>
#include <vector>

#include "base/macros.h"
#include "build/build_config.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/base.h"

namespace crypto {
Expand Down
3 changes: 2 additions & 1 deletion crypto/ec_private_key_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

#include "crypto/ec_private_key.h"

#include <stdint.h>

#include <memory>
#include <vector>

#include "base/macros.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {
Expand Down
3 changes: 2 additions & 1 deletion crypto/ec_signature_creator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
#ifndef CRYPTO_EC_SIGNATURE_CREATOR_H_
#define CRYPTO_EC_SIGNATURE_CREATOR_H_

#include <stdint.h>

#include <memory>
#include <string>
#include <vector>

#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
4 changes: 3 additions & 1 deletion crypto/ec_signature_creator_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

#include "crypto/ec_signature_creator_impl.h"

#include <stddef.h>
#include <stdint.h>

#include "base/logging.h"
#include "crypto/ec_private_key.h"
#include "crypto/openssl_util.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/bn.h"
#include "third_party/boringssl/src/include/openssl/ec.h"
#include "third_party/boringssl/src/include/openssl/ecdsa.h"
Expand Down
3 changes: 2 additions & 1 deletion crypto/ec_signature_creator_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
#ifndef CRYPTO_EC_SIGNATURE_CREATOR_IMPL_H_
#define CRYPTO_EC_SIGNATURE_CREATOR_IMPL_H_

#include <stdint.h>

#include <vector>

#include "base/compiler_specific.h"
#include "base/macros.h"
#include "crypto/ec_signature_creator.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
3 changes: 2 additions & 1 deletion crypto/ec_signature_creator_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

#include "crypto/ec_signature_creator.h"

#include <stdint.h>

#include <memory>
#include <string>
#include <vector>

#include "crypto/ec_private_key.h"
#include "crypto/signature_verifier.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"

// TODO(rch): Add some exported keys from each to
Expand Down
5 changes: 3 additions & 2 deletions crypto/encryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

#include "crypto/encryptor.h"

#include <stddef.h>
#include <stdint.h>

#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/sys_byteorder.h"
#include "crypto/openssl_util.h"
#include "crypto/symmetric_key.h"
#include "starboard/memory.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/aes.h"
#include "third_party/boringssl/src/include/openssl/evp.h"

Expand Down
4 changes: 3 additions & 1 deletion crypto/encryptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#ifndef CRYPTO_ENCRYPTOR_H_
#define CRYPTO_ENCRYPTOR_H_

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <string>

#include "base/strings/string_piece.h"
#include "build/build_config.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
4 changes: 2 additions & 2 deletions crypto/encryptor_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

#include "crypto/encryptor.h"

#include <stddef.h>

#include <memory>
#include <string>

#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "crypto/symmetric_key.h"
#include "starboard/memory.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"

TEST(EncryptorTest, EncryptDecrypt) {
Expand Down
4 changes: 3 additions & 1 deletion crypto/hkdf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

#include "crypto/hkdf.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "base/logging.h"
#include "crypto/hmac.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/digest.h"
#include "third_party/boringssl/src/include/openssl/hkdf.h"

Expand Down
3 changes: 2 additions & 1 deletion crypto/hkdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#ifndef CRYPTO_HKDF_H_
#define CRYPTO_HKDF_H_

#include <stddef.h>

#include <string>

#include "base/strings/string_piece.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
3 changes: 2 additions & 1 deletion crypto/hmac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "crypto/hmac.h"

#include <stddef.h>

#include <algorithm>
#include <string>

Expand All @@ -12,7 +14,6 @@
#include "crypto/openssl_util.h"
#include "crypto/secure_util.h"
#include "crypto/symmetric_key.h"
#include "starboard/types.h"
#include "third_party/boringssl/src/include/openssl/hmac.h"

namespace crypto {
Expand Down
3 changes: 2 additions & 1 deletion crypto/hmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
#ifndef CRYPTO_HMAC_H_
#define CRYPTO_HMAC_H_

#include <stddef.h>

#include <memory>
#include <vector>

#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/strings/string_piece.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
4 changes: 2 additions & 2 deletions crypto/hmac_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>

#include <string>

#include "base/macros.h"
#include "crypto/hmac.h"
#include "starboard/memory.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"

static const size_t kSHA1DigestSize = 20;
Expand Down
4 changes: 3 additions & 1 deletion crypto/mock_apple_keychain.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
#ifndef CRYPTO_MOCK_APPLE_KEYCHAIN_H_
#define CRYPTO_MOCK_APPLE_KEYCHAIN_H_

#include <stddef.h>
#include <stdint.h>

#include <map>
#include <set>
#include <string>
#include <vector>

#include "base/compiler_specific.h"
#include "crypto/apple_keychain.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
3 changes: 2 additions & 1 deletion crypto/mock_apple_keychain_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>

#include "base/logging.h"
#include "base/macros.h"
#include "base/time/time.h"
#include "crypto/mock_apple_keychain.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
2 changes: 1 addition & 1 deletion crypto/nss_key_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#include <keyhi.h>
#include <pk11pub.h>
#include <secmod.h>
#include <stdint.h>

#include <memory>

#include "base/logging.h"
#include "crypto/nss_util.h"
#include "crypto/nss_util_internal.h"
#include "starboard/types.h"

namespace crypto {

Expand Down
3 changes: 2 additions & 1 deletion crypto/nss_key_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
#ifndef CRYPTO_NSS_KEY_UTIL_H_
#define CRYPTO_NSS_KEY_UTIL_H_

#include <stdint.h>

#include <vector>

#include "build/build_config.h"
#include "crypto/crypto_export.h"
#include "crypto/scoped_nss_types.h"
#include "starboard/types.h"

typedef struct PK11SlotInfoStr PK11SlotInfo;

Expand Down
2 changes: 1 addition & 1 deletion crypto/nss_key_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

#include <keyhi.h>
#include <pk11pub.h>
#include <stdint.h>

#include <vector>

#include "crypto/nss_util.h"
#include "crypto/scoped_nss_types.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace crypto {
Expand Down
2 changes: 0 additions & 2 deletions crypto/nss_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <utility>
#include <vector>

#include "starboard/types.h"

#include "base/base_paths.h"
#include "base/bind.h"
#include "base/debug/alias.h"
Expand Down
3 changes: 2 additions & 1 deletion crypto/nss_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
#ifndef CRYPTO_NSS_UTIL_H_
#define CRYPTO_NSS_UTIL_H_

#include <stdint.h>

#include <string>
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "crypto/crypto_export.h"
#include "starboard/types.h"

namespace base {
class Time;
Expand Down
Loading

0 comments on commit 9f019fd

Please sign in to comment.