tls protocol

amina month ago

traccar support TLSv1.2", "TLSv1.3" protocol?

Track-tracea month ago

You can use for instance https://www.traccar.org/secure-connection/ Or Nginx to proxy the connection.

amina month ago

can i refactor code like this to support tls? :

  protected void initChannel(Channel channel) throws UnrecoverableEntryException, KeyStoreException, NoSuchAlgorithmException, IOException, CertificateException {
        final ChannelPipeline pipeline = channel.pipeline();

        KeyStore keyStore = KeyStore.getInstance("JKS");
        keyStore.load(new FileInputStream("keystore.jks"), "password".toCharArray());
        KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
        keyManagerFactory.init(keyStore, "password".toCharArray());


        // Create the SslContext for TLS
        SslContext sslContext = SslContextBuilder.forServer(keyManagerFactory)
                .clientAuth(ClientAuth.NONE)  // This disables client certificate authentication
                .protocols("TLSv1.2", "TLSv1.3")
                .build();

        // Step 2: Add SslHandler to the pipeline
        SslHandler sslHandler = sslContext.newHandler(channel.alloc());
        pipeline.addFirst(sslHandler);