| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "crypto/nss_key_util.h" | 5 #include "crypto/nss_key_util.h" |
| 6 | 6 |
| 7 #include <keyhi.h> | 7 #include <keyhi.h> |
| 8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
| 9 #include <stdint.h> |
| 9 | 10 |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "crypto/nss_util.h" | 13 #include "crypto/nss_util.h" |
| 13 #include "crypto/scoped_nss_types.h" | 14 #include "crypto/scoped_nss_types.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 namespace crypto { | 17 namespace crypto { |
| 17 | 18 |
| 18 class NSSKeyUtilTest : public testing::Test { | 19 class NSSKeyUtilTest : public testing::Test { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 79 |
| 79 // Remove the keys from the DB, and make sure we can't find them again. | 80 // Remove the keys from the DB, and make sure we can't find them again. |
| 80 PK11_DestroyTokenObject(private_key->pkcs11Slot, private_key->pkcs11ID); | 81 PK11_DestroyTokenObject(private_key->pkcs11Slot, private_key->pkcs11ID); |
| 81 PK11_DestroyTokenObject(public_key->pkcs11Slot, public_key->pkcs11ID); | 82 PK11_DestroyTokenObject(public_key->pkcs11Slot, public_key->pkcs11ID); |
| 82 | 83 |
| 83 EXPECT_FALSE(FindNSSKeyFromPublicKeyInfo(public_key_der)); | 84 EXPECT_FALSE(FindNSSKeyFromPublicKeyInfo(public_key_der)); |
| 84 } | 85 } |
| 85 #endif // defined(USE_NSS_CERTS) | 86 #endif // defined(USE_NSS_CERTS) |
| 86 | 87 |
| 87 } // namespace crypto | 88 } // namespace crypto |
| OLD | NEW |