summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2014-07-07 11:11:38 +0200
committerViktor Dukhovni <ietf-dane@dukhovni.org>2014-07-07 11:11:38 +0200
commit297c67fcd817ea643de2fdeff4e434b050d571e2 (patch)
tree5ff05ff3ed125e5091f9cb75a50c51bb5ff7c397 /apps/x509.c
parentUsage for -hack and -prexit -verify_return_error (diff)
downloadopenssl-297c67fcd817ea643de2fdeff4e434b050d571e2.tar.xz
openssl-297c67fcd817ea643de2fdeff4e434b050d571e2.zip
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/x509.c')
-rw-r--r--apps/x509.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 1b612d17d4..3bb261010f 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -214,7 +214,8 @@ int MAIN(int argc, char **argv)
int need_rand = 0;
int checkend=0,checkoffset=0;
unsigned long nmflag = 0, certflag = 0;
- unsigned char *checkhost = NULL, *checkemail = NULL;
+ char *checkhost = NULL;
+ char *checkemail = NULL;
char *checkip = NULL;
#ifndef OPENSSL_NO_ENGINE
char *engine=NULL;
@@ -474,12 +475,12 @@ int MAIN(int argc, char **argv)
else if (strcmp(*argv,"-checkhost") == 0)
{
if (--argc < 1) goto bad;
- checkhost=(unsigned char *)*(++argv);
+ checkhost=*(++argv);
}
else if (strcmp(*argv,"-checkemail") == 0)
{
if (--argc < 1) goto bad;
- checkemail=(unsigned char *)*(++argv);
+ checkemail=*(++argv);
}
else if (strcmp(*argv,"-checkip") == 0)
{