s3_meth.c revision 280304
15969Ssimonis/* ssl/s3_meth.c */ 29934Scoleenp/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 311486Sgoetz * All rights reserved. 45969Ssimonis * 55969Ssimonis * This package is an SSL implementation written 65969Ssimonis * by Eric Young (eay@cryptsoft.com). 75969Ssimonis * The implementation was written so as to conform with Netscapes SSL. 85969Ssimonis * 95969Ssimonis * This library is free for commercial and non-commercial use as long as 105969Ssimonis * the following conditions are aheared to. The following conditions 115969Ssimonis * apply to all code found in this distribution, be it the RC4, RSA, 125969Ssimonis * lhash, DES, etc., code; not just the SSL code. The SSL documentation 135969Ssimonis * included with this distribution is covered by the same copyright terms 145969Ssimonis * except that the holder is Tim Hudson (tjh@cryptsoft.com). 155969Ssimonis * 165969Ssimonis * Copyright remains Eric Young's, and as such any Copyright notices in 175969Ssimonis * the code are not to be removed. 185969Ssimonis * If this package is used in a product, Eric Young should be given attribution 195969Ssimonis * as the author of the parts of the library used. 205969Ssimonis * This can be in the form of a textual message at program startup or 215969Ssimonis * in documentation (online or textual) provided with the package. 225969Ssimonis * 235969Ssimonis * Redistribution and use in source and binary forms, with or without 245969Ssimonis * modification, are permitted provided that the following conditions 255969Ssimonis * are met: 265969Ssimonis * 1. Redistributions of source code must retain the copyright 275969Ssimonis * notice, this list of conditions and the following disclaimer. 285969Ssimonis * 2. Redistributions in binary form must reproduce the above copyright 295969Ssimonis * notice, this list of conditions and the following disclaimer in the 305969Ssimonis * documentation and/or other materials provided with the distribution. 315969Ssimonis * 3. All advertising materials mentioning features or use of this software 325969Ssimonis * must display the following acknowledgement: 335969Ssimonis * "This product includes cryptographic software written by 345969Ssimonis * Eric Young (eay@cryptsoft.com)" 3513078Smikael * The word 'cryptographic' can be left out if the rouines from the library 365969Ssimonis * being used are not cryptographic related :-). 375969Ssimonis * 4. If you include any Windows specific code (or a derivative thereof) from 385969Ssimonis * the apps directory (application code) you must include an acknowledgement: 398183Sgoetz * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 405969Ssimonis * 415969Ssimonis * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 425969Ssimonis * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 435969Ssimonis * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 445969Ssimonis * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 455969Ssimonis * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 465969Ssimonis * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 475969Ssimonis * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 485969Ssimonis * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 495969Ssimonis * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 505969Ssimonis * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 515969Ssimonis * SUCH DAMAGE. 528183Sgoetz * 538183Sgoetz * The licence and distribution terms for any publically available version or 548183Sgoetz * derivative of this code cannot be changed. i.e. this code cannot simply be 5511486Sgoetz * copied and put under another distribution licence 565969Ssimonis * [including the GNU Public Licence.] 578183Sgoetz */ 585969Ssimonis 595969Ssimonis#include <stdio.h> 605969Ssimonis#include <openssl/objects.h> 615969Ssimonis#include "ssl_locl.h" 625969Ssimonis 639665Sstuefe#ifndef OPENSSL_NO_SSL3_METHOD 649665Sstuefestatic const SSL_METHOD *ssl3_get_method(int ver) 655969Ssimonis{ 665969Ssimonis if (ver == SSL3_VERSION) 675969Ssimonis return (SSLv3_method()); 6811486Sgoetz else 695969Ssimonis return (NULL); 705969Ssimonis} 715969Ssimonis 725969SsimonisIMPLEMENT_ssl3_meth_func(SSLv3_method, 735969Ssimonis ssl3_accept, ssl3_connect, ssl3_get_method) 745969Ssimonis#endif 755969Ssimonis