ResourceUtils.cpp File Reference


Detailed Description

Subsystem: PKIF Resources

Module: Utility functions

Id
ResourceUtils.cpp 11150 2010-01-21 17:00:11Z agalustyan

Definition in file ResourceUtils.cpp.

#include "ResourceUtils.h"
#include "boost/filesystem/operations.hpp"
#include <boost/tokenizer.hpp>
#include <fstream>

Include dependency graph for ResourceUtils.cpp:

Go to the source code of this file.

Functions

CPKIFCertificatePtr GetCert (wxString &filename)
CPKIFCRLPtr GetCrl (wxString &filename)
void StringSplit (const string &text, string &separators, vector< string > &words)
bool ValidateOID (const wxString &attrVal)
bool ValidateOIDComponents (const wxString &attrVal)
string GetOIDString (const CPKIFOIDPtr &oid)
const wxString & GetBufAsAscii (const CPKIFBufferPtr &in, wxString &out)


Function Documentation

const wxString& GetBufAsAscii ( const CPKIFBufferPtr &  in,
wxString &  out 
)

Interface: Subsystem

This function returns buffer as ASCII

Returns:
ASCII representation of the buffer
Parameters:
in  [in] Buffer to be converted to ASCII
out  [out] ASCII representation of the buffer

Definition at line 275 of file ResourceUtils.cpp.

References btoa().

Referenced by CPKIFGeneralCRLDetailsPanel::PopulateListExtensions().

CPKIFCertificatePtr GetCert ( wxString &  filename  ) 

Interface: Subsystem

This function reads a certificate from a file and returns a CPKIFCertificate object

Returns:
Smart pointer to CPKIFCertificate object
Parameters:
filename  [in] Filename

Definition at line 24 of file ResourceUtils.cpp.

CPKIFCRLPtr GetCrl ( wxString &  filename  ) 

Interface: Subsystem

This function reads a crl from a file and returns a CPKIFCRL object

Returns:
Smart pointer to CPKIFCRL object
Parameters:
filename  [in] Filename

Definition at line 58 of file ResourceUtils.cpp.

string GetOIDString ( const CPKIFOIDPtr &  oid  ) 

void StringSplit ( const string &  text,
string &  separators,
vector< string > &  words 
)

Interface: Subsystem

This function splits a string based on a specified separator

Returns:
Smart pointer to CPKIFCRL object
Parameters:
text  [in] String to be split
separators  [in] separator
words  [out] Vector of split strings

Definition at line 92 of file ResourceUtils.cpp.

Referenced by CPKIFGeneralCertificateDetailsPanel::OnInitDialog(), CPKIFGeneralCRLDetailsPanel::PopulateListExtensions(), and ValidateOID().

bool ValidateOID ( const wxString &  attrVal  ) 

Interface: Subsystem

This function validates an OID

Returns:
True if OID is ok, false otherwise

Definition at line 118 of file ResourceUtils.cpp.

References StringSplit().

bool ValidateOIDComponents ( const wxString &  attrVal  ) 

Interface: Subsystem

This function validates an OID

Returns:
True if OID is ok, false otherwise

Definition at line 140 of file ResourceUtils.cpp.


Generated on Mon Nov 15 11:19:14 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6