Live data from Hacker News

A TLS 1.3 stack written in Visual Basic 6

github.com

51–60 of 101 posts

Re: A TLS 1.3 stack written in Visual Basic 6

#51
post #10

Earlier quoted context omitted.

The big lines of code in TLS is x.509 certificate parsing, and supporting multiple protocols. If you just want 1.3 and you've got existing cipher and certificate validation libraries to call, it's not too bad. There's some published test vectors to help you get the cipher setup right as well; it gets fiddly, but it's not going to be a lot of code unless you have an Object Extravaganza, and even then, still not too ba…

I implemented TLS without any external deps by supporting only mandatory stuff from the RFC specifications. DER parsing here: https://github.com/mateuszb/tls1.3/blob/master/der.lisp Elliptic curves here: https://github.com/mateuszb/tls1.3/blob/master/elliptic-curv... Protocol records: https://github.com/mateuszb/tls1.3/blob/master/record.lisp At the time I implemented TLS1.3 there was very little support for it and i…

I don't know much Lisp, but your code is wonderfully readable! Great job!

Re: A TLS 1.3 stack written in Visual Basic 6

#52

This is probably the cleanest VB 6 I've seen. Do notice Option Explicit. That is like disabling 90% of the magic that causes unmaintainable code.

The IDE has a setting to always turn it on for new projects. That was a setting I always enabled on new installs. Along with a switch to use SDI instead of MDI.

> Along with a switch to use SDI instead of MDI.

You monster!

Re: A TLS 1.3 stack written in Visual Basic 6

#53

Ah,VB6 - that's how I started programming. There was a book literally called "Visual Basic for Kids" and I got it when I was....12? I think? Anyway it got me into making all kinds of basic games, then I started reading books about C and C++, started programming for the Playstation Portable, went to university to study CS and got a job in the games industry after that. I 100% credit Visual Basic 6 for me being a progr…

+1

VB6 was part of my Year 10, 11 & 12 software design and development class at school similarly was my first start as a programmer. I remember one of my first major projects was a sudoku solver :)

In fact, I still have the 1300 page 'Mastering Visual Basic 6' book on my bookshelf as a reminder some 15 years later.

Re: A TLS 1.3 stack written in Visual Basic 6

#55

This is probably the cleanest VB 6 I've seen. Do notice Option Explicit. That is like disabling 90% of the magic that causes unmaintainable code.

I remember the feeling when you see a module and it has an "On Error Resume Next" at the start.

Re: A TLS 1.3 stack written in Visual Basic 6

#57
post #29

Are there still working and available ide and compilers for vb6? Any open source ones? After working on vba for MSAccess for a few years I came to both appreciate and hate it. It’s fast, small in features compared to modern languages, but a pleasure to hack around and find ways to expand its capabilities. I made simple ORM with it, autogenerating classes from a database, went into the rabbit hole of modernising the d…

I heard GAMBAS is one. Not tried it. Was mentioned on HN recently and in the past too.

Re: A TLS 1.3 stack written in Visual Basic 6

#58
post #55

This is probably the cleanest VB 6 I've seen. Do notice Option Explicit. That is like disabling 90% of the magic that causes unmaintainable code.

I remember the feeling when you see a module and it has an "On Error Resume Next" at the start.

That’s basically how shell scripts behave by default. At least in VB it’s not the default.

Re: A TLS 1.3 stack written in Visual Basic 6

#60
post #54

Kids today will never know the joy of "On Error Resume Next"

It's called try { doSomething(); } catch(e) {} these days. :)

I'm still programming in VBA today. I name the error handling labels try: and catch: and finally: :). My attempt to introduce some modernity into the language (the'try:'-label is obviously obsolete and is a mere indicator).
Post reply on HN