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
e7b254f1
Commit
e7b254f1
authored
May 11, 2017
by
Jehonathan Thomas
Committed by
GitHub
May 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #214 from honfika/develop
Small fixes
parents
9fbf9810
aa1fb216
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
CertificateManagerTests.cs
...s/Titanium.Web.Proxy.UnitTests/CertificateManagerTests.cs
+1
-1
BCCertificateMaker.cs
Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
+3
-3
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+4
-4
No files found.
Tests/Titanium.Web.Proxy.UnitTests/CertificateManagerTests.cs
View file @
e7b254f1
...
@@ -9,7 +9,7 @@ namespace Titanium.Web.Proxy.UnitTests
...
@@ -9,7 +9,7 @@ namespace Titanium.Web.Proxy.UnitTests
[
TestClass
]
[
TestClass
]
public
class
CertificateManagerTests
public
class
CertificateManagerTests
{
{
private
readonly
static
string
[]
hostNames
private
static
readonly
string
[]
hostNames
=
new
string
[]
{
"facebook.com"
,
"youtube.com"
,
"google.com"
,
=
new
string
[]
{
"facebook.com"
,
"youtube.com"
,
"google.com"
,
"bing.com"
,
"yahoo.com"
};
"bing.com"
,
"yahoo.com"
};
...
...
Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
View file @
e7b254f1
...
@@ -23,8 +23,8 @@ namespace Titanium.Web.Proxy.Network.Certificate
...
@@ -23,8 +23,8 @@ namespace Titanium.Web.Proxy.Network.Certificate
/// </summary>
/// </summary>
internal
class
BCCertificateMaker
:
ICertificateMaker
internal
class
BCCertificateMaker
:
ICertificateMaker
{
{
private
const
int
C
ertificateValidDays
=
1825
;
private
const
int
c
ertificateValidDays
=
1825
;
private
const
int
C
ertificateGraceDays
=
366
;
private
const
int
c
ertificateGraceDays
=
366
;
/// <summary>
/// <summary>
/// Makes the certificate.
/// Makes the certificate.
...
@@ -187,7 +187,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
...
@@ -187,7 +187,7 @@ namespace Titanium.Web.Proxy.Network.Certificate
return
certificate
;
return
certificate
;
}
}
return
MakeCertificateInternal
(
isRoot
,
subject
,
$"CN=
{
subject
}
"
,
DateTime
.
UtcNow
.
AddDays
(-
CertificateGraceDays
),
DateTime
.
UtcNow
.
AddDays
(
C
ertificateValidDays
),
isRoot
?
null
:
signingCert
);
return
MakeCertificateInternal
(
isRoot
,
subject
,
$"CN=
{
subject
}
"
,
DateTime
.
UtcNow
.
AddDays
(-
certificateGraceDays
),
DateTime
.
UtcNow
.
AddDays
(
c
ertificateValidDays
),
isRoot
?
null
:
signingCert
);
}
}
}
}
...
...
Titanium.Web.Proxy/ProxyServer.cs
View file @
e7b254f1
...
@@ -87,7 +87,7 @@ namespace Titanium.Web.Proxy
...
@@ -87,7 +87,7 @@ namespace Titanium.Web.Proxy
get
{
return
certificateManager
.
Issuer
;
}
get
{
return
certificateManager
.
Issuer
;
}
set
set
{
{
CreateCertificate
Cache
Manager
(
certificateManager
.
RootCertificateName
,
value
);
CreateCertificateManager
(
certificateManager
.
RootCertificateName
,
value
);
certValidated
=
null
;
certValidated
=
null
;
}
}
}
}
...
@@ -104,7 +104,7 @@ namespace Titanium.Web.Proxy
...
@@ -104,7 +104,7 @@ namespace Titanium.Web.Proxy
get
{
return
certificateManager
.
RootCertificateName
;
}
get
{
return
certificateManager
.
RootCertificateName
;
}
set
set
{
{
CreateCertificate
Cache
Manager
(
value
,
certificateManager
.
Issuer
);
CreateCertificateManager
(
value
,
certificateManager
.
Issuer
);
certValidated
=
null
;
certValidated
=
null
;
}
}
}
}
...
@@ -272,7 +272,7 @@ namespace Titanium.Web.Proxy
...
@@ -272,7 +272,7 @@ namespace Titanium.Web.Proxy
new
FireFoxProxySettingsManager
();
new
FireFoxProxySettingsManager
();
#endif
#endif
CreateCertificate
Cache
Manager
(
rootCertificateName
,
rootCertificateIssuerName
);
CreateCertificateManager
(
rootCertificateName
,
rootCertificateIssuerName
);
}
}
/// <summary>
/// <summary>
...
@@ -557,7 +557,7 @@ namespace Titanium.Web.Proxy
...
@@ -557,7 +557,7 @@ namespace Titanium.Web.Proxy
}
}
private
void
CreateCertificate
Cache
Manager
(
string
rootCertificateName
,
string
rootCertificateIssuerName
)
private
void
CreateCertificateManager
(
string
rootCertificateName
,
string
rootCertificateIssuerName
)
{
{
certificateManager
=
new
CertificateManager
(
CertificateEngine
,
certificateManager
=
new
CertificateManager
(
CertificateEngine
,
rootCertificateIssuerName
,
rootCertificateName
,
ExceptionFunc
);
rootCertificateIssuerName
,
rootCertificateName
,
ExceptionFunc
);
...
...
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