Get rid of pk_wrap_rsa()
diff --git a/library/pk.c b/library/pk.c
index c83d02b..19bc79b 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -58,7 +58,6 @@
ctx->info = NULL;
ctx->type = POLARSSL_PK_NONE;
ctx->data = NULL;
- ctx->dont_free = 0;
}
/*
@@ -88,8 +87,7 @@
; /* guard for the else's above */
}
- if( ! ctx->dont_free )
- polarssl_free( ctx->data );
+ polarssl_free( ctx->data );
ctx->info = NULL;
ctx->type = POLARSSL_PK_NONE;
@@ -150,20 +148,3 @@
return( 0 );
}
-
-#if defined(POLARSSL_RSA_C)
-/*
- * Wrap an RSA context in a PK context
- */
-int pk_wrap_rsa( pk_context *ctx, const rsa_context *rsa)
-{
- if( ctx->type != POLARSSL_PK_NONE )
- return( POLARSSL_ERR_PK_TYPE_MISMATCH );
-
- ctx->type = POLARSSL_PK_RSA;
- ctx->data = (rsa_context *) rsa;
- ctx->dont_free = 1;
-
- return( 0 );
-}
-#endif