Fixed updating certificate for KeyPair