[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] More OpenSSL portability work; add missing docs to tls.c
Update of /home/minion/cvsroot/src/minion/src
In directory moria.mit.edu:/tmp/cvs-serv2024/src
Modified Files:
_minionlib.h aes_ctr.c crypt.c main.c tls.c
Log Message:
More OpenSSL portability work; add missing docs to tls.c
Index: _minionlib.h
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/_minionlib.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- _minionlib.h 11 Feb 2003 23:34:08 -0000 1.13
+++ _minionlib.h 12 Feb 2003 01:23:24 -0000 1.14
@@ -11,8 +11,13 @@
the README file for further instructions."
#endif
+#ifndef TRUNCATED_OPENSSL_INCLUDES
#include <openssl/aes.h>
#include <openssl/rsa.h>
+#else
+#include <aes.h>
+#include <rsa.h>
+#endif
/* We provide our own implementation of counter mode; see aes_ctr.c
*/
Index: aes_ctr.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/aes_ctr.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- aes_ctr.c 17 Jan 2003 05:57:57 -0000 1.11
+++ aes_ctr.c 12 Feb 2003 01:23:24 -0000 1.12
@@ -14,7 +14,11 @@
* a while before I decided to abandon it.
*/
+#ifndef TRUNCATED_OPENSSL_INCLUDES
#include <openssl/aes.h>
+#else
+#include <aes.h>
+#endif
#include <string.h>
#include <stdio.h>
Index: crypt.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/crypt.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- crypt.c 8 Jan 2003 08:09:09 -0000 1.18
+++ crypt.c 12 Feb 2003 01:23:24 -0000 1.19
@@ -4,6 +4,7 @@
#include <time.h>
+#ifndef TRUNCATED_OPENSSL_INCLUDES
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/aes.h>
@@ -12,6 +13,16 @@
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
+#else
+#include <bn.h>
+#include <rsa.h>
+#include <aes.h>
+#include <sha.h>
+#include <rand.h>
+#include <err.h>
+#include <pem.h>
+#include <evp.h>
+#endif
#include <_minionlib.h>
#include <assert.h>
Index: main.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- main.c 9 Feb 2003 22:30:58 -0000 1.10
+++ main.c 12 Feb 2003 01:23:24 -0000 1.11
@@ -9,9 +9,15 @@
#include <_minionlib.h>
+#ifndef TRUNCATED_OPENSSL_INCLUDES
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
+#else
+#include <ssl.h>
+#include <err.h>
+#include <rsa.h>
+#endif
/* Macros to declare function tables for Python. */
#define ENTRY_ND(fn) { #fn, (PyCFunction)mm_##fn, METH_VARARGS|METH_KEYWORDS,\
Index: tls.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/tls.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- tls.c 12 Jan 2003 04:27:19 -0000 1.14
+++ tls.c 12 Feb 2003 01:23:25 -0000 1.15
@@ -2,8 +2,13 @@
/* $Id$ */
#include "_minionlib.h"
+#ifndef TRUNCATED_OPENSSL_INCLUDES
#include <openssl/ssl.h>
#include <openssl/tls1.h>
+#else
+#include <ssl.h>
+#include <tls1.h>
+#endif
char mm_TLSError__doc__[] =
"mixminion._minionlib.TLSError\n\n"
@@ -541,7 +546,9 @@
static char mm_TLSSock_renegotiate__doc__[] =
"tlssock.renegotate()\n\n"
- "DOCDOC";
+ "Mark this connection as requiring renegotiation. No renegotiation is\n"
+ "performed until do_handshake is called. Note that renegotiation only\n"
+ "works intuitively on the client side.\n";
static PyObject*
mm_TLSSock_renegotiate(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -565,8 +572,10 @@
}
static char mm_TLSSock_do_handshake__doc__[] =
- "tlssock.renegotate()\n\n"
- "DOCDOC";
+ "tlssock.do_handshake()\n\n"
+ "Perform handshake functions for renegotiating a TLS socket.\n"
+ "Raises TLSWantRead or TLSWantWrite if the underlying nonblocking socket\n"
+ "would block on a read or a write respectively.\n";
static PyObject*
mm_TLSSock_do_handshake(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -589,9 +598,9 @@
return Py_None;
}
+#if 0
static char mm_TLSSock_get_num_renegotiations__doc__[] =
- "tlssock.get_num_renegotiations()\n\n"
- "DOCDOC";
+"tlssock.get_num_renegotiations()\n\n";
static PyObject*
mm_TLSSock_get_num_renegotiations(PyObject *self, PyObject *args,
@@ -605,6 +614,7 @@
return PyInt_FromLong(SSL_num_renegotiations(ssl));
}
+#endif
static PyMethodDef mm_TLSSock_methods[] = {
METHOD(mm_TLSSock, accept),
@@ -617,7 +627,9 @@
METHOD(mm_TLSSock, fileno),
METHOD(mm_TLSSock, do_handshake),
METHOD(mm_TLSSock, renegotiate),
+#if 0
METHOD(mm_TLSSock, get_num_renegotiations),
+#endif
{ NULL, NULL }
};