[openssl-commits] [openssl] master update

2018-08-24 Thread Andy Polyakov
The branch master has been updated
   via  d573ff17939458f7b14d56770641c11a83b98d10 (commit)
  from  21ebd2fc3fc00d7871ad00f52daffde4039da665 (commit)


- Log -
commit d573ff17939458f7b14d56770641c11a83b98d10
Author: Andy Polyakov 
Date:   Sat Aug 18 17:45:08 2018 +0200

Configurations/unix-Makefile.tmpl: address find portability issue.

-path is non-portable extension, fortunately it's possible to express
.git subdirectory exclusion with -prune.

Reviewed-by: Matthias St. Pierre 
Reviewed-by: Richard Levitte 
(Merged from https://github.com/openssl/openssl/pull/7004)

---

Summary of changes:
 Configurations/unix-Makefile.tmpl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Configurations/unix-Makefile.tmpl 
b/Configurations/unix-Makefile.tmpl
index c492740..16af4d2 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -413,13 +413,13 @@ libclean:
 clean: libclean
$(RM) $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS)
$(RM) $(GENERATED_MANDATORY) $(GENERATED)
-   -$(RM) `find . -name '*{- $depext -}' -a \! -path "./.git/*"`
-   -$(RM) `find . -name '*{- $objext -}' -a \! -path "./.git/*"`
+   -$(RM) `find . -name .git -prune -o -name '*{- $depext -}' -print`
+   -$(RM) `find . -name .git -prune -o -name '*{- $objext -}' -print`
$(RM) core
$(RM) tags TAGS doc-nits
$(RM) -r test/test-runs
$(RM) openssl.pc libcrypto.pc libssl.pc
-   -$(RM) `find . -type l -a \! -path "./.git/*"`
+   -$(RM) `find . -name .git -prune -o -type l -print`
$(RM) $(TARFILE)
 
 distclean: clean
_
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits


