\hypertarget{group__Eet__Cipher__Group}{}\section{Cipher, Identity and Protection Mechanisms}
\label{group__Eet__Cipher__Group}\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}


Eet allows one to protect entries of an \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} individually.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}\label{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}} 
typedef struct \+\_\+\+Eet\+\_\+\+Key \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}}
\begin{DoxyCompactList}\small\item\em Opaque handle that defines an identity (also known as key) in Eet\textquotesingle{}s cipher system. \end{DoxyCompactList}\item 
typedef int($\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}}) (char $\ast$buffer, int size, int rwflag, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Callback used to request if needed the password of a private key. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_gae8be5ad35c585cdf5034309bc97f1af8}{eet\+\_\+identity\+\_\+open}} (const char $\ast$certificate\+\_\+file, const char $\ast$private\+\_\+key\+\_\+file, \mbox{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}} cb)
\begin{DoxyCompactList}\small\item\em Creates an Eet\+\_\+\+Key needed for signing an eet file. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void \mbox{\hyperlink{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}{eet\+\_\+identity\+\_\+close}} (\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$key)
\begin{DoxyCompactList}\small\item\em Close and release all resource used by an Eet\+\_\+\+Key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eet__Group_gab002b16c58e2a62fc7981581647a0092}{Eet\+\_\+\+Error}} \mbox{\hyperlink{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}{eet\+\_\+identity\+\_\+set}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$key)
\begin{DoxyCompactList}\small\item\em Sets a key to sign a file. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void \mbox{\hyperlink{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}{eet\+\_\+identity\+\_\+print}} (\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$key, F\+I\+LE $\ast$out)
\begin{DoxyCompactList}\small\item\em Displays both private and public key of an Eet\+\_\+\+Key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}{eet\+\_\+identity\+\_\+verify}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, const char $\ast$certificate\+\_\+file)
\begin{DoxyCompactList}\small\item\em Compares the identify certificate of an eet file against a stored one. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const void $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_ga6f92a1276ed7e87d5a7ba58b7943df7a}{eet\+\_\+identity\+\_\+x509}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, int $\ast$der\+\_\+length)
\begin{DoxyCompactList}\small\item\em Gets the x509 der certificate associated with an Eet\+\_\+\+File. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const void $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_gacabba4892e4492464fe29309508a8c99}{eet\+\_\+identity\+\_\+signature}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, int $\ast$signature\+\_\+length)
\begin{DoxyCompactList}\small\item\em Gets the raw signature associated with an Eet\+\_\+\+File. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const void $\ast$ \mbox{\hyperlink{group__Eet__Cipher__Group_gacb54b5441fc049d52b4e3f212087c8a0}{eet\+\_\+identity\+\_\+sha1}} (\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$ef, int $\ast$sha1\+\_\+length)
\begin{DoxyCompactList}\small\item\em Gets the S\+H\+A1 associated with a file. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void \mbox{\hyperlink{group__Eet__Cipher__Group_ga131e4a43a0ae98dc31a9a642ada33357}{eet\+\_\+identity\+\_\+certificate\+\_\+print}} (const unsigned char $\ast$certificate, int der\+\_\+length, F\+I\+LE $\ast$out)
\begin{DoxyCompactList}\small\item\em Displays the x509 der certificate to out. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Eet allows one to protect entries of an \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} individually. 

This may be used to ensure data was not tampered or that third party does not read your data.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__File__Cipher__Group}{Eet File Ciphered Main Functions}} 

\mbox{\hyperlink{group__Eet__File__Image__Cipher__Group}{Image Store and Load using a Cipher}} 
\end{DoxySeeAlso}


\subsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}\label{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback@{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}}
\index{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback@{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}{Eet\_Key\_Password\_Callback}}
{\footnotesize\ttfamily typedef int($\ast$ Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback) (char $\ast$buffer, int size, int rwflag, void $\ast$data)}



Callback used to request if needed the password of a private key. 


\begin{DoxyParams}{Parameters}
{\em buffer} & the buffer where to store the password. \\
\hline
{\em size} & the maximum password size (size of buffer, including \textquotesingle{}\textbackslash{}0\textquotesingle{}). \\
\hline
{\em rwflag} & if the buffer is also readable or just writable. \\
\hline
{\em data} & currently unused, may contain some context in future. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success and password was set to {\ttfamily buffer}, {\ttfamily 0} on failure.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eet__Cipher__Group_gae8be5ad35c585cdf5034309bc97f1af8}\label{group__Eet__Cipher__Group_gae8be5ad35c585cdf5034309bc97f1af8}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+open@{eet\+\_\+identity\+\_\+open}}
\index{eet\+\_\+identity\+\_\+open@{eet\+\_\+identity\+\_\+open}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+open()}{eet\_identity\_open()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}}$\ast$ eet\+\_\+identity\+\_\+open (\begin{DoxyParamCaption}\item[{const char $\ast$}]{certificate\+\_\+file,  }\item[{const char $\ast$}]{private\+\_\+key\+\_\+file,  }\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}}}]{cb }\end{DoxyParamCaption})}



