NSURLRequest+SRWebSocket.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Copyright 2012 Square Inc.
  3. // Portions Copyright (c) 2016-present, Facebook, Inc.
  4. //
  5. // All rights reserved.
  6. //
  7. // This source code is licensed under the BSD-style license found in the
  8. // LICENSE file in the root directory of this source tree. An additional grant
  9. // of patent rights can be found in the PATENTS file in the same directory.
  10. //
  11. #import <Foundation/Foundation.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. @interface NSURLRequest (SRWebSocket)
  14. /**
  15. An array of pinned `SecCertificateRef` SSL certificates that `SRWebSocket` will use for validation.
  16. */
  17. @property (nullable, nonatomic, copy, readonly) NSArray *SR_SSLPinnedCertificates
  18. DEPRECATED_MSG_ATTRIBUTE("Using pinned certificates is neither secure nor supported in SocketRocket, "
  19. "and leads to security issues. Please use a proper, trust chain validated certificate.");
  20. @end
  21. @interface NSMutableURLRequest (SRWebSocket)
  22. /**
  23. An array of pinned `SecCertificateRef` SSL certificates that `SRWebSocket` will use for validation.
  24. */
  25. @property (nullable, nonatomic, copy) NSArray *SR_SSLPinnedCertificates
  26. DEPRECATED_MSG_ATTRIBUTE("Using pinned certificates is neither secure nor supported in SocketRocket, "
  27. "and leads to security issues. Please use a proper, trust chain validated certificate.");
  28. @end
  29. NS_ASSUME_NONNULL_END