<!--
{
  "availability" : [
    "macOS: 10.2.0 - 10.9.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SSLGetAllowsExpiredRoots",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SSLGetAllowsExpiredRoots"
  },
  "title" : "SSLGetAllowsExpiredRoots"
}
-->

# SSLGetAllowsExpiredRoots

Retrieves the value indicating whether expired roots are allowed.

```
OSStatus SSLGetAllowsExpiredRoots(SSLContextRef context, Boolean *allowsExpired);
```

## Parameters

`context`

An SSL session context reference.

`allowsExpired`

On return, points to a Boolean value indicating whether expired roots are allowed. If this value is `true`, no errors are returned if the certificate chain ends in an expired root.

## Return Value

A result code. See [Secure Transport Result Codes](/documentation/Security/secure-transport-result-codes).

## Discussion

Use the [`SSLSetAllowsExpiredRoots`](/documentation/Security/SSLSetAllowsExpiredRoots) function to change the setting of the `allowsExpired` flag.

---

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)