\hypertarget{class_qore_1_1_s_s_l_certificate}{}\doxysection{Qore\+::SSLCertificate Class Reference}
\label{class_qore_1_1_s_s_l_certificate}\index{Qore::SSLCertificate@{Qore::SSLCertificate}}


\mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} objects allow Qore code to work with X.\+509 certificate data.  




{\ttfamily \#include $<$QC\+\_\+\+SSLCertificate.\+dox.\+h$>$}



Inheritance diagram for Qore\+::SSLCertificate\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=193pt]{class_qore_1_1_s_s_l_certificate__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_ad0971140da3d09eff6509309367e44b3}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} pem)
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} object from the PEM-\/encoded version of the X.\+509 certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a6c23688064313053f0d97d721f1199fb}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} der)
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} object from the DER-\/encoded version of the X.\+509 certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aba1f8b7876a1c6630f8c474a713daa2e}{copy}} ()
\begin{DoxyCompactList}\small\item\em Returns a copy of the certificate object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_adc018f372e971b43a44d678b96c222ca}{get\+DER}} ()
\begin{DoxyCompactList}\small\item\em Returns a binary object in DER format representing the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aff7becf3647ada9bcc083826c364422c}{get\+Info}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash of all information for the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aa31ffd7b9f3c22ec7a9823eec1589ce8}{get\+Issuer\+Hash}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash of strings representing the issuer information of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__date__and__time__functions_gaa80ee453b6a5653ac685d7e290c74e3f}{date}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aa032ba7fce14b9fd6ac0181e2a5a2538}{get\+Not\+After\+Date}} ()
\begin{DoxyCompactList}\small\item\em Returns a date/time value representing the end date of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__date__and__time__functions_gaa80ee453b6a5653ac685d7e290c74e3f}{date}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_ada4fcaa035665d0ce962bf0292533a31}{get\+Not\+Before\+Date}} ()
\begin{DoxyCompactList}\small\item\em Returns a date/time value representing the start date of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_ad89366c7f97b5307e3360e57dd006add}{get\+PEM}} ()
\begin{DoxyCompactList}\small\item\em Returns a string in PEM format representing the certificate. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a259fc90259854970a59c0a14ba7ed36f}{get\+Public\+Key}} ()
\begin{DoxyCompactList}\small\item\em Returns a binary object representing the public key of the certificate in DER (Distinguished Encoding Rules) format or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no public key is present in the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a7ed8f779b639b5ca332004e05a3a25ac}{get\+Public\+Key\+Algorithm}} ()
\begin{DoxyCompactList}\small\item\em Returns the name of the public key algorithm of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a32a7a8c9418aba6f14b33e0e1b7ae9ee}{get\+Purpose\+Hash}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash of booleans representing the allowed purposes of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_afb37f78ccfbc743f93ac957c6ba7f7bf}{get\+Serial\+Number}} ()
\begin{DoxyCompactList}\small\item\em Returns the integer serial number of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a5931188f312c2be2d96bcba5d1dd79f5}{get\+Signature}} ()
\begin{DoxyCompactList}\small\item\em Returns a binary object representing the signature of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a662cf1040b9f99900c2888023b7b6cb9}{get\+Signature\+Type}} ()
\begin{DoxyCompactList}\small\item\em Returns the signature type of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aae14ff472e7923a770f8da84aa69a9f1}{get\+Subject\+Hash}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash of strings representing the subject information of the certificate. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_acc049d3abd7ad86ba47bcf927839804d}{get\+Version}} ()
\begin{DoxyCompactList}\small\item\em Returns the version of the certificate as an integer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} objects allow Qore code to work with X.\+509 certificate data. 

The \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} class supports \mbox{\hyperlink{class_qore_1_1_serializable}{data serialization}}; note that the serialized data is a representation of the data that does not require a password, so for source data that requires a password to use, the serialized representation of the private key should be protected carefully (transmitted only in an encrypted stream) 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_a6c23688064313053f0d97d721f1199fb}\label{class_qore_1_1_s_s_l_certificate_a6c23688064313053f0d97d721f1199fb}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Qore\+::\+SSLCertificate\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{der }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} object from the DER-\/encoded version of the X.\+509 certificate. 


