feeding a private rsa key through the shell to get the public
alex at tweedly.net
Sat May 4 18:53:08 EDT 2013
I know you said you were trying to avoid using files - but it might be
the easiest option.
Write the field to a temp file, then use that in the shell command; I
think if you use specialfolderPath("Temporary") you will be independent
of file system variations (for desktops).
Otherwise - sorry, I don't know enough about the different shells to
suggest how to deal with multi-line quoting across the various platforms.
On 04/05/2013 23:46, Dr. Hawkins wrote:
> On Sat, May 4, 2013 at 3:24 PM, Alex Tweedly <alex at tweedly.net> wrote:
>> put the shell of ("echo " & fld privateKey & " | openssl rsa -pubout")
> that produces,
> -----BEGIN RSA PRIVATE KEY-----
> /bin/sh: line 2:
> MIIJKQIBAAKCAgEAqtf05M03fM9BaOhdaY1C+dfp6D1dHDa9pJ7RBgcYd57n3AiY: command
> not found
> /bin/sh: line 3:
> MF/yA1y8l4+OCJG8tBmgeRJweNqqUrMOh33HDkY52088vVLJLmExHv56hTqNblFw: No such
> file or directory
> The multi-line key isn't getting quoted to echo, and I've tried both single
> and double quotes on this.
> I note that the file when I dump the key field uses ^M rather than ^J.
More information about the use-livecode