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_impl.h" | 5 #include "crypto/ec_signature_creator_impl.h" |
6 | 6 |
7 #include <openssl/bn.h> | 7 #include <openssl/bn.h> |
8 #include <openssl/ec.h> | 8 #include <openssl/ec.h> |
9 #include <openssl/ecdsa.h> | 9 #include <openssl/ecdsa.h> |
10 #include <openssl/evp.h> | 10 #include <openssl/evp.h> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 if (!BN_bn2bin_padded(&result[0], kMaxBytesPerBN, ecdsa_sig->r) || | 67 if (!BN_bn2bin_padded(&result[0], kMaxBytesPerBN, ecdsa_sig->r) || |
68 !BN_bn2bin_padded(&result[kMaxBytesPerBN], kMaxBytesPerBN, | 68 !BN_bn2bin_padded(&result[kMaxBytesPerBN], kMaxBytesPerBN, |
69 ecdsa_sig->s)) { | 69 ecdsa_sig->s)) { |
70 return false; | 70 return false; |
71 } | 71 } |
72 out_raw_sig->swap(result); | 72 out_raw_sig->swap(result); |
73 return true; | 73 return true; |
74 } | 74 } |
75 | 75 |
76 } // namespace crypto | 76 } // namespace crypto |
OLD | NEW |