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
3159b8eb
Commit
3159b8eb
authored
May 02, 2017
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize certificate maker for alternative subject names
cleanup win cert maker
parent
6b4a035e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
WinCertificateMaker.cs
...nium.Web.Proxy/Network/Certificate/WinCertificateMaker.cs
+11
-5
No files found.
Titanium.Web.Proxy/Network/Certificate/WinCertificateMaker.cs
View file @
3159b8eb
...
...
@@ -34,6 +34,12 @@ namespace Titanium.Web.Proxy.Network.Certificate
private
readonly
Type
typeX509Enrollment
;
private
readonly
Type
typeAltNamesCollection
;
private
readonly
Type
typeExtNames
;
private
readonly
Type
typeCAlternativeName
;
private
readonly
string
sProviderName
=
"Microsoft Enhanced Cryptographic Provider v1.0"
;
private
object
_SharedPrivateKey
;
...
...
@@ -55,8 +61,13 @@ namespace Titanium.Web.Proxy.Network.Certificate
typeSignerCertificate
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CSignerCertificate"
);
typeX509Enrollment
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509Enrollment"
);
//for alternative names
typeAltNamesCollection
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeNames"
);
typeExtNames
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509ExtensionAlternativeNames"
);
typeCAlternativeName
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeName"
);
}
/// <summary>
/// Make certificate.
/// </summary>
...
...
@@ -172,13 +183,8 @@ namespace Titanium.Web.Proxy.Network.Certificate
//add alternative names
// https://forums.iis.net/t/1180823.aspx
var
typeAltNamesCollection
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeNames"
);
var
altNameCollection
=
Activator
.
CreateInstance
(
typeAltNamesCollection
);
var
typeExtNames
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509ExtensionAlternativeNames"
);
var
extNames
=
Activator
.
CreateInstance
(
typeExtNames
);
var
typeCAlternativeName
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeName"
);
var
altDnsNames
=
Activator
.
CreateInstance
(
typeCAlternativeName
);
typeValue
=
new
object
[]
{
3
,
subject
};
...
...
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