Module: Utility functions
Definition in file ResourceUtils.cpp.
#include "ResourceUtils.h"
#include "boost/filesystem/operations.hpp"
#include <boost/tokenizer.hpp>
#include <fstream>
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) |
const wxString& GetBufAsAscii | ( | const CPKIFBufferPtr & | in, | |
wxString & | out | |||
) |
Interface: Subsystem
This function returns buffer as ASCII
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
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
filename | [in] Filename |
Definition at line 58 of file ResourceUtils.cpp.
string GetOIDString | ( | const CPKIFOIDPtr & | oid | ) |
Interface: Subsystem
This function converts OID to algorithm name
Definition at line 167 of file ResourceUtils.cpp.
References g_dsa, g_dsaWithSHA1, g_dsaWithSHA1Alternative, g_ecc, g_ecdsa_sha1, g_ecdsa_sha224, g_ecdsa_sha256, g_ecdsa_sha384, g_ecdsa_sha512, g_md2WithRSAEncryption, g_md5WithRSAEncryption, g_rsa, g_sha1, g_sha1WithRSAEncryption, g_sha224, g_sha224WithRSAEncryption, g_sha256, g_sha256WithRSAEncryption, g_sha384, g_sha384WithRSAEncryption, g_sha512, and g_sha512WithRSAEncryption.
Referenced by CPKIFGeneralCRLDetailsPanel::PopulateList().
void StringSplit | ( | const string & | text, | |
string & | separators, | |||
vector< string > & | words | |||
) |
Interface: Subsystem
This function splits a string based on a specified separator
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
Definition at line 118 of file ResourceUtils.cpp.
References StringSplit().
bool ValidateOIDComponents | ( | const wxString & | attrVal | ) |
Interface: Subsystem
This function validates an OID
Definition at line 140 of file ResourceUtils.cpp.