Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: net/third_party/nss/ssl/ssl.h

Issue 10540014: nss: support SECWouldBlock from ChannelID callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/third_party/nss/patches/channelid.patch ('k') | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file contains prototypes for the public SSL functions. 2 * This file contains prototypes for the public SSL functions.
3 * 3 *
4 * ***** BEGIN LICENSE BLOCK ***** 4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 ** Did the handshake with the peer negotiate the given extension? 938 ** Did the handshake with the peer negotiate the given extension?
939 ** Output parameter valid only if function returns SECSuccess 939 ** Output parameter valid only if function returns SECSuccess
940 */ 940 */
941 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, 941 SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
942 SSLExtensionType extId, 942 SSLExtensionType extId,
943 PRBool *yes); 943 PRBool *yes);
944 944
945 SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, 945 SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd,
946 PRBool *last_handshake_resumed) ; 946 PRBool *last_handshake_resumed) ;
947 947
948 /* See SSL_SetClientChannelIDCallback for usage. The callback must return 948 /* See SSL_SetClientChannelIDCallback for usage. If the callback returns
949 * SECFailure or SECSuccess (not SECWouldBlock). On SECSuccess, the callback 949 * SECWouldBlock then SSL_RestartHandshakeAfterChannelIDReq should be called in
950 * must have written a P-256, EC key pair to |*out_public_key| and 950 * the future to restart the handshake. On SECSuccess, the callback must have
951 * |*out_private_key|. */ 951 * written a P-256, EC key pair to |*out_public_key| and |*out_private_key|. */
952 typedef SECStatus (PR_CALLBACK *SSLClientChannelIDCallback)( 952 typedef SECStatus (PR_CALLBACK *SSLClientChannelIDCallback)(
953 void *arg, 953 void *arg,
954 PRFileDesc *fd, 954 PRFileDesc *fd,
955 SECKEYPublicKey **out_public_key, 955 SECKEYPublicKey **out_public_key,
956 SECKEYPrivateKey **out_private_key); 956 SECKEYPrivateKey **out_private_key);
957 957
958 /* SSL_RestartHandshakeAfterChannelIDReq attempts to restart the handshake
959 * after a ChannelID callback returned SECWouldBlock.
960 *
961 * This function takes ownership of |channelIDPub| and |channelID|. */
962 SSL_IMPORT SECStatus SSL_RestartHandshakeAfterChannelIDReq(
963 PRFileDesc *fd,
964 SECKEYPublicKey *channelIDPub,
965 SECKEYPrivateKey *channelID);
966
958 /* SSL_SetClientChannelIDCallback sets a callback function that will be called 967 /* SSL_SetClientChannelIDCallback sets a callback function that will be called
959 * just before a Channel ID is sent. This is only applicable to a client socket 968 * once the server's ServerHello has been processed. This is only applicable to
960 * and setting this callback causes the TLS Channel ID extension to be 969 * a client socket and setting this callback causes the TLS Channel ID
961 * advertised. */ 970 * extension to be advertised. */
962 SSL_IMPORT SECStatus SSL_SetClientChannelIDCallback( 971 SSL_IMPORT SECStatus SSL_SetClientChannelIDCallback(
963 PRFileDesc *fd, 972 PRFileDesc *fd,
964 SSLClientChannelIDCallback callback, 973 SSLClientChannelIDCallback callback,
965 void *arg); 974 void *arg);
966 975
967 /* 976 /*
968 ** How long should we wait before retransmitting the next flight of 977 ** How long should we wait before retransmitting the next flight of
969 ** the DTLS handshake? Returns SECFailure if not DTLS or not in a 978 ** the DTLS handshake? Returns SECFailure if not DTLS or not in a
970 ** handshake. 979 ** handshake.
971 */ 980 */
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 * should continue using the connection. If the application passes a non-zero 1057 * should continue using the connection. If the application passes a non-zero
1049 * value for second argument (error), or if SSL_AuthCertificateComplete returns 1058 * value for second argument (error), or if SSL_AuthCertificateComplete returns
1050 * anything other than SECSuccess, then the application should close the 1059 * anything other than SECSuccess, then the application should close the
1051 * connection. 1060 * connection.
1052 */ 1061 */
1053 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, 1062 SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd,
1054 PRErrorCode error); 1063 PRErrorCode error);
1055 SEC_END_PROTOS 1064 SEC_END_PROTOS
1056 1065
1057 #endif /* __ssl_h_ */ 1066 #endif /* __ssl_h_ */
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/channelid.patch ('k') | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698