File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -102,4 +102,20 @@ public function testStrtotime()
102
102
103
103
$ this ->assertSame (\strtotime ('+1 day ' ), strtotime ('+1 day ' ));
104
104
}
105
+
106
+ /**
107
+ * Tests that parameters signature can be not passed. See https://github.com/thecodingmachine/safe/issues/86
108
+ */
109
+ public function testOpenSslSign ()
110
+ {
111
+ require_once __DIR__ .'/../../generated/openssl.php ' ;
112
+ require_once __DIR__ .'/../../lib/Exceptions/SafeExceptionInterface.php ' ;
113
+ require_once __DIR__ .'/../../lib/Exceptions/AbstractSafeException.php ' ;
114
+ require_once __DIR__ .'/../../generated/Exceptions/OpensslException.php ' ;
115
+
116
+ \openssl_sign ('foo ' , $ signature , file_get_contents (__DIR__ .'/fixtures/id_rsa ' ));
117
+ openssl_sign ('foo ' , $ signatureSafe , file_get_contents (__DIR__ .'/fixtures/id_rsa ' ));
118
+
119
+ $ this ->assertSame ($ signature , $ signatureSafe );
120
+ }
105
121
}
You can’t perform that action at this time.
0 commit comments