Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fszlin committed Dec 8, 2016
2 parents ded89c2 + 1dc1057 commit ef48698
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/Certes/AcmeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public async Task<AcmeAccount> 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
Expand Down Expand Up @@ -134,6 +136,8 @@ public async Task<AcmeResult<Authz>> NewAuthorization(AuthorizationIdentifier id
return new AcmeResult<Authz>
{
Data = result.Data,
Json = result.Json,
Raw = result.Raw,
Links = result.Links,
Location = result.Location,
ContentType = result.ContentType
Expand All @@ -153,6 +157,8 @@ public async Task<AcmeResult<Authz>> GetAuthorization(Uri location)
return new AcmeResult<Authz>
{
Data = result.Data,
Json = result.Json,
Raw = result.Raw,
Links = result.Links,
Location = result.Location ?? location,
ContentType = result.ContentType
Expand Down Expand Up @@ -210,6 +216,8 @@ public async Task<AcmeResult<Challenge>> CompleteChallenge(Challenge authChallen
return new AcmeResult<Challenge>
{
Data = result.Data,
Json = result.Json,
Raw = result.Raw,
Links = result.Links,
Location = result.Location,
ContentType = result.ContentType
Expand Down Expand Up @@ -264,7 +272,6 @@ public async Task<AcmeCertificate> NewCertificate(ICertificationRequestBuilder c
currentCert.Issuer = new AcmeCertificate
{
Raw = issuerResult.Raw,
Key = csrProvider.Export(),
Links = issuerResult.Links,
Location = issuerResult.Location,
ContentType = issuerResult.ContentType
Expand Down
13 changes: 13 additions & 0 deletions src/Certes/Pkcs/CertificationRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,22 @@ public class CertificationRequestBuilder : CertificationRequestBuilderBase
/// Initializes a new instance of the <see cref="CertificationRequestBuilder"/> class.
/// </summary>
/// <param name="keyInfo">The key information.</param>
/// <exception cref="System.NotSupportedException">
/// If the provided key is not one of the supported <seealso cref="SignatureAlgorithm"/>.
/// </exception>
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();
}
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Certes/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion test/Certes.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit ef48698

Please sign in to comment.