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
a5a04e9a
Commit
a5a04e9a
authored
Dec 27, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fast BC
parent
147d7234
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
253 additions
and
4 deletions
+253
-4
BCCertificateMaker.cs
...anium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
+0
-1
BCCertificateMakerFast.cs
...m.Web.Proxy/Network/Certificate/BCCertificateMakerFast.cs
+238
-0
CertificateManager.cs
src/Titanium.Web.Proxy/Network/CertificateManager.cs
+15
-3
No files found.
src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
View file @
a5a04e9a
...
...
@@ -44,7 +44,6 @@ namespace Titanium.Web.Proxy.Network.Certificate
/// Makes the certificate.
/// </summary>
/// <param name="sSubjectCn">The s subject cn.</param>
/// <param name="isRoot">if set to <c>true</c> [is root].</param>
/// <param name="signingCert">The signing cert.</param>
/// <returns>X509Certificate2 instance.</returns>
public
X509Certificate2
MakeCertificate
(
string
sSubjectCn
,
X509Certificate2
?
signingCert
=
null
)
...
...
src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMakerFast.cs
0 → 100644
View file @
a5a04e9a
This diff is collapsed.
Click to expand it.
src/Titanium.Web.Proxy/Network/CertificateManager.cs
View file @
a5a04e9a
...
...
@@ -24,6 +24,8 @@ namespace Titanium.Web.Proxy.Network
/// </summary>
BouncyCastle
=
0
,
BouncyCastleFast
=
2
,
/// <summary>
/// Uses Windows Certification Generation API and only valid in Windows OS.
/// Observed to be faster than BouncyCastle.
...
...
@@ -68,9 +70,19 @@ namespace Titanium.Web.Proxy.Network
{
if
(
certEngineValue
==
null
)
{
certEngineValue
=
engine
==
CertificateEngine
.
BouncyCastle
?
(
ICertificateMaker
)
new
BCCertificateMaker
(
ExceptionFunc
)
:
new
WinCertificateMaker
(
ExceptionFunc
);
switch
(
engine
)
{
case
CertificateEngine
.
BouncyCastle
:
certEngineValue
=
new
BCCertificateMaker
(
ExceptionFunc
);
break
;
case
CertificateEngine
.
BouncyCastleFast
:
certEngineValue
=
new
BCCertificateMakerFast
(
ExceptionFunc
);
break
;
case
CertificateEngine
.
DefaultWindows
:
default
:
certEngineValue
=
new
WinCertificateMaker
(
ExceptionFunc
);
break
;
}
}
return
certEngineValue
;
...
...
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