most of the move over to cert pinning

this code does not build