Skip navigation
All People > Alameyo > Alameyo's GSoC 2017 Blog > 2017 > May
2017

Alameyo's GSoC 2017 Blog

May 2017 Previous month Next month
Alameyo

#2 Certificates and keystores

Posted by Alameyo May 26, 2017

Hi again,

This week I was checking tools for managing certificates. First is Java Keytool, that's shell/command line tool which give easy way to access Keystores and list all certificates or extract particular by alias. Other one was easy rsa that comes with openVPN, it's also nice tool for creating certificates, but seems give less options than Java's.

 

After that I started to looking how to manage certificates in Java's code. Extracting certificate from Keystore is pretty straightforward: load Keystore from directory as file, create instance of Keystore in code and load file to that instance using password for Keystore. From now extracting basic fields of certificate is easy as it can be done with getters methods, though getting extensions fields is a bit more complicated.

 

What else could I do about certificates? Create own, that's seems impossible to do easy way with basic Java so I had to add Bouncy Castle library to my dependencies. Often happens that external libraries have more frequent changes that native Java stuff. Effect is that found examples on various websites are often not up to date. So what to do? Check in documentation as in the end everything should be there . However going through can be sometimes like looking for missing pice of puzzles: class A is deprecated use instead class B > class B is also deprecated use class C > constructor of C's class takes different arguments than constructor of A class. But that's what programmers do . In the end I have done self-signed certificates with deprecated tools for now, while I am also close to solve it with new methods. Nevertheless that would be useful in later parts of GSoC project so I have still time for this.

Next week I should have already taken the first steps in doing project of certificate manager for Spark.
Cya,
Paweł

Alameyo

#1 Starting with open source

Posted by Alameyo May 19, 2017

Hello all

I introduced myself-earlier and maybe you are wondering what I have done since that time and before. I started with Spark by doing little changes with graphics interface bugs or improvements. Nothing really hard, sometimes even 1 line of code changes or new XML mapping for emojis, so with next release of Spark you will see emoticons like this for Unicode characters like this ☺. Nothing hard, yeah? But for me one of the first commits for the open source I have done since March when I started contributing.

 

So what I have been doing this week? Unfortunately I didn't fixed any issue with Spark, but started to developing own XMPP client. Don't worry, it's not going to be competitor for Spark but my hands on learning about Smack, the Java library for XMPP propelling Spark. It doesn't have even GUI, it is purely console/text based and doesn't have many futures yet. I also build for first time Openfire from source code. There are some guides how to do it with ant, however it's a bit outdated as Openfire now moved to Maven, and I didn't know how to build it. However with help from my great mentor Guus I have done it and it is totally easier than doing it with ant.

In case you are wondering: install maven > go with shell/cmd to Openfire directory and type "mvn clean package" and maven will build your project. Now go to target/bin directory and run openfire.bat.

 

For next week I plan to do some stuff with Java crypto libraries and Bouncy Castle, as it will be useful for certificate manager project.

Stay tuned,

Paweł