[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

2018-08-24 Thread nic . tuv
The branch OpenSSL_1_1_0-stable has been updated
   via  5eee95a54de6854e60886c8e662a902184b12d04 (commit)
  from  837017b4748d587912d9d218894644d6ca86721f (commit)


- Log -
commit 5eee95a54de6854e60886c8e662a902184b12d04
Author: Nicola Tuveri 
Date:   Tue Aug 21 00:50:01 2018 +0300

Backport #6648 to OpenSSL_1_1_0-stable

Reviewed-by: Paul Dale 
(Merged from https://github.com/openssl/openssl/pull/7015)

---

Summary of changes:
 crypto/ec/ec_mult.c | 46 --
 1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c
index 56c7767..71ec910 100644
--- a/crypto/ec/ec_mult.c
+++ b/crypto/ec/ec_mult.c
@@ -382,30 +382,32 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const 
BIGNUM *scalar,
 return EC_POINT_set_to_infinity(group, r);
 }
 
-/*-
- * Handle the common cases where the scalar is secret, enforcing a constant
- * time scalar multiplication algorithm.
- */
-if ((scalar != NULL) && (num == 0)) {
-/*-
- * In this case we want to compute scalar * GeneratorPoint: this
- * codepath is reached most prominently by (ephemeral) key generation
- * of EC cryptosystems (i.e. ECDSA keygen and sign setup, ECDH
- * keygen/first half), where the scalar is always secret. This is why
- * we ignore if BN_FLG_CONSTTIME is actually set and we always call the
- * constant time version.
- */
-return ec_mul_consttime(group, r, scalar, NULL, ctx);
-}
-if ((scalar == NULL) && (num == 1)) {
+if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
 /*-
- * In this case we want to compute scalar * GenericPoint: this codepath
- * is reached most prominently by the second half of ECDH, where the
- * secret scalar is multiplied by the peer's public point. To protect
- * the secret scalar, we ignore if BN_FLG_CONSTTIME is actually set and
- * we always call the constant time version.
+ * Handle the common cases where the scalar is secret, enforcing a 
constant
+ * time scalar multiplication algorithm.
  */
-return ec_mul_consttime(group, r, scalars[0], points[0], ctx);
+if ((scalar != NULL) && (num == 0)) {
+/*-
+ * In this case we want to compute scalar * GeneratorPoint: this
+ * codepath is reached most prominently by (ephemeral) key 
generation
+ * of EC cryptosystems (i.e. ECDSA keygen and sign setup, ECDH
+ * keygen/first half), where the scalar is always secret. This is 
why
+ * we ignore if BN_FLG_CONSTTIME is actually set and we always 
call the
+ * constant time version.
+ */
+return ec_mul_consttime(group, r, scalar, NULL, ctx);
+}
+if ((scalar == NULL) && (num == 1)) {
+/*-
+ * In this case we want to compute scalar * GenericPoint: this 
codepath
+ * is reached most prominently by the second half of ECDH, where 
the
+ * secret scalar is multiplied by the peer's public point. To 
protect
+ * the secret scalar, we ignore if BN_FLG_CONSTTIME is actually 
set and
+ * we always call the constant time version.
+ */
+return ec_mul_consttime(group, r, scalars[0], points[0], ctx);
+}
 }
 
 for (i = 0; i < num; i++) {
_
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits


[openssl-commits] [openssl] master update

2018-08-24 Thread yang . yang
The branch master has been updated
   via  21ebd2fc3fc00d7871ad00f52daffde4039da665 (commit)
  from  c87af534e6387dda5b81c762c83b19d014f156b2 (commit)


- Log -
commit 21ebd2fc3fc00d7871ad00f52daffde4039da665
Author: Paul Yang 
Date:   Fri Aug 24 20:38:04 2018 +0800

Add semicolon at the end of the function prototypes

Reviewed-by: Matt Caswell 
Reviewed-by: Paul Dale 
(Merged from https://github.com/openssl/openssl/pull/7041)

---

Summary of changes:
 doc/man3/EVP_sm3.pod |  4 ++--
 doc/man3/EVP_sm4_cbc.pod | 12 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/man3/EVP_sm3.pod b/doc/man3/EVP_sm3.pod
index a68fe66..50ec429 100644
--- a/doc/man3/EVP_sm3.pod
+++ b/doc/man3/EVP_sm3.pod
@@ -9,7 +9,7 @@ EVP_sm3
 
  #include 
 
- const EVP_MD *EVP_sm3(void)
+ const EVP_MD *EVP_sm3(void);
 
 =head1 DESCRIPTION
 
@@ -42,7 +42,7 @@ L
 
 =head1 COPYRIGHT
 
-Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
 Copyright 2017 Ribose Inc. All Rights Reserved.
 
 Licensed under the OpenSSL license (the "License").  You may not use
diff --git a/doc/man3/EVP_sm4_cbc.pod b/doc/man3/EVP_sm4_cbc.pod
index 38abfad..4e02409 100644
--- a/doc/man3/EVP_sm4_cbc.pod
+++ b/doc/man3/EVP_sm4_cbc.pod
@@ -13,11 +13,11 @@ EVP_sm4_ctr
 
  #include 
 
- const EVP_CIPHER *EVP_sm4_cbc(void)
- const EVP_CIPHER *EVP_sm4_ecb(void)
- const EVP_CIPHER *EVP_sm4_cfb(void)
- const EVP_CIPHER *EVP_sm4_ofb(void)
- const EVP_CIPHER *EVP_sm4_ctr(void)
+ const EVP_CIPHER *EVP_sm4_cbc(void);
+ const EVP_CIPHER *EVP_sm4_ecb(void);
+ const EVP_CIPHER *EVP_sm4_cfb(void);
+ const EVP_CIPHER *EVP_sm4_ofb(void);
+ const EVP_CIPHER *EVP_sm4_ctr(void);
 
 =head1 DESCRIPTION
 
@@ -52,7 +52,7 @@ L
 
 =head1 COPYRIGHT
 
-Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
 Copyright 2017 Ribose Inc. All Rights Reserved.
 
 Licensed under the OpenSSL license (the "License").  You may not use
_
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits


[openssl-commits] [openssl] master update

2018-08-24 Thread nic . tuv
The branch master has been updated
   via  c87af534e6387dda5b81c762c83b19d014f156b2 (commit)
  from  324b95605225410763fe63f7cff36eb46ca54ee9 (commit)


- Log -
commit c87af534e6387dda5b81c762c83b19d014f156b2
Author: Dmitry Belyavskiy 
Date:   Sat Aug 18 19:43:23 2018 +0300

Do not ignore EVP_PKEY_print_public/EVP_PKEY_print_private return values

Reviewed-by: Kurt Roeckx 
Reviewed-by: Nicola Tuveri 
(Merged from https://github.com/openssl/openssl/pull/7007)

---

Summary of changes:
 apps/pkey.c | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/apps/pkey.c b/apps/pkey.c
index 760fc1b..0dd5590 100644
--- a/apps/pkey.c
+++ b/apps/pkey.c
@@ -186,23 +186,29 @@ int pkey_main(int argc, char **argv)
 if (!noout) {
 if (outformat == FORMAT_PEM) {
 if (pubout) {
-PEM_write_bio_PUBKEY(out, pkey);
+if (!PEM_write_bio_PUBKEY(out, pkey))
+goto end;
 } else {
 assert(private);
-if (traditional)
-PEM_write_bio_PrivateKey_traditional(out, pkey, cipher,
- NULL, 0, NULL,
- passout);
-else
-PEM_write_bio_PrivateKey(out, pkey, cipher,
- NULL, 0, NULL, passout);
+if (traditional) {
+if (!PEM_write_bio_PrivateKey_traditional(out, pkey, 
cipher,
+  NULL, 0, NULL,
+  passout))
+goto end;
+} else {
+if (!PEM_write_bio_PrivateKey(out, pkey, cipher,
+  NULL, 0, NULL, passout))
+goto end;
+}
 }
 } else if (outformat == FORMAT_ASN1) {
 if (pubout) {
-i2d_PUBKEY_bio(out, pkey);
+if (!i2d_PUBKEY_bio(out, pkey))
+goto end;
 } else {
 assert(private);
-i2d_PrivateKey_bio(out, pkey);
+if (!i2d_PrivateKey_bio(out, pkey))
+goto end;
 }
 } else {
 BIO_printf(bio_err, "Bad format specified for key\n");
@@ -212,10 +218,12 @@ int pkey_main(int argc, char **argv)
 
 if (text) {
 if (pubtext) {
-EVP_PKEY_print_public(out, pkey, 0, NULL);
+if (EVP_PKEY_print_public(out, pkey, 0, NULL) <= 0)
+goto end;
 } else {
 assert(private);
-EVP_PKEY_print_private(out, pkey, 0, NULL);
+if (EVP_PKEY_print_private(out, pkey, 0, NULL) <= 0)
+goto end;
 }
 }
 
_
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits