| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "net/quic/crypto/channel_id.h" | 5 #include "net/quic/crypto/channel_id.h" |
| 6 | 6 |
| 7 #include <keythi.h> | 7 #include <keythi.h> |
| 8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
| 9 #include <sechash.h> | 9 #include <sechash.h> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 HASH_Update(sha256, | 69 HASH_Update(sha256, |
| 70 reinterpret_cast<const unsigned char*>(kClientToServerStr), | 70 reinterpret_cast<const unsigned char*>(kClientToServerStr), |
| 71 strlen(kClientToServerStr) + 1); | 71 strlen(kClientToServerStr) + 1); |
| 72 } | 72 } |
| 73 HASH_Update(sha256, | 73 HASH_Update(sha256, |
| 74 reinterpret_cast<const unsigned char*>(signed_data.data()), | 74 reinterpret_cast<const unsigned char*>(signed_data.data()), |
| 75 signed_data.size()); | 75 signed_data.size()); |
| 76 HASH_End(sha256, hash_buf, &hash_item.len, sizeof(hash_buf)); | 76 HASH_End(sha256, hash_buf, &hash_item.len, sizeof(hash_buf)); |
| 77 HASH_Destroy(sha256); | 77 HASH_Destroy(sha256); |
| 78 | 78 |
| 79 return PK11_Verify(&public_key, &signature_item, &hash_item, NULL) == | 79 return PK11_Verify(&public_key, &signature_item, &hash_item, nullptr) == |
| 80 SECSuccess; | 80 SECSuccess; |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace net | 83 } // namespace net |
| OLD | NEW |