No video

Making Minimalist HTTPS Client in C on Linux

  Рет қаралды 13,812

Nir Lichtman

Nir Lichtman

Күн бұрын

I this video I will demonstrate how to create a simple HTTPS client in C using the Socket API and OpenSSL library.
You can install the OpenSSL dependencies (libraries and man pages) using the following command on Ubuntu/Debian:
apt install libssl-dev libssl-doc
For other distros, check out the corresponding OpenSSL library packages names
You can view the code I wrote in the video over here: github.com/nir...

Пікірлер: 69
@Kabodanki
@Kabodanki 8 ай бұрын
I love how your video doesn't jump everywhere all the times
@littlecurrybread
@littlecurrybread 8 ай бұрын
I’m loving this c stuff. Would love to see more in this vein.
@utvikler-no
@utvikler-no 8 ай бұрын
This is incredible good stuff for developing small IOT devices that should listen to or read settings or logs from other devices Thanks!
@JonathanNelson-nelsonj3
@JonathanNelson-nelsonj3 4 ай бұрын
Thank you for these videos. As a developer with a Java shaped brain these are just what I have needed to get into C coding.
@silakanveli
@silakanveli 8 ай бұрын
Please make video about pointers and why they are used. You have such a great way to explain concepts!
@nirlichtman
@nirlichtman 8 ай бұрын
That is a good idea for a short, thanks :)
@dazealex
@dazealex 8 ай бұрын
What a cool way of making a video on this. Super easy to follow. Love it!
@Jonathan-ru9zl
@Jonathan-ru9zl 4 ай бұрын
Great content! Please consider making a video about the differences between TCP and UDP
@nirlichtman
@nirlichtman 4 ай бұрын
I will add to my list :)
@sirk3v
@sirk3v 8 ай бұрын
when you call man on a command, ....where is the documentation comming from, is "C" inbuilt in linux? noob question
@abulaman8713
@abulaman8713 8 ай бұрын
Yes it is
@hoteny
@hoteny 8 ай бұрын
@@abulaman8713 is the definition of ”most helpful linux user”
@sputnick1
@sputnick1 8 ай бұрын
its a program called man and he is looking at the postix c man pages (i think, not quite sure). You should install man and the respective man pages for whatever you need
@rajatmond
@rajatmond 8 ай бұрын
It depends on how you install the libraries. You can create your own manpage. I guess most installation script contains a part that also creates manpages. Linux OS written in c so even though you don't have a compiler by default, most system c APIs will have manpages by default.
@GearAddict90210
@GearAddict90210 8 ай бұрын
Man was not working out of the box on arch Linux, I think installed the manpages package to get it. I think Ubuntu etc. Have it installed from the start.
@pianissimo7121
@pianissimo7121 8 ай бұрын
Man linux seems to much better than windows. I am really new to programming and stuff, will install linux this weekend or sometime.
@nirlichtman
@nirlichtman 8 ай бұрын
I actually like both Windows and Linux so my setup is actually Debian Linux running on top of Windows using WSL
@junkmeal7292
@junkmeal7292 8 ай бұрын
Great video! It would also be nice if you made a video about DNS; so we can have a full fledged https client with domain name resolution
@sirk3v
@sirk3v 8 ай бұрын
broo, I have barely started on your first video, take it easy yoh...also any tips on how you manage your time or how to move fast like you would be highly appreciated, just like the videos...great work...truly god sent....(algorithim sent)
@dailydoseofshtposts6891
@dailydoseofshtposts6891 8 ай бұрын
cant belive i was just looking for this
@godlyradmehr2004
@godlyradmehr2004 8 ай бұрын
One of the best and practical video's that I've seen❤❤❤ nice bro
@tapiomakinen
@tapiomakinen 8 ай бұрын
Love your stuff and style. Thanks for sharing!
@MadMathMike
@MadMathMike 8 ай бұрын
You're the type of programmer I want to be when I grow up (I'm 37... 😂).
@GearAddict90210
@GearAddict90210 8 ай бұрын
Very handy information to have, thanks for the video!
@ikhlasulkamal5245
@ikhlasulkamal5245 8 ай бұрын
Great video, very practical and informative xD
@uzumakiuchiha7678
@uzumakiuchiha7678 8 ай бұрын
Wow that was a lot of good new information. Thank You
@Kar7ik28
@Kar7ik28 8 ай бұрын
Great video man!!!! if possible can you discuss the step by step procedure to do the task instead to writing functions on the go ?
@Stabby666
@Stabby666 8 ай бұрын
He's explaining the steps as he goes. You might want to start on a simpler topic if you haven't tried networking code before. This is pretty straight forward for people with some experience in networking really. The man pages he's using are also available to you, to read more if you need to.
@Kar7ik28
@Kar7ik28 8 ай бұрын
@@Stabby666 i am assuming the tutorial is for beginners. Just discussing the points beforehand rather than going straigh to the code might be more helpful to beginners
@Stabby666
@Stabby666 8 ай бұрын
@@Kar7ik28 I don’t understand what you mean. I think you should have the basic knowledge of how socket connections work from a networking perspective before considering writing code. Is this the part that’s causing confusion? Guess I’m not understanding where you have problems with this.
@et2124
@et2124 8 ай бұрын
Next up: https server in c :)
@mEm__96
@mEm__96 8 ай бұрын
Very, very insightful content ! I also have a question, more a curiosity. I got caught at 4:59 by the long list of autocompletion. Is it the LSP, or something else? Because, it look like the Vim built-in autocompletion functionality, just extended to search into included files. If so, I'd love to know how made it to work like that.
@nirlichtman
@nirlichtman 8 ай бұрын
Actually, it's the built in vim autocomplete (CTRL+N), by default it also searches included files when auto completing, more information about this on ":help 'complete" :)
@OlegKosmakov
@OlegKosmakov 7 ай бұрын
Damn, I thought you'd implement SSL yourself, too :)
@mytechnotalent
@mytechnotalent 8 ай бұрын
hell yes!!! great job!!
@spacewad8745
@spacewad8745 8 ай бұрын
amazing stuff dude
@ItsCOMMANDer_
@ItsCOMMANDer_ 8 ай бұрын
Can you do minimalist https server in c?
@nirlichtman
@nirlichtman 8 ай бұрын
Yes :)
@__hannibaal__
@__hannibaal__ 8 ай бұрын
Good
@andrzejcuber
@andrzejcuber 7 ай бұрын
i wonder if you could create a movie about simple smtp client that would enable send emails from programs in C.
@chegleeff
@chegleeff 8 ай бұрын
I tried to do this on MacOS (M1), but the OpenSSL library is missing ☹
@shivampatel4461
@shivampatel4461 8 ай бұрын
hey , what man pages are you using ? , i am on arch , so it doesn't have installed by default
@nirlichtman
@nirlichtman 8 ай бұрын
On Arch you can install the man-pages package which will include the man pages for system calls and c lib calls as well. For the SSL related man pages you can install the openssl package
@shivampatel4461
@shivampatel4461 8 ай бұрын
thanks@@nirlichtman
@nebulaworld915
@nebulaworld915 8 ай бұрын
Great video!!! But I have a problem here, when I execute "man sockaddr" it says "No manual entry for sockaddr", What is strange is that after I install "manpages-dev glibc-doc manpages-posix manpages-posix-dev ", "No manual entry for sockaddr" is still displayed. Do you have this problem? Or what should I do?
@nirlichtman
@nirlichtman 8 ай бұрын
Thanks! What distro are you using?
@nebulaworld915
@nebulaworld915 8 ай бұрын
Thanks for your replay, my distro is Ubuntu and versions 18.04.6 LTS (Bionic Beaver) and 22.04.3 LTS (Jammy Jellyfish)".@@nirlichtman
@nirlichtman
@nirlichtman 8 ай бұрын
Interesting, supposed to work, do the other manpages exist, for example socket? how about scanf?
@nebulaworld915
@nebulaworld915 8 ай бұрын
Yes, manpages for socket and scanf exist, and executing "man ncurses" after installing "ncurses-doc" is also useful, which is weird.@@nirlichtman
@jamescraft5300
@jamescraft5300 2 ай бұрын
the document has not moved it uses http/3.0
@anon_y_mousse
@anon_y_mousse 8 ай бұрын
The meme version of this would be using wget or curl through the system() function.
@nirlichtman
@nirlichtman 8 ай бұрын
technically still in C 😂😂 I am not sure about wget but I think curl does have a library for C called libcurl that can be used to quickly bring up a https client
@mattia628
@mattia628 8 ай бұрын
Make a video about dhcp
@mattia628
@mattia628 8 ай бұрын
Protocols maybe a discover
@wahffle6729
@wahffle6729 8 ай бұрын
Is there a reason as to why you're sending two CRLFs in your http request? Particularly because you're on linux
@nirlichtman
@nirlichtman 8 ай бұрын
Yes, HTTP protocol works with CRLFs
@wahffle6729
@wahffle6729 8 ай бұрын
Huh, interesting, only ever worked with TCP in C, the more you know. Also, great video, excited to see what you have for us up next.
@aah134-K
@aah134-K 8 ай бұрын
Super
@gaeshows1938
@gaeshows1938 8 ай бұрын
void main wtf?
@BennyPowers
@BennyPowers 8 ай бұрын
סחתיין מלך
@nirlichtman
@nirlichtman 8 ай бұрын
תודה!
@grijjly6091
@grijjly6091 7 ай бұрын
reading 1023 byte is mistake or trick ?
@nirlichtman
@nirlichtman 7 ай бұрын
It is on purpose; it makes sure that the buffer always ends with a null terminator (since I initialize the whole buffer with zeros, I read one less than the buffer length to always keep a zero in the end)
@grijjly6091
@grijjly6091 7 ай бұрын
@@nirlichtman okay but why ?
@nirlichtman
@nirlichtman 7 ай бұрын
@@grijjly6091 it is a good practice to leave a null terminator in the end in buffers you plan to treat as strings, to minimize the risk of string functions like strchr for example continuing beyond the buffer limits, I will talks about this among other tips on a future vid
Making Minimalist Snake Game in C on Linux
8:01
Nir Lichtman
Рет қаралды 30 М.
Making Minimalist HTTPS Server in C on Linux
16:11
Nir Lichtman
Рет қаралды 18 М.
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 30 МЛН
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 2,1 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 168 МЛН
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 14 МЛН
The Importance of Error Handling in C
8:18
Nir Lichtman
Рет қаралды 30 М.
Making Minimalist Chat Server in C on Linux
14:28
Nir Lichtman
Рет қаралды 41 М.
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 273 М.
Making Simple Graphical Linux Distro from Scratch
17:19
Nir Lichtman
Рет қаралды 58 М.
I forced EVERYONE to use Linux
22:59
NetworkChuck
Рет қаралды 475 М.
you need to stop using print debugging (do THIS instead)
7:07
Low Level Learning
Рет қаралды 430 М.
Creator of git, Linus Torvalds Presents the Fundamentals of git
1:10:15
Developers Alliance
Рет қаралды 83 М.
Making Minimalist Web Server in C on Windows
10:52
Nir Lichtman
Рет қаралды 9 М.
The 12 Linux Apps Everyone Should Know About
21:20
DistroTube
Рет қаралды 462 М.
Every programming language explained in 15 minutes | Prime Reacts
43:42
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 30 МЛН