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
24c5332d
Commit
24c5332d
authored
Sep 24, 2020
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix after #795
parent
c54c7c1c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
244 additions
and
236 deletions
+244
-236
BCCertificateMaker.cs
src/Titanium.Web.Proxy/Certificates/BCCertificateMaker.cs
+236
-235
BCCertificateMakerFast.cs
...Titanium.Web.Proxy/Certificates/BCCertificateMakerFast.cs
+8
-1
No files found.
src/Titanium.Web.Proxy/Certificates/BCCertificateMaker.cs
View file @
24c5332d
This diff is collapsed.
Click to expand it.
src/Titanium.Web.Proxy/Certificates/BCCertificateMakerFast.cs
View file @
24c5332d
using
System
;
using
System.IO
;
using
System.Net
;
using
System.Security.Cryptography.X509Certificates
;
using
Org.BouncyCastle.Asn1
;
using
Org.BouncyCastle.Asn1.Pkcs
;
...
...
@@ -99,7 +100,13 @@ namespace Titanium.Web.Proxy.Network.Certificate
if
(
hostName
!=
null
)
{
// add subject alternative names
var
subjectAlternativeNames
=
new
Asn1Encodable
[]
{
new
GeneralName
(
GeneralName
.
DnsName
,
hostName
)
};
var
nameType
=
GeneralName
.
DnsName
;
if
(
IPAddress
.
TryParse
(
hostName
,
out
_
))
{
nameType
=
GeneralName
.
IPAddress
;
}
var
subjectAlternativeNames
=
new
Asn1Encodable
[]
{
new
GeneralName
(
nameType
,
hostName
)
};
var
subjectAlternativeNamesExtension
=
new
DerSequence
(
subjectAlternativeNames
);
certificateGenerator
.
AddExtension
(
X509Extensions
.
SubjectAlternativeName
.
Id
,
false
,
...
...
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