Browse code

core: move existing MD5 hash implementation into new core subfolder crypto

Henning Westerholt authored on 02/10/2019 22:11:37
Showing 10 changed files
... ...
@@ -15,6 +15,7 @@ sources=$(filter-out $(auto_gen), $(wildcard *.c) \
15 15
 		$(wildcard core/parser/*.c) $(wildcard core/parser/digest/*.c) \
16 16
 		$(wildcard core/parser/contact/*.c) $(wildcard core/parser/sdp/*.c) \
17 17
 		$(wildcard core/rand/*.c) $(wildcard core/rand/isaac/*.c) ) \
18
+		$(wildcard core/crypto/*.c) \
18 19
 		$(wildcard core/cfg/*.c) $(auto_gen)
19 20
 ifeq ($(CORE_TLS), 1)
20 21
 	sources+= $(wildcard tls/*.c)
... ...
@@ -29,7 +29,7 @@
29 29
 #include "parser/msg_parser.h"
30 30
 #include "parser/parse_to.h"
31 31
 #include "parser/parse_from.h"
32
-#include "md5utils.h"
32
+#include "crypto/md5utils.h"
33 33
 
34 34
 /*! \brief calculate characteristic value of a message -- this value
35 35
    is used to identify a transaction during the process of
... ...
@@ -35,6 +35,8 @@
35 35
 #ifndef config_h
36 36
 #define config_h
37 37
 
38
+#include "crypto/md5utils.h"
39
+
38 40
 #define SIP_PORT  5060 /*!< default SIP port if none specified */
39 41
 #define SIPS_PORT 5061 /*!< default SIP port for TLS if none specified */
40 42
 
41 43
similarity index 99%
42 44
rename from src/core/md5.c
43 45
rename to src/core/crypto/md5.c
... ...
@@ -20,7 +20,7 @@
20 20
 #include <sys/types.h>
21 21
 #include <string.h>
22 22
 
23
-#include "endianness.h"
23
+#include "../endianness.h"
24 24
 #include "md5.h"
25 25
 
26 26
 #ifndef __OS_solaris
27 27
similarity index 100%
28 28
rename from src/core/md5.h
29 29
rename to src/core/crypto/md5.h
30 30
similarity index 97%
31 31
rename from src/core/md5utils.c
32 32
rename to src/core/crypto/md5utils.c
... ...
@@ -33,8 +33,8 @@
33 33
 #include <string.h>
34 34
 #include "md5.h"
35 35
 #include "md5utils.h"
36
-#include "dprint.h"
37
-#include "ut.h"
36
+#include "../dprint.h"
37
+#include "../ut.h"
38 38
 
39 39
 
40 40
 /*!
41 41
similarity index 98%
42 42
rename from src/core/md5utils.h
43 43
rename to src/core/crypto/md5utils.h
... ...
@@ -28,7 +28,7 @@
28 28
 #ifndef _MD5UTILS_H
29 29
 #define _MD5UTILS_H
30 30
 
31
-#include "str.h"
31
+#include "../str.h"
32 32
 
33 33
 #define MD5_LEN	32
34 34
 
... ...
@@ -50,6 +50,7 @@
50 50
 #include "data_lump.h"
51 51
 #include "ut.h"
52 52
 #include "mem/mem.h"
53
+#include "crypto/md5utils.h"
53 54
 #include "msg_translator.h"
54 55
 #include "sr_module.h"
55 56
 #include "ip_addr.h"
... ...
@@ -91,7 +91,6 @@
91 91
 #include "mem/mem.h"
92 92
 #include "dprint.h"
93 93
 #include "config.h"
94
-#include "md5utils.h"
95 94
 #include "data_lump.h"
96 95
 #include "data_lump_rpl.h"
97 96
 #include "ip_addr.h"
... ...
@@ -35,7 +35,6 @@
35 35
 #include "../lump_struct.h"
36 36
 #include "../flags.h"
37 37
 #include "../ip_addr.h"
38
-#include "../md5utils.h"
39 38
 #include "../config.h"
40 39
 #include "parse_def.h"
41 40
 #include "parse_cseq.h"