Tuesday, 21 June 2016

def Week3_and_Week4(numtasks): - Week 3 and 4

So its been quite some time since I updated my blog about how my summer of code is proceeding. Probably trying to act "busy" :P.

Anyways , these 2 weeks have experienced some quite effective work.The first draft of all functions are done.After getting them reviewed, I now am working majorly on error handling, tidying up the code and testing.As usual, my ever so awesome mentors have always been ever on my side , always available and providing me with a feeling of how blesses I am to be working with these amazing guys.

This week did see a major setback in terms of my owns self confidence, due to a particular commit having oh so many errors.It was a moment when I doubted my abilities to write the standard of code being expected by me.However after a boost from my mentor and an assurance of in his words "doin just fine" , I brushed it off my shoulder ready to write some kickass code.

This week , we also decided upon a few design changes in the existing structs for the PKCS 11 tokens,slots and objects.We decided to provide a static uri field in their structs rather than just leaking of the uri strings that till now the functions were doing.This field would then be set if not set during the GetURIFromFoo functions and if set , would directly be returned.We decided to make these changes step by step rather than applying them at once to all the existing structs altogether.

So bit by bit, we modified the PKCS 11 module URI handing functions.Since they were due for review, I also had a go at the token functions making the required tweaks.I also had to implement the locking and unlocking of the several PKCS 11 objects to prevent multiple threads from reading or writing data to an object while another thread was in play.

For the error handling, Since I had been using an external API, I needed to build an error map which as the name suggests would map the errors from the API to the standars NSS errors.

So yeah, quite some changes , tidying up and lots of fun these 2 weeks.

As mentioned before , for those interested to view the codecan visit my
Github Repo

A few screenshots:

Thanks for reading.Hope I didn't bore you much! :)

Wednesday, 1 June 2016

int main() - Week 1 of Coding Period

So A week into my GSoc coding period.Things went pretty "smooth" to say the least.I realized as time passes, I have gradually become quite comfortable with NSS' codebase.

While being the #sincere person as I am, the Coding period was merely a formal beginning of the project while I had started working quite some time ago.My ever so awesome mentors gave me a clear and concise picture of how to proceed forwards.Function by function, I proceeded further.I regularly was in touch with my mentor and would get all my work regularly evaluated.A very very big mention to the trouble I had in building NSS along with a dependency on an external API.This took a rather huge chunk of my weeks time.

So now for the details:
The basic idea for the first part of my project is basically to setup a URI based recognition system for the Cryptoki objects , tokens , slots and modules.
This basically narrows it down to implementing functions like
PK11_FindFooByURI and PK11_GetURIByFoo for each of the PKCS #11 objects, modules and tokens.

This week majorly went to integrating the p11-kit API with NSS and implementing the URI functionality for Cryptoki tokens and modules.Although we are considering a review on the Structures for the NSS URI's (whether to cache the URI string  into a  static struct in NSS or not), for now we have decided to move along the current flow as the changes if arise from the review would require quite minor tweaks.

Here are a few screenshots:

You can also view my GitHub Repo for further details and to view my progress.

So now for the exciting part.
This week was a rather cheerful one.With the initial Community bonding stipends and the Google welcome package reaching us, It was a constant reminder of how big a thing we were all a part of.Hope all my fellow GSoccers are also having a blast just like me.