bugfix in certificate management, add str() conversion for safety