From: John Carr Date: Tue, 16 Apr 1991 08:23:52 +0000 (+0000) Subject: Add command line option to set message X-Git-Tag: krb5-1.0-alpha5~111 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dc7237a77e78d63856f6e93338415c901059e793;p=krb5.git Add command line option to set message git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1990 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c index 2cb4535e9..ef67c15ed 100644 --- a/src/appl/simple/client/sim_client.c +++ b/src/appl/simple/client/sim_client.c @@ -64,8 +64,8 @@ char *argv[]; krb5_rcache rcache; extern krb5_deltat krb5_clockskew; - if (argc != 2) { - fprintf(stderr, "usage: %s \n",PROGNAME); + if (argc != 2 && argc != 3) { + fprintf(stderr, "usage: %s [message]\n",PROGNAME); exit(1); } @@ -263,8 +263,8 @@ char *argv[]; } /* Make the safe message */ - inbuf.length = strlen(MSG); - inbuf.data = MSG; + inbuf.data = argc == 3 ? argv[2] : MSG; + inbuf.length = strlen (inbuf.data); if (retval = krb5_mk_safe(&inbuf, CKSUMTYPE_RSA_MD4_DES,