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
5e2fdbb7
Commit
5e2fdbb7
authored
Oct 18, 2018
by
Kent Friesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #509 (BCCertificateMaker issue on Mono)
parent
c963bc58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
BCCertificateMaker.cs
...anium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
+14
-1
No files found.
src/Titanium.Web.Proxy/Network/Certificate/BCCertificateMaker.cs
View file @
5e2fdbb7
...
...
@@ -16,6 +16,7 @@ using Org.BouncyCastle.Pkcs;
using
Org.BouncyCastle.Security
;
using
Org.BouncyCastle.Utilities
;
using
Org.BouncyCastle.X509
;
using
Titanium.Web.Proxy.Helpers
;
using
Titanium.Web.Proxy.Shared
;
using
X509Certificate
=
Org
.
BouncyCastle
.
X509
.
X509Certificate
;
...
...
@@ -166,7 +167,19 @@ namespace Titanium.Web.Proxy.Network.Certificate
private
static
X509Certificate2
withPrivateKey
(
X509Certificate
certificate
,
AsymmetricKeyParameter
privateKey
)
{
const
string
password
=
"password"
;
var
store
=
new
Pkcs12Store
();
Pkcs12Store
store
=
null
;
if
(
RunTime
.
IsRunningOnMono
)
{
Pkcs12StoreBuilder
builder
=
new
Pkcs12StoreBuilder
();
builder
.
SetUseDerEncoding
(
true
);
store
=
builder
.
Build
();
}
else
{
store
=
new
Pkcs12Store
();
}
var
entry
=
new
X509CertificateEntry
(
certificate
);
store
.
SetCertificateEntry
(
certificate
.
SubjectDN
.
ToString
(),
entry
);
...
...
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