Hi,
On Mon, Nov 13, 2017 at 3:40 PM, David Sommerseth <openvpn@sf.lists.
topphemmelig.net> wrote:
> On 13/11/17 14:44, François Kooman wrote:
> > On 11/13/2017 01:16 PM, David Sommerseth wrote:
> [...snip...]
> >> But we should consider if we want to make use of a JSON library
> >> producing the JSON streams. The reason is to ensure the output is
> >> according to the specification and that escaping if contents is
> >> consistent and proper. Imagine if someone puts a double-quote into the
> >> CN field of a certificate?
> >>
> >> CN="} Lets explode things, O=Hacktivist0
> >>
> >> Or other characters which needs escaping.
> >
> > Another very good point. I do have some experience with json-c [1],
> > would it be acceptable to add this as a project dependency? That is the
> > main reason I started out by just outputting a string and conveniently
> > forgot escaping issues...
>
> Yes, I think that should be fine. I see it is available in RHEL6 (the
> oldest Linux distribution we support, json-c-0.11-13.el6), so this
> should work out just fine. So keep in mind to not use a bleeding fresh
> version only available in the latest faster-moving Linux distros.
> What would be needed though is to enable/disable this via ./configure
> (tackled in configure.ac). We basically can have three approaches here:
>
> a) If json-c is found, enable --status 4 by default. If not found,
> this feature is unavailable.
>
There is no libjson-c for Windows, I guess... Probably no one cares if
--status 4 is not supported on Windows.
>
> > 1. use json-c to generate (human readable) JSON;
> > 2. also support --status (command line) in addition to "status" in
> > management interface
> > 3. do not print "END" marker any longer
>
I suppose that means no "END" as a part of the JSON output (ie., not written
to console or file) but if the output is multi-line, management still needs
to get a
terminating "END\n" line. Else we will be breaking the management
interface protocol as it stands now.
Selva
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel