* creating, using and closing TLS/SSL connections.
*
* Copyright : Written by and Copyright (c) 2020 Maxim Antonov <mantonov@gmail.com>
+ * Copyright (C) 2017 Vaclav Svec. FIT CVUT.
+ * Copyright (C) 2018-2020 by Fabian Keil <fk@fabiankeil.de>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
*
* Function : openssl_init
*
- * Description : INitializes OpenSSL library once
+ * Description : Initializes OpenSSL library once
*
* Parameters : N/A
*
* or has not yet been sent by the remote end.
*
* Parameters :
- * 1 : ssl = SSL context to test
+ * 1 : ssl_attr = SSL context to test
*
* Returns : 0 => No data are pending
* >0 => Pending data length
* connection context.
*
* Parameters :
- * 1 : ssl = SSL context to send data to
+ * 1 : ssl_attr = SSL context to send data to
* 2 : buf = Pointer to data to be sent
* 3 : len = Length of data to be sent to the SSL context
*
* it into buffer.
*
* Parameters :
- * 1 : ssl = SSL context to receive data from
+ * 1 : ssl_attr = SSL context to receive data from
* 2 : buf = Pointer to buffer where data will be written
* 3 : max_length = Maximum number of bytes to read
*
* 1 : cert = The certificate to modify
* 2 : issuer = Issuer certificate
* 3 : nid = OpenSSL NID
- * 2 : data = extension value
+ * 4 : value = extension value
*
* Returns : 0 => Error while setting extensuon data
* 1 => It worked
*
*********************************************************************/
-static int set_x509_ext(X509 *cert, X509 *issuer, int nid, const char *value)
+static int set_x509_ext(X509 *cert, X509 *issuer, int nid, char *value)
{
X509_EXTENSION *ext = NULL;
X509V3_CTX ctx;
* Parameters :
* 1 : cert = The certificate to modify
* 2 : issuer = Issuer certificate
- * 2 : hostname = The hostname to add
+ * 3 : hostname = The hostname to add
*
* Returns : 0 => Error while creating certificate.
* 1 => It worked