From 331227bef54db3044b31f95c4081a5fcce4a11c8 Mon Sep 17 00:00:00 2001 From: Greg Bailey Date: Fri, 10 Mar 2017 15:26:39 +0000 Subject: [PATCH] Patch to fix build issues with GCC 6 and OpenSSL 1.1 (#1424564) --- bz1424564-gcc-6_and_openssl-1.1.patch | 893 ++++++++++++++++++++++++++ yapet.spec | 20 +- 2 files changed, 911 insertions(+), 2 deletions(-) create mode 100644 bz1424564-gcc-6_and_openssl-1.1.patch diff --git a/bz1424564-gcc-6_and_openssl-1.1.patch b/bz1424564-gcc-6_and_openssl-1.1.patch new file mode 100644 index 0000000..f8e6754 --- /dev/null +++ b/bz1424564-gcc-6_and_openssl-1.1.patch @@ -0,0 +1,893 @@ +Index: crypt/crypt.cc +=================================================================== +--- crypt/crypt.cc (revision 6011) ++++ crypt/crypt.cc (revision 6988) +@@ -34,6 +34,31 @@ + + using namespace YAPET; + ++EVP_CIPHER_CTX* ++Crypt::create_context() { ++#ifdef HAVE_EVP_CIPHER_CTX_INIT ++ EVP_CIPHER_CTX *context = (EVP_CIPHER_CTX*) std::malloc(sizeof(EVP_CIPHER_CTX)); ++ EVP_CIPHER_CTX_init(context); ++ return context; ++#elif HAVE_EVP_CIPHER_CTX_NEW ++ return EVP_CIPHER_CTX_new(); ++#else ++ #error "Neither EVP_CIPHER_CTX_init() nor EVP_CIPHER_CTX_new() available" ++#endif ++} ++ ++void ++Crypt::destroy_context(EVP_CIPHER_CTX *context) { ++#ifdef HAVE_EVP_CIPHER_CTX_CLEANUP ++ EVP_CIPHER_CTX_cleanup(context); ++ std::free(context); ++#elif HAVE_EVP_CIPHER_CTX_FREE ++ EVP_CIPHER_CTX_free(context); ++#else ++#error "Neither EVP_CIPHER_CTX_cleanup() nor EVP_CIPHER_CTX_free() available" ++#endif ++} ++ + /** + * Initializes the class with the given key, which is used for + * encryption and decryption. +@@ -57,25 +82,24 @@ + throw YAPETException (_ ("Unable to get cipher") ); + + // Test if key length is ok +- EVP_CIPHER_CTX ctx; +- EVP_CIPHER_CTX_init (&ctx); +- int retval = EVP_CipherInit_ex (&ctx, cipher, 0, 0, 0, 0); ++ EVP_CIPHER_CTX* ctx = create_context(); ++ int retval = EVP_CipherInit_ex (ctx, cipher, 0, 0, 0, 0); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context(ctx); + throw YAPETException (_ ("Error initializing cipher") ); + } + +- retval = EVP_CIPHER_CTX_set_key_length (&ctx, key.size() ); ++ retval = EVP_CIPHER_CTX_set_key_length (ctx, key.size() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context(ctx); + throw YAPETException (_ ("Error setting the key length") ); + } + +- iv_length = EVP_CIPHER_CTX_iv_length (&ctx); +- key_length = EVP_CIPHER_CTX_key_length (&ctx); +- EVP_CIPHER_CTX_cleanup (&ctx); ++ iv_length = EVP_CIPHER_CTX_iv_length (ctx); ++ key_length = EVP_CIPHER_CTX_key_length (ctx); ++ destroy_context(ctx); + } + + Crypt::Crypt (const Crypt& c) : cipher (c.cipher), +Index: crypt/crypt.h +=================================================================== +--- crypt/crypt.h (revision 6011) ++++ crypt/crypt.h (revision 6988) +@@ -100,6 +100,9 @@ + */ + Key key; + ++ EVP_CIPHER_CTX *create_context(); ++ void destroy_context(EVP_CIPHER_CTX *context); ++ + public: + //! Constructor + Crypt (const Key& k) throw (YAPETException); +@@ -159,9 +162,8 @@ + if (key.ivec_size() != iv_length) + throw YAPETException (_ ("IVec length missmatch") ); + +- EVP_CIPHER_CTX ctx; +- EVP_CIPHER_CTX_init (&ctx); +- int retval = EVP_EncryptInit_ex (&ctx, ++ EVP_CIPHER_CTX *ctx=create_context (); ++ int retval = EVP_EncryptInit_ex (ctx, + cipher, + 0, + key, +@@ -168,14 +170,14 @@ + key.getIVec() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + throw YAPETEncryptionException (_ ("Error initializing encryption engine") ); + } + +- retval = EVP_CIPHER_CTX_set_key_length (&ctx, key.size() ); ++ retval = EVP_CIPHER_CTX_set_key_length (ctx, key.size() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + throw YAPETException (_ ("Error setting the key length") ); + } + +@@ -182,7 +184,7 @@ + BDBuffer* encdata = + new BDBuffer (data.size() + EVP_MAX_BLOCK_LENGTH); + int outlen; +- retval = EVP_EncryptUpdate (&ctx, ++ retval = EVP_EncryptUpdate (ctx, + *encdata, + &outlen, + data, +@@ -189,24 +191,24 @@ + data.size() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + delete encdata; + throw YAPETEncryptionException (_ ("Error encrypting data") ); + } + + int tmplen; +- retval = EVP_EncryptFinal_ex (&ctx, ++ retval = EVP_EncryptFinal_ex (ctx, + encdata->at (outlen), + &tmplen); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + delete encdata; + throw YAPETEncryptionException (_ ("Error finalizing encryption") ); + } + + encdata->resize (outlen + tmplen); +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + return encdata; + } + +@@ -237,9 +239,8 @@ + if ( ( (unsigned int) key.ivec_size() ) != iv_length) + throw YAPETException (_ ("IVec length missmatch") ); + +- EVP_CIPHER_CTX ctx; +- EVP_CIPHER_CTX_init (&ctx); +- int retval = EVP_DecryptInit_ex (&ctx, ++ EVP_CIPHER_CTX* ctx = create_context (); ++ int retval = EVP_DecryptInit_ex (ctx, + cipher, + 0, + key, +@@ -246,20 +247,20 @@ + key.getIVec() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + throw YAPETEncryptionException (_ ("Error initializing encryption engine") ); + } + +- retval = EVP_CIPHER_CTX_set_key_length (&ctx, key.size() ); ++ retval = EVP_CIPHER_CTX_set_key_length (ctx, key.size() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + throw YAPETException (_ ("Error setting the key length") ); + } + + BDBuffer* decdata = new BDBuffer (data.size() ); + int outlen; +- retval = EVP_DecryptUpdate (&ctx, ++ retval = EVP_DecryptUpdate (ctx, + *decdata, + &outlen, + data, +@@ -266,24 +267,24 @@ + data.size() ); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + delete decdata; + throw YAPETEncryptionException (_ ("Error decrypting data") ); + } + + int tmplen; +- retval = EVP_DecryptFinal_ex (&ctx, ++ retval = EVP_DecryptFinal_ex (ctx, + decdata->at (outlen), + &tmplen); + + if (retval == 0) { +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + delete decdata; + throw YAPETEncryptionException (_ ("Error finalizing decryption") ); + } + + decdata->resize (outlen + tmplen); +- EVP_CIPHER_CTX_cleanup (&ctx); ++ destroy_context (ctx); + Record* r = 0; + try { + r = new Record; +Index: crypt/key.cc +=================================================================== +--- crypt/key.cc (revision 6011) ++++ crypt/key.cc (revision 6988) +@@ -45,6 +45,29 @@ + std::memset (IVec, 0, IVECLENGTH); + } + ++EVP_MD_CTX* ++Key::create_context() { ++#ifdef HAVE_EVP_MD_CTX_CREATE ++ return EVP_MD_CTX_create (); ++#elif HAVE_EVP_MD_CTX_NEW ++ return EVP_MD_CTX_new(); ++#else ++#error "Neither EVP_MD_CTX_create() nor EVP_MD_CTX_new() available" ++#endif ++} ++ ++void ++Key::destroy_context(EVP_MD_CTX *context) { ++#ifdef HAVE_EVP_MD_CTX_DESTROY ++ EVP_MD_CTX_destroy (context); ++#elif HAVE_EVP_MD_CTX_FREE ++ EVP_MD_CTX_free(context); ++#else ++#error "Neither EVP_MD_CTX_destroy() nor EVP_MD_CTX_free() available" ++#endif ++} ++ ++ + /** + * Initializes the key and the initialization vector. Make sure you + * securely destroy the password provided to this method. +@@ -63,39 +86,39 @@ + if (md == 0) + throw YAPETException (_ ("Run 1: Unable to initialize the EVP_MD structure") ); + +- EVP_MD_CTX mdctx; +- EVP_MD_CTX_init (&mdctx); +- int retval = EVP_DigestInit_ex (&mdctx, md, 0); ++ EVP_MD_CTX *mdctx = create_context(); + ++ int retval = EVP_DigestInit_ex (mdctx, md, 0); ++ + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + throw YAPETException (_ ("Run 1: Unable to initialize the digest") ); + } + +- retval = EVP_DigestUpdate (&mdctx, password, std::strlen (password) ); ++ retval = EVP_DigestUpdate (mdctx, password, std::strlen (password) ); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + throw YAPETException (_ ("Run 1: Unable to update the digest") ); + } + + unsigned int tmplen; +- retval = EVP_DigestFinal_ex (&mdctx, key, &tmplen); ++ retval = EVP_DigestFinal_ex (mdctx, key, &tmplen); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 1: Unable to finalize the digest") ); + } + + if (tmplen != SHA1_LEN) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 1: Digest does not have expected length") ); + } + + eff_keylength = tmplen; +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + // + // Second run (md5) + // +@@ -106,39 +129,39 @@ + throw YAPETException (_ ("Run 2: Unable to initialize the EVP_MD structure") ); + } + +- EVP_MD_CTX_init (&mdctx); +- retval = EVP_DigestInit_ex (&mdctx, md, 0); ++ mdctx=create_context(); ++ retval = EVP_DigestInit_ex (mdctx, md, 0); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 2: Unable to initialize the digest") ); + } + +- retval = EVP_DigestUpdate (&mdctx, key, SHA1_LEN); ++ retval = EVP_DigestUpdate (mdctx, key, SHA1_LEN); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 2: Unable to update the digest") ); + } + +- retval = EVP_DigestFinal_ex (&mdctx, key + SHA1_LEN, &tmplen); ++ retval = EVP_DigestFinal_ex (mdctx, key + SHA1_LEN, &tmplen); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 2: Unable to finalize the digest") ); + } + + if (tmplen != MD5_LEN) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 2: Digest does not have expected length") ); + } + + eff_keylength += tmplen; +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + // + // Third run (ripemd160) + // +@@ -149,39 +172,39 @@ + throw YAPETException (_ ("Run 3: Unable to initialize the EVP_MD structure") ); + } + +- EVP_MD_CTX_init (&mdctx); +- retval = EVP_DigestInit_ex (&mdctx, md, 0); ++ mdctx = create_context(); ++ retval = EVP_DigestInit_ex (mdctx, md, 0); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 3: Unable to initialize the digest") ); + } + +- retval = EVP_DigestUpdate (&mdctx, key, SHA1_LEN + MD5_LEN); ++ retval = EVP_DigestUpdate (mdctx, key, SHA1_LEN + MD5_LEN); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 3: Unable to update the digest") ); + } + +- retval = EVP_DigestFinal_ex (&mdctx, key + SHA1_LEN + MD5_LEN, &tmplen); ++ retval = EVP_DigestFinal_ex (mdctx, key + SHA1_LEN + MD5_LEN, &tmplen); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 3: Unable to finalize the digest") ); + } + + if (tmplen != RIPEMD160_LEN) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("Run 3: Digest does not have expected length") ); + } + + eff_keylength += tmplen; +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + + if (eff_keylength != KEYLENGTH) { + cleanup(); +@@ -205,38 +228,38 @@ + throw YAPETException (_ ("IVec: Unable to initialize the EVP_MD structure") ); + } + +- EVP_MD_CTX_init (&mdctx); +- retval = EVP_DigestInit_ex (&mdctx, md, 0); ++ mdctx = create_context(); ++ retval = EVP_DigestInit_ex (mdctx, md, 0); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("IVec: Unable to initialize the digest") ); + } + +- retval = EVP_DigestUpdate (&mdctx, key, SHA1_LEN + MD5_LEN + RIPEMD160_LEN); ++ retval = EVP_DigestUpdate (mdctx, key, SHA1_LEN + MD5_LEN + RIPEMD160_LEN); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("IVec: Unable to update the digest") ); + } + +- retval = EVP_DigestFinal_ex (&mdctx, ivec_hash_buf, &tmplen); ++ retval = EVP_DigestFinal_ex (mdctx, ivec_hash_buf, &tmplen); + + if (retval == 0) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("IVec: Unable to finalize the digest") ); + } + + if (tmplen != MD5_LEN) { +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + cleanup(); + throw YAPETException (_ ("IVec: Digest does not have expected length") ); + } + +- EVP_MD_CTX_cleanup (&mdctx); ++ destroy_context(mdctx); + std::memcpy (IVec, ivec_hash_buf, IVECLENGTH); + std::memset (ivec_hash_buf, 0, MD5_LEN); + } +Index: crypt/key.h +=================================================================== +--- crypt/key.h (revision 6011) ++++ crypt/key.h (revision 6988) +@@ -114,6 +114,10 @@ + //! Cleanup routine + void cleanup(); + ++ EVP_MD_CTX *create_context(); ++ ++ void destroy_context(EVP_MD_CTX *context); ++ + public: + //! Initializes the key + Key (const char* password) throw (YAPETException); +Index: po/de.po +=================================================================== +--- po/de.po (revision 6011) ++++ po/de.po (revision 6988) +@@ -9,7 +9,7 @@ + msgstr "" + "Project-Id-Version: YAPET 1.0\n" + "Report-Msgid-Bugs-To: Rafael Ostertag \n" +-"POT-Creation-Date: 2014-02-18 18:05+0100\n" ++"POT-Creation-Date: 2016-11-09 20:57+0100\n" + "PO-Revision-Date: 2013-12-28 19:53+0100\n" + "Last-Translator: Rafael Ostertag \n" + "Language-Team: German\n" +@@ -27,39 +27,39 @@ + msgid "Position out of range" + msgstr "Position ausserhalb des Bereiches" + +-#: crypt/crypt.cc:57 ++#: crypt/crypt.cc:82 + msgid "Unable to get cipher" + msgstr "Kann die Verschlüsselung nicht ermitteln" + +-#: crypt/crypt.cc:66 ++#: crypt/crypt.cc:90 + msgid "Error initializing cipher" + msgstr "Fehler beim Initialisieren der Verschlüsselung" + +-#: crypt/crypt.cc:73 crypt/crypt.h:179 crypt/crypt.h:257 ++#: crypt/crypt.cc:97 crypt/crypt.h:181 crypt/crypt.h:258 + msgid "Error setting the key length" + msgstr "Kann die Schlüssellänge nicht setzen" + +-#: crypt/crypt.h:160 crypt/crypt.h:238 ++#: crypt/crypt.h:163 crypt/crypt.h:240 + msgid "IVec length missmatch" + msgstr "IVec Länge falsch" + +-#: crypt/crypt.h:172 crypt/crypt.h:250 ++#: crypt/crypt.h:174 crypt/crypt.h:251 + msgid "Error initializing encryption engine" + msgstr "Fehler beim Initialisieren der Verschlüsselung" + +-#: crypt/crypt.h:194 ++#: crypt/crypt.h:196 + msgid "Error encrypting data" + msgstr "Fehler beim Verschlüsseln der Daten" + +-#: crypt/crypt.h:205 ++#: crypt/crypt.h:207 + msgid "Error finalizing encryption" + msgstr "Fehler beim Abschliessen der Verschlüsselung" + +-#: crypt/crypt.h:271 ++#: crypt/crypt.h:272 + msgid "Error decrypting data" + msgstr "Fehler beim Entschlüsseln der Daten" + +-#: crypt/crypt.h:282 ++#: crypt/crypt.h:283 + msgid "Error finalizing decryption" + msgstr "Fehler beim Abschliessen der Entschlüsselung" + +@@ -127,67 +127,67 @@ + msgid "File has been externally modified" + msgstr "Datei wurde von ausserhalb verändert" + +-#: crypt/key.cc:64 ++#: crypt/key.cc:87 + msgid "Run 1: Unable to initialize the EVP_MD structure" + msgstr "Lauf 1: Kann EVP_MD Struktur nicht initialisieren" + +-#: crypt/key.cc:72 ++#: crypt/key.cc:95 + msgid "Run 1: Unable to initialize the digest" + msgstr "Lauf 1: Kann Digest nicht initialisieren" + +-#: crypt/key.cc:79 ++#: crypt/key.cc:102 + msgid "Run 1: Unable to update the digest" + msgstr "Lauf 1: Digest kann nicht angepasst werden" + +-#: crypt/key.cc:88 ++#: crypt/key.cc:111 + msgid "Run 1: Unable to finalize the digest" + msgstr "Lauf 1: Kann Digest nicht abschliessen" + +-#: crypt/key.cc:94 ++#: crypt/key.cc:117 + msgid "Run 1: Digest does not have expected length" + msgstr "Lauf 1: Digest hat unerwartete Länge" + +-#: crypt/key.cc:106 ++#: crypt/key.cc:129 + msgid "Run 2: Unable to initialize the EVP_MD structure" + msgstr "Lauf 2: Kann EVP_MD Struktur nicht initialisieren" + +-#: crypt/key.cc:115 ++#: crypt/key.cc:138 + msgid "Run 2: Unable to initialize the digest" + msgstr "Lauf 2: Kann Digest nicht initialisieren" + +-#: crypt/key.cc:123 ++#: crypt/key.cc:146 + msgid "Run 2: Unable to update the digest" + msgstr "Lauf 2: Digest kann nicht angepasst werden" + +-#: crypt/key.cc:131 ++#: crypt/key.cc:154 + msgid "Run 2: Unable to finalize the digest" + msgstr "Lauf 2: Kann Digest nicht abschliessen" + +-#: crypt/key.cc:137 ++#: crypt/key.cc:160 + msgid "Run 2: Digest does not have expected length" + msgstr "Lauf 2: Digest hat unerwartete Länge" + +-#: crypt/key.cc:149 ++#: crypt/key.cc:172 + msgid "Run 3: Unable to initialize the EVP_MD structure" + msgstr "Lauf 3: Kann EVP_MD Struktur nicht initialisieren" + +-#: crypt/key.cc:158 ++#: crypt/key.cc:181 + msgid "Run 3: Unable to initialize the digest" + msgstr "Lauf 3: Kann Digest nicht initialisieren" + +-#: crypt/key.cc:166 ++#: crypt/key.cc:189 + msgid "Run 3: Unable to update the digest" + msgstr "Lauf 3: Digest kann nicht angepasst werden" + +-#: crypt/key.cc:174 ++#: crypt/key.cc:197 + msgid "Run 3: Unable to finalize the digest" + msgstr "Lauf 3: Kann Digest nicht abschliessen" + +-#: crypt/key.cc:180 ++#: crypt/key.cc:203 + msgid "Run 3: Digest does not have expected length" + msgstr "Lauf 3: Digest hat unerwartete Länge" + +-#: crypt/key.cc:191 ++#: crypt/key.cc:214 + #, c-format + msgid "Effective key length of %d does not match expected key length %d" + msgstr "" +@@ -194,23 +194,23 @@ + "Die effektive Schlüssellänge %d passt nicht auf die erwartete Schlüssellänge " + "%d" + +-#: crypt/key.cc:205 ++#: crypt/key.cc:228 + msgid "IVec: Unable to initialize the EVP_MD structure" + msgstr "IVec: Kann EVP_MD Struktur nicht initialisieren" + +-#: crypt/key.cc:214 ++#: crypt/key.cc:237 + msgid "IVec: Unable to initialize the digest" + msgstr "IVec: Kann Digest nicht initialisieren" + +-#: crypt/key.cc:222 ++#: crypt/key.cc:245 + msgid "IVec: Unable to update the digest" + msgstr "IVec: Kann Digest nicht anpassen" + +-#: crypt/key.cc:230 ++#: crypt/key.cc:253 + msgid "IVec: Unable to finalize the digest" + msgstr "IVec: Kann Digest nicht abschliessen" + +-#: crypt/key.cc:236 ++#: crypt/key.cc:259 + msgid "IVec: Digest does not have expected length" + msgstr "IVec: Digest hat unerwartete Länge" + +@@ -240,9 +240,8 @@ + + #: glue/createfile.cc:80 glue/promptpassword.cc:60 glue/changepassword.cc:52 + #: glue/changepassword.cc:62 glue/changepassword.cc:116 +-#: glue/opencmdlinefile.cc:103 ui/passwordrecord.cc:88 +-#: ui/passwordrecord.cc:248 ui/mainwindow.cc:420 ui/mainwindow.cc:472 +-#: ui/mainwindow.cc:503 ++#: glue/opencmdlinefile.cc:103 ui/passwordrecord.cc:88 ui/passwordrecord.cc:248 ++#: ui/mainwindow.cc:420 ui/mainwindow.cc:472 ui/mainwindow.cc:503 + msgid "Error" + msgstr "Fehler" + +Index: po/yapet.pot +=================================================================== +--- po/yapet.pot (revision 6011) ++++ po/yapet.pot (revision 6988) +@@ -1,6 +1,6 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Free Software Foundation, Inc. +-# This file is distributed under the same license as the PACKAGE package. ++# This file is distributed under the same license as the yapet package. + # FIRST AUTHOR , YEAR. + # + #, fuzzy +@@ -8,7 +8,7 @@ + msgstr "" + "Project-Id-Version: yapet 1.0\n" + "Report-Msgid-Bugs-To: Rafael Ostertag \n" +-"POT-Creation-Date: 2014-02-18 18:05+0100\n" ++"POT-Creation-Date: 2016-11-09 20:57+0100\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -25,39 +25,39 @@ + msgid "Position out of range" + msgstr "" + +-#: crypt/crypt.cc:57 ++#: crypt/crypt.cc:82 + msgid "Unable to get cipher" + msgstr "" + +-#: crypt/crypt.cc:66 ++#: crypt/crypt.cc:90 + msgid "Error initializing cipher" + msgstr "" + +-#: crypt/crypt.cc:73 crypt/crypt.h:179 crypt/crypt.h:257 ++#: crypt/crypt.cc:97 crypt/crypt.h:181 crypt/crypt.h:258 + msgid "Error setting the key length" + msgstr "" + +-#: crypt/crypt.h:160 crypt/crypt.h:238 ++#: crypt/crypt.h:163 crypt/crypt.h:240 + msgid "IVec length missmatch" + msgstr "" + +-#: crypt/crypt.h:172 crypt/crypt.h:250 ++#: crypt/crypt.h:174 crypt/crypt.h:251 + msgid "Error initializing encryption engine" + msgstr "" + +-#: crypt/crypt.h:194 ++#: crypt/crypt.h:196 + msgid "Error encrypting data" + msgstr "" + +-#: crypt/crypt.h:205 ++#: crypt/crypt.h:207 + msgid "Error finalizing encryption" + msgstr "" + +-#: crypt/crypt.h:271 ++#: crypt/crypt.h:272 + msgid "Error decrypting data" + msgstr "" + +-#: crypt/crypt.h:282 ++#: crypt/crypt.h:283 + msgid "Error finalizing decryption" + msgstr "" + +@@ -125,88 +125,88 @@ + msgid "File has been externally modified" + msgstr "" + +-#: crypt/key.cc:64 ++#: crypt/key.cc:87 + msgid "Run 1: Unable to initialize the EVP_MD structure" + msgstr "" + +-#: crypt/key.cc:72 ++#: crypt/key.cc:95 + msgid "Run 1: Unable to initialize the digest" + msgstr "" + +-#: crypt/key.cc:79 ++#: crypt/key.cc:102 + msgid "Run 1: Unable to update the digest" + msgstr "" + +-#: crypt/key.cc:88 ++#: crypt/key.cc:111 + msgid "Run 1: Unable to finalize the digest" + msgstr "" + +-#: crypt/key.cc:94 ++#: crypt/key.cc:117 + msgid "Run 1: Digest does not have expected length" + msgstr "" + +-#: crypt/key.cc:106 ++#: crypt/key.cc:129 + msgid "Run 2: Unable to initialize the EVP_MD structure" + msgstr "" + +-#: crypt/key.cc:115 ++#: crypt/key.cc:138 + msgid "Run 2: Unable to initialize the digest" + msgstr "" + +-#: crypt/key.cc:123 ++#: crypt/key.cc:146 + msgid "Run 2: Unable to update the digest" + msgstr "" + +-#: crypt/key.cc:131 ++#: crypt/key.cc:154 + msgid "Run 2: Unable to finalize the digest" + msgstr "" + +-#: crypt/key.cc:137 ++#: crypt/key.cc:160 + msgid "Run 2: Digest does not have expected length" + msgstr "" + +-#: crypt/key.cc:149 ++#: crypt/key.cc:172 + msgid "Run 3: Unable to initialize the EVP_MD structure" + msgstr "" + +-#: crypt/key.cc:158 ++#: crypt/key.cc:181 + msgid "Run 3: Unable to initialize the digest" + msgstr "" + +-#: crypt/key.cc:166 ++#: crypt/key.cc:189 + msgid "Run 3: Unable to update the digest" + msgstr "" + +-#: crypt/key.cc:174 ++#: crypt/key.cc:197 + msgid "Run 3: Unable to finalize the digest" + msgstr "" + +-#: crypt/key.cc:180 ++#: crypt/key.cc:203 + msgid "Run 3: Digest does not have expected length" + msgstr "" + +-#: crypt/key.cc:191 ++#: crypt/key.cc:214 + #, c-format + msgid "Effective key length of %d does not match expected key length %d" + msgstr "" + +-#: crypt/key.cc:205 ++#: crypt/key.cc:228 + msgid "IVec: Unable to initialize the EVP_MD structure" + msgstr "" + +-#: crypt/key.cc:214 ++#: crypt/key.cc:237 + msgid "IVec: Unable to initialize the digest" + msgstr "" + +-#: crypt/key.cc:222 ++#: crypt/key.cc:245 + msgid "IVec: Unable to update the digest" + msgstr "" + +-#: crypt/key.cc:230 ++#: crypt/key.cc:253 + msgid "IVec: Unable to finalize the digest" + msgstr "" + +-#: crypt/key.cc:236 ++#: crypt/key.cc:259 + msgid "IVec: Digest does not have expected length" + msgstr "" + +@@ -236,9 +236,8 @@ + + #: glue/createfile.cc:80 glue/promptpassword.cc:60 glue/changepassword.cc:52 + #: glue/changepassword.cc:62 glue/changepassword.cc:116 +-#: glue/opencmdlinefile.cc:103 ui/passwordrecord.cc:88 +-#: ui/passwordrecord.cc:248 ui/mainwindow.cc:420 ui/mainwindow.cc:472 +-#: ui/mainwindow.cc:503 ++#: glue/opencmdlinefile.cc:103 ui/passwordrecord.cc:88 ui/passwordrecord.cc:248 ++#: ui/mainwindow.cc:420 ui/mainwindow.cc:472 ui/mainwindow.cc:503 + msgid "Error" + msgstr "" + +Index: tests/preload/Makefile.am +=================================================================== +--- tests/preload/Makefile.am (revision 6011) ++++ tests/preload/Makefile.am (revision 6988) +@@ -14,7 +14,7 @@ + ../../crypt/bdbuffer.cc ../../crypt/crypt.cc ../../crypt/file.cc \ + ../../crypt/key.cc ../../crypt/partdec.cc + checktestpwrecord_CPPFLAGS = -I$(top_srcdir)/crypt -I$(top_builddir) \ +--I$(top_srcdir) ++-I$(top_srcdir) $(OPENSSL_INCLUDES) + checktestpwrecord_LDADD = $(top_builddir)/crypt/libyapet-crypt.la $(LIBINTL) + + checkmasterpwchange_SOURCES = checkmasterpwchange.cc \ +@@ -21,7 +21,7 @@ + ../../crypt/bdbuffer.cc ../../crypt/crypt.cc ../../crypt/file.cc \ + ../../crypt/key.cc ../../crypt/partdec.cc + checkmasterpwchange_CPPFLAGS = -I$(top_srcdir)/crypt -I$(top_builddir) \ +--I$(top_srcdir) ++-I$(top_srcdir) $(OPENSSL_INCLUDES) + checkmasterpwchange_LDADD = $(top_builddir)/crypt/libyapet-crypt.la $(LIBINTL) + + istty_SOURCES = istty.cc +Index: yapet/cfg.h +=================================================================== +--- yapet/cfg.h (revision 6011) ++++ yapet/cfg.h (revision 6988) +@@ -163,7 +163,7 @@ + locked = false; + } + +- void is_locked() const { ++ bool is_locked() const { + return locked; + } + +Index: configure.ac +=================================================================== +--- configure.ac (revision 6011) ++++ configure.ac (revision 6988) +@@ -86,9 +86,10 @@ + LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" + CPPFLAGS="$CPPFLAGS $OPENSSL_INCLUDES" + AC_MSG_NOTICE([Checking encryption functions]) +-AC_CHECK_FUNCS([EVP_bf_cbc EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_init EVP_CIPHER_CTX_set_key_length EVP_CipherInit_ex EVP_DigestFinal_ex EVP_DigestInit_ex EVP_DigestUpdate EVP_MD_CTX_cleanup EVP_MD_CTX_init EVP_md5 EVP_ripemd160 EVP_sha1], ++AC_CHECK_FUNCS([EVP_bf_cbc EVP_CIPHER_CTX_set_key_length EVP_CipherInit_ex EVP_DigestFinal_ex EVP_DigestInit_ex EVP_DigestUpdate EVP_md5 EVP_ripemd160 EVP_sha1], + [], + [AC_MSG_ERROR([You are missing a crucial function required for $PACKAGE_NAME])]) ++AC_CHECK_FUNCS([EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_free EVP_CIPHER_CTX_init EVP_CIPHER_CTX_new EVP_MD_CTX_destroy EVP_MD_CTX_create EVP_MD_CTX_free EVP_MD_CTX_new]) + AC_MSG_NOTICE([Checking support functions]) + AC_CHECK_FUNCS([SSLeay_version]) + LIBS="$LIBS_SAVE" diff --git a/yapet.spec b/yapet.spec index f1d1368..955c893 100644 --- a/yapet.spec +++ b/yapet.spec @@ -2,7 +2,7 @@ Name: yapet Version: 1.0 -Release: 8%{?pre}%{?dist} +Release: 9%{?pre}%{?dist} Summary: Yet Another Password Encryption Tool License: GPLv3+ with exceptions URL: http://www.guengel.ch/myapps/%{name}/ @@ -11,7 +11,11 @@ BuildRequires: gettext BuildRequires: ncurses-devel BuildRequires: openssl-devel +BuildRequires: automake +BuildRequires: autoconf + Patch0: bz1308262-gcc6-void-fn-returns-value.patch +Patch1: bz1424564-gcc-6_and_openssl-1.1.patch %description YAPET is a text based password manager using the Blowfish encryption algorithm. @@ -22,7 +26,11 @@ for installing on desktop and server systems alike. %setup -qn %{name}-%{version}%{?pre} # https://bugs.guengel.ch/show_bug.cgi?id=112 -%patch0 -p1 +# Skip this patch, as it is included by the subsequent patch now +# %patch0 -p1 + +# https://bugs.guengel.ch/show_bug.cgi?id=113 +%patch1 -p0 for f in ./DESIGN ./README do @@ -32,6 +40,11 @@ do done %build + +# Rebuild configure script because the supplied patches only modify configure.ac +aclocal -I m4 +autoconf + %configure --disable-install-doc \ --disable-source-doc \ --disable-install-doci \ @@ -62,6 +75,9 @@ rm -frv %{buildroot}%{_docdir} %{_mandir}/man*/*yapet* %changelog +* Wed Mar 1 2017 Greg Bailey - 1.0-9 +- Patch to fix build issues with GCC 6 and OpenSSL 1.1 (#1424564) + * Sat Feb 11 2017 Fedora Release Engineering - 1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild