<!--
{
  "availability" : [
    "macOS: 10.7.0 - 10.12.4"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecCertificateCopyNormalizedSubjectContent(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecCertificateCopyNormalizedSubjectContent"
  },
  "title" : "SecCertificateCopyNormalizedSubjectContent(_:_:)"
}
-->

# SecCertificateCopyNormalizedSubjectContent(_:_:)

Returns a normalized copy of the distinguished name (DN) of the subject of a certificate.

```
func SecCertificateCopyNormalizedSubjectContent(_ certificate: SecCertificate, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> CFData?
```

## Parameters

`certificate`

The certificate from which the subject’s distinguished name should be copied.

`error`

A pointer to a <doc://com.apple.documentation/documentation/CoreFoundation/CFError> variable where an error object is stored upon failure. If not `NULL`, the caller is responsible for checking this variable and releasing the resulting object if it exists.

## Return Value

A data object containing a DER-encoded X.509 distinguished name suitable for use with [`SecItemCopyMatching(_:_:)`](/documentation/Security/SecItemCopyMatching(_:_:)). Returns `NULL` if an error occurred. In Objective-C, free this object with a call to the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function when you are done with it.

## Discussion

To obtain a copy of the subject’s distinguished name in a format suitable for display purposes, call [`SecCertificateCopyValues(_:_:_:)`](/documentation/Security/SecCertificateCopyValues(_:_:_:)) instead.

---

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)