\section{KSSLPKCS12 Class Reference}
\label{classKSSLPKCS12}\index{KSSLPKCS12@{KSSLPKCS12}}
{\bf KDE} PKCS\#12 Certificate {\bf KDE} PKCS\#12 Certificate.  


{\tt \#include $<$ksslpkcs12.h$>$}

Collaboration diagram for KSSLPKCS12:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=135pt]{classKSSLPKCS12__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf $\sim$KSSLPKCS12} ()
\item 
{\bf QString} {\bf name} ()
\item 
{\bf QString} {\bf to\-String} ()
\item 
void {\bf set\-Cert} (PKCS12 $\ast$c)
\item 
bool {\bf change\-Password} ({\bf QString} pold, {\bf QString} pnew)
\item 
EVP\_\-PKEY $\ast$ {\bf get\-Private\-Key} ()
\item 
{\bf KSSLCertificate} $\ast$ {\bf get\-Certificate} ()
\item 
bool {\bf to\-File} ({\bf QString} filename)
\item 
{\bf KSSLCertificate::KSSLValidation} {\bf validate} ()
\item 
{\bf KSSLCertificate::KSSLValidation} {\bf validate} (KSSLCertificate::KSSLPurpose p)
\item 
{\bf KSSLCertificate::KSSLValidation} {\bf revalidate} ()
\item 
{\bf KSSLCertificate::KSSLValidation} {\bf revalidate} (KSSLCertificate::KSSLPurpose p)
\item 
bool {\bf is\-Valid} ()
\item 
bool {\bf is\-Valid} (KSSLCertificate::KSSLPurpose p)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KSSLPKCS12} $\ast$ {\bf from\-String} ({\bf QString} base64, {\bf QString} password=\char`\"{}\char`\"{})
\item 
static {\bf KSSLPKCS12} $\ast$ {\bf load\-Cert\-File} ({\bf QString} filename, {\bf QString} password=\char`\"{}\char`\"{})
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
bool {\bf parse} ({\bf QString} pass)\label{classKSSLPKCS12_b1}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KSSL}\label{classKSSLPKCS12_n0}

\end{CompactItemize}


\subsection{Detailed Description}
{\bf KDE} PKCS\#12 Certificate {\bf KDE} PKCS\#12 Certificate. 

As of yet, this class is being defined. if you use it, let it be known that BC will break on you until this message is removed.

\begin{Desc}
\item[Author:]George Staikos $<${\tt staikos@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSSL}{\rm (p.\,\pageref{classKSSL})}, {\bf KSSLCertificate}{\rm (p.\,\pageref{classKSSLCertificate})} \end{Desc}




Definition at line 61 of file ksslpkcs12.h.

\subsection{Constructor \& Destructor Documentation}
\index{KSSLPKCS12@{KSSLPKCS12}!~KSSLPKCS12@{$\sim$KSSLPKCS12}}
\index{~KSSLPKCS12@{$\sim$KSSLPKCS12}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSSLPKCS12::$\sim${\bf KSSLPKCS12} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKSSLPKCS12_a0}


Destroy this PKCS\#12 certificate. 



Definition at line 58 of file ksslpkcs12.cc.

References KOpen\-SSLProxy::EVP\_\-PKEY\_\-free(), KOpen\-SSLProxy::PKCS12\_\-free(), and KOpen\-SSLProxy::X509\_\-free().

\subsection{Member Function Documentation}
\index{KSSLPKCS12@{KSSLPKCS12}!name@{name}}
\index{name@{name}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KSSLPKCS12::name ()}\label{classKSSLPKCS12_a1}


The name of this certificate. 

This can be used to refer to the certificate instead of passing the object itself. \begin{Desc}
\item[Returns:]the name of the certificate\end{Desc}


Definition at line 279 of file ksslpkcs12.cc.\index{KSSLPKCS12@{KSSLPKCS12}!fromString@{fromString}}
\index{fromString@{fromString}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLPKCS12} $\ast$ KSSLPKCS12::from\-String ({\bf QString} {\em base64}, {\bf QString} {\em password} = {\tt \char`\"{}\char`\"{}})\hspace{0.3cm}{\tt  [static]}}\label{classKSSLPKCS12_e0}


Create a KSSLPKCS12 object from a Base64 in a {\bf QString}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em base64}]the base64 encoded certificate \item[{\em password}]a password for the certificate if encrypted \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the PKCS\#12 object, or NULL on failure.\end{Desc}


Definition at line 75 of file ksslpkcs12.cc.

References KCodecs::base64Decode(), KTemp\-File::close(), KTemp\-File::file(), QString::is\-Empty(), QString::latin1(), load\-Cert\-File(), KTemp\-File::name(), and KTemp\-File::unlink().\index{KSSLPKCS12@{KSSLPKCS12}!loadCertFile@{loadCertFile}}
\index{loadCertFile@{loadCertFile}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLPKCS12} $\ast$ KSSLPKCS12::load\-Cert\-File ({\bf QString} {\em filename}, {\bf QString} {\em password} = {\tt \char`\"{}\char`\"{}})\hspace{0.3cm}{\tt  [static]}}\label{classKSSLPKCS12_e1}


Create a KSSLPKCS12 object by reading a PKCS\#12 file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]the filename of the certificate \item[{\em password}]a password for the certificate if encrypted \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the PKCS\#12 object, or NULL on failure.\end{Desc}


Definition at line 93 of file ksslpkcs12.cc.

References QFile::handle(), QFile::open(), parse(), and set\-Cert().

Referenced by from\-String().\index{KSSLPKCS12@{KSSLPKCS12}!toString@{toString}}
\index{toString@{toString}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KSSLPKCS12::to\-String ()}\label{classKSSLPKCS12_a2}


Convert to a Base64 string. 

\begin{Desc}
\item[Returns:]the certificate in base64 form\end{Desc}


Definition at line 196 of file ksslpkcs12.cc.

References KCodecs::base64Encode(), and KOpen\-SSLProxy::i2d\_\-PKCS12().\index{KSSLPKCS12@{KSSLPKCS12}!setCert@{setCert}}
\index{setCert@{setCert}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSSLPKCS12::set\-Cert (PKCS12 $\ast$ {\em c})}\label{classKSSLPKCS12_a3}


Raw set the PKCS12 object. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em c}]the openssl PKCS12 object \end{description}
\end{Desc}


Definition at line 126 of file ksslpkcs12.cc.

Referenced by load\-Cert\-File().\index{KSSLPKCS12@{KSSLPKCS12}!changePassword@{changePassword}}
\index{changePassword@{changePassword}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSSLPKCS12::change\-Password ({\bf QString} {\em pold}, {\bf QString} {\em pnew})}\label{classKSSLPKCS12_a4}


Change the password of the PKCS\#12 in memory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pold}]the old password \item[{\em pnew}]the new password \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success\end{Desc}


Definition at line 133 of file ksslpkcs12.cc.

References QString::is\-Null(), QString::latin1(), and KOpen\-SSLProxy::PKCS12\_\-newpass().\index{KSSLPKCS12@{KSSLPKCS12}!getPrivateKey@{getPrivateKey}}
\index{getPrivateKey@{getPrivateKey}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}EVP\_\-PKEY $\ast$ KSSLPKCS12::get\-Private\-Key ()}\label{classKSSLPKCS12_a5}


