aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/GRPCClient/private')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCSecureChannel.h4
-rw-r--r--src/objective-c/GRPCClient/private/GRPCSecureChannel.m10
2 files changed, 8 insertions, 6 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannel.h b/src/objective-c/GRPCClient/private/GRPCSecureChannel.h
index 74257eb058..3f5f2a58ec 100644
--- a/src/objective-c/GRPCClient/private/GRPCSecureChannel.h
+++ b/src/objective-c/GRPCClient/private/GRPCSecureChannel.h
@@ -35,7 +35,7 @@
#import "GRPCChannel.h"
-struct grpc_credentials;
+struct grpc_channel_credentials;
@interface GRPCSecureChannel : GRPCChannel
- (instancetype)initWithHost:(NSString *)host;
@@ -48,6 +48,6 @@ struct grpc_credentials;
// The passed arguments aren't required to be valid beyond the invocation of this initializer.
- (instancetype)initWithHost:(NSString *)host
- credentials:(struct grpc_credentials *)credentials
+ credentials:(struct grpc_channel_credentials *)credentials
args:(grpc_channel_args *)args NS_DESIGNATED_INITIALIZER;
@end
diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannel.m b/src/objective-c/GRPCClient/private/GRPCSecureChannel.m
index ce16655330..a573c171e9 100644
--- a/src/objective-c/GRPCClient/private/GRPCSecureChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCSecureChannel.m
@@ -37,7 +37,7 @@
// Returns NULL if the file at path couldn't be read. In that case, if errorPtr isn't NULL,
// *errorPtr will be an object describing what went wrong.
-static grpc_credentials *CertificatesAtPath(NSString *path, NSError **errorPtr) {
+static grpc_channel_credentials *CertificatesAtPath(NSString *path, NSError **errorPtr) {
// Files in PEM format can have non-ASCII characters in their comments (e.g. for the name of the
// issuer). Load them as UTF8 and produce an ASCII equivalent.
NSString *contentInUTF8 = [NSString stringWithContentsOfFile:path
@@ -62,7 +62,7 @@ static grpc_credentials *CertificatesAtPath(NSString *path, NSError **errorPtr)
pathToCertificates:(NSString *)path
hostNameOverride:(NSString *)hostNameOverride {
// Load default SSL certificates once.
- static grpc_credentials *kDefaultCertificates;
+ static grpc_channel_credentials *kDefaultCertificates;
static dispatch_once_t loading;
dispatch_once(&loading, ^{
NSString *defaultPath = @"gRPCCertificates.bundle/roots"; // .pem
@@ -79,7 +79,9 @@ static grpc_credentials *CertificatesAtPath(NSString *path, NSError **errorPtr)
});
//TODO(jcanizales): Add NSError** parameter to the initializer.
- grpc_credentials *certificates = path ? CertificatesAtPath(path, NULL) : kDefaultCertificates;
+ grpc_channel_credentials *certificates = path
+ ? CertificatesAtPath(path, NULL)
+ : kDefaultCertificates;
if (!certificates) {
return nil;
}
@@ -99,7 +101,7 @@ static grpc_credentials *CertificatesAtPath(NSString *path, NSError **errorPtr)
}
- (instancetype)initWithHost:(NSString *)host
- credentials:(grpc_credentials *)credentials
+ credentials:(grpc_channel_credentials *)credentials
args:(grpc_channel_args *)args {
return (self = [super
initWithChannel:grpc_secure_channel_create(