Skip to content

Commit

Permalink
Cert fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SlejmUr committed Sep 20, 2023
1 parent 12834de commit 8da54b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cert/run.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
openssl genpkey -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out cert.key
openssl req -new -nodes -key cert.key -config cert.conf -nameopt utf8 -utf8 -out global.csr
openssl req -x509 -nodes -in cert.csr -days 365 -key global.key -config cert.conf -extensions req_ext -nameopt utf8 -utf8 -out cert.crt
openssl req -new -nodes -key cert.key -config cert.conf -nameopt utf8 -utf8 -out cert.csr
openssl req -x509 -nodes -in cert.csr -days 365 -key cert.key -config cert.conf -extensions req_ext -nameopt utf8 -utf8 -out cert.crt
certutil -p "cert,cert" -mergepfx cert.crt cert.pfx
pause
2 changes: 1 addition & 1 deletion PayCheckServerLib/Responses/IAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static bool LiveToken(HttpRequest request, PC3Server.PC3Session session)
},
Permissions = new() { },
PlatformId = "live",
PlatformUserId = "",
PlatformUserId = "", //todo, how the fuck you got the userid from jwt
RefreshExpiresIn = 86400,
RefreshToken = refresh_token.ToBase64(),
Roles = new() { "2251438839e948d783ec0e5281daf05" },
Expand Down
4 changes: 2 additions & 2 deletions PayCheckServerLib/Servers/PC3Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class PC3Server
{
public static X509Certificate GetCert()
{

X509Certificate2 cert = new(File.ReadAllBytes($"cert.pfx"));
//read the cert.pfx
X509Certificate2 cert = new(File.ReadAllBytes($"cert.pfx"), "cert");
return cert;
}

Expand Down

0 comments on commit 8da54b0

Please sign in to comment.