diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-07-21 09:54:20 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-07-21 09:54:20 +0000 |
commit | 78dc026dccd0c0eef9d818c7ca505c8b9ff6d382 (patch) | |
tree | b3e6d014a313f519282a7dcc7b376d534a034bdc /lib/gnutls_pk.c | |
parent | 3a1ce6c21617db2162521b096c5db0d34eee96cd (diff) | |
download | gnutls-78dc026dccd0c0eef9d818c7ca505c8b9ff6d382.tar.gz |
*** empty log message ***
Diffstat (limited to 'lib/gnutls_pk.c')
-rw-r--r-- | lib/gnutls_pk.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c index 76b06ce6a0..94b61090de 100644 --- a/lib/gnutls_pk.c +++ b/lib/gnutls_pk.c @@ -34,7 +34,7 @@ */ int _gnutls_pkcs1_rsa_encrypt(gnutls_datum * ciphertext, gnutls_datum plaintext, - MPI pkey, MPI n) + MPI pkey, MPI n, int btype) { int k, psize, i, ret; MPI m, res; @@ -55,11 +55,11 @@ int _gnutls_pkcs1_rsa_encrypt(gnutls_datum * ciphertext, gnutls_datum plaintext, } /* EB = 00||BT||PS||00||D - * (use block type 2) + * (use block type 'btype') */ edata[0] = 0; - edata[1] = 2; + edata[1] = btype; psize = k - 3 - plaintext.size; ps = &edata[2]; @@ -121,6 +121,8 @@ int _gnutls_pkcs1_rsa_decrypt(gnutls_datum * plaintext, gnutls_datum ciphertext, esize = ciphertext.size; if (esize!=k) { +#warning "REMOVE ME" +fprintf(stderr, "ESIZE: %d/%d\n", esize, k); gnutls_assert(); return GNUTLS_E_PK_DECRYPTION_FAILED; } |