message: Fix EC JWK private key size calculation
diff: @@ -438,11 +438,14 @@ namespace crypto
  {
  JsonWebKeyECPrivate jwk = {PublicKey_OpenSSL::public_key_jwk(kid)};
  + // As per https://www.openssl.org/docs/man1.0.2/man3/BN_num_bytes.html, size
  + // should not be calculated with BN_num_bytes(d)!
  + size_t size = EVP_PKEY_bits(key) / 8;
  Unique_EC_KEY eckey(EVP_PKEY_get1_EC_KEY(key));
  const BIGNUM* d = EC_KEY_get0_private_key(eckey);
  - size_t size = BN_num_bytes(d);
  +
  std::vector<uint8_t> bytes(size);
  - BN_bn2binpad(d, bytes.data(), size);
  + auto rc = BN_bn2binpad(d, bytes.data(), size);
  jwk.d = b64url_from_raw(bytes, false /* with_padding */);
  return jwk;
  