add copyright info and license
[project/ustream-ssl.git] / ustream-ssl.c
index ce32eb5..adc88b4 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * ustream-ssl - library for SSL over ustream
+ *
+ * Copyright (C) 2012 Felix Fietkau <nbd@openwrt.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 #include <errno.h>
 
 #include <openssl/ssl.h>
@@ -182,12 +200,8 @@ static void ustream_ssl_stream_init(struct ustream_ssl *us)
 
 static void *_ustream_ssl_context_new(bool server)
 {
-#ifdef CYASSL_OPENSSL_H_
-       SSL_METHOD *m;
-#else
-       const SSL_METHOD *m;
-#endif
        SSL_CTX *c;
+       const void *m;
 
        ssl_init();
 
@@ -203,7 +217,7 @@ static void *_ustream_ssl_context_new(bool server)
                m = TLSv1_client_method();
 #endif
 
-       c = SSL_CTX_new(m);
+       c = SSL_CTX_new((void *) m);
        if (!c)
                return NULL;