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
a9b8157b
Commit
a9b8157b
authored
Sep 14, 2016
by
ilushka85
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to CertEnroll instead of makecert
parent
ee6b7683
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
263 additions
and
220 deletions
+263
-220
CertEnrollEngine.cs
Titanium.Web.Proxy/Network/CertEnrollEngine.cs
+238
-0
CertificateManager.cs
Titanium.Web.Proxy/Network/CertificateManager.cs
+10
-211
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+1
-1
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+2
-2
Titanium.Web.Proxy.csproj
Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
+12
-6
makecert.exe
Titanium.Web.Proxy/makecert.exe
+0
-0
No files found.
Titanium.Web.Proxy/Network/CertEnrollEngine.cs
0 → 100644
View file @
a9b8157b
This diff is collapsed.
Click to expand it.
Titanium.Web.Proxy/Network/CertificateManager.cs
View file @
a9b8157b
This diff is collapsed.
Click to expand it.
Titanium.Web.Proxy/ProxyServer.cs
View file @
a9b8157b
...
@@ -289,7 +289,7 @@ namespace Titanium.Web.Proxy
...
@@ -289,7 +289,7 @@ namespace Titanium.Web.Proxy
throw
new
Exception
(
"Proxy is already running."
);
throw
new
Exception
(
"Proxy is already running."
);
}
}
certTrusted
=
certificateCacheManager
.
CreateTrustedRootCertificate
()
.
Result
;
certTrusted
=
certificateCacheManager
.
CreateTrustedRootCertificate
();
foreach
(
var
endPoint
in
ProxyEndPoints
)
foreach
(
var
endPoint
in
ProxyEndPoints
)
{
{
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
a9b8157b
...
@@ -186,7 +186,7 @@ namespace Titanium.Web.Proxy
...
@@ -186,7 +186,7 @@ namespace Titanium.Web.Proxy
{
{
sslStream
=
new
SslStream
(
clientStream
,
true
);
sslStream
=
new
SslStream
(
clientStream
,
true
);
var
certificate
=
await
certificateCacheManager
.
CreateCertificate
(
httpRemoteUri
.
Host
,
false
);
var
certificate
=
certificateCacheManager
.
CreateCertificate
(
httpRemoteUri
.
Host
,
false
);
//Successfully managed to authenticate the client using the fake certificate
//Successfully managed to authenticate the client using the fake certificate
await
sslStream
.
AuthenticateAsServerAsync
(
certificate
,
false
,
await
sslStream
.
AuthenticateAsServerAsync
(
certificate
,
false
,
SupportedSslProtocols
,
false
);
SupportedSslProtocols
,
false
);
...
@@ -259,7 +259,7 @@ namespace Titanium.Web.Proxy
...
@@ -259,7 +259,7 @@ namespace Titanium.Web.Proxy
var
sslStream
=
new
SslStream
(
clientStream
,
true
);
var
sslStream
=
new
SslStream
(
clientStream
,
true
);
//implement in future once SNI supported by SSL stream, for now use the same certificate
//implement in future once SNI supported by SSL stream, for now use the same certificate
certificate
=
await
certificateCacheManager
.
CreateCertificate
(
endPoint
.
GenericCertificateName
,
false
);
certificate
=
certificateCacheManager
.
CreateCertificate
(
endPoint
.
GenericCertificateName
,
false
);
try
try
{
{
...
...
Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
View file @
a9b8157b
...
@@ -65,6 +65,7 @@
...
@@ -65,6 +65,7 @@
<Compile
Include=
"EventArguments\CertificateValidationEventArgs.cs"
/>
<Compile
Include=
"EventArguments\CertificateValidationEventArgs.cs"
/>
<Compile
Include=
"Extensions\ByteArrayExtensions.cs"
/>
<Compile
Include=
"Extensions\ByteArrayExtensions.cs"
/>
<Compile
Include=
"Network\CachedCertificate.cs"
/>
<Compile
Include=
"Network\CachedCertificate.cs"
/>
<Compile
Include=
"Network\CertEnrollEngine.cs"
/>
<Compile
Include=
"Network\ProxyClient.cs"
/>
<Compile
Include=
"Network\ProxyClient.cs"
/>
<Compile
Include=
"Exceptions\BodyNotFoundException.cs"
/>
<Compile
Include=
"Exceptions\BodyNotFoundException.cs"
/>
<Compile
Include=
"Extensions\HttpWebResponseExtensions.cs"
/>
<Compile
Include=
"Extensions\HttpWebResponseExtensions.cs"
/>
...
@@ -93,15 +94,20 @@
...
@@ -93,15 +94,20 @@
<Compile
Include=
"Http\Responses\RedirectResponse.cs"
/>
<Compile
Include=
"Http\Responses\RedirectResponse.cs"
/>
<Compile
Include=
"Shared\ProxyConstants.cs"
/>
<Compile
Include=
"Shared\ProxyConstants.cs"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup
/>
<ItemGroup>
<ItemGroup>
<None
Include=
"app.config"
/>
<COMReference
Include=
"CERTENROLLLib"
>
<None
Include=
"packages.config"
/>
<Guid>
{728AB348-217D-11DA-B2A4-000E7BBB2B09}
</Guid>
<VersionMajor>
1
</VersionMajor>
<VersionMinor>
0
</VersionMinor>
<Lcid>
0
</Lcid>
<WrapperTool>
tlbimp
</WrapperTool>
<Isolated>
False
</Isolated>
<EmbedInteropTypes>
True
</EmbedInteropTypes>
</COMReference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None
Include=
"makecert.exe"
>
<None
Include=
"app.config"
/>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
<None
Include=
"packages.config"
/>
</None>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(SolutionDir)\.nuget\NuGet.targets"
Condition=
"Exists('$(SolutionDir)\.nuget\NuGet.targets')"
/>
<Import
Project=
"$(SolutionDir)\.nuget\NuGet.targets"
Condition=
"Exists('$(SolutionDir)\.nuget\NuGet.targets')"
/>
...
...
Titanium.Web.Proxy/makecert.exe
deleted
100644 → 0
View file @
ee6b7683
File deleted
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