Enumeration Case

errSecDuplicateItem

The item already exists.

Declaration

errSecDuplicateItem = -25299

Discussion

The system considers an item to be a duplicate for a given keychain when that keychain already has an item of the same class with the same set of composite primary keys. Each class of keychain item has a different set of primary keys, although a few attributes are used in common across all classes. In particular, where applicable, kSecAttrSynchronizable and kSecAttrAccessGroup are part of the set of primary keys. The additional per-class primary keys are listed below:

For generic passwords, the primary keys include kSecAttrAccount and kSecAttrService.

For internet passwords, the primary keys include kSecAttrAccount, kSecAttrSecurityDomain, kSecAttrServer, kSecAttrProtocol, kSecAttrAuthenticationType, kSecAttrPort, and kSecAttrPath.

For certificates, the primary keys include kSecAttrCertificateType, kSecAttrIssuer, and kSecAttrSerialNumber.

For key items, the primary keys include kSecAttrKeyClass, kSecAttrKeyType, kSecAttrApplicationLabel, kSecAttrApplicationTag, kSecAttrKeySizeInBits, and kSecAttrEffectiveKeySize.

For identity items, which are a certificate and a private key bundled together, the primary keys are the same as for a certificate. Because a private key may be certified more than once, the uniqueness of the certificate determines that of the identity.

See Also

Keychain Result Codes

errSecNotAvailable

No trust results are available.

errSecReadOnly

Read-only error.

errSecAuthFailed

Authorization and/or authentication failed.

errSecNoSuchKeychain

The keychain does not exist.

errSecInvalidKeychain

The keychain is not valid.

errSecDuplicateKeychain

A keychain with the same name already exists.

errSecDuplicateCallback

More than one callback of the same name exists.

errSecInvalidCallback

The callback is not valid.

errSecItemNotFound

The item cannot be found.

errSecBufferTooSmall

The buffer is too small.

errSecDataTooLarge

The data is too large for the particular data type.

errSecNoSuchAttr

The attribute does not exist.

errSecInvalidItemRef

The item reference is invalid.

errSecInvalidSearchRef

The search reference is invalid.

errSecNoSuchClass

The keychain item class does not exist.

errSecNoDefaultKeychain

A default keychain does not exist.

errSecInteractionNotAllowed

Interaction with the Security Server is not allowed.

errSecReadOnlyAttr

The attribute is read-only.

errSecWrongSecVersion

The version is incorrect.

errSecKeySizeNotAllowed

The key size is not allowed.

errSecNoStorageModule

There is no storage module available.

errSecNoCertificateModule

There is no certificate module available.

errSecNoPolicyModule

There is no policy module available.

errSecInteractionRequired

User interaction is required.

errSecDataNotAvailable

The data is not available.

errSecDataNotModifiable

The data is not modifiable.

errSecCreateChainFailed

The attempt to create a certificate chain failed.

errSecInvalidPrefsDomain

The preference domain specified is invalid.

errSecInDarkWake

The user interface cannot be displayed because the system is in a dark wake state.