d1_meth.c revision 160815
126026Sbrian/* ssl/d1_meth.h */ 226026Sbrian/* 326026Sbrian * DTLS implementation written by Nagendra Modadugu 426026Sbrian * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 526026Sbrian */ 626026Sbrian/* ==================================================================== 726026Sbrian * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 826026Sbrian * 926026Sbrian * Redistribution and use in source and binary forms, with or without 1026026Sbrian * modification, are permitted provided that the following conditions 1126026Sbrian * are met: 1226026Sbrian * 1326026Sbrian * 1. Redistributions of source code must retain the above copyright 1426026Sbrian * notice, this list of conditions and the following disclaimer. 1526026Sbrian * 1626026Sbrian * 2. Redistributions in binary form must reproduce the above copyright 1726026Sbrian * notice, this list of conditions and the following disclaimer in 1826026Sbrian * the documentation and/or other materials provided with the 1926026Sbrian * distribution. 2026026Sbrian * 2126026Sbrian * 3. All advertising materials mentioning features or use of this 2226026Sbrian * software must display the following acknowledgment: 2326026Sbrian * "This product includes software developed by the OpenSSL Project 2426026Sbrian * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 2526026Sbrian * 2626026Sbrian * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 2726026Sbrian * endorse or promote products derived from this software without 2826026Sbrian * prior written permission. For written permission, please contact 2926026Sbrian * openssl-core@OpenSSL.org. 3026026Sbrian * 3126026Sbrian * 5. Products derived from this software may not be called "OpenSSL" 3226026Sbrian * nor may "OpenSSL" appear in their names without prior written 3326026Sbrian * permission of the OpenSSL Project. 3426026Sbrian * 3559356Sru * 6. Redistributions of any form whatsoever must retain the following 3626026Sbrian * acknowledgment: 3726026Sbrian * "This product includes software developed by the OpenSSL Project 3826026Sbrian * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 3926026Sbrian * 4026026Sbrian * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 4126026Sbrian * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4226026Sbrian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 4326026Sbrian * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 4426026Sbrian * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4526026Sbrian * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 4626026Sbrian * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 4726026Sbrian * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 4826026Sbrian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 4926026Sbrian * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 5026026Sbrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 5159356Sru * OF THE POSSIBILITY OF SUCH DAMAGE. 5259356Sru * ==================================================================== 5326026Sbrian * 5426026Sbrian * This product includes cryptographic software written by Eric Young 5526026Sbrian * (eay@cryptsoft.com). This product includes software written by Tim 5626026Sbrian * Hudson (tjh@cryptsoft.com). 5726026Sbrian * 5826026Sbrian */ 5944307Sbrian 6026026Sbrian#include <stdio.h> 6126026Sbrian#include <openssl/objects.h> 6226026Sbrian#include "ssl_locl.h" 6326026Sbrian 6444307Sbrianstatic SSL_METHOD *dtls1_get_method(int ver); 6526026Sbrianstatic SSL_METHOD *dtls1_get_method(int ver) 6626026Sbrian { 6726026Sbrian if (ver == DTLS1_VERSION) 6826026Sbrian return(DTLSv1_method()); 6926026Sbrian else 7026026Sbrian return(NULL); 7126026Sbrian } 7226026Sbrian 7326026SbrianIMPLEMENT_dtls1_meth_func(DTLSv1_method, 7426026Sbrian dtls1_accept, 7526026Sbrian dtls1_connect, 7644307Sbrian dtls1_get_method) 7726026Sbrian 7826026Sbrian