|
d95b4c3089
|
Return from addrbook_load if a file is empty.
|
2024-03-28 18:03:41 +04:00 |
|
|
a2e0694efc
|
Fixed memory allocation for addrbook_t. Ditched a separate init function and moved allocation to add func. Added a variable to store the capacity of an array.
|
2024-03-28 17:52:14 +04:00 |
|
|
c468363efb
|
Okay, current state of the addrbook. And it is... Segmentation fault! xD
|
2024-03-28 04:19:29 +04:00 |
|
|
c8d69f23bc
|
Print an incoming pub key.
|
2024-03-26 18:14:38 +04:00 |
|
|
9e9b0ba047
|
Reorganised the main() func.
|
2024-03-26 17:44:35 +04:00 |
|
|
de1d4085b9
|
Move a common handshake stage in a separate func.
|
2024-03-26 17:21:37 +04:00 |
|
|
5e45b95fdf
|
Remove includes that are implicitely included.
|
2024-03-26 17:21:00 +04:00 |
|
|
722baa7da3
|
In a server handshake initialise all the shit before sending our hello.
|
2024-03-26 04:59:24 +04:00 |
|
|
2680674c71
|
Fixed usage. Didn't notice before.
|
2024-03-26 04:54:18 +04:00 |
|
|
6d9596e1d0
|
Oops... Theses are no longer needed. :)
|
2024-03-26 04:52:48 +04:00 |
|
|
b06d955f98
|
A proper handshake was implemented.
|
2024-03-26 04:51:31 +04:00 |
|
|
ccca06e70f
|
An actually working handshake example in a main().
|
2024-03-25 05:03:46 +04:00 |
|
|
5174c2685e
|
Just set an s->remote_key pointer to NULL, do not call crypt_key_destroy on it.
|
2024-03-25 05:02:59 +04:00 |
|
|
b225b63cdf
|
In net.c sockaddr structures' had their *_len fields set to 0, so recvfrom didn't fill an inaddr field.
|
2024-03-25 05:02:05 +04:00 |
|
|
58c3b3fada
|
A handshake fix in main(): No, actually, NOW we're secure. :)
|
2024-03-25 03:59:38 +04:00 |
|
|
92d7659306
|
Keep on using a main() func for testing. Now a secure connection instantiation was completed. Yay!
|
2024-03-25 03:53:55 +04:00 |
|
|
c72eca2ad8
|
Made separate streams for in and out sound. WIll be very handy for muting a microphone and your companion.
|
2024-03-25 01:05:29 +04:00 |
|
|
d9cc37896f
|
Add the empty lines at the end of the sources so clang won't whine and compile. :)
|
2024-03-25 00:56:42 +04:00 |
|
|
174f0df1d4
|
Test net module in main.
|
2024-03-24 20:14:16 +04:00 |
|
|
42d801f05d
|
A net module was rewritten to support both IPv4 and IPv6.
|
2024-03-24 19:45:25 +04:00 |
|
|
58645aae4b
|
In order to support both IPv4 and IPv6 store a type struct sockaddr. Also remove specifying af_family as an arg. It will be determined using a getaddrinfo() func.
|
2024-03-24 19:38:00 +04:00 |
|
|
b9b82a0e26
|
Return a number of bytes read or sent.
|
2024-03-24 17:55:39 +04:00 |
|
|
6990664f2f
|
In net_send() remove a const modifier from buf_len. In net_recv() a const modifier was added to a pointer to buf.
|
2024-03-24 16:50:49 +04:00 |
|
|
ba3a87ab4f
|
An unneeded include of sys/socket.h was removed. It is implicitely included in netinet/in.h.
|
2024-03-24 16:41:22 +04:00 |
|
|
43d5bdfe80
|
In net_send() check if an raddr struct is set.
|
2024-03-24 16:35:04 +04:00 |
|
|
e5c6f23cfb
|
A buffer was removed from a struct net_t. Use external buffer for data receiving. net_sendto -> net_send and net_recvfrom -> net_recv.
|
2024-03-24 16:31:10 +04:00 |
|
|
842659e879
|
Remove useless comments.
|
2024-03-24 14:08:13 +04:00 |
|
|
b04fbeb34e
|
Let's uncomment a code for audio and put an encryption in it.
|
2024-03-24 06:05:01 +04:00 |
|
|
0c61d4e433
|
Changed a crypt_hello_get_nonce func because now a half of a nonce is placed after a pub key and before a signature.
|
2024-03-24 05:56:30 +04:00 |
|
|
944a81a8bf
|
Let's swap a signature and a half of a nonce. And sign both a pub key and the half of a nonce.
|
2024-03-24 05:52:19 +04:00 |
|
|
1afd678fd4
|
Let's put some pointer safety. Like checks for NULL and actually freeing them in case of errors.
|
2024-03-24 05:35:39 +04:00 |
|
|
16e0149802
|
Replace '< 0' with '== -1'. For the sake of optimisation! xD
|
2024-03-24 05:32:46 +04:00 |
|
|
e4b388f554
|
An include messup was cleaned.
|
2024-03-24 05:06:13 +04:00 |
|
|
3b68835c9c
|
Oh, because of goto used some var can never be presented, so lets move them right before the first use of a goto.
|
2024-03-24 04:56:02 +04:00 |
|
|
98581204e9
|
Well, actually, let a crypt_hello_get_nonce func return just a "unsigned char *" without a const modifier.
|
2024-03-24 04:54:59 +04:00 |
|
|
8df5a6344e
|
Another change of main to show an example of key exchange and data encryption.
|
2024-03-24 04:41:08 +04:00 |
|
|
acc016f10b
|
crypt_session_encrypt() and crypt_session_decrypt() was implemented.
|
2024-03-24 04:38:32 +04:00 |
|
|
3ec30111e2
|
Removed an absolutely clueless const modifier from a bool argument that was introduced during a usual late night programming session. :)
|
2024-03-24 02:23:57 +04:00 |
|
|
0cdca672a0
|
Now hello has a half of a nonce is being generated. A crypt_hello_get_nonce() func was introduced to make a full-length nonce.
|
2024-03-24 02:18:27 +04:00 |
|
|
61b1992828
|
Put just a touch of pointer magick in a crypt module. Also put const modifiers here and there.
|
2024-03-23 05:52:03 +04:00 |
|
|
2786fb9c87
|
An unused stdlib.h include was removed from net.c.
|
2024-03-23 04:22:36 +04:00 |
|
|
0d47261c51
|
Current state of main.
|
2024-03-23 04:22:01 +04:00 |
|
|
a875891088
|
A crypt module had many changes. *_destroy() funcs were added to securely erase the keys. A set of new defines were introduced to mask the ones from a libsodium. Funcs for load and store the keys in a FILE. Added a crypt_hello() func.
|
2024-03-23 04:21:41 +04:00 |
|
|
b5d92489b8
|
In an audio module: 1) removed a commented out block of code; 2) uint8_t -> unsigned char; 3) size_t -> int; 4) make audio_read() return a number of encoded bytes or -1 on an error.
|
2024-03-23 04:17:19 +04:00 |
|
|
fb9e62fc8b
|
crypt_store_*_key funcs was implemented. Also a test code in a main func comes along.
|
2024-03-22 04:16:43 +04:00 |
|
|
e6c94b64a0
|
First try to implement a network module.
|
2024-03-22 03:50:58 +04:00 |
|
|
051d18ba40
|
In crypt.c/.h a var/arg naming was changed as well.
|
2024-03-22 03:32:40 +04:00 |
|
|
e075a99a28
|
In audio.c/.h arg/var naming style was changed.
|
2024-03-22 03:30:12 +04:00 |
|
|
b233d8bc43
|
Fixed an ifndef in crypt.h.
|
2024-03-22 03:24:01 +04:00 |
|
|
20c99d0540
|
Last main.c.
|
2024-03-21 17:51:03 +04:00 |
|