Fix error code in pk.h
diff --git a/include/polarssl/error.h b/include/polarssl/error.h
index c326154..f8c23e6 100644
--- a/include/polarssl/error.h
+++ b/include/polarssl/error.h
@@ -76,7 +76,8 @@
* Name ID Nr of Errors
* PEM 1 9
* PKCS#12 1 4 (Started from top)
- * X509 2 23
+ * X509 2 25
+ * PK 2 1 (Started from top)
* DHM 3 6
* PKCS5 3 4 (Started from top)
* RSA 4 9
diff --git a/include/polarssl/pk.h b/include/polarssl/pk.h
index 16aac43..3806027 100644
--- a/include/polarssl/pk.h
+++ b/include/polarssl/pk.h
@@ -27,6 +27,8 @@
#ifndef POLARSSL_PK_H
#define POLARSSL_PK_H
+#define POLARSSL_ERR_PK_MALLOC_FAILED -0x2F80 /**< Memory alloation failed. */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -66,8 +68,7 @@
* \param ctx Context to initialize
* \param type Type of key
*
- * \return O on success, -1 on memory allocation error
- * TODO: use appropriate error constant
+ * \return O on success, or POLARSSL_ERR_PK_MALLOC_FAILED
*/
int pk_set_type( pk_context *ctx, pk_type_t type );