\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 \hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} individually.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{}\label{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d} 
typedef struct \+\_\+\+Eet\+\_\+\+Key \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$ \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 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key} $\ast$ \hyperlink{group__Eet__Cipher__Group_gae8be5ad35c585cdf5034309bc97f1af8}{eet\+\_\+identity\+\_\+open} (const char $\ast$certificate\+\_\+file, const char $\ast$private\+\_\+key\+\_\+file, \hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback} cb)
\begin{DoxyCompactList}\small\item\em Create an Eet\+\_\+\+Key needed for signing an eet file. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void \hyperlink{group__Eet__Cipher__Group_gaa8b2e329d0ecdb55b564e1aa70ba557f}{eet\+\_\+identity\+\_\+close} (\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 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eet__Group_gab002b16c58e2a62fc7981581647a0092}{Eet\+\_\+\+Error} \hyperlink{group__Eet__Cipher__Group_ga687984e5f508017c01f6d22a203fce16}{eet\+\_\+identity\+\_\+set} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, \hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key} $\ast$key)
\begin{DoxyCompactList}\small\item\em Set a key to sign a file. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void \hyperlink{group__Eet__Cipher__Group_ga846b1e0f0f4a1a9c7ab9a4fc55728534}{eet\+\_\+identity\+\_\+print} (\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key} $\ast$key, F\+I\+LE $\ast$out)
\begin{DoxyCompactList}\small\item\em Display both private and public key of an Eet\+\_\+\+Key. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eet__Cipher__Group_ga29c3b343fd972696ff5bbd7bf928fb7e}{eet\+\_\+identity\+\_\+verify} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, const char $\ast$certificate\+\_\+file)
\begin{DoxyCompactList}\small\item\em Compare the identify certificate of an eet file against a stored one. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const void $\ast$ \hyperlink{group__Eet__Cipher__Group_ga6f92a1276ed7e87d5a7ba58b7943df7a}{eet\+\_\+identity\+\_\+x509} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, int $\ast$der\+\_\+length)
\begin{DoxyCompactList}\small\item\em Get the x509 der certificate associated with an Eet\+\_\+\+File. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const void $\ast$ \hyperlink{group__Eet__Cipher__Group_gacabba4892e4492464fe29309508a8c99}{eet\+\_\+identity\+\_\+signature} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, int $\ast$signature\+\_\+length)
\begin{DoxyCompactList}\small\item\em Get the raw signature associated with an Eet\+\_\+\+File. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const void $\ast$ \hyperlink{group__Eet__Cipher__Group_gacb54b5441fc049d52b4e3f212087c8a0}{eet\+\_\+identity\+\_\+sha1} (\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$ef, int $\ast$sha1\+\_\+length)
\begin{DoxyCompactList}\small\item\em Get the S\+H\+A1 associated with a file. \end{DoxyCompactList}\item 
\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void \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 Display the x509 der certificate to out. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Eet allows one to protect entries of an \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}
\hyperlink{group__Eet__File__Cipher__Group}{Eet File Ciphered Main Functions} 

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


\subsection{Typedef Documentation}
\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}
1 on success and password was set to {\ttfamily buffer}, 0 on failure.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}


\subsection{Function Documentation}
\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \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[{\hyperlink{group__Eet__Cipher__Group_ga37fcf12b2139e1084d01a7bc5d999ed9}{Eet\+\_\+\+Key\+\_\+\+Password\+\_\+\+Callback}}]{cb }\end{DoxyParamCaption})}



Create 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}
\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().

\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void eet\+\_\+identity\+\_\+close (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key} $\ast$}]{key }\end{DoxyParamCaption})}



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

An 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().



Referenced by eet\+\_\+identity\+\_\+print().

\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eet__Group_gab002b16c58e2a62fc7981581647a0092}{Eet\+\_\+\+Error} eet\+\_\+identity\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$}]{ef,  }\item[{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key} $\ast$}]{key }\end{DoxyParamCaption})}



Set 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}
\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 \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.

\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} void eet\+\_\+identity\+\_\+print (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__Cipher__Group_gaa958627af70e4ee4c54adba8805da30d}{Eet\+\_\+\+Key} $\ast$}]{key,  }\item[{F\+I\+LE $\ast$}]{out }\end{DoxyParamCaption})}



Display 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 alloca(), E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+B\+A\+D\+\_\+\+O\+B\+J\+E\+CT, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+M\+M\+A\+P\+\_\+\+F\+A\+I\+L\+ED, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+NE, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+T\+\_\+\+I\+M\+P\+L\+E\+M\+E\+N\+T\+ED, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+S\+I\+G\+N\+A\+T\+U\+R\+E\+\_\+\+F\+A\+I\+L\+ED, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+W\+R\+I\+T\+E\+\_\+\+E\+R\+R\+OR, E\+E\+T\+\_\+\+E\+R\+R\+O\+R\+\_\+\+X509\+\_\+\+E\+N\+C\+O\+D\+I\+N\+G\+\_\+\+F\+A\+I\+L\+ED, eet\+\_\+identity\+\_\+close(), eina\+\_\+mmap\+\_\+safety\+\_\+enabled\+\_\+set(), E\+I\+N\+A\+\_\+\+T\+R\+UE, emile\+\_\+cipher\+\_\+init(), E\+RR, mmap(), and munmap().

\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} eet\+\_\+identity\+\_\+verify (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$}]{ef,  }\item[{const char $\ast$}]{certificate\+\_\+file }\end{DoxyParamCaption})}



Compare 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}
E\+I\+N\+A\+\_\+\+T\+R\+UE if the certificates match, otherwise 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 \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.

\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const void$\ast$ eet\+\_\+identity\+\_\+x509 (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$}]{ef,  }\item[{int $\ast$}]{der\+\_\+length }\end{DoxyParamCaption})}



Get 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}
\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const void$\ast$ eet\+\_\+identity\+\_\+signature (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$}]{ef,  }\item[{int $\ast$}]{signature\+\_\+length }\end{DoxyParamCaption})}



Get 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}
\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 \hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI} const void$\ast$ eet\+\_\+identity\+\_\+sha1 (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\+\_\+\+File} $\ast$}]{ef,  }\item[{int $\ast$}]{sha1\+\_\+length }\end{DoxyParamCaption})}



Get 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}
\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 \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})}



Display 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(), eina\+\_\+binbuf\+\_\+manage\+\_\+new(), E\+I\+N\+A\+\_\+\+T\+R\+UE, emile\+\_\+binbuf\+\_\+cipher(), emile\+\_\+cipher\+\_\+init(), E\+RR, and I\+NF.

