Handle secure connection with certificate