[consfigurator] binary (non utf8) secrets
David Bremner
david at tethera.net
Sun Apr 13 12:06:30 BST 2025
Sean Whitton <spwhitton at spwhitton.name> writes:
> Hello David,
>
> It seems like the problem could be either in how the data gets written
> to the secrets file; how it gets read from there; or how the deployment
> is trying to send the data over to the remote side.
>
> Based on the traceback I would think that it's the third one, but let's
> try to eliminate the other two.
>
> Looking inside your secrets file, how has Lisp decided to represent the
> binary data? If you copy and paste that into the repl inside a call to
> READ-FROM-STRING, does it produce an appropriate Lisp representation of
> the binary string?
Yes, this seems to work fine, TYPE-OF says
(SIMPLE-ARRAY (UNSIGNED-BYTE 8) (512))
>
> If that's fine I would suggest trying to do
>
> (funcall (%get-data "_secrets" path))
>
> at the REPL and see whether it successfully extracts the item of data as
> an instance of STRING-DATA.
>
Yes, although I have to tell SBCL to go ahead and use the non-external
symbol (in the debugger).
> Though ... STRING-DATA suggests that valid UTF-8 is required. FILE-DATA
> isn't appropriate for DATA.PGP, so perhaps we need a new OCTETS-DATA.
Hmm. Not sure if you refer to just the naming issue, but
consfigurator::%get-data-string does return the expected
(SIMPLE-ARRAY (UNSIGNED-BYTE 8) (512))
d
More information about the sgo-software-discuss
mailing list