Back to index

lightning-sunbird  0.9+nobinonly
sslenum.c
Go to the documentation of this file.
00001 /*
00002  * Table enumerating all implemented cipher suites
00003  * Part of public API.
00004  *
00005  * ***** BEGIN LICENSE BLOCK *****
00006  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00007  *
00008  * The contents of this file are subject to the Mozilla Public License Version
00009  * 1.1 (the "License"); you may not use this file except in compliance with
00010  * the License. You may obtain a copy of the License at
00011  * http://www.mozilla.org/MPL/
00012  *
00013  * Software distributed under the License is distributed on an "AS IS" basis,
00014  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00015  * for the specific language governing rights and limitations under the
00016  * License.
00017  *
00018  * The Original Code is the Netscape security libraries.
00019  *
00020  * The Initial Developer of the Original Code is
00021  * Netscape Communications Corporation.
00022  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00023  * the Initial Developer. All Rights Reserved.
00024  *
00025  * Contributor(s):
00026  *   Dr Stephen Henson <stephen.henson@gemplus.com>
00027  *   Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
00028  *
00029  * Alternatively, the contents of this file may be used under the terms of
00030  * either the GNU General Public License Version 2 or later (the "GPL"), or
00031  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00032  * in which case the provisions of the GPL or the LGPL are applicable instead
00033  * of those above. If you wish to allow use of your version of this file only
00034  * under the terms of either the GPL or the LGPL, and not to allow others to
00035  * use your version of this file under the terms of the MPL, indicate your
00036  * decision by deleting the provisions above and replace them with the notice
00037  * and other provisions required by the GPL or the LGPL. If you do not delete
00038  * the provisions above, a recipient may use your version of this file under
00039  * the terms of any one of the MPL, the GPL or the LGPL.
00040  *
00041  * ***** END LICENSE BLOCK ***** */
00042 /* $Id: sslenum.c,v 1.12.2.1 2006/01/28 00:13:37 wtchang%redhat.com Exp $ */
00043 
00044 #include "ssl.h"
00045 #include "sslproto.h"
00046 
00047 const PRUint16 SSL_ImplementedCiphers[] = {
00048 
00049     /* 256-bit */
00050 #ifdef NSS_ENABLE_ECC
00051     TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
00052     TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
00053 #endif /* NSS_ENABLE_ECC */
00054     TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
00055     TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
00056 #ifdef NSS_ENABLE_ECC
00057     TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
00058     TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
00059 #endif /* NSS_ENABLE_ECC */
00060     TLS_RSA_WITH_AES_256_CBC_SHA,
00061 
00062     /* 128-bit */
00063 #ifdef NSS_ENABLE_ECC
00064     TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
00065     TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
00066     TLS_ECDHE_RSA_WITH_RC4_128_SHA,
00067     TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
00068 #endif /* NSS_ENABLE_ECC */
00069     TLS_DHE_DSS_WITH_RC4_128_SHA,
00070     TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
00071     TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
00072 #ifdef NSS_ENABLE_ECC
00073     TLS_ECDH_RSA_WITH_RC4_128_SHA,
00074     TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
00075     TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
00076     TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
00077 #endif /* NSS_ENABLE_ECC */
00078     SSL_RSA_WITH_RC4_128_MD5,
00079     SSL_RSA_WITH_RC4_128_SHA,
00080     TLS_RSA_WITH_AES_128_CBC_SHA,
00081 
00082     /* 112-bit 3DES */
00083 #ifdef NSS_ENABLE_ECC
00084     TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
00085     TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
00086 #endif /* NSS_ENABLE_ECC */
00087     SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
00088     SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
00089 #ifdef NSS_ENABLE_ECC
00090     TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
00091     TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
00092 #endif /* NSS_ENABLE_ECC */
00093     SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,
00094     SSL_RSA_WITH_3DES_EDE_CBC_SHA,
00095 
00096     /* 56-bit DES "domestic" cipher suites */
00097     SSL_DHE_RSA_WITH_DES_CBC_SHA,
00098     SSL_DHE_DSS_WITH_DES_CBC_SHA,
00099     SSL_RSA_FIPS_WITH_DES_CBC_SHA,
00100     SSL_RSA_WITH_DES_CBC_SHA,
00101 
00102     /* export ciphersuites with 1024-bit public key exchange keys */
00103     TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,
00104     TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,
00105 
00106     /* export ciphersuites with 512-bit public key exchange keys */
00107     SSL_RSA_EXPORT_WITH_RC4_40_MD5,
00108     SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
00109 
00110     /* ciphersuites with no encryption */
00111 #ifdef NSS_ENABLE_ECC
00112     TLS_ECDHE_ECDSA_WITH_NULL_SHA,
00113     TLS_ECDHE_RSA_WITH_NULL_SHA,
00114     TLS_ECDH_RSA_WITH_NULL_SHA,
00115     TLS_ECDH_ECDSA_WITH_NULL_SHA,
00116 #endif /* NSS_ENABLE_ECC */
00117     SSL_RSA_WITH_NULL_SHA,
00118     SSL_RSA_WITH_NULL_MD5,
00119 
00120     /* SSL2 cipher suites. */
00121     SSL_EN_RC4_128_WITH_MD5,
00122     SSL_EN_RC2_128_CBC_WITH_MD5,
00123     SSL_EN_DES_192_EDE3_CBC_WITH_MD5,  /* actually 112, not 192 */
00124     SSL_EN_DES_64_CBC_WITH_MD5,
00125     SSL_EN_RC4_128_EXPORT40_WITH_MD5,
00126     SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5,
00127 
00128     0
00129 
00130 };
00131 
00132 const PRUint16 SSL_NumImplementedCiphers = 
00133     (sizeof SSL_ImplementedCiphers) / (sizeof SSL_ImplementedCiphers[0]) - 1;
00134