Balazs Scheidler <[EMAIL PROTECTED]> writes:
> I've tried to hack a small program converting ssh2 keyfiles to
> s-expressions. Currently I began doing this using read_line chained to a
> custom line_handler, which then processes line by line. While looking
> through the sexp_streamed_parser.c module, I found that some classes would
> be usable for me as well (parser, parse_value and the base64 decoder), but
> those would have to be made a bit more general and moved to a general
> module. What do you think?
Sounds like a Nice Thing to have. Feel free to move non-sexp-related
parsing classes to a separate file. Into a separate file. Perhaps
read_parse.c? There used to be a file read_scan.c that did something
similar.
Using read_line sounds a little dangerous, as this reader doesn't
allow long lines.
> btw: the ssh2 keyfile format is a simple base64 encoded form of the ssh2
> keyblob as the protocol draft defines it, coupled with some comments.
Perhaps the spki reference implementation contains some useful
conversion programs as well?
Happy hacking!
/Niels