diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-03-08 14:51:57 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-03-27 22:37:55 -0400 |
commit | 00b4784575c88d5de15886b440096c1e2b9fb080 (patch) | |
tree | 3eabb1c323705719ad469767d79dd064d3fb4ddc /src/test | |
parent | fc35674567b005f1d096488fc92d81f662aaebe5 (diff) | |
download | tor-00b4784575c88d5de15886b440096c1e2b9fb080.tar.gz tor-00b4784575c88d5de15886b440096c1e2b9fb080.zip |
Remove support for PK_NO_PADDING in crypto_pk_public_hybrid_encrypt
We never use it, and it would be a stupid thing if we started using it.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_crypto.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c index bf0962e98b..3f9029a8f8 100644 --- a/src/test/test_crypto.c +++ b/src/test/test_crypto.c @@ -485,14 +485,11 @@ test_crypto_pk(void) /* Try with hybrid encryption wrappers. */ crypto_rand(data1, 1024); - for (i = 0; i < 3; ++i) { + for (i = 0; i < 2; ++i) { for (j = 85; j < 140; ++j) { memset(data2,0,1024); memset(data3,0,1024); - if (i == 0 && j < 129) - continue; - p = (i==0)?PK_NO_PADDING: - (i==1)?PK_PKCS1_PADDING:PK_PKCS1_OAEP_PADDING; + p = (i==0)?PK_PKCS1_PADDING:PK_PKCS1_OAEP_PADDING; len = crypto_pk_public_hybrid_encrypt(pk1,data2,sizeof(data2), data1,j,p,0); test_assert(len>=0); |