Browse Source

z/OS support: bit calculation

master
David Lanzendörfer 12 months ago
parent
commit
48cfc0fc28
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      src/keyring.c

+ 3
- 4
src/keyring.c View File

@ -553,13 +553,13 @@ unsigned key_bit_len(const pgp_pubkey_t *key)
return BN_num_bits(key->key.elgamal.p);
#elif defined(HAVE_GSKSSL)
case PGP_PKA_DSA:
return key->key.dsa.p->length*8-1;
return key->key.dsa.p->length*8-7;
case PGP_PKA_RSA:
return key->key.rsa.n->length*8-1;
return key->key.rsa.n->length*8-7;
case PGP_PKA_ELGAMAL:
return key->key.elgamal.p->length*8-1;
return key->key.elgamal.p->length*8-7;
#endif
default:
return 0;
@ -1297,7 +1297,6 @@ pgp_keyring_add(pgp_keyring_t *dst, const pgp_key_t *src)
pgp_key_t *pgp_ensure_pubkey(pgp_keyring_t *keyring, pgp_pubkey_t *pubkey, uint8_t *pubkeyid)
{
printf("%s:%d\n",__FILE__,__LINE__);
pgp_key_t *key;
unsigned c;


Loading…
Cancel
Save