It looks like Bitdefender is the root of the problem. I disabled SSL scanning and I was able to connect to my router with HTTPS. Then I installed certificate generated by router to Windows 10 CA Root store and then I was able to use HTTPS.
So it is most probably some problems with Bitdefender.