rss

ssl certificates and truststore: minimal howto

This post is a kind of minimal 'how to' for SSL, certificates and truststore

Java error

javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Java workarounds

  • (bad and quick way) Disable all ssl check by configuration cf. UnsafeSSLHelper (from javabox github project)
  • (right way) Update the ssl verification chain. For example by importing new valid certificate(s) to your truststore.

Windows

  • Windows > List certificates:

    Start / Execute / certmgr.msc
  • Google Chrome > List certificates:

    go to Parameters, the search "ssl" (chrome://settings/search#ssl)


  • Import a certificate in a truststore file:

    Make a backup :
    cp %JAVA_HOME%/jre/lib/security/cacerts %JAVA_HOME%/jre/lib/security/cacerts.orig 
    
    Import a certificate :
    keytool -import -alias MyCert -keystore %JAVA_HOME%/jre/lib/security/cacerts -trustcacerts -file MyCert.cer
    

    (cf. commandes+keytool ...)

shared libraries "lib.so and lib.dll" file: minimal how to

This post is a kind of minimal 'how to' for the shared libraries : ex. under linux mylib.so or under windows my.dll

Windows





Linux

  • List library exported symbols (then functions)
readelf -s /usr/lib/libspreadsheet.so |grep workbook_sheet
nm -D /usr/lib/libspreadsheet.so |grep workbook_sheet
objdump -T /usr/lib/libspreadsheet.so |grep workbook_sheet



  • List library dependencies

readelf -d /usr/lib/libspreadsheet.so|grep NEEDED

prosyst OSGi: minimal how to

This post is a kind of minimal 'how to' for Prosyst OSGi.

console (or telnet) commands

  • (telnet only) toggle command to get stdout / stderr on the telnet output
dump
  • Bundle installation
install mybundle.jar
  • Bundle start
start mybundle.jar
  • Bundle installation and start alias
i -S mybundle.jar
  • Bundle restart alias
rs mybundle.jar
rs 42
  • Bundle update := uninstall, install, start
update mybundle.jar
update 42
  • whole prosyst OSGi framework restart (you will loose the telnet connection)
rs 0