mini-curl
Description
mini-curl is a self-contained mini HTTPS client with a curl-style command interface, written in C/CPP. It is a command-line HTTP/HTTPS client replicating the interface of the popular curl utility.
The project is self-contained: all networking and cryptography is provided by the built-in crypery library (a pure C/C++ network stack); the only external dependency is zlib (optional, for gzip decompression). The client works with both plain HTTP and HTTPS (TLS 1.2/1.3). All crypto algorithms are implemented from scratch inside the crypery library - OpenSSL and other external crypto libraries are not used.
Modules used
- crypery/tls - base crypto layer: pure C TLS 1.2/1.3 implementation (AES-128-GCM, SHA-256, HMAC-SHA256, HKDF, RSA-2048, ECDH P-256/X25519, X.509 certificates)
- crypery/ssl - OpenSSL-compatible API layer over the built-in TLS: handshake, encrypted socket I/O, timeouts, certificate verification
- crypery/url - HTTP/HTTPS client library: URL parsing, HTTP/1.1 requests, response reading (Content-Length, chunked), redirects, multipart forms, DNS resolving, connect with timeout
- zlib - optional library for decompressing gzipped responses
Technologies
- C/CPP - client code
- crypery - built-in networking and crypto library: TLS 1.2/1.3 (AES-128-GCM, SHA-256, HMAC-SHA256, HKDF, RSA-2048, ECDH P-256/X25519, X.509 certificates), OpenSSL-compatible API, HTTP/HTTPS client
- zlib - optional, for gzip decompression
- Windows (MinGW, Winsock) and Unix-like systems (BSD sockets)
- GCC / MinGW-w64, build script build_curl.bat (-O2)