This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 23
23
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24
24
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
25
26
- using System ;
27
26
using NUnit . Framework ;
28
27
using OpenSSL . Core ;
29
- using Random = OpenSSL . Core . Random ;
30
- using System . Runtime . InteropServices ;
31
28
using OpenSSL . Crypto ;
32
- using System . Text ;
33
29
using OpenSSL . Crypto . EC ;
30
+ using System ;
31
+ using System . Text ;
32
+ using Random = OpenSSL . Core . Random ;
34
33
35
34
namespace UnitTests
36
35
{
@@ -133,11 +132,13 @@ public void test_builtin() {
133
132
134
133
/* create signature */
135
134
byte [ ] signature = new byte [ eckey . Size ] ;
136
- eckey . Sign ( 0 , digest , signature ) ;
135
+ var sigSize = eckey . Sign ( 0 , digest , signature ) ;
136
+ Array . Resize ( ref signature , ( int ) sigSize ) ;
137
137
Console . Write ( "." ) ;
138
138
139
139
/* verify signature */
140
- Assert . IsTrue ( eckey . Verify ( 0 , digest , signature ) ) ;
140
+ var verifyResult = eckey . Verify ( 0 , digest , signature ) ;
141
+ Assert . IsTrue ( verifyResult ) ;
141
142
Console . Write ( "." ) ;
142
143
143
144
/* verify signature with the wrong key */
@@ -155,4 +156,3 @@ public void test_builtin() {
155
156
}
156
157
}
157
158
}
158
-
You can’t perform that action at this time.
0 commit comments