Creates an Eet\+\_\+\+Key needed for signing an eet file. 

The certificate should provide the public that match the private key. No verification is done to ensure that.


\begin{DoxyParams}{Parameters}
{\em certificate\+\_\+file} & The file where to find the certificate. \\
\hline
{\em private\+\_\+key\+\_\+file} & The file that contains the private key. \\
\hline
{\em cb} & Function to callback if password is required to unlock private key. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A key handle to use, or {\ttfamily N\+U\+LL} on failure.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}{eet\+\_\+identity\+\_\+close()}}
\end{DoxySeeAlso}
\begin{DoxyWarning}{Warning}
You need to compile signature support in E\+ET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+open(), E\+I\+N\+A\+\_\+\+F\+I\+L\+E\+\_\+\+S\+E\+Q\+U\+E\+N\+T\+I\+AL, eina\+\_\+file\+\_\+size\+\_\+get(), eina\+\_\+mmap\+\_\+safety\+\_\+enabled\+\_\+set(), E\+I\+N\+A\+\_\+\+T\+R\+UE, and emile\+\_\+cipher\+\_\+init().

\mbox{\Hypertarget{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}\label{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+close@{eet\+\_\+identity\+\_\+close}}
\index{eet\+\_\+identity\+\_\+close@{eet\+\_\+identity\+\_\+close}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+close()}{eet\_identity\_close()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eet\+\_\+identity\+\_\+close (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$}]{key }\end{DoxyParamCaption})}



Close and release all resource used by an Eet\+\_\+\+Key. 

A reference counter prevent it from being freed until all file using it are also closed.


\begin{DoxyParams}{Parameters}
{\em key} & the key handle to close and free resources.\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References emile\+\_\+cipher\+\_\+init().

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}\label{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+set@{eet\+\_\+identity\+\_\+set}}
\index{eet\+\_\+identity\+\_\+set@{eet\+\_\+identity\+\_\+set}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+set()}{eet\_identity\_set()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eet__Group_gab002b16c58e2a62fc7981581647a0092}{Eet\+\_\+\+Error}} eet\+\_\+identity\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$}]{key }\end{DoxyParamCaption})}



Sets a key to sign a file. 


\begin{DoxyParams}{Parameters}
{\em ef} & the file to set the identity. \\
\hline
{\em key} & the key handle to set as identity. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eet__Group_ggaa9142d865094701672375485d4a6284da624f64fe9803c1a4229a60214d675fa4}{E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+B\+A\+D\+\_\+\+O\+B\+J\+E\+CT}} if {\ttfamily ef} is invalid or \mbox{\hyperlink{group__Eet__Group_ggaa9142d865094701672375485d4a6284da2e3af24c66d0decf7c97fe4e5a7f75d4}{E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+NE}} on success.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+B\+A\+D\+\_\+\+O\+B\+J\+E\+CT, and E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+NE.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}\label{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+print@{eet\+\_\+identity\+\_\+print}}
\index{eet\+\_\+identity\+\_\+print@{eet\+\_\+identity\+\_\+print}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+print()}{eet\_identity\_print()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eet\+\_\+identity\+\_\+print (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key}} $\ast$}]{key,  }\item[{F\+I\+LE $\ast$}]{out }\end{DoxyParamCaption})}



Displays both private and public key of an Eet\+\_\+\+Key. 


\begin{DoxyParams}{Parameters}
{\em key} & the handle to print. \\
\hline
{\em out} & where to print.\\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
You need to compile signature support in E\+ET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References emile\+\_\+cipher\+\_\+init(), and E\+RR.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}\label{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+verify@{eet\+\_\+identity\+\_\+verify}}
\index{eet\+\_\+identity\+\_\+verify@{eet\+\_\+identity\+\_\+verify}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+verify()}{eet\_identity\_verify()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eet\+\_\+identity\+\_\+verify (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{const char $\ast$}]{certificate\+\_\+file }\end{DoxyParamCaption})}



Compares the identify certificate of an eet file against a stored one. 


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to check the identify of \\
\hline
{\em certificate\+\_\+file} & The path to the certificate file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} if the certificates match, otherwise {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} 
\end{DoxyReturn}
The {\ttfamily ef} file handle mus be valid, and a signed file, otherwise checking will fail. The path to the certificate file must be a valid file path to a \textquotesingle{}pem\textquotesingle{} format file (the same used for siging with \mbox{\hyperlink{group__Eet__Cipher__Group_gae8be5ad35c585cdf5034309bc97f1af8}{eet\+\_\+identity\+\_\+open()}} as a certificate file).

