A super trimmed down TLS stack, GPL licensed

Dependents:   MiniTLS-HTTPS-Example

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.

Revision:
1:27b41ba7e847
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tls/minitls.c	Mon Jun 09 14:57:32 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;
+}