In this guide, we will discuss one particular scenario during the key import which should be considered to avoid duplicate agent keys.
The OID of KeyManagement object is always "1a-fa347804-9d33-11d3-8025-006008aaae5b". However, the OID of an Agent Key object could be any random value.
Let's consider as sample key export from source Key Store :
and lets check the existing OID of keys in the destination Key Store :
As you can see above, even though the OID for KeyManagement object is same between source and target Key store, the OIDs of Agent Keys are different.
Now, if you import this key store export file in the target key store the final key store after the successful import looks like this :
As you can see above, during the import , the smkeyimport tool updated the existing KeyManagement object as the OID was the same.
However, as the OIDs for the Agent Keys were different, it created the new Agent Keys object resulting in the duplicate set of Agent Keys.