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
bfd6e9e8
Commit
bfd6e9e8
authored
Nov 19, 2017
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
0b64df4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
BCCertificateMaker.cs
Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
+14
-6
No files found.
Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
View file @
bfd6e9e8
...
...
@@ -28,6 +28,10 @@ namespace Titanium.Web.Proxy.Network.Certificate
private
const
int
certificateValidDays
=
1825
;
private
const
int
certificateGraceDays
=
366
;
// The FriendlyName value cannot be set on Unix.
// Set this flag to true when exception detected to avoid further exceptions
private
static
bool
doNotSetFriendlyName
;
/// <summary>
/// Makes the certificate.
/// </summary>
...
...
@@ -126,13 +130,17 @@ namespace Titanium.Web.Proxy.Network.Certificate
// Set private key onto certificate instance
var
x509Certificate
=
new
X509Certificate2
(
certificate
.
GetEncoded
());
x509Certificate
.
PrivateKey
=
DotNetUtilities
.
ToRSA
(
rsaparams
);
try
{
x509Certificate
.
FriendlyName
=
subjectName
;
}
catch
(
PlatformNotSupportedException
)
if
(!
doNotSetFriendlyName
)
{
// The FriendlyName value cannot be set on Unix.
try
{
x509Certificate
.
FriendlyName
=
subjectName
;
}
catch
(
PlatformNotSupportedException
)
{
doNotSetFriendlyName
=
true
;
}
}
return
x509Certificate
;
...
...
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