forked from wolfSSL/wolfssl
Apply connected to sendto and address code review
This commit is contained in:
@ -407,7 +407,7 @@ int EmbedReceiveFrom(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
||||
else
|
||||
dtlsCtx->peer.bufSz = 0;
|
||||
}
|
||||
peer = dtlsCtx->peer.sa;
|
||||
peer = (SOCKADDR_S*)dtlsCtx->peer.sa;
|
||||
peerSz = dtlsCtx->peer.bufSz;
|
||||
}
|
||||
|
||||
@ -518,8 +518,8 @@ int EmbedSendTo(WOLFSSL* ssl, char *buf, int sz, void *ctx)
|
||||
WOLFSSL_ENTER("EmbedSendTo()");
|
||||
|
||||
sent = (int)DTLS_SENDTO_FUNCTION(sd, buf, sz, ssl->wflags,
|
||||
(const SOCKADDR*)dtlsCtx->peer.sa,
|
||||
dtlsCtx->peer.sz);
|
||||
!dtlsCtx->connected ? (const SOCKADDR*)dtlsCtx->peer.sa : NULL,
|
||||
!dtlsCtx->connected ? dtlsCtx->peer.sz : 0);
|
||||
|
||||
sent = TranslateReturnCode(sent, sd);
|
||||
|
||||
|
@ -2219,7 +2219,7 @@ WOLFSSL_LOCAL int DoVerifyCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl,
|
||||
/* wolfSSL Sock Addr */
|
||||
struct WOLFSSL_SOCKADDR {
|
||||
unsigned int sz; /* sockaddr size */
|
||||
unsigned int bufSz; /* sockaddr size */
|
||||
unsigned int bufSz; /* size of allocated buffer */
|
||||
void* sa; /* pointer to the sockaddr_in or sockaddr_in6 */
|
||||
};
|
||||
|
||||
@ -4481,7 +4481,7 @@ struct WOLFSSL {
|
||||
#ifdef WOLFSSL_STATIC_MEMORY
|
||||
WOLFSSL_HEAP_HINT heap_hint;
|
||||
#endif
|
||||
#ifdef WOLFSSL_DTLS
|
||||
#if defined(WOLFSSL_DTLS) && !defined(NO_WOLFSSL_SERVER)
|
||||
ClientHelloGoodCb chGoodCb; /* notify user we parsed a verified
|
||||
* ClientHello */
|
||||
void* chGoodCtx; /* user ClientHello cb context */
|
||||
|
@ -1045,7 +1045,9 @@ WOLFSSL_API int wolfSSL_CTX_set1_param(WOLFSSL_CTX* ctx, WOLFSSL_X509_VERIFY_PAR
|
||||
WOLFSSL_API int wolfSSL_is_server(WOLFSSL* ssl);
|
||||
WOLFSSL_API WOLFSSL* wolfSSL_write_dup(WOLFSSL* ssl);
|
||||
WOLFSSL_ABI WOLFSSL_API int wolfSSL_set_fd(WOLFSSL* ssl, int fd);
|
||||
#ifdef WOLFSSL_DTLS
|
||||
WOLFSSL_API int wolfSSL_set_dtls_fd_connected(WOLFSSL* ssl, int fd);
|
||||
#endif
|
||||
WOLFSSL_API int wolfSSL_set_write_fd (WOLFSSL* ssl, int fd);
|
||||
WOLFSSL_API int wolfSSL_set_read_fd (WOLFSSL* ssl, int fd);
|
||||
WOLFSSL_API char* wolfSSL_get_cipher_list(int priority);
|
||||
|
Reference in New Issue
Block a user