Rename x509parse_key & co with _rsa suffix
diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c
index 2f906c4..bea996a 100644
--- a/programs/pkey/key_app.c
+++ b/programs/pkey/key_app.c
@@ -164,14 +164,14 @@
printf( "\n . Loading the private key ..." );
fflush( stdout );
- ret = x509parse_keyfile( &rsa, opt.filename, opt.password );
+ ret = x509parse_keyfile_rsa( &rsa, opt.filename, opt.password );
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
polarssl_strerror( ret, buf, 1024 );
#endif
- printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
+ printf( " failed\n ! x509parse_key_rsa returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
goto exit;
}
@@ -199,14 +199,14 @@
printf( "\n . Loading the public key ..." );
fflush( stdout );
- ret = x509parse_public_keyfile( &rsa, opt.filename );
+ ret = x509parse_public_keyfile_rsa( &rsa, opt.filename );
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
polarssl_strerror( ret, buf, 1024 );
#endif
- printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
+ printf( " failed\n ! x509parse_public_key_rsa returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
goto exit;
}
diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c
index feb2ecc..88cb907 100644
--- a/programs/pkey/key_app_writer.c
+++ b/programs/pkey/key_app_writer.c
@@ -238,14 +238,14 @@
printf( "\n . Loading the private key ..." );
fflush( stdout );
- ret = x509parse_keyfile( &rsa, opt.filename, NULL );
+ ret = x509parse_keyfile_rsa( &rsa, opt.filename, NULL );
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
polarssl_strerror( ret, buf, 1024 );
#endif
- printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
+ printf( " failed\n ! x509parse_key_rsa returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
goto exit;
}
@@ -274,14 +274,14 @@
printf( "\n . Loading the public key ..." );
fflush( stdout );
- ret = x509parse_public_keyfile( &rsa, opt.filename );
+ ret = x509parse_public_keyfile_rsa( &rsa, opt.filename );
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
polarssl_strerror( ret, buf, 1024 );
#endif
- printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
+ printf( " failed\n ! x509parse_public_key_rsa returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
goto exit;
}
diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c
index 8238708..e848f54 100644
--- a/programs/pkey/rsa_sign_pss.c
+++ b/programs/pkey/rsa_sign_pss.c
@@ -101,7 +101,7 @@
rsa_init( &rsa, RSA_PKCS_V21, POLARSSL_MD_SHA1 );
- if( ( ret = x509parse_keyfile( &rsa, argv[1], "" ) ) != 0 )
+ if( ( ret = x509parse_keyfile_rsa( &rsa, argv[1], "" ) ) != 0 )
{
ret = 1;
printf( " failed\n ! Could not open '%s'\n", argv[1] );
diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c
index b44daa0..00d7378 100644
--- a/programs/pkey/rsa_verify_pss.c
+++ b/programs/pkey/rsa_verify_pss.c
@@ -83,9 +83,9 @@
rsa_init( &rsa, RSA_PKCS_V21, POLARSSL_MD_SHA1 );
- if( ( ret = x509parse_public_keyfile( &rsa, argv[1] ) ) != 0 )
+ if( ( ret = x509parse_public_keyfile_rsa( &rsa, argv[1] ) ) != 0 )
{
- printf( " failed\n ! x509parse_public_key returned %d\n\n", ret );
+ printf( " failed\n ! x509parse_public_key_rsa returned %d\n\n", ret );
goto exit;
}
diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c
index 1ddb86d..036cc67 100644
--- a/programs/ssl/ssl_client2.c
+++ b/programs/ssl/ssl_client2.c
@@ -533,11 +533,11 @@
#if defined(POLARSSL_FS_IO)
if( strlen( opt.key_file ) )
- ret = x509parse_keyfile( &rsa, opt.key_file, "" );
+ ret = x509parse_keyfile_rsa( &rsa, opt.key_file, "" );
else
#endif
#if defined(POLARSSL_CERTS_C)
- ret = x509parse_key( &rsa, (const unsigned char *) test_cli_key,
+ ret = x509parse_key_rsa( &rsa, (const unsigned char *) test_cli_key,
strlen( test_cli_key ), NULL, 0 );
#else
{
@@ -547,7 +547,7 @@
#endif
if( ret != 0 )
{
- printf( " failed\n ! x509parse_key returned -0x%x\n\n", -ret );
+ printf( " failed\n ! x509parse_key_rsa returned -0x%x\n\n", -ret );
goto exit;
}
diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c
index e021ebb..986458b 100644
--- a/programs/ssl/ssl_fork_server.c
+++ b/programs/ssl/ssl_fork_server.c
@@ -139,7 +139,7 @@
/*
* This demonstration program uses embedded test certificates.
* Instead, you may want to use x509parse_crtfile() to read the
- * server and CA certificates, as well as x509parse_keyfile().
+ * server and CA certificates, as well as x509parse_keyfile_rsa().
*/
ret = x509parse_crt( &srvcert, (const unsigned char *) test_srv_crt,
strlen( test_srv_crt ) );
@@ -158,11 +158,11 @@
}
rsa_init( &rsa, RSA_PKCS_V15, 0 );
- ret = x509parse_key( &rsa, (const unsigned char *) test_srv_key,
+ ret = x509parse_key_rsa( &rsa, (const unsigned char *) test_srv_key,
strlen( test_srv_key ), NULL, 0 );
if( ret != 0 )
{
- printf( " failed\n ! x509parse_key returned %d\n\n", ret );
+ printf( " failed\n ! x509parse_key_rsa returned %d\n\n", ret );
goto exit;
}
diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c
index 4b5d177..665cdbf 100644
--- a/programs/ssl/ssl_mail_client.c
+++ b/programs/ssl/ssl_mail_client.c
@@ -532,11 +532,11 @@
#if defined(POLARSSL_FS_IO)
if( strlen( opt.key_file ) )
- ret = x509parse_keyfile( &rsa, opt.key_file, "" );
+ ret = x509parse_keyfile_rsa( &rsa, opt.key_file, "" );
else
#endif
#if defined(POLARSSL_CERTS_C)
- ret = x509parse_key( &rsa, (const unsigned char *) test_cli_key,
+ ret = x509parse_key_rsa( &rsa, (const unsigned char *) test_cli_key,
strlen( test_cli_key ), NULL, 0 );
#else
{
@@ -546,7 +546,7 @@
#endif
if( ret != 0 )
{
- printf( " failed\n ! x509parse_key returned %d\n\n", ret );
+ printf( " failed\n ! x509parse_key_rsa returned %d\n\n", ret );
goto exit;
}
diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c
index 3059236..dbb193b 100644
--- a/programs/ssl/ssl_server.c
+++ b/programs/ssl/ssl_server.c
@@ -117,7 +117,7 @@
/*
* This demonstration program uses embedded test certificates.
* Instead, you may want to use x509parse_crtfile() to read the
- * server and CA certificates, as well as x509parse_keyfile().
+ * server and CA certificates, as well as x509parse_keyfile_rsa().
*/
ret = x509parse_crt( &srvcert, (const unsigned char *) test_srv_crt,
strlen( test_srv_crt ) );
@@ -136,11 +136,11 @@
}
rsa_init( &rsa, RSA_PKCS_V15, 0 );
- ret = x509parse_key( &rsa, (const unsigned char *) test_srv_key,
+ ret = x509parse_key_rsa( &rsa, (const unsigned char *) test_srv_key,
strlen( test_srv_key ), NULL, 0 );
if( ret != 0 )
{
- printf( " failed\n ! x509parse_key returned %d\n\n", ret );
+ printf( " failed\n ! x509parse_key_rsa returned %d\n\n", ret );
goto exit;
}
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index 6197cda..db2d123 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -501,11 +501,11 @@
#if defined(POLARSSL_FS_IO)
if( strlen( opt.key_file ) )
- ret = x509parse_keyfile( &rsa, opt.key_file, "" );
+ ret = x509parse_keyfile_rsa( &rsa, opt.key_file, "" );
else
#endif
#if defined(POLARSSL_CERTS_C)
- ret = x509parse_key( &rsa, (const unsigned char *) test_srv_key,
+ ret = x509parse_key_rsa( &rsa, (const unsigned char *) test_srv_key,
strlen( test_srv_key ), NULL, 0 );
#else
{
@@ -515,7 +515,7 @@
#endif
if( ret != 0 )
{
- printf( " failed\n ! x509parse_key returned -0x%x\n\n", -ret );
+ printf( " failed\n ! x509parse_key_rsa returned -0x%x\n\n", -ret );
goto exit;
}
diff --git a/programs/test/o_p_test.c b/programs/test/o_p_test.c
index 9726282..84dd38b 100644
--- a/programs/test/o_p_test.c
+++ b/programs/test/o_p_test.c
@@ -104,7 +104,7 @@
fflush( stdout );
rsa_init( &p_rsa, RSA_PKCS_V15, 0 );
- if( x509parse_keyfile( &p_rsa, argv[1], NULL ) != 0 )
+ if( x509parse_keyfile_rsa( &p_rsa, argv[1], NULL ) != 0 )
{
ret = 1;
printf( " failed\n ! Could not load key.\n\n" );
diff --git a/programs/test/ssl_cert_test.c b/programs/test/ssl_cert_test.c
index 83a2a01..bf4684b 100644
--- a/programs/test/ssl_cert_test.c
+++ b/programs/test/ssl_cert_test.c
@@ -196,10 +196,10 @@
printf( " . Loading the client private key %s...", name );
fflush( stdout );
- ret = x509parse_keyfile( &rsa, name, NULL );
+ ret = x509parse_keyfile_rsa( &rsa, name, NULL );
if( ret != 0 )
{
- printf( " failed\n ! x509parse_key returned %d\n\n", ret );
+ printf( " failed\n ! x509parse_key_rsa returned %d\n\n", ret );
goto exit;
}
diff --git a/programs/test/ssl_test.c b/programs/test/ssl_test.c
index 607b092..ce45ccf 100644
--- a/programs/test/ssl_test.c
+++ b/programs/test/ssl_test.c
@@ -229,11 +229,11 @@
goto exit;
}
- ret = x509parse_key( &rsa, (const unsigned char *) test_srv_key,
+ ret = x509parse_key_rsa( &rsa, (const unsigned char *) test_srv_key,
strlen( test_srv_key ), NULL, 0 );
if( ret != 0 )
{
- printf( " ! x509parse_key returned %d\n\n", ret );
+ printf( " ! x509parse_key_rsa returned %d\n\n", ret );
goto exit;
}
#endif
diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c
index 20418ab..cbd6252 100644
--- a/programs/x509/cert_req.c
+++ b/programs/x509/cert_req.c
@@ -267,14 +267,14 @@
printf( "\n . Loading the private key ..." );
fflush( stdout );
- ret = x509parse_keyfile( &rsa, opt.filename, NULL );
+ ret = x509parse_keyfile_rsa( &rsa, opt.filename, NULL );
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
error_strerror( ret, buf, 1024 );
#endif
- printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
+ printf( " failed\n ! x509parse_key_rsa returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
goto exit;
}