\begin{DoxyParams}{Parameters}
{\em der} & the DER-\/encoded representation of the X.\+509 certificate\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{SSLCertificate cert(der\_cert);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SSLCERTIFICATE-\/\+CONSTRUCTOR-\/\+ERROR} & invalid X.\+509 certificate data \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_ad0971140da3d09eff6509309367e44b3}\label{class_qore_1_1_s_s_l_certificate_ad0971140da3d09eff6509309367e44b3}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Qore\+::\+SSLCertificate\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{pem }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate}{SSLCertificate}} object from the PEM-\/encoded version of the X.\+509 certificate. 


\begin{DoxyParams}{Parameters}
{\em pem} & the PEM representation of the X.\+509 certificate\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{SSLCertificate cert(pem\_cert\_string);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SSLCERTIFICATE-\/\+CONSTRUCTOR-\/\+ERROR} & invalid X.\+509 certificate data\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
0.\+8.\+4\+: the deprecated functionality where the if the string passed was less than 200 bytes long, it was assumed to be a file name has been removed; the string is assumed to be the PEM-\/encoded X.\+509 Certificate itself 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_aba1f8b7876a1c6630f8c474a713daa2e}\label{class_qore_1_1_s_s_l_certificate_aba1f8b7876a1c6630f8c474a713daa2e}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!copy@{copy}}
\index{copy@{copy}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+SSLCertificate\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a copy of the certificate object. 

\begin{DoxySince}{Since}
Qore 0.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_adc018f372e971b43a44d678b96c222ca}\label{class_qore_1_1_s_s_l_certificate_adc018f372e971b43a44d678b96c222ca}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getDER@{getDER}}
\index{getDER@{getDER}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getDER()}{getDER()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::\+SSLCertificate\+::get\+DER (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a binary object in DER format representing the certificate. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary der = cert.getDER();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a binary object in DER format representing the certificate
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em X509-\/\+ERROR} & could not create DER data from certificate data\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+9 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_aff7becf3647ada9bcc083826c364422c}\label{class_qore_1_1_s_s_l_certificate_aff7becf3647ada9bcc083826c364422c}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getInfo@{getInfo}}
\index{getInfo@{getInfo}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getInfo()}{getInfo()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SSLCertificate\+::get\+Info (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a hash of all information for the certificate. 

\begin{DoxyReturn}{Returns}
a hash of all information for the certificate with the following keys\+:
\begin{DoxyItemize}
\item {\ttfamily \char`\"{}version\char`\"{}}\+: The version of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_acc049d3abd7ad86ba47bcf927839804d}{SSLCertificate\+::get\+Version()}})
\item {\ttfamily \char`\"{}serial\+Number\char`\"{}}\+: The serial number of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_afb37f78ccfbc743f93ac957c6ba7f7bf}{SSLCertificate\+::get\+Serial\+Number()}})
\item {\ttfamily \char`\"{}subject\char`\"{}}\+: The subject hash of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aae14ff472e7923a770f8da84aa69a9f1}{SSLCertificate\+::get\+Subject\+Hash()}})
\item {\ttfamily \char`\"{}issuer\char`\"{}}\+: The issuer hash of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aa31ffd7b9f3c22ec7a9823eec1589ce8}{SSLCertificate\+::get\+Issuer\+Hash()}})
\item {\ttfamily \char`\"{}purposes\char`\"{}}\+: The purpose hash of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a32a7a8c9418aba6f14b33e0e1b7ae9ee}{SSLCertificate\+::get\+Purpose\+Hash()}})
\item {\ttfamily \char`\"{}not\+Before\char`\"{}}\+: The \char`\"{}not before date\char`\"{} of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_ada4fcaa035665d0ce962bf0292533a31}{SSLCertificate\+::get\+Not\+Before\+Date()}})
\item {\ttfamily \char`\"{}not\+After\char`\"{}}\+: The \char`\"{}not after date\char`\"{} of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_aa032ba7fce14b9fd6ac0181e2a5a2538}{SSLCertificate\+::get\+Not\+After\+Date()}})
\item {\ttfamily \char`\"{}signature\+Type\char`\"{}}\+: The signature type string of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a662cf1040b9f99900c2888023b7b6cb9}{SSLCertificate\+::get\+Signature\+Type()}})
\item {\ttfamily \char`\"{}signature\char`\"{}}\+: The binary signature of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a5931188f312c2be2d96bcba5d1dd79f5}{SSLCertificate\+::get\+Signature()}})
\item {\ttfamily \char`\"{}public\+Key\char`\"{}}\+: The binary public key of the X.\+509 certificate (see \mbox{\hyperlink{class_qore_1_1_s_s_l_certificate_a259fc90259854970a59c0a14ba7ed36f}{SSLCertificate\+::get\+Public\+Key()}})
\end{DoxyItemize}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = cert.getInfo();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_aa31ffd7b9f3c22ec7a9823eec1589ce8}\label{class_qore_1_1_s_s_l_certificate_aa31ffd7b9f3c22ec7a9823eec1589ce8}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getIssuerHash@{getIssuerHash}}
\index{getIssuerHash@{getIssuerHash}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getIssuerHash()}{getIssuerHash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SSLCertificate\+::get\+Issuer\+Hash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a hash of strings representing the issuer information of the certificate. 

\begin{DoxyReturn}{Returns}
a hash of key-\/value pairs representing the issuer information of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = cert.getIssuerHash();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_aa032ba7fce14b9fd6ac0181e2a5a2538}\label{class_qore_1_1_s_s_l_certificate_aa032ba7fce14b9fd6ac0181e2a5a2538}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getNotAfterDate@{getNotAfterDate}}
\index{getNotAfterDate@{getNotAfterDate}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getNotAfterDate()}{getNotAfterDate()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__date__and__time__functions_gaa80ee453b6a5653ac685d7e290c74e3f}{date}} Qore\+::\+SSLCertificate\+::get\+Not\+After\+Date (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a date/time value representing the end date of the certificate. 

\begin{DoxyReturn}{Returns}
a date/time value representing the end date of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{date end = cert.getNotAfterDate();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_ada4fcaa035665d0ce962bf0292533a31}\label{class_qore_1_1_s_s_l_certificate_ada4fcaa035665d0ce962bf0292533a31}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getNotBeforeDate@{getNotBeforeDate}}
\index{getNotBeforeDate@{getNotBeforeDate}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getNotBeforeDate()}{getNotBeforeDate()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__date__and__time__functions_gaa80ee453b6a5653ac685d7e290c74e3f}{date}} Qore\+::\+SSLCertificate\+::get\+Not\+Before\+Date (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a date/time value representing the start date of the certificate. 

\begin{DoxyReturn}{Returns}
a date/time value representing the start date of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{date start = cert.getNotBeforeDate();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_ad89366c7f97b5307e3360e57dd006add}\label{class_qore_1_1_s_s_l_certificate_ad89366c7f97b5307e3360e57dd006add}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getPEM@{getPEM}}
\index{getPEM@{getPEM}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getPEM()}{getPEM()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+SSLCertificate\+::get\+PEM (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a string in PEM format representing the certificate. 

\begin{DoxyReturn}{Returns}
a string in PEM format representing the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string pem\_str = cert.getPEM();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em X509-\/\+ERROR} & could not create PEM string from X509 certificate data \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_a259fc90259854970a59c0a14ba7ed36f}\label{class_qore_1_1_s_s_l_certificate_a259fc90259854970a59c0a14ba7ed36f}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getPublicKey@{getPublicKey}}
\index{getPublicKey@{getPublicKey}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getPublicKey()}{getPublicKey()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::\+SSLCertificate\+::get\+Public\+Key (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a binary object representing the public key of the certificate in DER (Distinguished Encoding Rules) format or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no public key is present in the certificate. 

\begin{DoxyReturn}{Returns}
a binary object representing the public key of the certificate in DER (Distinguished Encoding Rules) format or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if no public key is present in the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*binary bin = cert.getPublicKey();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_a7ed8f779b639b5ca332004e05a3a25ac}\label{class_qore_1_1_s_s_l_certificate_a7ed8f779b639b5ca332004e05a3a25ac}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getPublicKeyAlgorithm@{getPublicKeyAlgorithm}}
\index{getPublicKeyAlgorithm@{getPublicKeyAlgorithm}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getPublicKeyAlgorithm()}{getPublicKeyAlgorithm()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+SSLCertificate\+::get\+Public\+Key\+Algorithm (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the name of the public key algorithm of the certificate. 

\begin{DoxyReturn}{Returns}
the name of the public key algorithm of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string str = cert.getPublicKeyAlgorithm();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_a32a7a8c9418aba6f14b33e0e1b7ae9ee}\label{class_qore_1_1_s_s_l_certificate_a32a7a8c9418aba6f14b33e0e1b7ae9ee}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getPurposeHash@{getPurposeHash}}
\index{getPurposeHash@{getPurposeHash}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getPurposeHash()}{getPurposeHash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SSLCertificate\+::get\+Purpose\+Hash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a hash of booleans representing the allowed purposes of the certificate. 

\begin{DoxyReturn}{Returns}
a hash of booleans representing the allowed purposes of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = cert.getPurposeHash();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_afb37f78ccfbc743f93ac957c6ba7f7bf}\label{class_qore_1_1_s_s_l_certificate_afb37f78ccfbc743f93ac957c6ba7f7bf}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getSerialNumber@{getSerialNumber}}
\index{getSerialNumber@{getSerialNumber}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getSerialNumber()}{getSerialNumber()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+SSLCertificate\+::get\+Serial\+Number (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the integer serial number of the certificate. 

\begin{DoxyReturn}{Returns}
the integer serial number of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int sn = cert.getSerialNumber();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_a5931188f312c2be2d96bcba5d1dd79f5}\label{class_qore_1_1_s_s_l_certificate_a5931188f312c2be2d96bcba5d1dd79f5}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getSignature@{getSignature}}
\index{getSignature@{getSignature}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getSignature()}{getSignature()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::\+SSLCertificate\+::get\+Signature (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a binary object representing the signature of the certificate. 

\begin{DoxyReturn}{Returns}
a binary object representing the signature of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = cert.getSignature();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_a662cf1040b9f99900c2888023b7b6cb9}\label{class_qore_1_1_s_s_l_certificate_a662cf1040b9f99900c2888023b7b6cb9}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getSignatureType@{getSignatureType}}
\index{getSignatureType@{getSignatureType}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getSignatureType()}{getSignatureType()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+SSLCertificate\+::get\+Signature\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the signature type of the certificate. 

\begin{DoxyReturn}{Returns}
the signature type of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string str = cert.getSignatureType();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_aae14ff472e7923a770f8da84aa69a9f1}\label{class_qore_1_1_s_s_l_certificate_aae14ff472e7923a770f8da84aa69a9f1}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getSubjectHash@{getSubjectHash}}
\index{getSubjectHash@{getSubjectHash}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getSubjectHash()}{getSubjectHash()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::\+SSLCertificate\+::get\+Subject\+Hash (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a hash of strings representing the subject information of the certificate. 

\begin{DoxyReturn}{Returns}
a hash of key-\/value pairs representing the subject information of the certificate
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto> h = cert.getSubjectHash();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_s_s_l_certificate_acc049d3abd7ad86ba47bcf927839804d}\label{class_qore_1_1_s_s_l_certificate_acc049d3abd7ad86ba47bcf927839804d}} 
\index{Qore::SSLCertificate@{Qore::SSLCertificate}!getVersion@{getVersion}}
\index{getVersion@{getVersion}!Qore::SSLCertificate@{Qore::SSLCertificate}}
\doxysubsubsection{\texorpdfstring{getVersion()}{getVersion()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+SSLCertificate\+::get\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the version of the certificate as an integer. 

\begin{DoxyReturn}{Returns}
the version of the certificate as an integer
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int ver = cert.getVersion();}

\end{DoxyCode}
 
\end{DoxyParagraph}
