File tree Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 1+ # [ 6.2.0] ( https://github.com/Rapsssito/react-native-tcp-socket/compare/v6.1.0...v6.2.0 ) (2024-07-08)
2+
3+
4+ ### Features
5+
6+ * ** Android:** Add TLS key & cert for server ([ #192 ] ( https://github.com/Rapsssito/react-native-tcp-socket/issues/192 ) ) ([ 054c789] ( https://github.com/Rapsssito/react-native-tcp-socket/commit/054c7890dc0575acceb93c24794c0fade6c548a8 ) )
7+
18# [ 6.1.0] ( https://github.com/Rapsssito/react-native-tcp-socket/compare/v6.0.6...v6.1.0 ) (2024-06-20)
29
310
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11/**
22 * @typedef {object } TLSSocketOptions
33 * @property {any } [ca]
4+ * @property {any } [key]
5+ * @property {any } [cert]
6+ * @property {string } [androidKeyStore]
7+ * @property {string } [certAlias]
8+ * @property {string } [keyAlias]
9+ * @property {string[] } [resolvedKeys]
410 *
511 * @extends {Socket }
612 */
713export default class TLSSocket extends Socket {
14+ /**
15+ * @private
16+ * Resolves the asset source if necessary and registers the resolved key.
17+ * @param {TLSSocketOptions } options The options object containing the source to be resolved.
18+ * @param {'ca' | 'key' | 'cert' } key The key name being resolved.
19+ */
20+ private static resolveAssetIfNeeded ;
821 /**
922 * @param {Socket } socket Any instance of `Socket`.
1023 * @param {TLSSocketOptions } [options] Options for the TLS socket.
@@ -22,8 +35,16 @@ export default class TLSSocket extends Socket {
2235 * @private
2336 */
2437 private _startTLS ;
38+ getCertificate ( ) : any ;
39+ getPeerCertificate ( ) : any ;
2540}
2641export type TLSSocketOptions = {
2742 ca ?: any ;
43+ key ?: any ;
44+ cert ?: any ;
45+ androidKeyStore ?: string | undefined ;
46+ certAlias ?: string | undefined ;
47+ keyAlias ?: string | undefined ;
48+ resolvedKeys ?: string [ ] | undefined ;
2849} ;
2950import Socket from "./Socket" ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-tcp-socket" ,
33 "title" : " React Native Tcp Socket" ,
4- "version" : " 6.1 .0" ,
4+ "version" : " 6.2 .0" ,
55 "description" : " React Native TCP socket API for Android & iOS with SSL/TLS support" ,
66 "main" : " src/index.js" ,
77 "types" : " lib/types/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments