| Index: crypto/ec_signature_creator_nss.cc
|
| diff --git a/crypto/ec_signature_creator_nss.cc b/crypto/ec_signature_creator_nss.cc
|
| index 388870f7fa8cf5aa6f792a3326f8227fe7d0a74a..a85b1e94fecf20299494fcffdc95c7894fb375da 100644
|
| --- a/crypto/ec_signature_creator_nss.cc
|
| +++ b/crypto/ec_signature_creator_nss.cc
|
| @@ -8,6 +8,9 @@
|
| #include <pk11pub.h>
|
| #include <secerr.h>
|
| #include <sechash.h>
|
| +#if defined(OS_POSIX)
|
| +#include <unistd.h>
|
| +#endif
|
|
|
| #include "base/logging.h"
|
| #include "crypto/ec_private_key.h"
|
| @@ -34,12 +37,14 @@ SECStatus SignData(SECItem* result,
|
| hash_type, &hash_data[0], input->data, input->len);
|
| if (rv != SECSuccess)
|
| return rv;
|
| - SECItem hash = {siBuffer, &hash_data[0], hash_data.size()};
|
| + SECItem hash = {siBuffer, &hash_data[0],
|
| + static_cast<unsigned int>(hash_data.size())};
|
|
|
| // Compute signature of hash.
|
| int signature_len = PK11_SignatureLen(key);
|
| std::vector<uint8> signature_data(signature_len);
|
| - SECItem sig = {siBuffer, &signature_data[0], signature_len};
|
| + SECItem sig = {siBuffer, &signature_data[0],
|
| + static_cast<unsigned int>(signature_len)};
|
| rv = PK11_Sign(key, &sig, &hash);
|
| if (rv != SECSuccess)
|
| return rv;
|
|
|