Package: tcltrf / 2.1.4-dfsg3-8

ssl_static.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Patch (a quick hack actually) together with two lines in debian/rules
allows to link libcrypto at build time (not using dl_open at runtime).

--- a/generic/loadman.c
+++ b/generic/loadman.c
@@ -134,6 +134,13 @@
 TrfLoadMD2 (interp)
     Tcl_Interp* interp;
 {
+#ifdef SSL_STATIC_BUILD
+  md2f.loaded = 1;
+  md2f.init   = MD2_Init;
+  md2f.update = MD2_Update;
+  md2f.final  = MD2_Final;
+  return TCL_OK;
+#else
   int res;
 
   TrfLock; /* THREADING: serialize initialization */
@@ -161,6 +168,7 @@
 
   TrfUnlock;
   return TCL_ERROR;
+#endif
 }
 
 /*
@@ -234,6 +242,13 @@
 TrfLoadSHA1 (interp)
     Tcl_Interp* interp;
 {
+#ifdef SSL_STATIC_BUILD
+  sha1f.loaded = 1;
+  sha1f.init   = SHA1_Init;
+  sha1f.update = SHA1_Update;
+  sha1f.final  = SHA1_Final;
+  return TCL_OK;
+#else
   int res;
 
   TrfLock; /* THREADING: serialize initialization */
@@ -261,5 +276,6 @@
 
   TrfUnlock;
   return TCL_ERROR;
+#endif
 }
 
--- a/generic/loadman.h
+++ b/generic/loadman.h
@@ -102,8 +102,8 @@
 typedef struct Md2Functions {
   long loaded;
   void (* init)   _ANSI_ARGS_ ((MD2_CTX* c));
-  void (* update) _ANSI_ARGS_ ((MD2_CTX* c, unsigned char* data,
-				unsigned long length));
+  void (* update) _ANSI_ARGS_ ((MD2_CTX* c, const unsigned char* data,
+				size_t length));
   void (* final)  _ANSI_ARGS_ ((unsigned char* digest, MD2_CTX* c));
 } md2Functions;
 
@@ -112,18 +112,18 @@
   void (* init)   __P ((MD5_CTX* c));
   void (* update) __P ((MD5_CTX* c, unsigned char* data,
 				unsigned long length));
-  void* (* final)  __P ((unsigned char* digest, MD5_CTX* c));
+  void (* final)  __P ((unsigned char* digest, MD5_CTX* c));
 
-  const char* (* crypt) _ANSI_ARGS_ ((const char* key, const char* salt));
+  char* (* crypt) _ANSI_ARGS_ ((const char* key, const char* salt));
 
 } md5Functions;
 
 typedef struct Sha1Functions {
   long loaded;
-  void (* init)   _ANSI_ARGS_ ((SHA_CTX* c));
-  void (* update) _ANSI_ARGS_ ((SHA_CTX* c, unsigned char* data,
-				unsigned long length));
-  void (* final)  _ANSI_ARGS_ ((unsigned char* digest, SHA_CTX* c));
+  int (* init)   _ANSI_ARGS_ ((SHA_CTX* c));
+  int (* update) _ANSI_ARGS_ ((SHA_CTX* c, const void* data,
+				size_t length));
+  int (* final)  _ANSI_ARGS_ ((unsigned char* digest, SHA_CTX* c));
 } sha1Functions;