Browse Source

z/OS support: bit calculation

master
David Lanzendörfer 12 months ago
parent
commit
9ca45010fb
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/crypto.c

+ 2
- 3
src/crypto.c View File

@ -131,7 +131,7 @@ pgp_decrypt_decode_mpi(uint8_t *buf,
#if defined(HAVE_OPENSSL)
(unsigned)(BN_num_bits(encmpi) + 7) / 8,
#elif defined(HAVE_GSKSSL)
(unsigned)((encmpi->length*8-1) + 7) / 8,
(unsigned)encmpi->length,
#endif
&seckey->key.rsa, &seckey->pubkey.key.rsa);
if (n == -1) {
@ -244,8 +244,7 @@ pgp_rsa_encrypt_mpi(const uint8_t *encoded_m_buf,
return 0;
}
n = pgp_rsa_public_encrypt(encmpibuf, encoded_m_buf,
sz_encoded_m_buf, &pubkey->key.rsa);
n = pgp_rsa_public_encrypt(encmpibuf, encoded_m_buf, sz_encoded_m_buf, &pubkey->key.rsa);
if (n == -1) {
(void) fprintf(stderr, "pgp_rsa_public_encrypt failure\n");
return 0;


Loading…
Cancel
Save