projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR: 1967
[openssl.git]
/
apps
/
sess_id.c
diff --git
a/apps/sess_id.c
b/apps/sess_id.c
index 3d363d13ebcffdba55a36691465195d557db5ae9..b99179f27679daa2b1d5085bd7089d9050b69cf0 100644
(file)
--- a/
apps/sess_id.c
+++ b/
apps/sess_id.c
@@
-69,7
+69,7
@@
#undef PROG
#define PROG sess_id_main
#undef PROG
#define PROG sess_id_main
-static char *sess_id_usage[]={
+static c
onst c
har *sess_id_usage[]={
"usage: sess_id args\n",
"\n",
" -inform arg - input format - default PEM (DER or PEM)\n",
"usage: sess_id args\n",
"\n",
" -inform arg - input format - default PEM (DER or PEM)\n",
@@
-84,6
+84,9
@@
NULL
};
static SSL_SESSION *load_sess_id(char *file, int format);
};
static SSL_SESSION *load_sess_id(char *file, int format);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
SSL_SESSION *x=NULL;
int MAIN(int argc, char **argv)
{
SSL_SESSION *x=NULL;
@@
-92,7
+95,7
@@
int MAIN(int argc, char **argv)
int informat,outformat;
char *infile=NULL,*outfile=NULL,*context=NULL;
int cert=0,noout=0,text=0;
int informat,outformat;
char *infile=NULL,*outfile=NULL,*context=NULL;
int cert=0,noout=0,text=0;
- char **pp;
+ c
onst c
har **pp;
apps_startup();
apps_startup();
@@
-153,7
+156,7
@@
int MAIN(int argc, char **argv)
{
bad:
for (pp=sess_id_usage; (*pp != NULL); pp++)
{
bad:
for (pp=sess_id_usage; (*pp != NULL); pp++)
- BIO_printf(bio_err,*pp);
+ BIO_printf(bio_err,
"%s",
*pp);
goto end;
}
goto end;
}
@@
-203,7
+206,15
@@
bad:
}
if (outfile == NULL)
}
if (outfile == NULL)
+ {
BIO_set_fp(out,stdout,BIO_NOCLOSE);
BIO_set_fp(out,stdout,BIO_NOCLOSE);
+#ifdef OPENSSL_SYS_VMS
+ {
+ BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+ out = BIO_push(tmpbio, out);
+ }
+#endif
+ }
else
{
if (BIO_write_filename(out,outfile) <= 0)
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@
-230,7
+241,7
@@
bad:
if (!noout && !cert)
{
if (outformat == FORMAT_ASN1)
if (!noout && !cert)
{
if (outformat == FORMAT_ASN1)
- i=
(int)
i2d_SSL_SESSION_bio(out,x);
+ i=i2d_SSL_SESSION_bio(out,x);
else if (outformat == FORMAT_PEM)
i=PEM_write_bio_SSL_SESSION(out,x);
else {
else if (outformat == FORMAT_PEM)
i=PEM_write_bio_SSL_SESSION(out,x);
else {
@@
-259,9
+270,10
@@
bad:
}
ret=0;
end:
}
ret=0;
end:
- if (out != NULL) BIO_free(out);
+ if (out != NULL) BIO_free
_all
(out);
if (x != NULL) SSL_SESSION_free(x);
if (x != NULL) SSL_SESSION_free(x);
- EXIT(ret);
+ apps_shutdown();
+ OPENSSL_EXIT(ret);
}
static SSL_SESSION *load_sess_id(char *infile, int format)
}
static SSL_SESSION *load_sess_id(char *infile, int format)