💾 Archived View for envs.net › ~juhani › minigem › 20200706-minigem-notes.gmi captured on 2022-04-29 at 11:02:18. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-10-31)
-=-=-=-=-=-=-
2020-07-06
Implemented gemini client and cert storage on which to build TOFU. The client took exactly 100 lines of code :)
Dart feels a lot like typescript but lexical binding makes it much nicer to work with.
Unit tests are easy to write but runtime environments caused some trouble. Tests that depend on android platform cannot run in the development enviroment. Instead they must built, uploaded to simulator and run there, using cli (flutter run test/store_test.dart). And you cannot access network, other that localhost, in the development environment. Of course you shouldn't use external resources in unit tests, but still...
Accepting self-signed certs requires specifying onBadCertificate handler. All responsibility about accepting cert is handed over to the handler, and it must explicitly check validity period and hostname.