diff options
author | Hendrik Jäger <gitcommit@henk.geekmail.org> | 2024-01-23 20:37:42 +0100 |
---|---|---|
committer | Hendrik Jäger <gitcommit@henk.geekmail.org> | 2024-01-23 20:37:42 +0100 |
commit | a15d47be69e5b6adea4f542531130fe7ba33c321 (patch) | |
tree | 09918d710e24b804d3c0bdc1bbbe5cc1bd4df7fa |
initial commit – get LE’s newAccount uri
-rw-r--r-- | macir.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/macir.rb b/macir.rb new file mode 100644 index 0000000..0bc2382 --- /dev/null +++ b/macir.rb @@ -0,0 +1,26 @@ +#!/usr/bin/ruby + +require 'net/http' +require 'json' + +acme_directory_uri = URI('https://acme-staging-v02.api.letsencrypt.org/directory') +acme_directory_uri.freeze +hostname = acme_directory_uri.hostname +path = acme_directory_uri.path +port = acme_directory_uri.port + +acme_directory_json = Net::HTTP.get(acme_directory_uri) +acme_directory = JSON.parse(acme_directory_json) +pp acme_directory + +newAccount_uri = acme_directory['newAccount'] +p newAccount_uri + + +# Net::HTTP.get(hostname, '/index.html') +# Net::HTTP.start(hostname) do |http| +# http.get('/todos/1') do |res| +# p res +# end +# end + |