MAINT: Part migration of nearest neighbour extraction to unit tests
SSL certificate verification workaround.