\begin{DoxyNote}{Note}
This function can not be used to provide any security mecanism. You need to check your x509 certificate against a chain of trust to have a proper security. This is just a convenience test function. 
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
You need to compile signature support in E\+ET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+13 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, and E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Eet__Cipher__Group_ga6f92a1276ed7e87d5a7ba58b7943df7a}\label{group__Eet__Cipher__Group_ga6f92a1276ed7e87d5a7ba58b7943df7a}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+x509@{eet\+\_\+identity\+\_\+x509}}
\index{eet\+\_\+identity\+\_\+x509@{eet\+\_\+identity\+\_\+x509}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+x509()}{eet\_identity\_x509()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const void$\ast$ eet\+\_\+identity\+\_\+x509 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{int $\ast$}]{der\+\_\+length }\end{DoxyParamCaption})}



Gets the x509 der certificate associated with an Eet\+\_\+\+File. 

Will return N\+U\+LL if the file is not signed.


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to query. \\
\hline
{\em der\+\_\+length} & The length of returned data, may be {\ttfamily N\+U\+LL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the x509 certificate or {\ttfamily N\+U\+LL} on error.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}
\mbox{\Hypertarget{group__Eet__Cipher__Group_gacabba4892e4492464fe29309508a8c99}\label{group__Eet__Cipher__Group_gacabba4892e4492464fe29309508a8c99}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+signature@{eet\+\_\+identity\+\_\+signature}}
\index{eet\+\_\+identity\+\_\+signature@{eet\+\_\+identity\+\_\+signature}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+signature()}{eet\_identity\_signature()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const void$\ast$ eet\+\_\+identity\+\_\+signature (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{int $\ast$}]{signature\+\_\+length }\end{DoxyParamCaption})}



Gets the raw signature associated with an Eet\+\_\+\+File. 

Will return N\+U\+LL if the file is not signed.


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to query. \\
\hline
{\em signature\+\_\+length} & The length of returned data, may be {\ttfamily N\+U\+LL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The raw signature or {\ttfamily N\+U\+LL} on error. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eet__Cipher__Group_gacb54b5441fc049d52b4e3f212087c8a0}\label{group__Eet__Cipher__Group_gacb54b5441fc049d52b4e3f212087c8a0}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+sha1@{eet\+\_\+identity\+\_\+sha1}}
\index{eet\+\_\+identity\+\_\+sha1@{eet\+\_\+identity\+\_\+sha1}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+sha1()}{eet\_identity\_sha1()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const void$\ast$ eet\+\_\+identity\+\_\+sha1 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File}} $\ast$}]{ef,  }\item[{int $\ast$}]{sha1\+\_\+length }\end{DoxyParamCaption})}



Gets the S\+H\+A1 associated with a file. 

Could be the one used to sign the data or if the data where not signed, it will be the S\+H\+A1 of the file.


\begin{DoxyParams}{Parameters}
{\em ef} & The file handle to query. \\
\hline
{\em sha1\+\_\+length} & The length of returned data, may be {\ttfamily N\+U\+LL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the associated S\+H\+A1 or {\ttfamily N\+U\+LL} on error.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}
\mbox{\Hypertarget{group__Eet__Cipher__Group_ga131e4a43a0ae98dc31a9a642ada33357}\label{group__Eet__Cipher__Group_ga131e4a43a0ae98dc31a9a642ada33357}} 
\index{Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}!eet\+\_\+identity\+\_\+certificate\+\_\+print@{eet\+\_\+identity\+\_\+certificate\+\_\+print}}
\index{eet\+\_\+identity\+\_\+certificate\+\_\+print@{eet\+\_\+identity\+\_\+certificate\+\_\+print}!Cipher, Identity and Protection Mechanisms@{Cipher, Identity and Protection Mechanisms}}
\subsubsection{\texorpdfstring{eet\+\_\+identity\+\_\+certificate\+\_\+print()}{eet\_identity\_certificate\_print()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eet\+\_\+identity\+\_\+certificate\+\_\+print (\begin{DoxyParamCaption}\item[{const unsigned char $\ast$}]{certificate,  }\item[{int}]{der\+\_\+length,  }\item[{F\+I\+LE $\ast$}]{out }\end{DoxyParamCaption})}



Displays the x509 der certificate to out. 


\begin{DoxyParams}{Parameters}
{\em certificate} & the x509 certificate to print \\
\hline
{\em der\+\_\+length} & The length the certificate. \\
\hline
{\em out} & where to print.\\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
You need to compile signature support in E\+ET. 
\end{DoxyWarning}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


References alloca(), emile\+\_\+cipher\+\_\+init(), E\+RR, and I\+NF.

