Fix system definition, move hard-coded key paths

This commit is contained in:
Jaidyn Ann 2024-06-08 16:12:37 -05:00
parent a62cf06f1b
commit 6852d63a43
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
(defsystem "activitypub-servist" (defsystem "activitypub-servist"
:depends-on ("alexandria" "clack" "dexador" "inferior-shell" "ironclad" "local-time" "purl" "str" "webtentacle" "yason") :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)) ;; (ql:quickload '(alexandria clack dexador inferior-shell ironclad local-time purl str webtentacle yason))

View File

@ -38,8 +38,8 @@
(".well-known/host-meta" . http-host-meta))) (".well-known/host-meta" . http-host-meta)))
(defvar *privkey* (alexandria:read-file-into-string #p"enc/privkey.pem")) (defvar *privkey* (alexandria:read-file-into-string #p"../enc/privkey.pem"))
(defvar *pubkey* (alexandria:read-file-into-string #p"enc/pubkey.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) (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 "Use the OpenSSL binary on the host system to RSS-SHA256 sign a STRING with a
private key." 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 (apply #'str:concat
(inferior-shell:run/lines (inferior-shell:run/lines
`(inferior-shell:pipe `(inferior-shell:pipe
(printf ,string) (printf ,string)
(openssl dgst -sha256 -sign private.pem -) (openssl dgst -sha256 -sign /tmp/private.pem -)
(base64))))) (base64)))))