Desafio Labsec (SGC)
Public Member Functions | Public Attributes | List of all members
FourthMilestone Class Reference

Fourth Milestone - PKCS12 Key Repository More...

#include <FourthMilestone.h>

Public Member Functions

 FourthMilestone ()
 
virtual ~FourthMilestone ()
 
void createUserRepository (Certificate *userCert, KeyPair &userKeyPair)
 
void createRootCaRepository (Certificate *rootCaCert, KeyPair &rootCaKeyPair)
 

Public Attributes

const char * userAlias = "userP12"
 
const char * rootCaAlias = "rootP12"
 
const char * userPass = "userpassword"
 
const char * rootCaPass = "rootcapassword"
 

Detailed Description

Fourth Milestone - PKCS12 Key Repository

It is not a good idea to keep Private Keys in plain text files. You should protect the keys you've just created by using encryption. There are several ways to protect cryptographic keys, the one you are about to implement is a standard called PKCS#12. To create a PKCS#12 file (extension .p12) you will pack together the Private Key and its respective certificate. Both assets have been produced on previous milestones. The key repository's structure is somewhat like this:

<Alias, <Certificate, PrivateKey> >

Alias is the nickname or friendly name given to the tuple <Certificate, PrivateKey>.

See also
libcryptosec/Pkcs12Builder
libcryptosec/Pkcs12

SELF EVALUATION (Requires previous milstones to run)
In evaluation folder run '$make fourth'.
You need to implement the evaluation for this milestone.

Author
Lucas Perin

Constructor & Destructor Documentation

◆ FourthMilestone()

FourthMilestone::FourthMilestone ( )

Like any other C++ code, this one needs little hack.

◆ ~FourthMilestone()

FourthMilestone::~FourthMilestone ( )
virtual

Member Function Documentation

◆ createRootCaRepository()

void FourthMilestone::createRootCaRepository ( Certificate *  rootCaCert,
KeyPair &  rootCaKeyPair 
)

TODO Implement this function in the cpp file.

TODO(milestone4)

◆ createUserRepository()

void FourthMilestone::createUserRepository ( Certificate *  userCert,
KeyPair &  userKeyPair 
)

TODO Implement this function in the cpp file.

TODO(milestone4)

Member Data Documentation

◆ rootCaAlias

const char* FourthMilestone::rootCaAlias = "rootP12"

◆ rootCaPass

const char* FourthMilestone::rootCaPass = "rootcapassword"

◆ userAlias

const char* FourthMilestone::userAlias = "userP12"

PKCS12 alias (friendly name)

◆ userPass

const char* FourthMilestone::userPass = "userpassword"

PKCS12 password


The documentation for this class was generated from the following files: