From 9169921271f646a4323fbfa2a9e7c2543915abe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 22 Jan 2015 16:26:39 +0000 Subject: [PATCH] Rename to mbed TLS in examples --- programs/ssl/ssl_fork_server.c | 2 +- programs/ssl/ssl_mail_client.c | 4 ++-- programs/ssl/ssl_pthread_server.c | 2 +- programs/ssl/ssl_server.c | 2 +- programs/ssl/ssl_server2.c | 2 +- programs/test/o_p_test.c | 24 ++++++++++++------------ programs/x509/cert_req.c | 4 ++-- programs/x509/cert_write.c | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index 66505a9cf..18076abea 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -52,7 +52,7 @@ #define HTTP_RESPONSE \ "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

PolarSSL Test Server

\r\n" \ + "

mbed TLS Test Server

\r\n" \ "

Successful connection using: %s

\r\n" #if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_CERTS_C) || \ diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 2105a2ba5..085512fdf 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -805,9 +805,9 @@ int main( int argc, char *argv[] ) printf( " > Write content to server:" ); fflush( stdout ); - len = sprintf( (char *) buf, "From: %s\r\nSubject: PolarSSL Test mail\r\n\r\n" + len = sprintf( (char *) buf, "From: %s\r\nSubject: mbed TLS Test mail\r\n\r\n" "This is a simple test mail from the " - "PolarSSL mail client example.\r\n" + "mbed TLS mail client example.\r\n" "\r\n" "Enjoy!", opt.mail_from ); ret = write_ssl_data( &ssl, buf, len ); diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index c61c59531..ba3f76c9e 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -77,7 +77,7 @@ int main( int argc, char *argv[] ) #define HTTP_RESPONSE \ "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

PolarSSL Test Server

\r\n" \ + "

mbed TLS Test Server

\r\n" \ "

Successful connection using: %s

\r\n" #define DEBUG_LEVEL 0 diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c index a518c951e..3921b70e1 100644 --- a/programs/ssl/ssl_server.c +++ b/programs/ssl/ssl_server.c @@ -71,7 +71,7 @@ int main( int argc, char *argv[] ) #define HTTP_RESPONSE \ "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

PolarSSL Test Server

\r\n" \ + "

mbed TLS Test Server

\r\n" \ "

Successful connection using: %s

\r\n" #define DEBUG_LEVEL 0 diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 8538fcb78..ea5004640 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -134,7 +134,7 @@ int main( int argc, char *argv[] ) * packets (for fragmentation purposes) */ #define HTTP_RESPONSE \ "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

PolarSSL Test Server

\r\n" \ + "

mbed TLS Test Server

\r\n" \ "

Successful connection using: %s

