Fix implementation-defined integer conversion

"When an integer is demoted to a signed integer with smaller size, or an
unsigned integer is converted to its corresponding signed integer, if
the value cannot be represented the result is implementation-defined."
diff --git a/include/polarssl/x509_crt.h b/include/polarssl/x509_crt.h
index d534ad8..cb43262 100644
--- a/include/polarssl/x509_crt.h
+++ b/include/polarssl/x509_crt.h
@@ -256,7 +256,7 @@
  *                 POLARSSL_ERR_X509_CERT_VERIFY_FAILED if the chain was verified
  *                 but found to be invalid, in which case *flags will have one
  *                 or more BADCERT_XXX or POLARSSL_X509_BADCRL_XXX
- *                 flags set, or another error (and flags set to 0xffffffff)
+ *                 flags set, or another error (and flags set to -1)
  *                 in case of a fatal error encountered during the
  *                 verification process.
  */
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 3652a8c..1ca61e5 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -2182,7 +2182,7 @@
 
     if( ret != 0 )
     {
-        *flags = (uint32_t) -1;
+        *flags = -1;
         return( ret );
     }