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

# SSLGetAllowsAnyRoot

Obtains a value specifying whether an unknown root is allowed.

```
OSStatus SSLGetAllowsAnyRoot(SSLContextRef context, Boolean *anyRoot);
```

## Parameters

`context`

An SSL session context reference.

`anyRoot`

On return, a Boolean indicating the current setting of the `anyRoot` flag.

## Return Value

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

## Discussion

Use the [`SSLSetAllowsAnyRoot`](/documentation/Security/SSLSetAllowsAnyRoot) function to set the value of the `anyRoot` flag. The effect and meaning of this flag is described in the discussion of the [`SSLSetAllowsAnyRoot`](/documentation/Security/SSLSetAllowsAnyRoot) function.

---

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)