Skip to content

Commit 63af5f6

Browse files
committed
Update docs of ecc_free().
This fixes #710 Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent 9a13375 commit 63af5f6

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

doc/crypt.tex

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5591,16 +5591,6 @@ \subsection{Legacy Key Generation}
55915591

55925592
The \textit{keysize} maps to the specific curve according to table \ref{fig:legacy-curve-names}.
55935593

5594-
\subsection{Key Free}
5595-
To free the memory allocated by one of \textit{ecc\_generate\_key()}, \textit{ecc\_make\_key()}, \textit{ecc\_make\_key\_ex()}, \textit{ecc\_import()},
5596-
\textit{ecc\_import\_openssl()}, \textit{ecc\_import\_x509()}, \textit{ecc\_import\_pkcs8()}, \textit{ecc\_ansi\_x963\_import()},
5597-
\textit{ecc\_ansi\_x963\_import\_ex()}, or \textit{ecc\_set\_key()} the following function is provided:
5598-
5599-
\index{ecc\_free()}
5600-
\begin{verbatim}
5601-
void ecc_free(ecc_key *key);
5602-
\end{verbatim}
5603-
56045594
\subsection{Key Helper Functions}
56055595
To get the curve OID as a NUL--terminated string the following function is provided:
56065596

@@ -5850,6 +5840,32 @@ \subsection{ANSI X9.63 Import (deprecated)}
58505840
The imported key is stored in the ECC key pointed to by \textit{key}. The function will free any allocated memory upon error.
58515841

58525842

5843+
\mysection{Key Free}
5844+
Any ECC API function which imports, generates, or finds (part of) a key with an argument of type
5845+
\code{ecc\_key*} must upon success call the following function to free the memory allocated.
5846+
5847+
\index{ecc\_free()}
5848+
\begin{verbatim}
5849+
void ecc_free(ecc_key *key);
5850+
\end{verbatim}
5851+
5852+
The following list of API functions must call \code{ecc\_free()} upon success:
5853+
5854+
\code{ecc\_ansi\_x963\_import()},
5855+
\code{ecc\_ansi\_x963\_import\_ex()},
5856+
\code{ecc\_copy\_curve()},
5857+
\code{ecc\_generate\_key()},
5858+
\code{ecc\_import()},
5859+
\code{ecc\_import\_ex()},
5860+
\code{ecc\_import\_openssl()},
5861+
\code{ecc\_import\_pkcs8()},
5862+
\code{ecc\_import\_x509()},
5863+
\code{ecc\_make\_key()},
5864+
\code{ecc\_make\_key\_ex()},
5865+
\code{ecc\_set\_curve()},
5866+
\code{ecc\_set\_key()}.
5867+
5868+
58535869
\mysection{Signatures (ECDSA)}
58545870
There are also functions to sign and verify messages. They use the \textit{ANSI X9.62} \textit{ECDSA} algorithm to generate and verify signatures in the
58555871
\textit{ANSI X9.62} format.

0 commit comments

Comments
 (0)