Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP OpenSSL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP OpenSSL
Commits
6d02d8e4
Commit
6d02d8e4
authored
26 years ago
by
Bodo Möller
Browse files
Options
Downloads
Patches
Plain Diff
New option "-showcerts" for s_client
Slight cleanup in ssl/
parent
4f49cc74
No related branches found
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
CHANGES
+8
-0
8 additions, 0 deletions
CHANGES
apps/s_client.c
+9
-1
9 additions, 1 deletion
apps/s_client.c
ssl/s2_clnt.c
+1
-1
1 addition, 1 deletion
ssl/s2_clnt.c
ssl/ssl.h
+3
-4
3 additions, 4 deletions
ssl/ssl.h
ssl/ssl2.h
+2
-2
2 additions, 2 deletions
ssl/ssl2.h
ssl/ssl_sess.c
+1
-1
1 addition, 1 deletion
ssl/ssl_sess.c
with
24 additions
and
9 deletions
CHANGES
+
8
−
0
View file @
6d02d8e4
...
...
@@ -5,6 +5,14 @@
Changes between 0.9.2b and 0.9.3
*) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and
SSL2_SERVER_VERSION (not used at all) macros, which are now the
same as SSL2_VERSION anyway.
[Bodo Moeller]
*) New "-showcerts" option for s_client.
[Bodo Moeller]
*) Still more PKCS#12 integration. Add pkcs12 application to openssl
application. Various cleanups and fixes.
[Steve Henson]
...
...
This diff is collapsed.
Click to expand it.
apps/s_client.c
+
9
−
1
View file @
6d02d8e4
...
...
@@ -90,6 +90,7 @@ static int c_nbio=0;
#endif
static
int
c_Pause
=
0
;
static
int
c_debug
=
0
;
static
int
c_showcerts
=
0
;
#ifndef NOPROTO
static
void
sc_usage
(
void
);
...
...
@@ -118,6 +119,7 @@ static void sc_usage()
BIO_printf
(
bio_err
,
" -CAfile arg - PEM format file of CA's
\n
"
);
BIO_printf
(
bio_err
,
" -reconnect - Drop and re-make the connection with the same Session-ID
\n
"
);
BIO_printf
(
bio_err
,
" -pause - sleep(1) after each read(2) and write(2) system call
\n
"
);
BIO_printf
(
bio_err
,
" -showcerts - show all certificates in the chain
\n
"
);
BIO_printf
(
bio_err
,
" -debug - extra output
\n
"
);
BIO_printf
(
bio_err
,
" -nbio_test - more ssl protocol testing
\n
"
);
BIO_printf
(
bio_err
,
" -state - print the 'ssl' states
\n
"
);
...
...
@@ -171,6 +173,7 @@ char **argv;
c_Pause
=
0
;
c_quiet
=
0
;
c_debug
=
0
;
c_showcerts
=
0
;
if
(
bio_err
==
NULL
)
bio_err
=
BIO_new_fp
(
stderr
,
BIO_NOCLOSE
);
...
...
@@ -227,6 +230,8 @@ char **argv;
c_Pause
=
1
;
else
if
(
strcmp
(
*
argv
,
"-debug"
)
==
0
)
c_debug
=
1
;
else
if
(
strcmp
(
*
argv
,
"-showcerts"
)
==
0
)
c_showcerts
=
1
;
else
if
(
strcmp
(
*
argv
,
"-nbio_test"
)
==
0
)
nbio_test
=
1
;
else
if
(
strcmp
(
*
argv
,
"-state"
)
==
0
)
...
...
@@ -675,6 +680,8 @@ int full;
X509_NAME_oneline
(
X509_get_issuer_name
((
X509
*
)
sk_value
(
sk
,
i
)),
buf
,
BUFSIZ
);
BIO_printf
(
bio
,
" i:%s
\n
"
,
buf
);
if
(
c_showcerts
)
PEM_write_bio_X509
(
bio
,(
X509
*
)
sk_value
(
sk
,
i
));
}
}
...
...
@@ -683,7 +690,8 @@ int full;
if
(
peer
!=
NULL
)
{
BIO_printf
(
bio
,
"Server certificate
\n
"
);
PEM_write_bio_X509
(
bio
,
peer
);
if
(
!
c_showcerts
)
/* Redundant if we showed the whole chain */
PEM_write_bio_X509
(
bio
,
peer
);
X509_NAME_oneline
(
X509_get_subject_name
(
peer
),
buf
,
BUFSIZ
);
BIO_printf
(
bio
,
"subject=%s
\n
"
,
buf
);
...
...
This diff is collapsed.
Click to expand it.
ssl/s2_clnt.c
+
1
−
1
View file @
6d02d8e4
...
...
@@ -485,7 +485,7 @@ SSL *s;
p
=
buf
;
/* header */
d
=
p
+
9
;
/* data section */
*
(
p
++
)
=
SSL2_MT_CLIENT_HELLO
;
/* type */
s2n
(
SSL2_
CLIENT_
VERSION
,
p
);
/* version */
s2n
(
SSL2_VERSION
,
p
);
/* version */
n
=
j
=
0
;
n
=
ssl_cipher_list_to_bytes
(
s
,
SSL_get_ciphers
(
s
),
d
);
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl.h
+
3
−
4
View file @
6d02d8e4
...
...
@@ -477,10 +477,9 @@ struct ssl_ctx_st
struct
ssl_st
{
/* procol version
* 2 for SSLv2
* 3 for SSLv3
* -3 for SSLv3 but accept SSLv2 */
/* protocol version
* (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION)
*/
int
version
;
int
type
;
/* SSL_ST_CONNECT or SSL_ST_ACCEPT */
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl2.h
+
2
−
2
View file @
6d02d8e4
...
...
@@ -67,8 +67,8 @@ extern "C" {
#define SSL2_VERSION 0x0002
#define SSL2_VERSION_MAJOR 0x00
#define SSL2_VERSION_MINOR 0x02
#define SSL2_CLIENT_VERSION 0x0002
#define SSL2_SERVER_VERSION 0x0002
/*
#define SSL2_CLIENT_VERSION 0x0002
*/
/*
#define SSL2_SERVER_VERSION 0x0002
*/
/* Protocol Message Codes */
#define SSL2_MT_ERROR 0
...
...
This diff is collapsed.
Click to expand it.
ssl/ssl_sess.c
+
1
−
1
View file @
6d02d8e4
...
...
@@ -150,7 +150,7 @@ int session;
if
(
session
)
{
if
(
s
->
version
==
SSL2_
CLIENT_
VERSION
)
if
(
s
->
version
==
SSL2_VERSION
)
{
ss
->
ssl_version
=
SSL2_VERSION
;
ss
->
session_id_length
=
SSL2_SSL_SESSION_ID_LENGTH
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment