diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-07-20 17:50:31 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-07-20 17:50:31 +0000 |
commit | ac95734359f80e3c7771f9807e0d57b8e87093e3 (patch) | |
tree | 1ff4f329c129b9c1c5c74ed293e82926f1e2a043 /lib/gnutls_pk.c | |
parent | b63487a0ae5c0d4cbeeaa6d38f24a6ce6619d7dc (diff) | |
download | gnutls-ac95734359f80e3c7771f9807e0d57b8e87093e3.tar.gz |
added some kind of certificate checking
Diffstat (limited to 'lib/gnutls_pk.c')
-rw-r--r-- | lib/gnutls_pk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c index b7bbfc58a4..76b06ce6a0 100644 --- a/lib/gnutls_pk.c +++ b/lib/gnutls_pk.c @@ -110,7 +110,7 @@ int _gnutls_pkcs1_rsa_encrypt(gnutls_datum * ciphertext, gnutls_datum plaintext, */ int _gnutls_pkcs1_rsa_decrypt(gnutls_datum * plaintext, gnutls_datum ciphertext, - MPI pkey, MPI n) + MPI pkey, MPI n, int btype) { int k, esize, i, ret; MPI c, res; @@ -153,13 +153,13 @@ int _gnutls_pkcs1_rsa_decrypt(gnutls_datum * plaintext, gnutls_datum ciphertext, gcry_mpi_release(res); /* EB = 00||BT||PS||00||D - * (use block type 2) + * (use block type 'btype') */ edata[0] = 0; esize++; - if (edata[0] != 0 || edata[1] != 2) { + if (edata[0] != 0 || edata[1] != btype) { gnutls_assert(); gnutls_free(edata); return GNUTLS_E_DECRYPTION_FAILED; |