Merge branch 'mbedtls-1.3' into development

* mbedtls-1.3:
  Fix typos in Changelog
  Fix macro name from wrong branch
  Fix bug in pk_parse_key()
  Fixed typos
  Updated Travis CI config for mbedtls project

Conflicts:
	include/mbedtls/ecp.h
	include/polarssl/compat-1.2.h
	include/polarssl/openssl.h
	include/polarssl/platform.h
	library/pkparse.c
	programs/pkey/mpi_demo.c
diff --git a/.travis.yml b/.travis.yml
index 0a51e7e..24c7667 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,14 +13,14 @@
 - tests/scripts/test-ref-configs.pl
 env:
   global:
-    secure: LidFb8vsR72MKTVpaZ8IYHR1xeVnff47/+ckEge5F9gcwf7QmfSI3+gBLZZciNdyrWzOFhlQ5Q2z/pqVeRtEkKrlcporoMMcHRIbyIA+lfRE1HnYHw7jITScfN9ZmK4msU1ElRlAk6U7ND6MPTH8QfWwchNafDk9d3AoHL4/RrQ=
+    secure: "barHldniAfXyoWOD/vcO+E6/Xm4fmcaUoC9BeKW+LwsHqlDMLvugaJnmLXkSpkbYhVL61Hzf3bo0KPJn88AFc5Rkf8oYHPjH4adMnVXkf3B9ghHCgznqHsAH3choo6tnPxaFgOwOYmLGb382nQxfE5lUdvnM/W/psQjWt66A1+k="
 
 addons:
   coverity_scan:
     project:
-      name: "polarssl/polarssl"
+      name: "ARMmbed/mbedtls"
       description: "mbed TLS Open Source SSL Library"
     notification_email: p.j.bakker@polarssl.org
     build_command_prepend:
     build_command: make
-    branch_pattern: development
+    branch_pattern: coverity_scan
diff --git a/ChangeLog b/ChangeLog
index 5cb1e58..d3ce7e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -114,10 +114,10 @@
    * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated.
    * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated.
    * compat-1.2.h and openssl.h are deprecated.
-   * Adjusting/overriding CFLAGS and LDFLAGS with the make build syste is now
+   * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now
      more flexible (warning: OFLAGS is not used any more) (see the README)
      (contributed by Alon Bar-Lev).
-   * ssl_set_own_cert() now longers calls pk_check_pair() since the
+   * ssl_set_own_cert() no longer calls pk_check_pair() since the
      performance impact was bad for some users (this was introduced in 1.3.10).
    * Move from SHA-1 to SHA-256 in example programs using signatures
      (suggested by Thorsten Mühlfelder).
@@ -156,7 +156,7 @@
      length of an X.509 verification chain.
    * Support for renegotiation can now be disabled at compile-time
    * Support for 1/n-1 record splitting, a countermeasure against BEAST.
-   * Certificate selection based on signature hash, prefering SHA-1 over SHA-2
+   * Certificate selection based on signature hash, preferring SHA-1 over SHA-2
      for pre-1.2 clients when multiple certificates are available.
    * Add support for getrandom() syscall on recent Linux kernels with Glibc or
      a compatible enough libc (eg uClibc).
diff --git a/README.rst b/README.rst
index 157adc5..bec0e4b 100644
--- a/README.rst
+++ b/README.rst
@@ -68,7 +68,7 @@
 - ASanDbg.
   Same as ASan but slower, with debug information and better stack traces.
 - MemSan.
-  This intruments the code with MemorySanitizer to check for uninitialised
+  This instruments the code with MemorySanitizer to check for uninitialised
   memory reads. Experimental, needs recent clang on Linux/x86_64.
 - MemSanDbg.
   Same as ASan but slower, with debug information, better stack traces and
diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h
index 6eac393..922d418 100644
--- a/include/mbedtls/ecp.h
+++ b/include/mbedtls/ecp.h
@@ -642,7 +642,7 @@
  * \param pub       Keypair structure holding a public key
  * \param prv       Keypair structure holding a private (plus public) key
  *
- * \return          0 if successfull (keys are valid and match), or
+ * \return          0 if successful (keys are valid and match), or
  *                  MBEDTLS_ERR_ECP_BAD_INPUT_DATA, or
  *                  a MBEDTLS_ERR_ECP_XXX or MBEDTLS_ERR_MPI_XXX code.
  */
diff --git a/library/pkparse.c b/library/pkparse.c
index 3440c2e..32974d1 100644
--- a/library/pkparse.c
+++ b/library/pkparse.c
@@ -787,7 +787,6 @@
          * Is 'publickey' present? If not, or if we can't read it (eg because it
          * is compressed), create it from the private key.
          */
-        pubkey_done = 0;
         if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
                         MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 1 ) ) == 0 )
         {
diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c
index 675c7f8..50a6cfd 100644
--- a/programs/pkey/mpi_demo.c
+++ b/programs/pkey/mpi_demo.c
@@ -96,7 +96,7 @@
 
     if( ret != 0 )
     {
-        mbedtls_printf( "\nAn error occured.\n" );
+        polarssl_printf( "\nAn error occurred.\n" );
         ret = 1;
     }
 
diff --git a/scripts/ecc-heap.sh b/scripts/ecc-heap.sh
index bc77e99..bf873f7 100755
--- a/scripts/ecc-heap.sh
+++ b/scripts/ecc-heap.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Measure heap usage (and perfomance) of ECC operations with various values of
+# Measure heap usage (and performance) of ECC operations with various values of
 # the relevant tunable compile-time parameters.
 #
 # Usage (preferably on a 32-bit platform):
diff --git a/tests/data_files/Readme-x509.txt b/tests/data_files/Readme-x509.txt
index 3022aae..2077f3a 100644
--- a/tests/data_files/Readme-x509.txt
+++ b/tests/data_files/Readme-x509.txt
@@ -73,7 +73,7 @@
 Signing CA in parentheses (same meaning as certificates).
 
 - crl-ec-sha*: (2) server6.crt
-- crl-future.pem: (2) server6.crt + unkown
+- crl-future.pem: (2) server6.crt + unknown
 - crl-rsa-pss-*.pem: (1) server9{,badsign,with-ca}.crt + cert_sha384.crt + unknown
 - crl.pem, crl_expired.pem: (1) server1{,.cert_type,.key_usage,.v1}.crt + unknown
 - crl_md*.pem: crl_sha*.pem: (1) same as crl.pem