diff options
-rw-r--r-- | comment (renamed from message) | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | deliver.rb | 4 |
2 files changed, 3 insertions, 1 deletions
diff --git a/deliver.rb b/deliver.rb index b54de2d..c3f04ce 100644..100755 --- a/deliver.rb +++ b/deliver.rb @@ -1,9 +1,11 @@ +#!/usr/bin/ruby + # https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/ require 'http' require 'openssl' -document = File.read('message') +document = File.read(ARGV[0]) date = Time.now.utc.httpdate keypair = OpenSSL::PKey::RSA.new(File.read('private.pem')) signed_string = "(request-target): post /inbox\nhost: git.exozy.me\ndate: #{date}" |