summaryrefslogtreecommitdiffstats
path: root/apps/apps.c
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2014-07-07 19:11:38 +1000
committerViktor Dukhovni <ietf-dane@dukhovni.org>2014-07-07 19:11:38 +1000
commit297c67fcd817ea643de2fdeff4e434b050d571e2 (patch)
tree5ff05ff3ed125e5091f9cb75a50c51bb5ff7c397 /apps/apps.c
parentee724df75d9ad67fd954253ac514fddb46f1e3c6 (diff)
Update API to use (char *) for email addresses and hostnames
Reduces number of silly casts in OpenSSL code and likely most applications. Consistent with (char *) for "peername" value from X509_check_host() and X509_VERIFY_PARAM_get0_peername().
Diffstat (limited to 'apps/apps.c')
-rw-r--r--apps/apps.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 188b2373aa..4eb322afbb 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -2388,7 +2388,8 @@ int args_verify(char ***pargs, int *pargc,
char *arg = **pargs, *argn = (*pargs)[1];
const X509_VERIFY_PARAM *vpm = NULL;
time_t at_time = 0;
- const unsigned char *hostname = NULL, *email = NULL;
+ char *hostname = NULL;
+ char *email = NULL;
char *ipasc = NULL;
if (!strcmp(arg, "-policy"))
{
@@ -2482,14 +2483,14 @@ int args_verify(char ***pargs, int *pargc,
{
if (!argn)
*badarg = 1;
- hostname = (unsigned char *)argn;
+ hostname = argn;
(*pargs)++;
}
else if (strcmp(arg,"-verify_email") == 0)
{
if (!argn)
*badarg = 1;
- email = (unsigned char *)argn;
+ email = argn;
(*pargs)++;
}
else if (strcmp(arg,"-verify_ip") == 0)
@@ -2960,8 +2961,8 @@ unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
#endif /* ndef OPENSSL_NO_TLSEXT */
void print_cert_checks(BIO *bio, X509 *x,
- const unsigned char *checkhost,
- const unsigned char *checkemail,
+ const char *checkhost,
+ const char *checkemail,
const char *checkip)
{
if (x == NULL)