projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: return 0 if no error occured.
[oweals/openssl.git]
/
apps
/
version.c
diff --git
a/apps/version.c
b/apps/version.c
index a84943329ca78936a85bfbd2f680dadf7da694e6..efa0d0d493b7a41c67c5e2cab30bbbd01e16f788 100644
(file)
--- a/
apps/version.c
+++ b/
apps/version.c
@@
-1,5
+1,5
@@
/* apps/version.c */
/* apps/version.c */
-/* Copyright (C) 1995-199
7
Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-199
8
Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* All rights reserved.
*
* This package is an SSL implementation written
@@
-60,24
+60,24
@@
#include <stdlib.h>
#include <string.h>
#include "apps.h"
#include <stdlib.h>
#include <string.h>
#include "apps.h"
-#include
"evp.h"
-#include
"crypto.h"
+#include
<openssl/evp.h>
+#include
<openssl/crypto.h>
#undef PROG
#define PROG version_main
#undef PROG
#define PROG version_main
-int MAIN(
argc, argv)
-int argc;
-char **argv;
+int MAIN(
int, char **);
+
+int MAIN(int argc, char **argv)
{
int i,ret=0;
{
int i,ret=0;
- int cflags=0,version=0,date=0,options=0;
+ int cflags=0,version=0,date=0,options=0
,platform=0,dir=0
;
apps_startup();
if (bio_err == NULL)
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
apps_startup();
if (bio_err == NULL)
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
- BIO_set_fp(bio_err,stderr,BIO_NOCLOSE);
+ BIO_set_fp(bio_err,stderr,BIO_NOCLOSE
|BIO_FP_TEXT
);
if (argc == 1) version=1;
for (i=1; i<argc; i++)
if (argc == 1) version=1;
for (i=1; i<argc; i++)
@@
-90,11
+90,15
@@
char **argv;
cflags=1;
else if (strcmp(argv[i],"-o") == 0)
options=1;
cflags=1;
else if (strcmp(argv[i],"-o") == 0)
options=1;
+ else if (strcmp(argv[i],"-p") == 0)
+ platform=1;
+ else if (strcmp(argv[i],"-d") == 0)
+ dir=1;
else if (strcmp(argv[i],"-a") == 0)
else if (strcmp(argv[i],"-a") == 0)
- date=version=cflags=options=1;
+ date=version=cflags=options=
platform=dir=
1;
else
{
else
{
- BIO_printf(bio_err,"usage:version
[-a] [-v] [-b] [-o] [-f
]\n");
+ BIO_printf(bio_err,"usage:version
-[avbofp
]\n");
ret=1;
goto end;
}
ret=1;
goto end;
}
@@
-102,27
+106,30
@@
char **argv;
if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION));
if (date) printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION));
if (date) printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
+ if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM));
if (options)
{
if (options)
{
- printf("options:");
+ printf("options:
");
printf("%s ",BN_options());
printf("%s ",BN_options());
-#ifndef NO_MD2
+#ifndef
OPENSSL_
NO_MD2
printf("%s ",MD2_options());
#endif
printf("%s ",MD2_options());
#endif
-#ifndef NO_RC4
+#ifndef
OPENSSL_
NO_RC4
printf("%s ",RC4_options());
#endif
printf("%s ",RC4_options());
#endif
-#ifndef NO_DES
+#ifndef
OPENSSL_
NO_DES
printf("%s ",des_options());
#endif
printf("%s ",des_options());
#endif
-#ifndef NO_IDEA
+#ifndef
OPENSSL_
NO_IDEA
printf("%s ",idea_options());
#endif
printf("%s ",idea_options());
#endif
-#ifndef
NO_BLOWFISH
+#ifndef
OPENSSL_NO_BF
printf("%s ",BF_options());
#endif
printf("%s ",BF_options());
#endif
+ printf("\n");
}
if (cflags) printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
}
if (cflags) printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
+ if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR));
end:
EXIT(ret);
}
end:
EXIT(ret);
}