Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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 curl
Commits
4b96ac50
Commit
4b96ac50
authored
17 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
prevent compiler warnings about shadowing and one case of unused variable
parent
0678a51d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/nss.c
+17
-14
17 additions, 14 deletions
lib/nss.c
with
17 additions
and
14 deletions
lib/nss.c
+
17
−
14
View file @
4b96ac50
...
...
@@ -548,7 +548,7 @@ static SECStatus nss_Init_Tokens(struct connectdata * conn)
return
status
;
}
static
SECStatus
BadCertHandler
(
void
*
arg
,
PRFileDesc
*
sock
et
)
static
SECStatus
BadCertHandler
(
void
*
arg
,
PRFileDesc
*
sock
)
{
SECStatus
success
=
SECSuccess
;
struct
connectdata
*
conn
=
(
struct
connectdata
*
)
arg
;
...
...
@@ -560,7 +560,7 @@ static SECStatus BadCertHandler(void *arg, PRFileDesc * socket)
return
success
;
conn
->
data
->
set
.
ssl
.
certverifyresult
=
err
;
cert
=
SSL_PeerCertificate
(
sock
et
);
cert
=
SSL_PeerCertificate
(
sock
);
subject
=
CERT_NameToAscii
(
&
cert
->
subject
);
issuer
=
CERT_NameToAscii
(
&
cert
->
issuer
);
CERT_DestroyCertificate
(
cert
);
...
...
@@ -606,14 +606,14 @@ static SECStatus BadCertHandler(void *arg, PRFileDesc * socket)
/**
* Inform the application that the handshake is complete.
*/
static
SECStatus
HandshakeCallback
(
PRFileDesc
*
sock
et
,
void
*
arg
)
static
SECStatus
HandshakeCallback
(
PRFileDesc
*
sock
,
void
*
arg
)
{
(
void
)
sock
et
;
(
void
)
sock
;
(
void
)
arg
;
return
SECSuccess
;
}
static
void
display_conn_info
(
struct
connectdata
*
conn
,
PRFileDesc
*
sock
et
)
static
void
display_conn_info
(
struct
connectdata
*
conn
,
PRFileDesc
*
sock
)
{
SSLChannelInfo
channel
;
SSLCipherSuiteInfo
suite
;
...
...
@@ -623,7 +623,7 @@ static void display_conn_info(struct connectdata *conn, PRFileDesc * socket)
char
timeString
[
256
];
PRTime
notBefore
,
notAfter
;
if
(
SSL_GetChannelInfo
(
sock
et
,
&
channel
,
sizeof
channel
)
==
if
(
SSL_GetChannelInfo
(
sock
,
&
channel
,
sizeof
channel
)
==
SECSuccess
&&
channel
.
length
==
sizeof
channel
&&
channel
.
cipherSuite
)
{
if
(
SSL_GetCipherSuiteInfo
(
channel
.
cipherSuite
,
...
...
@@ -634,7 +634,7 @@ static void display_conn_info(struct connectdata *conn, PRFileDesc * socket)
infof
(
conn
->
data
,
"Server certificate:
\n
"
);
cert
=
SSL_PeerCertificate
(
sock
et
);
cert
=
SSL_PeerCertificate
(
sock
);
subject
=
CERT_NameToAscii
(
&
cert
->
subject
);
issuer
=
CERT_NameToAscii
(
&
cert
->
issuer
);
common_name
=
CERT_GetCommonName
(
&
cert
->
subject
);
...
...
@@ -663,10 +663,10 @@ static void display_conn_info(struct connectdata *conn, PRFileDesc * socket)
*
* Callback to pick the SSL client certificate.
*/
static
SECStatus
SelectClientCert
(
void
*
arg
,
PRFileDesc
*
sock
et
,
struct
CERTDistNamesStr
*
caNames
,
struct
CERTCertificateStr
**
pRetCert
,
struct
SECKEYPrivateKeyStr
**
pRetKey
)
static
SECStatus
SelectClientCert
(
void
*
arg
,
PRFileDesc
*
sock
,
struct
CERTDistNamesStr
*
caNames
,
struct
CERTCertificateStr
**
pRetCert
,
struct
SECKEYPrivateKeyStr
**
pRetKey
)
{
CERTCertificate
*
cert
;
SECKEYPrivateKey
*
privKey
;
...
...
@@ -676,7 +676,7 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc * socket,
PK11SlotInfo
*
slot
;
(
void
)
caNames
;
proto_win
=
SSL_RevealPinArg
(
sock
et
);
proto_win
=
SSL_RevealPinArg
(
sock
);
if
(
!
nickname
)
return
secStatus
;
...
...
@@ -800,7 +800,9 @@ CURLcode Curl_nss_connect(struct connectdata * conn, int sockindex)
curl_socket_t
sockfd
=
conn
->
sock
[
sockindex
];
struct
ssl_connect_data
*
connssl
=
&
conn
->
ssl
[
sockindex
];
SECStatus
rv
;
#ifdef HAVE_PK11_CREATEGENERICOBJECT
char
*
configstring
=
NULL
;
#endif
char
*
certDir
=
NULL
;
int
curlerr
;
...
...
@@ -925,7 +927,7 @@ CURLcode Curl_nss_connect(struct connectdata * conn, int sockindex)
}
if
(
S_ISDIR
(
st
.
st_mode
))
{
int
r
v
;
int
r
c
;
dir
=
PR_OpenDir
(
data
->
set
.
ssl
.
CApath
);
do
{
...
...
@@ -936,7 +938,8 @@ CURLcode Curl_nss_connect(struct connectdata * conn, int sockindex)
snprintf
(
fullpath
,
sizeof
(
fullpath
),
"%s/%s"
,
data
->
set
.
ssl
.
CApath
,
entry
->
name
);
rv
=
nss_load_cert
(
fullpath
,
PR_TRUE
);
rc
=
nss_load_cert
(
fullpath
,
PR_TRUE
);
/* FIXME: check this return value! */
}
/* This is purposefully tolerant of errors so non-PEM files
* can be in the same directory */
...
...
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