From 6852d63a4304afcefd41980bb290d1047ea6b5bf Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Sat, 8 Jun 2024 16:12:37 -0500 Subject: [PATCH] Fix system definition, move hard-coded key paths --- activitypub-servist.asd | 2 +- src/activitypub-servist.lisp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/activitypub-servist.asd b/activitypub-servist.asd index 89945e1..70faeeb 100644 --- a/activitypub-servist.asd +++ b/activitypub-servist.asd @@ -1,5 +1,5 @@ (defsystem "activitypub-servist" :depends-on ("alexandria" "clack" "dexador" "inferior-shell" "ironclad" "local-time" "purl" "str" "webtentacle" "yason") - :components ((:file "activitypub-servist"))) + :components ((:file "src/activitypub-servist"))) ;; (ql:quickload '(alexandria clack dexador inferior-shell ironclad local-time purl str webtentacle yason)) diff --git a/src/activitypub-servist.lisp b/src/activitypub-servist.lisp index 56fc305..cb2d59f 100644 --- a/src/activitypub-servist.lisp +++ b/src/activitypub-servist.lisp @@ -38,8 +38,8 @@ (".well-known/host-meta" . http-host-meta))) -(defvar *privkey* (alexandria:read-file-into-string #p"enc/privkey.pem")) -(defvar *pubkey* (alexandria:read-file-into-string #p"enc/pubkey.pem")) +(defvar *privkey* (alexandria:read-file-into-string #p"../enc/privkey.pem")) +(defvar *pubkey* (alexandria:read-file-into-string #p"../enc/pubkey.pem")) @@ -474,11 +474,11 @@ returned values: An Ironclad private key, and an Ironclad public key." (defun openssl-shell-sign-string (private-pem-string string) "Use the OpenSSL binary on the host system to RSS-SHA256 sign a STRING with a private key." - (alexandria:write-string-into-file private-pem-string #p"private.pem" :if-exists :overwrite) + (alexandria:write-string-into-file private-pem-string #p"/tmp/private.pem" :if-does-not-exist :create :if-exists :overwrite) (apply #'str:concat (inferior-shell:run/lines `(inferior-shell:pipe (printf ,string) - (openssl dgst -sha256 -sign private.pem -) + (openssl dgst -sha256 -sign /tmp/private.pem -) (base64))))) - +