forked from aqbanking/gwenhywfar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
106 lines (71 loc) · 2.21 KB
/
TODO
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
idList64:
- add GWEN_IdList64_dup()
modtest:
- create a new module test
- use logger hook
- allow submodule tests
sio:
- ssl_cert_descr -> typemaker2
tm2:
- inline loc="struct" -> insert fields into the struct definition
- inline loc="constructor": -> insert code into constructor
- inline loc="destructor": -> insert code into constructor
-> or maybe: make the field definition also a part of the tm2 mechanisms
already in place (i.e. defined in tm2 files?)
xml:
- add argument to file reader/writer code which contains the target
encoding
Get root CA certs:
http://curl.haxx.se/docs/caextract.html
# get a list of exported functions:
nm libgwenhywfar.so | grep ' T ' | awk '{ print $3 }' | less
# or
nm libgwenhywfar.so | grep ' T ' | cut -c20- | sort
# get a list of functions imported from other libraries
nm libgwenhywfar.so | grep ' U ' | awk '{ print $2 }' | less
# or
nm libgwenhywfar.so | grep ' U ' | cut -c20- | sort | uniq
Callgraphs
- Generate callgraphs:
make CC=/usr/gccgraph/bin/gcc
C : genfull
C++: genfull -g cppdepn
- Show callgraph for s specific function:
gengraph -f FUNCTION_NAME -o OUTFILENAME --output-type=png
# read openssl certs
d = opendir("/etc/ssl/certs");
gnutls_certificate_allocate_credentials(&ca_list);
while ((dent = readdir(d)) != NULL) {
sprintf(ca_file, "/etc/ssl/certs/%s", dent->d_name);
stat(ca_file, &s);
if (!S_ISREG(s.st_mode)) continue;
gnutls_certificate_set_x509_trust_file(ca_list, ca_file,
GNUTLS_X509_FMT_PEM);
}
closedir(d);
0 10
1 19
2 35
3 67
4 91
5 115
6 247
insert 39
total 7
1. 0???: pos 0:10, smaller, set to 1, okay? no, keep at 0
2. 00??: pos 0:10, smaller, set to 1, okay? yes, set to 1
3. 010?: pos 4: 81, bigger, set to 0
4. 0100: pos 4: 81, bigger, set to 0
-> 4: insert before position 4
# approach: determine the highest entry smaller than the new value
1. 1???: pos 8: overflow, set to 0
2. 01??: pos 4: 91, bigger, set to 0
3. 001?: pos 2: 35, smaller, keep at 1
4. 0011: pos 3: 67, bigger, set to 0
-> 0010: 2 (+1 is the position)
insert 75
1. 1???: pos 8, overflow ->0
2. 01??: pos 4: 91, bigger ->0
3. 001?: pos 2: 35, smaller ->1
4. 0011: pos 3: 67, smaller ->1
-> 0011: 3 (+1 is the position)