save server cert fingerprint for later use
reorder command-related code (no functional change)