Get the private key. 

\begin{Desc}
\item[Returns:]the internal Open\-SSL private key format \end{Desc}


Definition at line 186 of file ksslpkcs12.cc.\index{KSSLPKCS12@{KSSLPKCS12}!getCertificate@{getCertificate}}
\index{getCertificate@{getCertificate}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLCertificate} $\ast$ KSSLPKCS12::get\-Certificate ()}\label{classKSSLPKCS12_a6}


Get the X.509 certificate. 

\begin{Desc}
\item[Returns:]the X.509 certificate for the PKCS\#12 object, or NULL\end{Desc}


Definition at line 191 of file ksslpkcs12.cc.\index{KSSLPKCS12@{KSSLPKCS12}!toFile@{toFile}}
\index{toFile@{toFile}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSSLPKCS12::to\-File ({\bf QString} {\em filename})}\label{classKSSLPKCS12_a7}


Write the PKCS\#12 to a file in raw mode. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]the file to write to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on success\end{Desc}


Definition at line 217 of file ksslpkcs12.cc.

References QFile::handle(), KOpen\-SSLProxy::i2d\_\-PKCS12\_\-fp(), QString::latin1(), and QFile::open().\index{KSSLPKCS12@{KSSLPKCS12}!validate@{validate}}
\index{validate@{validate}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLCertificate::KSSLValidation} KSSLPKCS12::validate ()}\label{classKSSLPKCS12_a8}


