зеркало из https://github.com/mozilla/pjs.git
Bug 402114: fix the incorrect prototypes of SSL handshake callbacks.
r=nelson. Modified Files: SSLsample/client.c SSLsample/server.c SSLsample/sslsample.c SSLsample/sslsample.h strsclnt/strsclnt.c vfyserv/vfyserv.c vfyserv/vfyserv.h vfyserv/vfyutil.c
This commit is contained in:
Родитель
181fe9c8f0
Коммит
b33e44d093
|
@ -175,8 +175,8 @@ retry:
|
|||
}
|
||||
|
||||
secStatus = SSL_HandshakeCallback(sslSocket,
|
||||
(SSLHandshakeCallback)myHandshakeCallback,
|
||||
NULL);
|
||||
myHandshakeCallback,
|
||||
NULL);
|
||||
if (secStatus != SECSuccess) {
|
||||
errWarn("SSL_HandshakeCallback");
|
||||
goto loser;
|
||||
|
|
|
@ -265,7 +265,7 @@ setupSSLSocket(PRFileDesc *tcpSocket, int requestCert)
|
|||
}
|
||||
|
||||
secStatus = SSL_HandshakeCallback(sslSocket,
|
||||
(SSLHandshakeCallback)myHandshakeCallback,
|
||||
myHandshakeCallback,
|
||||
NULL);
|
||||
if (secStatus != SECSuccess) {
|
||||
errWarn("SSL_HandshakeCallback");
|
||||
|
|
|
@ -311,11 +311,10 @@ myGetClientAuthData(void *arg,
|
|||
* Note: This function is not implemented in this sample, as we are using
|
||||
* blocking sockets.
|
||||
*/
|
||||
SECStatus
|
||||
void
|
||||
myHandshakeCallback(PRFileDesc *socket, void *arg)
|
||||
{
|
||||
printf("Handshake has completed, ready to send data securely.\n");
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ SECStatus myAuthCertificate(void *arg, PRFileDesc *socket,
|
|||
|
||||
SECStatus myBadCertHandler(void *arg, PRFileDesc *socket);
|
||||
|
||||
SECStatus myHandshakeCallback(PRFileDesc *socket, void *arg);
|
||||
void myHandshakeCallback(PRFileDesc *socket, void *arg);
|
||||
|
||||
SECStatus myGetClientAuthData(void *arg, PRFileDesc *socket,
|
||||
struct CERTDistNamesStr *caNames,
|
||||
|
|
|
@ -738,11 +738,10 @@ handle_connection( PRFileDesc *ssl_sock, int tid)
|
|||
|
||||
PRInt32 lastFullHandshakePeerID;
|
||||
|
||||
SECStatus
|
||||
void
|
||||
myHandshakeCallback(PRFileDesc *socket, void *arg)
|
||||
{
|
||||
PR_AtomicSet(&lastFullHandshakePeerID, (PRInt32) arg);
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -198,8 +198,8 @@ setupSSLSocket(PRNetAddr *addr)
|
|||
}
|
||||
|
||||
secStatus = SSL_HandshakeCallback(sslSocket,
|
||||
(SSLHandshakeCallback)myHandshakeCallback,
|
||||
NULL);
|
||||
myHandshakeCallback,
|
||||
NULL);
|
||||
if (secStatus != SECSuccess) {
|
||||
errWarn("SSL_HandshakeCallback");
|
||||
goto loser;
|
||||
|
|
|
@ -91,7 +91,7 @@ SECStatus myAuthCertificate(void *arg, PRFileDesc *socket,
|
|||
|
||||
SECStatus myBadCertHandler(void *arg, PRFileDesc *socket);
|
||||
|
||||
SECStatus myHandshakeCallback(PRFileDesc *socket, void *arg);
|
||||
void myHandshakeCallback(PRFileDesc *socket, void *arg);
|
||||
|
||||
SECStatus myGetClientAuthData(void *arg, PRFileDesc *socket,
|
||||
struct CERTDistNamesStr *caNames,
|
||||
|
|
|
@ -314,7 +314,7 @@ myGetClientAuthData(void *arg,
|
|||
return secStatus;
|
||||
}
|
||||
|
||||
/* Function: SECStatus myHandshakeCallback()
|
||||
/* Function: void myHandshakeCallback()
|
||||
*
|
||||
* Purpose: Called by SSL to inform application that the handshake is
|
||||
* complete. This function is mostly used on the server side of an SSL
|
||||
|
@ -337,11 +337,10 @@ myGetClientAuthData(void *arg,
|
|||
* Note: This function is not implemented in this sample, as we are using
|
||||
* blocking sockets.
|
||||
*/
|
||||
SECStatus
|
||||
void
|
||||
myHandshakeCallback(PRFileDesc *socket, void *arg)
|
||||
{
|
||||
fprintf(stderr,"Handshake Complete: SERVER CONFIGURED CORRECTLY\n");
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче