code: @Override
      public void handle(Socket socket) throws IOException, InterruptedException {
          try {
              X509Certificate certificate = (X509Certificate) keyStore.getCertificate("jenkins");
              if (certificate == null
                      || certificate.getNotAfter().getTime() < System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1)) {
                  LOGGER.log(Level.INFO, "Updating {0} TLS certificate to retain validity", getName());
                  X509Certificate identityCertificate = InstanceIdentityProvider.RSA.getCertificate();
                  RSAPrivateKey privateKey = InstanceIdentityProvider.RSA.getPrivateKey();
                  char[] password = "password".toCharArray();
                  keyStore.setKeyEntry("jenkins", privateKey, password, new X509Certificate[]{identityCertificate});
              }
          } catch (KeyStoreException e) {
              LOGGER.log(Level.FINEST, "Ignored", e);
          }
          handler.handle(socket,
                  Collections.singletonMap(JnlpConnectionState.COOKIE_KEY, JnlpAgentReceiver.generateCookie()),
                  ExtensionList.lookup(JnlpAgentReceiver.class));
      }
docs: {@inheritDoc}