From 8bb158270f704662ac221ebb38d15a1363edb65b Mon Sep 17 00:00:00 2001 From: Eddie Lin Date: Fri, 2 Dec 2016 14:32:01 -0500 Subject: [PATCH 1/5] bump version --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f1634869..f6eadd90 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 1.0.2.{build} +version: 1.0.3.{build} build: verbosity: minimal From 6d52377714931dbe81329b24ca4ae452a3198564 Mon Sep 17 00:00:00 2001 From: Eddie Lin Date: Tue, 6 Dec 2016 11:08:18 -0500 Subject: [PATCH 2/5] expose acme respone raw data --- src/Certes/AcmeClient.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Certes/AcmeClient.cs b/src/Certes/AcmeClient.cs index a6b3cf8e..9546c190 100644 --- a/src/Certes/AcmeClient.cs +++ b/src/Certes/AcmeClient.cs @@ -72,6 +72,8 @@ public async Task NewRegistraton(params string[] contact) { Links = result.Links, Data = result.Data, + Json = result.Json, + Raw = result.Raw, Location = result.Location, Key = key.Export(), ContentType = result.ContentType @@ -134,6 +136,8 @@ public async Task> NewAuthorization(AuthorizationIdentifier id return new AcmeResult { Data = result.Data, + Json = result.Json, + Raw = result.Raw, Links = result.Links, Location = result.Location, ContentType = result.ContentType @@ -153,6 +157,8 @@ public async Task> GetAuthorization(Uri location) return new AcmeResult { Data = result.Data, + Json = result.Json, + Raw = result.Raw, Links = result.Links, Location = result.Location ?? location, ContentType = result.ContentType @@ -210,6 +216,8 @@ public async Task> CompleteChallenge(Challenge authChallen return new AcmeResult { Data = result.Data, + Json = result.Json, + Raw = result.Raw, Links = result.Links, Location = result.Location, ContentType = result.ContentType From 5cecbe620e66df9e7765ca8306270bcfa273c51a Mon Sep 17 00:00:00 2001 From: Eddie Lin Date: Wed, 7 Dec 2016 10:45:23 -0500 Subject: [PATCH 3/5] remove unused key data for issuer certificates. --- src/Certes/AcmeClient.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Certes/AcmeClient.cs b/src/Certes/AcmeClient.cs index 9546c190..6a1fde53 100644 --- a/src/Certes/AcmeClient.cs +++ b/src/Certes/AcmeClient.cs @@ -272,7 +272,6 @@ public async Task NewCertificate(ICertificationRequestBuilder c currentCert.Issuer = new AcmeCertificate { Raw = issuerResult.Raw, - Key = csrProvider.Export(), Links = issuerResult.Links, Location = issuerResult.Location, ContentType = issuerResult.ContentType From 621003dd42b3d9523afb9d6b6e6e3c68fe019697 Mon Sep 17 00:00:00 2001 From: Eddie Lin Date: Wed, 7 Dec 2016 10:46:44 -0500 Subject: [PATCH 4/5] update BouncyCastle. --- src/Certes/project.json | 2 +- test/Certes.Tests/project.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Certes/project.json b/src/Certes/project.json index 3fdd1d5b..cd252e16 100644 --- a/src/Certes/project.json +++ b/src/Certes/project.json @@ -4,7 +4,7 @@ "description": "A client implantation for the Automated Certificate Management Environment (ACME) protocol", "dependencies": { "Newtonsoft.Json": "9.0.1", - "Portable.BouncyCastle": "1.8.1.1", + "Portable.BouncyCastle": "1.8.1.2", "System.Net.Http": "4.3.0", "System.Runtime.InteropServices": "4.3.0" }, diff --git a/test/Certes.Tests/project.json b/test/Certes.Tests/project.json index 717d142c..97950df3 100644 --- a/test/Certes.Tests/project.json +++ b/test/Certes.Tests/project.json @@ -15,7 +15,7 @@ }, "Moq": "4.6.38-alpha", "System.Diagnostics.TraceSource": "4.3.0", - "Portable.BouncyCastle": "1.8.1.1" + "Portable.BouncyCastle": "1.8.1.2" }, "frameworks": { From 1dc1057ac5a8be2d6d6383fb3deed81712573174 Mon Sep 17 00:00:00 2001 From: Eddie Lin Date: Thu, 8 Dec 2016 10:14:14 -0500 Subject: [PATCH 5/5] fix csr builder not using the provided key --- src/Certes/Pkcs/CertificationRequestBuilder.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Certes/Pkcs/CertificationRequestBuilder.cs b/src/Certes/Pkcs/CertificationRequestBuilder.cs index b3dccbdb..deb04dbf 100644 --- a/src/Certes/Pkcs/CertificationRequestBuilder.cs +++ b/src/Certes/Pkcs/CertificationRequestBuilder.cs @@ -32,9 +32,22 @@ public class CertificationRequestBuilder : CertificationRequestBuilderBase /// Initializes a new instance of the class. /// /// The key information. + /// + /// If the provided key is not one of the supported . + /// public CertificationRequestBuilder(KeyInfo keyInfo) { this.keyInfo = keyInfo; + + this.KeyPair = keyInfo.CreateKeyPair(); + if (this.KeyPair.Private is RsaPrivateCrtKeyParameters) + { + this.Algorithm = SignatureAlgorithm.Sha256WithRsaEncryption; + } + else + { + throw new NotSupportedException(); + } } ///