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 "content/child/webcrypto/nss/key_nss.h" | 5 #include "content/child/webcrypto/nss/key_nss.h" |
6 | 6 |
7 #include "content/child/webcrypto/crypto_data.h" | 7 #include "content/child/webcrypto/crypto_data.h" |
8 #include "content/child/webcrypto/status.h" | 8 #include "content/child/webcrypto/status.h" |
9 #include "content/child/webcrypto/webcrypto_util.h" | 9 #include "content/child/webcrypto/webcrypto_util.h" |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 PrivateKeyNss* PrivateKeyNss::AsPrivateKey() { | 78 PrivateKeyNss* PrivateKeyNss::AsPrivateKey() { |
79 return this; | 79 return this; |
80 } | 80 } |
81 | 81 |
82 PrivateKeyNss::PrivateKeyNss(crypto::ScopedSECKEYPrivateKey key, | 82 PrivateKeyNss::PrivateKeyNss(crypto::ScopedSECKEYPrivateKey key, |
83 const CryptoData& pkcs8_data) | 83 const CryptoData& pkcs8_data) |
84 : KeyNss(pkcs8_data), key_(key.Pass()) { | 84 : KeyNss(pkcs8_data), key_(key.Pass()) { |
85 } | 85 } |
86 | 86 |
87 bool PlatformSerializeKeyForClone(const blink::WebCryptoKey& key, | 87 bool PlatformSerializeKeyForClone(const blink::WebCryptoKey& key, |
88 blink::WebVector<uint8>* key_data) { | 88 blink::WebVector<uint8_t>* key_data) { |
89 const KeyNss* nss_key = static_cast<KeyNss*>(key.handle()); | 89 const KeyNss* nss_key = static_cast<KeyNss*>(key.handle()); |
90 *key_data = nss_key->serialized_key_data(); | 90 *key_data = nss_key->serialized_key_data(); |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 } // namespace webcrypto | 94 } // namespace webcrypto |
95 | 95 |
96 } // namespace content | 96 } // namespace content |
OLD | NEW |