Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
fabfe979
Commit
fabfe979
authored
Mar 11, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment out problematic test
parent
31dde587
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
CertificateManagerTests.cs
...s/Titanium.Web.Proxy.UnitTests/CertificateManagerTests.cs
+2
-1
CertificateManager.cs
Titanium.Web.Proxy/Network/CertificateManager.cs
+6
-1
No files found.
Tests/Titanium.Web.Proxy.UnitTests/CertificateManagerTests.cs
View file @
fabfe979
...
@@ -44,7 +44,7 @@ namespace Titanium.Web.Proxy.UnitTests
...
@@ -44,7 +44,7 @@ namespace Titanium.Web.Proxy.UnitTests
//uncomment this to compare WinCert maker performance with BC (BC takes more time for same test above)
//uncomment this to compare WinCert maker performance with BC (BC takes more time for same test above)
//cannot run this test in build server since trusting the certificate won't happen successfully
//cannot run this test in build server since trusting the certificate won't happen successfully
[
TestMethod
]
//
[TestMethod]
public
async
Task
Simple_Create_Win_Certificate_Test
()
public
async
Task
Simple_Create_Win_Certificate_Test
()
{
{
var
tasks
=
new
List
<
Task
>();
var
tasks
=
new
List
<
Task
>();
...
@@ -57,6 +57,7 @@ namespace Titanium.Web.Proxy.UnitTests
...
@@ -57,6 +57,7 @@ namespace Titanium.Web.Proxy.UnitTests
mgr
.
CertificateEngine
=
CertificateEngine
.
DefaultWindows
;
mgr
.
CertificateEngine
=
CertificateEngine
.
DefaultWindows
;
mgr
.
CreateRootCertificate
(
true
);
mgr
.
CreateRootCertificate
(
true
);
mgr
.
TrustRootCertificate
();
mgr
.
TrustRootCertificate
();
//mgr.TrustRootCertificateAsAdmin();
mgr
.
ClearIdleCertificates
();
mgr
.
ClearIdleCertificates
();
for
(
int
i
=
0
;
i
<
5
;
i
++)
for
(
int
i
=
0
;
i
<
5
;
i
++)
...
...
Titanium.Web.Proxy/Network/CertificateManager.cs
View file @
fabfe979
...
@@ -295,7 +295,9 @@ namespace Titanium.Web.Proxy.Network
...
@@ -295,7 +295,9 @@ namespace Titanium.Web.Proxy.Network
var
x509RootStore
=
new
X509Store
(
StoreName
.
Root
,
storeLocation
);
var
x509RootStore
=
new
X509Store
(
StoreName
.
Root
,
storeLocation
);
var
x509PersonalStore
=
new
X509Store
(
StoreName
.
My
,
storeLocation
);
var
x509PersonalStore
=
new
X509Store
(
StoreName
.
My
,
storeLocation
);
//TODO
//also it should do not duplicate if certificate already exists
try
try
{
{
x509RootStore
.
Open
(
OpenFlags
.
ReadWrite
);
x509RootStore
.
Open
(
OpenFlags
.
ReadWrite
);
...
@@ -651,6 +653,9 @@ namespace Titanium.Web.Proxy.Network
...
@@ -651,6 +653,9 @@ namespace Titanium.Web.Proxy.Network
string
fileName
=
Path
.
GetTempFileName
();
string
fileName
=
Path
.
GetTempFileName
();
File
.
WriteAllBytes
(
fileName
,
RootCertificate
.
Export
(
X509ContentType
.
Pkcs12
,
PfxPassword
));
File
.
WriteAllBytes
(
fileName
,
RootCertificate
.
Export
(
X509ContentType
.
Pkcs12
,
PfxPassword
));
//TODO
//need to figure out why this command do not add
//certificate to currentuser\personal store
var
info
=
new
ProcessStartInfo
var
info
=
new
ProcessStartInfo
{
{
FileName
=
"certutil.exe"
,
FileName
=
"certutil.exe"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment