projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop spurious "unable to load config info" errors in req
[openssl.git]
/
apps
/
sess_id.c
diff --git
a/apps/sess_id.c
b/apps/sess_id.c
index c1b497981ee8f95408216183342b0cce103f860e..41c3b3f4a3ab649ba05ae3580b8ecbdc7bc292d3 100644
(file)
--- a/
apps/sess_id.c
+++ b/
apps/sess_id.c
@@
-60,11
+60,11
@@
#include <stdlib.h>
#include <string.h>
#include "apps.h"
#include <stdlib.h>
#include <string.h>
#include "apps.h"
-#include
"bio.h"
-#include
"err.h"
-#include
"x509.h"
-#include
"pem.h"
-#include
"ssl.h"
+#include
<openssl/bio.h>
+#include
<openssl/err.h>
+#include
<openssl/x509.h>
+#include
<openssl/pem.h>
+#include
<openssl/ssl.h>
#undef PROG
#define PROG sess_id_main
#undef PROG
#define PROG sess_id_main
@@
-72,7
+72,7
@@
static char *sess_id_usage[]={
"usage: sess_id args\n",
"\n",
static char *sess_id_usage[]={
"usage: sess_id args\n",
"\n",
-" -inform arg - input format - default PEM (
one of DER, TXT
or PEM)\n",
+" -inform arg - input format - default PEM (
DER
or PEM)\n",
" -outform arg - output format - default PEM\n",
" -in arg - input file - default stdin\n",
" -out arg - output file - default stdout\n",
" -outform arg - output format - default PEM\n",
" -in arg - input file - default stdin\n",
" -out arg - output file - default stdout\n",
@@
-83,11
+83,9
@@
static char *sess_id_usage[]={
NULL
};
NULL
};
-#ifndef NOPROTO
static SSL_SESSION *load_sess_id(char *file, int format);
static SSL_SESSION *load_sess_id(char *file, int format);
-#else
-static SSL_SESSION *load_sess_id();
-#endif
+
+int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
int MAIN(int argc, char **argv)
{
@@
-158,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;
}
@@
-208,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)
@@
-264,8
+270,9
@@
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);
+ apps_shutdown();
EXIT(ret);
}
EXIT(ret);
}
@@
-294,7
+301,7
@@
static SSL_SESSION *load_sess_id(char *infile, int format)
if (format == FORMAT_ASN1)
x=d2i_SSL_SESSION_bio(in,NULL);
else if (format == FORMAT_PEM)
if (format == FORMAT_ASN1)
x=d2i_SSL_SESSION_bio(in,NULL);
else if (format == FORMAT_PEM)
- x=PEM_read_bio_SSL_SESSION(in,NULL,NULL);
+ x=PEM_read_bio_SSL_SESSION(in,NULL,NULL
,NULL
);
else {
BIO_printf(bio_err,"bad input format specified for input crl\n");
goto end;
else {
BIO_printf(bio_err,"bad input format specified for input crl\n");
goto end;