aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-03-18 12:25:39 +0000
committerMartin Willi <martin@strongswan.org>2008-03-18 12:25:39 +0000
commit4bfa63ed25f28ef3d02e1249ce3a9109fd577c67 (patch)
treee71d2691f31532247d2812afd918390228eec4e2 /src
parent18be601fcd202667981171e6e114ccf77af93783 (diff)
downloadstrongswan-4bfa63ed25f28ef3d02e1249ce3a9109fd577c67.tar.bz2
strongswan-4bfa63ed25f28ef3d02e1249ce3a9109fd577c67.tar.xz
added false positive signature check
Diffstat (limited to 'src')
-rw-r--r--src/charon/plugins/unit_tester/tests/test_rsa_gen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/charon/plugins/unit_tester/tests/test_rsa_gen.c b/src/charon/plugins/unit_tester/tests/test_rsa_gen.c
index 79f475063..2dbef04e0 100644
--- a/src/charon/plugins/unit_tester/tests/test_rsa_gen.c
+++ b/src/charon/plugins/unit_tester/tests/test_rsa_gen.c
@@ -52,6 +52,12 @@ bool test_rsa_gen()
DBG1(DBG_CFG, "verifying RSA signature failed");
return FALSE;
}
+ sig.ptr[sig.len-1]++;
+ if (public->verify(public, SIGN_RSA_EMSA_PKCS1_SHA1, data, sig))
+ {
+ DBG1(DBG_CFG, "verifying faked RSA signature succeeded!");
+ return FALSE;
+ }
free(sig.ptr);
public->destroy(public);
private->destroy(private);