change some parameters in the library to meet the needs of the website httpbin.org
Fork of MiniTLS-GPL by
Diff: tls/minitls.c
- Revision:
- 4:cbaf466d717d
- Parent:
- 1:27b41ba7e847
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tls/minitls.c Tue Jun 10 14:23:09 2014 +0000 @@ -0,0 +1,47 @@ +/* +MiniTLS - A super trimmed down TLS/SSL Library for embedded devices +Author: Donatien Garnier +Copyright (C) 2013-2014 AppNearMe Ltd + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*//** + * \file minitls.c + * \copyright Copyright (c) AppNearMe Ltd 2013 + * \author Donatien Garnier + */ + +#include "core/fwk.h" +#include "inc/minitls_errors.h" + +#include "minitls.h" + +/* This implementation assumes the following: + * + * Cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + * Compression: None + */ + +minitls_err_t minitls_init(minitls_t* minitls, crypto_prng_t* prng) +{ + minitls->certificate = NULL; + minitls->prng = prng; + return MINITLS_OK; +} + +minitls_err_t minitls_certificate_add(minitls_t* minitls, const tls_x509_certificate_t* cert) +{ + minitls->certificate = cert; + return MINITLS_OK; +}