fix warnings
crypto: make cert accessible for now
fix more warnings
Fix OS X build.