Tuesday 21 June 2016

def Week3_and_Week4(numtasks): - Week 3 and 4

Hi,
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:







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

Wednesday 1 June 2016

int main() - Week 1 of Coding Period

Hi,
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.

HAPPY CODING!!

Monday 2 May 2016

The __init__ to my GSoC selection:


Okay,so all this begun when I entered college about two years ago.The two terms to motivate us towards excellence used by our seniors were "Google Summer of Code" and "ACM ICPC".Since then my fascination for GSoC began and never seemed to calm down.

Okay,so now time-warp:and now I was in my fourth semester.It was the month of January and now I knew it was high time to have a focussed working towards GSoC.Having done considerably good open source contribution,I was in my groove and now shifted my focus to my dream organization "Mozilla".I knew this wasn't going to be easy.

The particular component to interest me was their Firefox for android component namely "Fennec".Being well acquainted with android,I felt immediately comfortable with the codebase(something that never happens in open source contribution to a new org so fast).As time proceeded, an intense jan-mid Feb was good enough to provide me with a few effective patches.Ok,so i was on the right track.

Then came a surge of academic commitments: exams, assignments, projects all guns blazing.Somehow knocking the out and what do I see , its march.A few more commits and the orgs were announced by google.So now that mozilla was in,I browsed through all the projects.Ok so one detail,I always had this fascination for networking security.I somehow felt a pull towards it from the beginning and wanted to do something in it.It was then that I stumbled upon NSS- mozilla's network security services library.

Ok,So then I met this super cool guy called David.I read few details about libraries written by him(mainly openconnect) and so now my fascination shifted from an individual project to rather working with him.As I contacted him with something you could call as my resume,he being ever so friendly instantly appreciated my previous work and suggested a project regarding the PKCS 11 URI scheme.On explaining further, it immediately caught my attention.I wen through a few articles on PKCS 11, the cryptoki API, RFC 7512 and all the works.Somehow I felt the project was something I would be interested in and so with david's help, made a few commits to the existing NSS library to get acquainted with the existing codebase and also strengthen my GSoC proposal.

Then David introduced me Robert,another very cool guy who was one of the core developers of the NSS library.He also welcomed me with a lot of warmth to the NSS library, solved a few doubts and so now with david and Rob by my side had the full confidence that this project was the one I was "destined" to do.

So as time progressed , I submitted my proposal.Now that my job was done,I shifted my focus back to college acads.So now the day was finally here, 22nd April.This was probably the most nervous I could ever be.Finally as the results were announced, I WAS IN..YAY!!!

This was I believe the most ecstatic I had ever been.All my friends rushing into my room pulling me out for a very ancient ritual in my college GPL.A solid beating and a juice treat later, all was calm.It was now time to live my dream of a "Summer of code".


So the points to take:
1.Focus on an org of your choice and give it your everything.
2.Patience is very vry important in the beginning(given the huge code base).
3.keep interacting with the community.Believe me,they're awesome!

So,that's all for this one.
I'll keep you all posted on all further developments and phases of the summer of code :)