[email protected] wrote on Wed, Oct 06, 2010 at 14:41:35 -0000:
> + value = getenv( "GPG_AGENT_INFO");
> +
> + if (value != NULL)
> + {
> + gpg_agent_info = apr_pstrmemdup(pool, value, strlen(value));
> + socket_details = svn_cstring_split(gpg_agent_info, ":", TRUE, pool);
> + socket_name = APR_ARRAY_IDX(socket_details, 0, const char *);
> + }
> + else
> + return FALSE;
> +
> + value = getenv("GPG_TTY");
> + if (value != NULL)
> + tty_name = apr_pstrmemdup(pool, value, strlen(value));
> + else
> + return FALSE;
> +
> + value = getenv("TERM");
> + if (value != NULL)
> + tty_type = apr_pstrmemdup(pool, value, strlen(value));
> + else
> + return FALSE;
getenv("TERM") will fail in GUI programs, won't it?
e.g., under gvim, ':echo $TERM' shows nothing. So, is it the case that,
as written, gpg support will only be available to cmdline programs, but
not to generic library users?
Another point: error checking. The calls to send(), close(),
svn_checksum() (and maybe others) don't check the return values.