Home | History | Annotate | Download | only in ssl

Lines Matching defs:cipher

96     PRUint8           keyLen;	/* cipher symkey size in bytes. */
153 * lsb corresponds to first cipher suite in allCipherSuites[].
176 /* Construct a socket's list of cipher specs from the global default values.
208 /* ask SSL3 how many cipher suites it has. */
214 /* Allocate memory to hold cipher specs */
228 /* fill in cipher specs for SSL2 cipher suites */
253 ** (e.g. SSL2 or SSL3) is logically enabled, but all its cipher suites
256 ** if no cipher suites are found, it sets the error code and returns
682 ssl2_SendSessionKeyMessage(sslSocket *ss, int cipher, int keySize,
706 msg[1] = cipher;
949 ** Send some data, when using a stream cipher. Stream ciphers have a
967 SSL_TRC(10, ("%d: SSL[%d]: sending %d bytes using stream cipher",
1050 ** Send some data, when using a block cipher. Package up the data with
1071 SSL_TRC(10, ("%d: SSL[%d]: sending %d bytes using block cipher",
1296 int cipher,
1315 sid->u.ssl2.cipherType = cipher;
1459 SSL_DBG(("%d: SSL[%d]: ssl2_CreateSessionCypher: unknown cipher=%d",
1558 ** "cipher" the cipher type to use
1559 ** "keyBits" the size of the final cipher key
1564 ** "ca" the cipher-arg data
1565 ** "caLen" the number of bytes of cipher-arg data
1577 ssl2_ServerSetupSessionCypher(sslSocket *ss, int cipher, unsigned int keyBits,
1591 PRUint16 allowed; /* cipher kinds enabled and allowed by policy */
1603 switch (cipher) {
1613 SSL_DBG(("%d: SSL[%d]: ssl2_ServerSetupSessionCypher: unknown cipher=%d",
1614 cipher));
1620 if (!(allowed & (1 << cipher))) {
1622 SSL_DBG(("%d: SSL[%d]: disallowed cipher=%d",
1623 SSL_GETPID(), ss->fd, cipher));
1628 keySize = ssl_Specs[cipher].keyLen;
1636 if (ckLen != ssl_Specs[cipher].pubLen) {
1643 if (caLen != ssl_Specs[cipher].ivLen) {
1719 rv = ssl2_FillInSID(sid, cipher, mkbuf, keySize, ca, caLen,
1733 SSL_TRC(1, ("%d: SSL[%d]: server, using %s cipher, clear=%d total=%d",
1734 SSL_GETPID(), ss->fd, ssl_cipherName[cipher],
1750 ** Rewrite the incoming cipher specs, comparing to list of specs we support,
1759 * Returns the number of bytes of "qualified cipher specs",
1764 PRUint8 * cs, /* cipher specs in client hello msg. */
1793 /* Copy this cipher spec into the "keep" section */
1809 ** Pick the best cipher we can find, given the array of server cipher
1810 ** specs. Returns cipher number (e.g. SSL_CK_*), or -1 for no overlap.
1817 ** Note that most servers only return a single cipher suite in their
1818 ** ServerHello messages. So, the code below for finding the "best" cipher
1820 ** their cipher suite lists sorted in descending order by preference.
1825 PRUint8 * hs, /* server hello's cipher suites. */
1879 /* Pick this cipher immediately! */
1887 /* Use secret keySize to determine which cipher is best */
1922 SSL_DBG(("%d: SSL[%d]: no cipher overlap", SSL_GETPID(), ss->fd));
2036 ** Given the server's public key and cipher specs, generate a session key
2053 int cipher;
2054 int keyLen; /* cipher symkey size in bytes. */
2088 /* Choose a compatible cipher with the server */
2090 cipher = ssl2_ChooseSessionCypher(ss, nc, cs, &keyLen);
2091 if (cipher < 0) {
2109 /* We know that cipher is a legit value here, because
2112 ckLen = ssl_Specs[cipher].pubLen; /* cleartext key length. */
2113 caLen = ssl_Specs[cipher].ivLen; /* IV length. */
2121 rv = ssl2_FillInSID(sid, cipher, keyData, keyLen,
2129 SSL_TRC(1, ("%d: SSL[%d]: client, using %s cipher, clear=%d total=%d",
2130 SSL_GETPID(), ss->fd, ssl_cipherName[cipher],
2169 rv = ssl2_SendSessionKeyMessage(ss, cipher, keyLen << 3, ca, caLen,
2882 SSL_DBG(("%d: SSL[%d]: no cipher overlap",
2916 /* Setup new session cipher */
2963 ** cipher is setup and ready to go. Switch to encrypted write routine
3074 /* If the cipher in this sid is not enabled, drop it. */
3136 /* ensure we don't neogtiate ECC cipher suites with SSL2 hello */
3239 int cipher;
3252 cipher = data[1];
3258 SSL_TRC(5, ("%d: SSL[%d]: session-key, cipher=%d keyBits=%d ckLen=%d ekLen=%d caLen=%d",
3259 SSL_GETPID(), ss->fd, cipher, keyBits, ckLen, ekLen, caLen));
3269 rv = ssl2_ServerSetupSessionCypher(ss, cipher, keyBits,
3415 ** cipher is setup and ready to go. Switch to encrypted write routine
3574 /* Qualify cipher specs before returning them to client */