Check the X.509 and private key to make sure they're valid. 

\begin{Desc}
\item[Returns:]the result of the validation \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSSLCertificate}{\rm (p.\,\pageref{classKSSLCertificate})}\end{Desc}


Definition at line 240 of file ksslpkcs12.cc.

Referenced by is\-Valid().\index{KSSLPKCS12@{KSSLPKCS12}!validate@{validate}}
\index{validate@{validate}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLCertificate::KSSLValidation} KSSLPKCS12::validate (KSSLCertificate::KSSLPurpose {\em p})}\label{classKSSLPKCS12_a9}


Check the X.509 and private key to make sure they're valid. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p}]the purpose to validate for \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the result of the validation \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSSLCertificate}{\rm (p.\,\pageref{classKSSLCertificate})}\end{Desc}


Definition at line 245 of file ksslpkcs12.cc.

References KOpen\-SSLProxy::X509\_\-check\_\-private\_\-key().\index{KSSLPKCS12@{KSSLPKCS12}!revalidate@{revalidate}}
\index{revalidate@{revalidate}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLCertificate::KSSLValidation} KSSLPKCS12::revalidate ()}\label{classKSSLPKCS12_a10}


Check the X.509 and private key to make sure they're valid. 

Ignore any cached validation result. \begin{Desc}
\item[Returns:]the result of the validation \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSSLCertificate}{\rm (p.\,\pageref{classKSSLCertificate})}\end{Desc}


Definition at line 259 of file ksslpkcs12.cc.\index{KSSLPKCS12@{KSSLPKCS12}!revalidate@{revalidate}}
\index{revalidate@{revalidate}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSSLCertificate::KSSLValidation} KSSLPKCS12::revalidate (KSSLCertificate::KSSLPurpose {\em p})}\label{classKSSLPKCS12_a11}


Check the X.509 and private key to make sure they're valid. 

Ignore any cached validation result. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p}]the purpose to validate for \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the result of the validation \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSSLCertificate}{\rm (p.\,\pageref{classKSSLCertificate})}\end{Desc}


Definition at line 264 of file ksslpkcs12.cc.\index{KSSLPKCS12@{KSSLPKCS12}!isValid@{isValid}}
\index{isValid@{isValid}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSSLPKCS12::is\-Valid ()}\label{classKSSLPKCS12_a12}


Check if the X.509 and private key are valid. 

\begin{Desc}
\item[Returns:]true if valid\end{Desc}


Definition at line 269 of file ksslpkcs12.cc.\index{KSSLPKCS12@{KSSLPKCS12}!isValid@{isValid}}
\index{isValid@{isValid}!KSSLPKCS12@{KSSLPKCS12}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSSLPKCS12::is\-Valid (KSSLCertificate::KSSLPurpose {\em p})}\label{classKSSLPKCS12_a13}


Check if the X.509 and private key are valid. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p}]the purpose to validate for \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if valid\end{Desc}


Definition at line 274 of file ksslpkcs12.cc.

References validate().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
ksslpkcs12.h\item 
ksslpkcs12.cc\end{CompactItemize}
