mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Merge pull request #16 from TheQuantumPhysicist/master
Fixed a few warnings about signed and unsigned comparison.
This commit is contained in:
commit
0227be3445
2 changed files with 4 additions and 4 deletions
|
@ -94,7 +94,7 @@ std::string base64_encode(const char* in, size_t len)
|
|||
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
for (; i < len - 2; i += 3) {
|
||||
for (; i < static_cast<int>(len) - 2; i += 3) {
|
||||
const auto first = in[i];
|
||||
const auto second = in[i+1];
|
||||
const auto third = in[i+2];
|
||||
|
|
|
@ -306,9 +306,9 @@ std::string PEMSign<Hasher>::public_key_ser(
|
|||
|
||||
ECDSA_SIG_get0(ec_sig.get(), &ec_sig_r, &ec_sig_s);
|
||||
|
||||
auto r_len = BN_num_bytes(ec_sig_r);
|
||||
auto s_len = BN_num_bytes(ec_sig_s);
|
||||
auto bn_len = (degree + 7) / 8;
|
||||
int r_len = BN_num_bytes(ec_sig_r);
|
||||
int s_len = BN_num_bytes(ec_sig_s);
|
||||
int bn_len = static_cast<int>((degree + 7) / 8);
|
||||
|
||||
if ((r_len > bn_len) || (s_len > bn_len)) {
|
||||
ec = AlgorithmErrc::SigningErr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue