OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ec_signature_creator.h" | 5 #include "crypto/ec_signature_creator.h" |
6 | 6 |
7 #include <cryptohi.h> | 7 #include <cryptohi.h> |
8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
9 #include <secerr.h> | 9 #include <secerr.h> |
10 #include <sechash.h> | 10 #include <sechash.h> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 // Sign the secret data and save it to |result|. | 86 // Sign the secret data and save it to |result|. |
87 SECStatus rv = | 87 SECStatus rv = |
88 SignData(arena.get(), result, &secret, key_->key(), HASH_AlgSHA1); | 88 SignData(arena.get(), result, &secret, key_->key(), HASH_AlgSHA1); |
89 if (rv != SECSuccess) { | 89 if (rv != SECSuccess) { |
90 DLOG(ERROR) << "DerSignData: " << PORT_GetError(); | 90 DLOG(ERROR) << "DerSignData: " << PORT_GetError(); |
91 return false; | 91 return false; |
92 } | 92 } |
93 | 93 |
94 // Copy the signed data into the output vector. | 94 // Copy the signed data into the output vector. |
95 signature->assign(result->data, result->data + result->len); | 95 signature->assign(result->data, result->data + result->len); |
96 SECITEM_FreeItem(result, PR_FALSE); | |
agl
2012/01/31 15:40:55
Thanks for catching this, but there's an underlyin
Ryan Hamilton
2012/01/31 16:37:16
No kidding? Thanks for catching this. As per wtc
| |
96 return true; | 97 return true; |
97 } | 98 } |
98 | 99 |
99 } // namespace crypto | 100 } // namespace crypto |
OLD | NEW |