guard sslengine with a lock to prevent calling wrap and unwrap at the same time