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
7a32d7ba
Commit
7a32d7ba
authored
May 02, 2017
by
Jehonathan Thomas
Committed by
GitHub
May 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #201 from justcoding121/develop
optimize certificate maker for alternative subject names
parents
b9cf1976
3159b8eb
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 @
7a32d7ba
...
@@ -34,6 +34,12 @@ namespace Titanium.Web.Proxy.Network.Certificate
...
@@ -34,6 +34,12 @@ namespace Titanium.Web.Proxy.Network.Certificate
private
readonly
Type
typeX509Enrollment
;
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
readonly
string
sProviderName
=
"Microsoft Enhanced Cryptographic Provider v1.0"
;
private
object
_SharedPrivateKey
;
private
object
_SharedPrivateKey
;
...
@@ -55,8 +61,13 @@ namespace Titanium.Web.Proxy.Network.Certificate
...
@@ -55,8 +61,13 @@ namespace Titanium.Web.Proxy.Network.Certificate
typeSignerCertificate
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CSignerCertificate"
);
typeSignerCertificate
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CSignerCertificate"
);
typeX509Enrollment
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509Enrollment"
);
typeX509Enrollment
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509Enrollment"
);
//for alternative names
typeAltNamesCollection
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeNames"
);
typeExtNames
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509ExtensionAlternativeNames"
);
typeCAlternativeName
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeName"
);
}
}
/// <summary>
/// <summary>
/// Make certificate.
/// Make certificate.
/// </summary>
/// </summary>
...
@@ -172,13 +183,8 @@ namespace Titanium.Web.Proxy.Network.Certificate
...
@@ -172,13 +183,8 @@ namespace Titanium.Web.Proxy.Network.Certificate
//add alternative names
//add alternative names
// https://forums.iis.net/t/1180823.aspx
// https://forums.iis.net/t/1180823.aspx
var
typeAltNamesCollection
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeNames"
);
var
altNameCollection
=
Activator
.
CreateInstance
(
typeAltNamesCollection
);
var
altNameCollection
=
Activator
.
CreateInstance
(
typeAltNamesCollection
);
var
typeExtNames
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CX509ExtensionAlternativeNames"
);
var
extNames
=
Activator
.
CreateInstance
(
typeExtNames
);
var
extNames
=
Activator
.
CreateInstance
(
typeExtNames
);
var
typeCAlternativeName
=
Type
.
GetTypeFromProgID
(
"X509Enrollment.CAlternativeName"
);
var
altDnsNames
=
Activator
.
CreateInstance
(
typeCAlternativeName
);
var
altDnsNames
=
Activator
.
CreateInstance
(
typeCAlternativeName
);
typeValue
=
new
object
[]
{
3
,
subject
};
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