Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
mbedtls
Commits
d27680bd
Commit
d27680bd
authored
Jul 08, 2014
by
Manuel Pégourié-Gonnard
Browse files
Clarify code using PSK callback
parent
0698f7c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
library/ssl_srv.c
library/ssl_srv.c
+3
-5
No files found.
library/ssl_srv.c
View file @
d27680bd
...
@@ -2635,11 +2635,10 @@ static int ssl_parse_client_psk_identity( ssl_context *ssl, unsigned char **p,
...
@@ -2635,11 +2635,10 @@ static int ssl_parse_client_psk_identity( ssl_context *ssl, unsigned char **p,
if
(
ssl
->
f_psk
!=
NULL
)
if
(
ssl
->
f_psk
!=
NULL
)
{
{
if
(
(
ret
!=
ssl
->
f_psk
(
ssl
->
p_psk
,
ssl
,
*
p
,
n
)
)
!=
0
)
if
(
ssl
->
f_psk
(
ssl
->
p_psk
,
ssl
,
*
p
,
n
)
!=
0
)
ret
=
POLARSSL_ERR_SSL_UNKNOWN_IDENTITY
;
ret
=
POLARSSL_ERR_SSL_UNKNOWN_IDENTITY
;
}
}
else
if
(
ret
==
0
)
{
{
/* Identity is not a big secret since clients send it in the clear,
/* Identity is not a big secret since clients send it in the clear,
* but treat it carefully anyway, just in case */
* but treat it carefully anyway, just in case */
...
@@ -2664,9 +2663,8 @@ static int ssl_parse_client_psk_identity( ssl_context *ssl, unsigned char **p,
...
@@ -2664,9 +2663,8 @@ static int ssl_parse_client_psk_identity( ssl_context *ssl, unsigned char **p,
}
}
*
p
+=
n
;
*
p
+=
n
;
ret
=
0
;
return
(
ret
);
return
(
0
);
}
}
#endif
/* POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED */
#endif
/* POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment