Networking

Compiling with libcurl

Hello guys,
I am implementing an app where currently I am using sockets to get data from urls. It works fine but I thought that using libCurl might be a better, faster solution. So I downloaded the libCurl from os4depot and installed it using the autoinstall script.

For a test tried to compile the a simple code found at
https://raw.githubusercontent.com/curl/curl/master/docs/examples/simple.c

I use the following to compile it
gcc -D__USE_INLINE__ -Wall simple.c -o simple -lcurl -lauto

but I am getting a lot of undefined references like below.

Forums: 

Anyone successfully used AmiSSL v4.3?

I'm using AmiSSL v4.3 with code and SSL certificates that work fine under Cygwin (with OpenSSL 1.1.1b). With AmiSSL, connections fail with:

TLS-error:SSL routines:tls_early_post_process_client_hello:no shared cipher

This happens with both RSA and EC certificates, and it's infuriating. No tweaks of the settings work. In fact, I get the same failure even if I use openssl's built-in s_server:
openssl s_server -key test.key -cert test.crt -verify 0 -accept 443 -WWW verify depth is 0

That also results in the same failure when a browser tries to connect.

Forums: 

Getting the computer's hostname as seen by the network

How do we get the local machine's hostname as seen by the rest of the network?

Annoyingly, gethostname() returns "localhost," which is useless, as does gethostbyname() and uname().

What I actually want is the hostname RoadShow registers with the DHCP server, and that Avast's Wifi Inspector detects when it scans the network. That is, I want the name that other computers on the LAN could use to identify the machine.

Hans

Forums: 

How do we choose between bsdsocket.library's functions and newlib's?

How do we choose between bsdsocket.library's functions and newlib's? Given that most of the functions are the same, how do we tell the compiler to choose one over the other?

I've got some networking code, but currently can't even tell whether it's via newlib or bsdsocket.library. It matters which one, because AmiSSL can only be used with file descriptors from bsdsocket.library.

Hans

Forums: 

Https server and android

Hello, i've done a small https server on AmigaOS4.1FE to serve a small Page and process the resulting POST queries, but when i connect from an android phone the first ssl_read() only returns 0 or 1 char.
The certificates i have are autosigned, and the browser complains about It, but i can Connect from Odyssey just fine, but from android i don't get the reply.

Forums: 

Using OAUTH and AmiSSL?

Hi everybody,

I'm playing around with OAuth at the moment. I want to write a very simple Twitter program (just as an exercise as much as anything), and I need OAUTH to authenticate myself. I know there are other ways, but I want to be as close to the "official" way as possible, so it's less likely it'll break in the future.

When I use a liboauth function, I compile with -loauth (of course). I then get loads of undefined references to functions such as RAND_bytes.

Adding -lcurl and -lamisslauto does nothing to help these undefined references.

Forums: 

IP address of a certain network interface [SOLVED]

According to bsdsocket.doc autodoc, the following should retrieve the IP address associated with a certain network interface.

ISocket->QueryInterfaceTags()
IFQ_Address (struct sockaddr *)

struct sockaddr {
u_char sa_len;
u_char sa_family;
char sa_data[14];
};

1) How the IP address value is returned?
2) Is it possible that a statically set IP address is unknown to its configured network interface?

Forums: 

Pages

Subscribe to RSS - Networking