acme-client 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16bb88e5400d61017d3265c400d093f074f141e4
4
- data.tar.gz: 9bb02691a2abbe5ea25915eb6f42a82a61be8ac0
3
+ metadata.gz: c389451aba873b133d61324af15bb4c4d8fd7ac0
4
+ data.tar.gz: 803eb577b2e2d4ede9d7c5f1ccabf89a6b9c36b7
5
5
  SHA512:
6
- metadata.gz: 068117a5dd211c110cc009ff1642b9fffdf78b6d54f3891f3a296a1af2940ee9217e76bf002f1a49a056672a02e58b63bc880710c8b3555a76953b18af85aaa7
7
- data.tar.gz: e234b3e0037ebb1428896cd235d7edb882adc2fabd382fe97d86b232dbf3dbcaa93c28be78efc8069673f59cc3f6938e713e4eb10fc280a24416b84b28ed78e9
6
+ metadata.gz: dd04dd1c2bcebb94d8fd336d151797ba7262c41faef0b521cb92c9b00122a29ef6f68639c532951c40474347ca49faff0d92c9678e42dda89ca0adbb2ae877c4
7
+ data.tar.gz: 15d1539125077753c8a8e68e7bd380daa0bcfb616d91424ba2ac640f4737b679b9aaae6585aeaf40c622cb6c0b9a2cf697fac2eddebcff35af0743cd75d360aa
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  `acme-client` is a client implementation of the [ACME](https://letsencrypt.github.io/acme-spec) protocol in Ruby.
4
4
 
5
- You can find the server reference implementation for ACME server [here](github.com/letsencrypt/boulder) and also the a reference [client](github.com/letsencrypt/letsencrypt) in python.
5
+ You can find the server reference implementation for ACME server [here](https://github.com/letsencrypt/boulder) and also the a reference [client](https://github.com/letsencrypt/letsencrypt) in python.
6
6
 
7
7
  ACME is part of the [Letsencrypt](https://letsencrypt.org/) project, that are working hard at encrypting all the things.
8
8
 
@@ -13,7 +13,7 @@ ACME is part of the [Letsencrypt](https://letsencrypt.org/) project, that are wo
13
13
  private_key = OpenSSL::PKey::RSA.new(2048)
14
14
 
15
15
  # We need an ACME server to talk to, see github.com/letsencrypt/boulder
16
- endpoint = 'http://letsencrypt.com/'
16
+ endpoint = 'https://acme-staging.api.letsencrypt.org'
17
17
 
18
18
  # Initialize the client
19
19
  client = Acme::Client.new(private_key: private_key, endpoint: endpoint)
@@ -26,7 +26,7 @@ registration.agree_terms
26
26
 
27
27
  # Let's try to optain a certificate for yourdomain.com
28
28
 
29
- # We need to prove that we control the domain using one of the challanges method.
29
+ # We need to prove that we control the domain using one of the challenges method.
30
30
  authorization = client.authorize(domain: 'yourdomain.com')
31
31
 
32
32
  # For now the only challenge method supprted by the client is simple_http.
@@ -64,7 +64,7 @@ csr.subject = OpenSSL::X509::Name.new([
64
64
  ])
65
65
 
66
66
  csr.public_key = certificate_private_key.public_key
67
- csr.sign(private_key, OpenSSL::Digest::SHA256.new)
67
+ csr.sign(certificate_private_key, OpenSSL::Digest::SHA256.new)
68
68
 
69
69
  # We can now request a certificate
70
70
  client.new_certificate(csr) # => #<OpenSSL::X509::Certificate ....>
File without changes
data/lib/acme/client.rb CHANGED
@@ -7,7 +7,7 @@ class Acme::Client
7
7
  'revoke-cert' => '/acme/revoke-cert'
8
8
  }
9
9
 
10
- def initialize(endpoint: DEFAULT_ENDPOINT, directory_uri: nil, private_key:)
10
+ def initialize(private_key:, endpoint: DEFAULT_ENDPOINT, directory_uri: nil)
11
11
  @endpoint, @private_key, @directory_uri = endpoint, private_key, directory_uri
12
12
  @nonces ||= []
13
13
  load_directory!
@@ -26,9 +26,9 @@ class Acme::Client
26
26
 
27
27
  def authorize(domain:)
28
28
  payload = {
29
- resource: "new-authz",
29
+ resource: 'new-authz',
30
30
  identifier: {
31
- type: "dns",
31
+ type: 'dns',
32
32
  value: domain
33
33
  }
34
34
  }
@@ -60,7 +60,6 @@ class Acme::Client
60
60
  body = response.body
61
61
  {
62
62
  'new-reg' => body.fetch('new-reg'),
63
- 'recover-reg' => body.fetch('recover-reg'),
64
63
  'new-authz' => body.fetch('new-authz'),
65
64
  'new-cert' => body.fetch('new-cert'),
66
65
  'revoke-cert' => body.fetch('revoke-cert'),
data/lib/acme/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Acme
2
2
  class Client
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acme-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Barbier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-09 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -175,6 +175,7 @@ files:
175
175
  - acme-client.gemspec
176
176
  - bin/console
177
177
  - bin/setup
178
+ - lib/acme-client.rb
178
179
  - lib/acme/client.rb
179
180
  - lib/acme/crypto.rb
180
181
  - lib/acme/error.rb
@@ -185,7 +186,6 @@ files:
185
186
  - lib/acme/resources/challenges/simple_http.rb
186
187
  - lib/acme/resources/registration.rb
187
188
  - lib/acme/version.rb
188
- - lib/acme_client.rb
189
189
  homepage: http://github.com/unixcharles/acme-client
190
190
  licenses:
191
191
  - MIT
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  requirements: []
208
208
  rubyforge_project:
209
- rubygems_version: 2.2.0
209
+ rubygems_version: 2.4.5
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: Client for the ACME protocol.