File tree Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -122,17 +122,6 @@ - (id)initWithClientId:(NSNumber *)clientID
122
122
return self;
123
123
}
124
124
125
- - (void )dealloc {
126
- if (_clientIdentity) {
127
- CFRelease (_clientIdentity);
128
- _clientIdentity = NULL ;
129
- }
130
- if (_peerTrust) {
131
- CFRelease (_peerTrust);
132
- _peerTrust = NULL ;
133
- }
134
- }
135
-
136
125
- (BOOL )connect : (NSString *)host
137
126
port : (int )port
138
127
withOptions : (NSDictionary *)options
Original file line number Diff line number Diff line change 11
11
* @extends {Socket }
12
12
*/
13
13
export default class TLSSocket extends Socket {
14
+ /**
15
+ * Checks if a certificate identity exists in the keychain
16
+ * @param {object } options Object containing the identity aliases
17
+ * @param {string } [options.androidKeyStore] The android keystore type
18
+ * @param {string } [options.certAlias] The certificate alias
19
+ * @param {string } [options.keyAlias] The key alias
20
+ * @returns {Promise<boolean> } Promise resolving to true if identity exists
21
+ */
22
+ static hasIdentity ( options ?: {
23
+ androidKeyStore : string | undefined ;
24
+ certAlias : string | undefined ;
25
+ keyAlias : string | undefined ;
26
+ } ) : Promise < boolean > ;
14
27
/**
15
28
* @private
16
29
* Resolves the asset source if necessary and registers the resolved key.
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ declare namespace _default {
11
11
export { Socket } ;
12
12
export { TLSServer } ;
13
13
export { TLSSocket } ;
14
+ export const hasIdentity : typeof import ( "./TLSSocket" ) . default . hasIdentity ;
14
15
}
15
16
export default _default ;
16
17
/**
Original file line number Diff line number Diff line change @@ -69,14 +69,16 @@ export default class TLSSocket extends Socket {
69
69
/**
70
70
* Checks if a certificate identity exists in the keychain
71
71
* @param {object } options Object containing the identity aliases
72
+ * @param {string } [options.androidKeyStore] The android keystore type
72
73
* @param {string } [options.certAlias] The certificate alias
73
74
* @param {string } [options.keyAlias] The key alias
74
75
* @returns {Promise<boolean> } Promise resolving to true if identity exists
75
76
*/
76
77
static hasIdentity ( options = { } ) {
77
78
return Sockets . hasIdentity ( {
79
+ androidKeyStore : options . androidKeyStore ,
78
80
certAlias : options . certAlias ,
79
- keyAlias : options . keyAlias
81
+ keyAlias : options . keyAlias ,
80
82
} ) ;
81
83
}
82
84
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ export default {
112
112
Socket,
113
113
TLSServer,
114
114
TLSSocket,
115
+ hasIdentity : TLSSocket . hasIdentity ,
115
116
} ;
116
117
117
118
// @ts -ignore
@@ -128,4 +129,5 @@ module.exports = {
128
129
Socket,
129
130
TLSServer,
130
131
TLSSocket,
132
+ hasIdentity : TLSSocket . hasIdentity ,
131
133
} ;
You can’t perform that action at this time.
0 commit comments