Merge code for RSA and ECDSA in SSL
diff --git a/include/polarssl/pk.h b/include/polarssl/pk.h
index 6135bb0..7c674ab 100644
--- a/include/polarssl/pk.h
+++ b/include/polarssl/pk.h
@@ -245,6 +245,17 @@
size_t pk_get_size( const pk_context *ctx );
/**
+ * \brief Get the length in bytes of the underlying key
+ * \param ctx Context to use
+ *
+ * \return Key lenght in bytes, or 0 on error
+ */
+static size_t pk_get_len( const pk_context *ctx )
+{
+ return( ( pk_get_size( ctx ) + 7 ) / 8 );
+}
+
+/**
* \brief Tell if a context can do the operation given by type
*
* \param ctx Context to test