\r\n" // LONG_RESPONSE /* diff --git a/programs/test/o_p_test.c b/programs/test/o_p_test.c index 358cd90ee..ea7bd154a 100644 --- a/programs/test/o_p_test.c +++ b/programs/test/o_p_test.c @@ -1,5 +1,5 @@ /* - * Test application that shows some PolarSSL and OpenSSL compatibility + * Test application that shows some mbed TLS and OpenSSL compatibility * * Copyright (C) 2011-2012 Brainspark B.V. * @@ -103,7 +103,7 @@ int main( int argc, char *argv[] ) goto exit; } - printf( " . Reading private key from %s into PolarSSL ...", argv[1] ); + printf( " . Reading private key from %s into mbed TLS ...", argv[1] ); fflush( stdout ); pk_init( &p_pk ); @@ -152,7 +152,7 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA encryption with public key. */ - printf( " . Generating the RSA encrypted value with PolarSSL (RSA_PUBLIC) ..." ); + printf( " . Generating the RSA encrypted value with mbed TLS (RSA_PUBLIC) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_encrypt( p_rsa, ctr_drbg_random, &ctr_drbg, RSA_PUBLIC, strlen( argv[2] ), input, p_pub_encrypted ) ) != 0 ) @@ -178,7 +178,7 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA encryption with private key. */ - printf( " . Generating the RSA encrypted value with PolarSSL (RSA_PRIVATE) ..." ); + printf( " . Generating the RSA encrypted value with mbed TLS (RSA_PRIVATE) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_encrypt( p_rsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, strlen( argv[2] ), input, p_priv_encrypted ) ) != 0 ) @@ -206,7 +206,7 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA decryption with private key. */ - printf( " . Generating the RSA decrypted value for OpenSSL (PUBLIC) with PolarSSL (PRIVATE) ..." ); + printf( " . Generating the RSA decrypted value for OpenSSL (PUBLIC) with mbed TLS (PRIVATE) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_decrypt( p_rsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, &olen, o_pub_encrypted, p_pub_decrypted, 1024 ) ) != 0 ) @@ -216,7 +216,7 @@ int main( int argc, char *argv[] ) else printf( " passed\n"); - printf( " . Generating the RSA decrypted value for PolarSSL (PUBLIC) with OpenSSL (PRIVATE) ..." ); + printf( " . Generating the RSA decrypted value for mbed TLS (PUBLIC) with OpenSSL (PRIVATE) ..." ); fflush( stdout ); if( ( ret = RSA_private_decrypt( p_rsa->len, p_pub_encrypted, o_pub_decrypted, o_rsa, RSA_PKCS1_PADDING ) ) == -1 ) @@ -230,7 +230,7 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA decryption with public key. */ - printf( " . Generating the RSA decrypted value for OpenSSL (PRIVATE) with PolarSSL (PUBLIC) ..." ); + printf( " . Generating the RSA decrypted value for OpenSSL (PRIVATE) with mbed TLS (PUBLIC) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_decrypt( p_rsa, NULL, NULL, RSA_PUBLIC, &olen, o_priv_encrypted, p_priv_decrypted, 1024 ) ) != 0 ) @@ -240,7 +240,7 @@ int main( int argc, char *argv[] ) else printf( " passed\n"); - printf( " . Generating the RSA decrypted value for PolarSSL (PRIVATE) with OpenSSL (PUBLIC) ..." ); + printf( " . Generating the RSA decrypted value for mbed TLS (PRIVATE) with OpenSSL (PUBLIC) ..." ); fflush( stdout ); if( ( ret = RSA_public_decrypt( p_rsa->len, p_priv_encrypted, o_priv_decrypted, o_rsa, RSA_PKCS1_PADDING ) ) == -1 ) @@ -252,10 +252,10 @@ int main( int argc, char *argv[] ) printf( " passed\n"); printf( "\n" ); - printf( "String value (OpenSSL Public Encrypt, PolarSSL Private Decrypt): '%s'\n", p_pub_decrypted ); - printf( "String value (PolarSSL Public Encrypt, OpenSSL Private Decrypt): '%s'\n", o_pub_decrypted ); - printf( "String value (OpenSSL Private Encrypt, PolarSSL Public Decrypt): '%s'\n", p_priv_decrypted ); - printf( "String value (PolarSSL Private Encrypt, OpenSSL Public Decrypt): '%s'\n", o_priv_decrypted ); + printf( "String value (OpenSSL Public Encrypt, mbed TLS Private Decrypt): '%s'\n", p_pub_decrypted ); + printf( "String value (mbed TLS Public Encrypt, OpenSSL Private Decrypt): '%s'\n", o_pub_decrypted ); + printf( "String value (OpenSSL Private Encrypt, mbed TLS Public Decrypt): '%s'\n", p_priv_decrypted ); + printf( "String value (mbed TLS Private Encrypt, OpenSSL Public Decrypt): '%s'\n", o_priv_decrypted ); exit: ctr_drbg_free( &ctr_drbg ); diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 19173c127..fbf8dae5c 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -57,7 +57,7 @@ int main( int argc, char *argv[] ) #define DFL_FILENAME "keyfile.key" #define DFL_DEBUG_LEVEL 0 #define DFL_OUTPUT_FILENAME "cert.req" -#define DFL_SUBJECT_NAME "CN=Cert,O=PolarSSL,C=NL" +#define DFL_SUBJECT_NAME "CN=Cert,O=mbed TLS,C=UK" #define DFL_KEY_USAGE 0 #define DFL_NS_CERT_TYPE 0 @@ -109,7 +109,7 @@ int write_certificate_request( x509write_csr *req, const char *output_file, " filename=%%s default: keyfile.key\n" \ " debug_level=%%d default: 0 (disabled)\n" \ " output_file=%%s default: cert.req\n" \ - " subject_name=%%s default: CN=Cert,O=PolarSSL,C=NL\n" \ + " subject_name=%%s default: CN=Cert,O=mbed TLS,C=UK\n" \ " key_usage=%%s default: (empty)\n" \ " Comma-separated-list of values:\n" \ " digital_signature\n" \ diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index 2ec073815..938f29310 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -63,8 +63,8 @@ int main( int argc, char *argv[] ) #define DFL_SUBJECT_PWD "" #define DFL_ISSUER_PWD "" #define DFL_OUTPUT_FILENAME "cert.crt" -#define DFL_SUBJECT_NAME "CN=Cert,O=PolarSSL,C=NL" -#define DFL_ISSUER_NAME "CN=CA,O=PolarSSL,C=NL" +#define DFL_SUBJECT_NAME "CN=Cert,O=mbed TLS,C=UK" +#define DFL_ISSUER_NAME "CN=CA,O=mbed TLS,C=UK" #define DFL_NOT_BEFORE "20010101000000" #define DFL_NOT_AFTER "20301231235959" #define DFL_SERIAL "1" @@ -142,12 +142,12 @@ int write_certificate( x509write_cert *crt, const char *output_file, USAGE_CSR \ " subject_key=%%s default: subject.key\n" \ " subject_pwd=%%s default: (empty)\n" \ - " subject_name=%%s default: CN=Cert,O=PolarSSL,C=NL\n" \ + " subject_name=%%s default: CN=Cert,O=mbed TLS,C=UK\n" \ "\n" \ " issuer_crt=%%s default: (empty)\n" \ " If issuer_crt is specified, issuer_name is\n" \ " ignored!\n" \ - " issuer_name=%%s default: CN=CA,O=PolarSSL,C=NL\n" \ + " issuer_name=%%s default: CN=CA,O=mbed TLS,C=UK\n" \ "\n" \ " selfsign=%%d default: 0 (false)\n" \ " If selfsign is enabled, issuer_name and\n" \