File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public class RsJwtTests
14
14
private static string PrivateKey = string . Empty ;
15
15
private static string PublicKey = string . Empty ;
16
16
private static string KeySize = string . Empty ;
17
+ private static string OpenSslBinPath = string . Empty ;
17
18
private static string CurrentPath = string . Empty ;
18
19
#endregion
19
20
@@ -22,10 +23,11 @@ public class RsJwtTests
22
23
public static void ClassInit ( TestContext context )
23
24
{
24
25
KeySize = ConfigurationManager . OpenExeConfiguration ( Assembly . GetExecutingAssembly ( ) . Location ) . AppSettings . Settings [ "KeySize" ] . Value ;
26
+ OpenSslBinPath = ConfigurationManager . OpenExeConfiguration ( Assembly . GetExecutingAssembly ( ) . Location ) . AppSettings . Settings [ "OpenSslBinPath" ] . Value ;
25
27
26
28
CurrentPath = Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ;
27
- string commands = string . Format ( @"C:\OpenSSL-Win32\bin\ openssl genrsa -out private{0 }.key {0 }
28
- C:\OpenSSL-Win32\bin\ openssl rsa -in private{0 }.key -outform PEM -pubout -out public{0 }.pem", KeySize ) ;
29
+ string commands = string . Format ( @"{0} openssl genrsa -out private{1 }.key {1 }
30
+ {0} openssl rsa -in private{1 }.key -outform PEM -pubout -out public{1 }.pem", OpenSslBinPath , KeySize ) ;
29
31
30
32
File . WriteAllText ( string . Format ( "{0}\\ create.bat" , CurrentPath ) , commands ) ;
31
33
Original file line number Diff line number Diff line change 2
2
<configuration >
3
3
<appSettings >
4
4
<add key =" KeySize" value =" 4096" />
5
+ <add key =" OpenSslBinPath" value =" C:\OpenSSL-Win32\bin\" />
5
6
</appSettings >
6
7
</configuration >
You can’t perform that action at this time.
0 commit comments