projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the cipher decision scheme for export ciphers: the export bits are *not*
[openssl.git]
/
apps
/
openssl.c
diff --git
a/apps/openssl.c
b/apps/openssl.c
index 739a0e8f31c0f260793de5a824037d604ddc55f6..dfa23d674e4ed157f5ab0bb578f06958b4ef6884 100644
(file)
--- a/
apps/openssl.c
+++ b/
apps/openssl.c
@@
-1,4
+1,4
@@
-/* apps/
ssleay
.c */
+/* apps/
openssl
.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@
-152,12
+152,14
@@
char *Argv[];
ERR_load_crypto_strings();
/* Lets load up our environment a little */
ERR_load_crypto_strings();
/* Lets load up our environment a little */
- p=getenv("SSLEAY_CONF");
+ p=getenv("OPENSSL_CONF");
+ if (p == NULL)
+ p=getenv("SSLEAY_CONF");
if (p == NULL)
{
strcpy(config_name,X509_get_default_cert_area());
strcat(config_name,"/lib/");
if (p == NULL)
{
strcpy(config_name,X509_get_default_cert_area());
strcat(config_name,"/lib/");
- strcat(config_name,
SSLEAY
_CONF);
+ strcat(config_name,
OPENSSL
_CONF);
p=config_name;
}
p=config_name;
}
@@
-191,7
+193,7
@@
char *Argv[];
goto end;
}
goto end;
}
- /* ok, lets enter the old '
SSLeay
>' mode */
+ /* ok, lets enter the old '
OpenSSL
>' mode */
for (;;)
{
for (;;)
{
@@
-204,7
+206,7
@@
char *Argv[];
p[0]='\0';
if (i++)
prompt=">";
p[0]='\0';
if (i++)
prompt=">";
- else prompt="
SSLeay>
";
+ else prompt="
OpenSSL>
";
fputs(prompt,stdout);
fflush(stdout);
fgets(p,n,stdin);
fputs(prompt,stdout);
fflush(stdout);
fgets(p,n,stdin);
@@
-278,10
+280,10
@@
char *argv[];
}
else
{
}
else
{
- BIO_printf(bio_err,"
'%s' is a bad command, valid commands are
",
+ BIO_printf(bio_err,"
openssl:Error: '%s' is an invalid command.\n
",
argv[0]);
argv[0]);
+ BIO_printf(bio_err, "\nStandard commands");
i=0;
i=0;
- fp=functions;
tp=0;
for (fp=functions; fp->name != NULL; fp++)
{
tp=0;
for (fp=functions; fp->name != NULL; fp++)
{
@@
-299,27
+301,43
@@
char *argv[];
{
i=1;
BIO_printf(bio_err,
{
i=1;
BIO_printf(bio_err,
- "
Message Digest commands - see the dgst command for more details
\n");
+ "
\nMessage Digest commands (see the `dgst' command for more details)
\n");
}
else if (tp == FUNC_TYPE_CIPHER)
{
i=1;
}
else if (tp == FUNC_TYPE_CIPHER)
{
i=1;
- BIO_printf(bio_err,"
Cipher commands - see the enc command for more details
\n");
+ BIO_printf(bio_err,"
\nCipher commands (see the `enc' command for more details)
\n");
}
}
BIO_printf(bio_err,"%-15s",fp->name);
}
}
}
BIO_printf(bio_err,"%-15s",fp->name);
}
- BIO_printf(bio_err,"\n
quit
\n");
+ BIO_printf(bio_err,"\n\n");
ret=0;
}
end:
return(ret);
}
ret=0;
}
end:
return(ret);
}
+static int SortFnByName(const void *_f1,const void *_f2)
+ {
+ const FUNCTION *f1=_f1;
+ const FUNCTION *f2=_f2;
+
+ if(f1->type != f2->type)
+ return f1->type-f2->type;
+ return strcmp(f1->name,f2->name);
+ }
+
static LHASH *prog_init()
{
LHASH *ret;
FUNCTION *f;
static LHASH *prog_init()
{
LHASH *ret;
FUNCTION *f;
+ int i;
+
+ /* Purely so it looks nice when the user hits ? */
+ for(i=0,f=functions ; f->name != NULL ; ++f,++i)
+ ;
+ qsort(functions,i,sizeof *functions,SortFnByName);
if ((ret=lh_new(hash,cmp)) == NULL) return(NULL);
if ((ret=lh_new(hash,cmp)) == NULL) return(NULL);