<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecKeyImportExportParameters/accessRef",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@SA@SecKeyImportExportParameters@FI@accessRef"
  },
  "title" : "accessRef"
}
-->

# accessRef

Specifies the initial access controls of imported private keys.

```
var accessRef: Unmanaged<SecAccess>?
```

## Discussion

If more than one private key is being imported, all private keys get the same initial access controls. If this field is `NULL` when private keys are being imported, then the access object for the keychain item for an imported private key depends on the [`noAccessControl`](/documentation/Security/SecKeyImportExportFlags/noAccessControl) bit in the `flags` parameter. When that flag is `0` (or `keyParams` is `NULL`), the default access control is used. When the flag is `1`, no access object is attached to the keychain item for imported private keys.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)