commit f0373f62df9cb6b7bff29150344fddfe1e8361c5
Author: Albert Astals Cid <aacid@kde.org>
Date:   Mon Jun 5 12:12:40 2023 +0200

    poppler 23.06.0

 CMakeLists.txt         |  4 ++--
 NEWS                   | 23 +++++++++++++++++++++++
 cpp/Doxyfile           |  2 +-
 qt5/src/CMakeLists.txt |  2 +-
 qt5/src/Doxyfile       |  2 +-
 qt6/src/CMakeLists.txt |  2 +-
 qt6/src/Doxyfile       |  2 +-
 7 files changed, 30 insertions(+), 7 deletions(-)

commit fa00b3fbbd62c5b6b5383d9997a9d5c30827b386
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Jun 5 11:09:09 2023 +0200

    Fix cornercase crash in weird pdfsig setups

    This fixes a potential crash in setups where at least one
    cryptographic
    signature backend is compiled in, but none is functional.

 utils/pdfsig.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

commit c002bee1f2010d13c85a46e6816920ecdccb3015
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu May 25 13:21:08 2023 +0200

    Store embedded fonts widths table more effective

    Some non-scientific experiments:
    A single 8k pdf document with okular adding a simple typewriter
    annotation with content "aoeu" in approximately the same place grows
    without this patch to 894k. With this patch, it grows to 649k.

    For comparison, if one doesn't embed the widths content at all,
    the same
    process grew to 638k

    While this isn't ground breaking gains, it is still some improvement.

 poppler/CIDFontsWidthsBuilder.h           | 190
 ++++++++++++++++++++++++++++++
 poppler/Form.cc                           |  36 +++++-
 qt5/tests/CMakeLists.txt                  |   1 +
 qt5/tests/check_cidfontswidthsbuilder.cpp | 100 ++++++++++++++++
 qt6/tests/CMakeLists.txt                  |   1 +
 qt6/tests/check_cidfontswidthsbuilder.cpp | 100 ++++++++++++++++
 6 files changed, 423 insertions(+), 5 deletions(-)

commit 2dcbf58328e5acaafaa73dc2e601e5737c685789
Author: Albert Astals Cid <aacid@kde.org>
Date:   Mon Jun 5 00:56:51 2023 +0200

    Remove poppler mingw CI until it's fixed again

    https://bugzilla.redhat.com/show_bug.cgi?id=2212050

 .gitlab-ci.yml | 12 ------------
 1 file changed, 12 deletions(-)

commit 981210b9dcc47ce2209ae7091cf6df87c958b6b2
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Tue May 30 22:06:20 2023 +0000

    Rename NSS CryptoSign backend classes and files in line with GPG
    backend.

 CMakeLists.txt                                     |  2 +-
 poppler/CryptoSignBackend.cc                       |  2 +-
 ...SignatureHandler.cc => NSSCryptoSignBackend.cc} | 58
 +++++++++++++---------
 .../{SignatureHandler.h => NSSCryptoSignBackend.h} | 32 ++++++------
 qt5/src/poppler-form.cc                            |  8 +--
 qt6/src/poppler-form.cc                            |  8 +--
 utils/pdfsig.cc                                    |  8 +--
 7 files changed, 63 insertions(+), 55 deletions(-)

commit c6dd11d89a08a6e4ab93d31b6d5d89a9153d9a91
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun May 28 01:00:51 2023 +0200

    Update (C)

 poppler/GfxFont.cc | 1 +
 1 file changed, 1 insertion(+)

commit 333b04802a3a9dbdb0d0e0caec553fd1037c4c92
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Mon May 8 18:35:10 2023 +0300

    Try harder to get Type 3 font name

    There is no BaseFont in Type 3 fonts, so we first try
    fontDescriptor’s
    FontName, but fontDescriptor is optional so we then try the Name key.

    Fixes #1396

 poppler/GfxFont.cc | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

commit 82fc01784dcfc3e22ee0053e4ecfa9b500119b19
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu May 25 12:25:57 2023 +0200

    Update (C)

 qt5/src/poppler-form.h | 1 +
 qt6/src/poppler-form.h | 1 +
 2 files changed, 2 insertions(+)

commit 83630a0ecf3db671c820b80f584e45ab9927c3fe
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Wed May 24 23:04:24 2023 +0000

    Qt frontend code for selecting cryptosign backend

 qt5/src/poppler-form.cc | 88
 ++++++++++++++++++++++++++++++++++++++++++++++++
 qt5/src/poppler-form.h  | 55 +++++++++++++++++++++++++++++-
 qt6/src/poppler-form.cc | 89
 +++++++++++++++++++++++++++++++++++++++++++++++++
 qt6/src/poppler-form.h  | 54 +++++++++++++++++++++++++++++-
 4 files changed, 284 insertions(+), 2 deletions(-)

commit a2b249f8a5bc6f8fe23d02f6e04cbfd132a46629
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue May 23 00:07:23 2023 +0200

    Update (C)

 poppler/CairoFontEngine.cc | 1 +
 1 file changed, 1 insertion(+)

commit 6f7c8d24aa699327917772fb04b7cb52ab5803f5
Author: Ilia Kats <ilia-kats@gmx.net>
Date:   Mon May 22 11:48:04 2023 +0200

    fix segfault in _free_type3_font_info

    The destructor of Gfx calls methods of outputDev, so it needs to be
    deleted first

 poppler/CairoFontEngine.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 33672ca1b6670f7378e24f6d475438f7f5d86b05
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon May 22 19:53:08 2023 +0000

    Fix crash with weird hashing used for signatures

 poppler/SignatureHandler.cc | 15 ++++++++++++---
 poppler/SignatureHandler.h  |  7 ++++++-
 2 files changed, 18 insertions(+), 4 deletions(-)

commit 4efd2f9f8175cb5d448809b56f67524df6e220aa
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Tue Apr 11 13:39:36 2023 +0200

    Cryptosign backend using gpgme (gpgsm) for all your signature needs

 CMakeLists.txt                       |   9 +-
 config.h.cmake                       |   3 +
 poppler/CryptoSignBackend.cc         |  18 ++
 poppler/CryptoSignBackend.h          |   3 +-
 poppler/GPGMECryptoSignBackend.cc    | 387
 +++++++++++++++++++++++++++++++++++
 poppler/GPGMECryptoSignBackend.h     |  57 ++++++
 qt5/tests/check_signature_basics.cpp |  52 ++++-
 qt6/tests/check_signature_basics.cpp |  50 ++++-
 8 files changed, 557 insertions(+), 22 deletions(-)

commit 9065bd7d5fb9f9554235eafe8a67d0f67ea25faf
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon May 1 15:40:39 2023 +0200

    Set certificate info a bit earlier; that way we also get it if
    signature validation fails

 poppler/Form.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit 266a2fd0a8cce584e0ffad0bc06670ed7136fc19
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 27 11:11:24 2023 +0200

    Add function to get specific element from the DN parse result

 poppler/DistinguishedNameParser.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

commit 395a5b7e5a8efa049a0eb3a4bbff41737aaf5fc1
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Fri Mar 10 13:00:09 2023 +0100

    Parser for Distinguished Names in certificates

    Not all crypto libraries exposes the fields parsed, so we wil need our
    own.

    Derived from KDE's libkleo, but improved and has added test coverage

 poppler/DistinguishedNameParser.h             | 311
 ++++++++++++++++++++++++++
 qt5/tests/CMakeLists.txt                      |   1 +
 qt5/tests/check_distinguished_name_parser.cpp | 165 ++++++++++++++
 qt6/tests/CMakeLists.txt                      |   1 +
 qt6/tests/check_distinguished_name_parser.cpp | 161 +++++++++++++
 5 files changed, 639 insertions(+)

commit 720fcc1f1b7c2d13894ce4dfee4f68a40384d91b
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Wed Mar 22 19:22:40 2023 +0100

    Let's try get in a bit of gnupg

    A script to build a gnupg2.4.1
    A gpgme that is hardcoded to use the above gnupg
    And enough CMake to see we can find it.

 .gitlab-ci.yml            |  4 +++-
 CMakeLists.txt            | 10 ++++++++--
 do-the-gnupg-2.4-dance.sh | 51
 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 3 deletions(-)

commit f07d64831252a9cb7775d12e5ce9b663aaae63d5
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat May 13 13:16:29 2023 +0200

    symbol.ttf is not a good Symbol font

    Add the URW++ font names for a proper Symbol replacement

 poppler/GlobalParamsWin.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

commit 591235c8b6c65a2eee88991b9ae73490fd9afdfe
Author: Albert Astals Cid <aacid@kde.org>
Date:   Wed May 17 22:42:05 2023 +0200

    OutlineItem::open: Fix crash on malformed files

    Fixes #1399

 poppler/Outline.cc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

commit db6d86238a86116f4ef809d6fd19ed859c36b5c1
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Tue May 16 15:29:04 2023 +0200

    Lookup with same rules as inserting them

    Inserting fonts happens without a trailing space if font style
    is empty.
    Apply teh same rules when lookin up.

 poppler/Form.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 6b70f3fc046cc0107ca3a1da0faa33e7bbb50255
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue May 16 23:12:57 2023 +0200

    Update (C)

 goo/JpegWriter.cc              | 1 +
 poppler/ImageEmbeddingUtils.cc | 1 +
 2 files changed, 2 insertions(+)

commit 2986f06c7cc9d64a506ebe861b8bf38f73386e86
Author: Jordan Abrahams-Whitehead <ajordanr@google.com>
Date:   Tue May 16 18:52:19 2023 +0000

    Add missing #include <cstdio> prior to jpeglib.h

    Fixes #1398

 goo/JpegWriter.cc              | 2 +-
 poppler/ImageEmbeddingUtils.cc | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

commit 26199bd53fbe7a0d5b00f8586e66d6702e324e5e
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri May 5 00:29:40 2023 +0200

    Look for fonts in both windows font dir and poppler fonts dir

 poppler/GlobalParamsWin.cc | 201
 +++++++++++++++++++++++----------------------
 1 file changed, 104 insertions(+), 97 deletions(-)

commit 8aaf78b06373e2a641e565c3b9da31ac3a25b7d8
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Fri May 12 21:12:43 2023 +0200

    Skip font lookup for nonprintable characters

    This is at least one cause for
    https://bugs.kde.org/show_bug.cgi?id=469664

 poppler/Form.cc | 4 ++++
 1 file changed, 4 insertions(+)

commit 6fd2c2e6f50b6b8f47c554c8e7e3076cd81a7554
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri May 12 16:22:24 2023 +0200

    Update (C)

 qt5/src/poppler-embeddedfile.cc | 1 +
 qt6/src/poppler-embeddedfile.cc | 1 +
 2 files changed, 2 insertions(+)

commit beb63c33457ed41033fb071eb25bb61e393280f6
Author: Andre Heinecke <aheinecke@gnupg.org>
Date:   Fri May 5 15:09:00 2023 +0200

    Fix crash when signing existing signature

    On windows, helvetica is not available and that makes poppler
    crash, so
    fix crash and add fallback to arial.

    This has already been implemented for "new" signatures, both the
    fallback and the crash in
    09fdfecea3a13d30b5c52e1258d17549739d9ea8 and
    a563801e1a6be5e70645472d82f4ba8534b454d1

    Refactor the fallback code to be reusable and use the same crash
    guard.

 poppler/Form.cc   | 25 +++++++++++++++++++++++--
 poppler/Form.h    |  4 ++++
 poppler/PDFDoc.cc | 21 +--------------------
 3 files changed, 28 insertions(+), 22 deletions(-)

commit aefd09f9eb69b91ae2cae0351280aaa66742dd84
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu May 11 16:43:41 2023 +0200

    Convert embedded files to bytearray a bit smarter

    The current behavior also triggers a runtime warning per byte:
    "Using QByteRef with an index pointing outside the valid range of
     a QByteArray. The corresponding behavior is deprecated, and will
     be changed in a future version of Qt."

    This will keep an extra copy of the data around during convertion,
    but that's probably okay.

 qt5/src/poppler-embeddedfile.cc | 11 ++---------
 qt6/src/poppler-embeddedfile.cc | 14 ++------------
 2 files changed, 4 insertions(+), 21 deletions(-)

commit 47856547b9b56c037049e48453f9ae65aa266a26
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri May 5 00:22:18 2023 +0200

    GooString -> std::string

 poppler/GlobalParamsWin.cc | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

commit 1e4488b2b44a56b35dee8e0bf9e33453523eb2ed
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu May 4 00:21:46 2023 +0200

    FontInfo: Make it return proper information about font substitution

    GfxFont::locateFont is what the output devices use, which is more
    complex than just findSystemFontFile so use that

 poppler/FontInfo.cc     | 8 +++-----
 poppler/GfxFont.cc      | 6 +++---
 poppler/GfxFont.h       | 3 ++-
 poppler/GlobalParams.cc | 8 ++++----
 poppler/GlobalParams.h  | 2 +-
 5 files changed, 13 insertions(+), 14 deletions(-)

commit 6a566e417b7c261252c8d3d83dd9b1c366f83194
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu May 4 14:05:45 2023 +0200

    Fix memory leak when looking for fonts in Windows

 poppler/GlobalParams.cc    |  6 +++---
 poppler/GlobalParams.h     |  4 ++--
 poppler/GlobalParamsWin.cc | 21 +++++++++------------
 3 files changed, 14 insertions(+), 17 deletions(-)

commit adf710eecf475dd7c64d7b904f7414ec3098491f
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue May 2 21:43:28 2023 +0200

    poppler 23.05.0

 CMakeLists.txt   | 4 ++--
 NEWS             | 8 ++++++++
 cpp/Doxyfile     | 2 +-
 qt5/src/Doxyfile | 2 +-
 qt6/src/Doxyfile | 2 +-
 5 files changed, 13 insertions(+), 5 deletions(-)

commit 91505b388ccb1902f86b7d9ec5baf22e879200b6
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue May 2 21:33:41 2023 +0200

    Update (C)

 poppler/Form.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 62f2eb80fb2a4d4c656e7583584aa73fbc1de511
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Apr 30 11:31:43 2023 +0200

    Form::ensureFontsForAllCharacters: Create resources if there's not one

    Fixes #1383

 poppler/Form.cc | 21 ++++++++++++++++-----
 poppler/Form.h  | 10 ++++++----
 2 files changed, 22 insertions(+), 9 deletions(-)

commit 0864da5b1063c3ddba7e68a567cc56ed3474f8b2
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Apr 30 10:28:40 2023 +0200

    Don't include an empty space at the end of the font name if there's
    no style

 poppler/Form.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 2b437604157a34546f7340cc383d7cfaa292ede5
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Apr 30 10:26:36 2023 +0200

    Do not hardcode Noto Sans as FontName

 poppler/Form.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit c5bc25a0094b3fd10e8eea5296a006a4f530a771
Author: Nicolas Fella <nicolas.fella@kdab.com>
Date:   Fri Apr 28 18:51:59 2023 +0200

    Set SigFlags when signing unsigned signature

    When creating a new signature we change SigFlags to indicate that
    there are now signatures

    However when signing an existing unsigned signature form that
    doesn't happen

    This breaks working on the file in Acrobat reader, e.g. it doesn't
    show the signatures panel and can't save amendments to the file

    Fixes https://bugs.kde.org/show_bug.cgi?id=461371

 poppler/Form.cc | 3 +++
 1 file changed, 3 insertions(+)

commit 39d0009741465344f8a30a3129081cd18bb378bb
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Fri Apr 14 17:12:24 2023 +0200

    API fixup: Use optional instead of a 'None' backend

    Let's fix the cryptosign backend code before release.

 poppler/CryptoSignBackend.cc | 13 +++++++------
 poppler/CryptoSignBackend.h  |  3 +--
 2 files changed, 8 insertions(+), 8 deletions(-)

commit 2cf3cf58ed9f70b99e6ee93c57bb434a52a0e857
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Apr 27 11:50:45 2023 +0200

    Check overflow in nvals correctly

 poppler/Stream.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

commit abc60c57be8f0dfb5b3b7b47ed9a086df9010503
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Apr 22 16:35:09 2023 +0200

    CI: Update Fedora to 38

 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit cc5ac1665aa3056d1f90a12e12d24a02536647e0
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 27 10:40:19 2023 +0200

    Adapt signature code to the backend interface

    Also set the signature info a bit later;
    gpgme only gives us the info after the validateSignature call

 CMakeLists.txt              | 25 +++++++++++++
 config.h.cmake              |  6 ++++
 poppler/Form.cc             | 87
 +++++++++++++++++++++++----------------------
 poppler/Form.h              |  8 +++--
 poppler/SignatureHandler.cc | 56 +++++++++++++++--------------
 poppler/SignatureHandler.h  | 45 ++++++++++++-----------
 qt5/src/poppler-form.cc     | 30 ++++++++--------
 qt6/src/poppler-form.cc     | 30 ++++++++--------
 utils/pdfsig.cc             |  3 +-
 9 files changed, 168 insertions(+), 122 deletions(-)

commit cb96047d029e2145191d79b7ece17b4a215794cd
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu Mar 23 16:40:59 2023 +0100

    Backending infrastructure

 poppler/CryptoSignBackend.cc |  97
 +++++++++++++++++++++++++++++++++++++++++
 poppler/CryptoSignBackend.h  | 101
 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 198 insertions(+)

commit 1be35ee8b2d6418dfafc6a8a9bbf6d70eafb2d2e
Author: Albert Astals Cid <aacid@kde.org>
Date:   Wed Apr 5 00:19:04 2023 +0200

    Fix stack overflow in PostScriptFunction::parseCode

    By using a pointer instead of a variable things are on the heap.

    Fixes issue #1381

 poppler/Function.cc | 40 +++++++++++++++++++++-------------------
 poppler/Function.h  |  2 +-
 2 files changed, 22 insertions(+), 20 deletions(-)

commit 8354c73ea0516a9d4a4bdf68da5c5392498b286d
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Sun Apr 2 14:38:53 2023 +0200

    Make filterPSName return std::string

    Rather than a pointer to GooString.  This saves one memory allocation.

 poppler/PSOutputDev.cc | 41 +++++++++++++++++------------------------
 poppler/PSOutputDev.h  |  2 +-
 2 files changed, 18 insertions(+), 25 deletions(-)

commit 013ab299d7041691760fbf8626cb4125e6a5a459
Author: Albert Astals Cid <aacid@kde.org>
Date:   Mon Apr 3 17:10:13 2023 +0200

    Update (C)

 poppler/GfxFont.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 341687022c6f34d6979bfebe34b8655679198d68
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Apr 2 12:19:44 2023 +0200

    GfxCIDFont::getCodeToGIDMap: Fix uninitialized memory reads

    Only initialize tumap when we're actually going to fill it

 poppler/GfxFont.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 4c6da80ab5a54df72c0243d32a3976b683441d5e
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Apr 2 11:26:06 2023 +0200

    poppler 23.04.0

 CMakeLists.txt   |  4 ++--
 NEWS             | 12 ++++++++++++
 cpp/Doxyfile     |  2 +-
 qt5/src/Doxyfile |  2 +-
 qt6/src/Doxyfile |  2 +-
 5 files changed, 17 insertions(+), 5 deletions(-)

commit 23994cf44ac8a11b0dfbf159df669bbe1ac78dc3
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Wed Mar 29 12:31:18 2023 +0200

    Use std::vector for the fontIDs array

    This makes the code safer and easier to read.

 poppler/PSOutputDev.cc | 24 ++++++------------------
 poppler/PSOutputDev.h  |  6 ++----
 2 files changed, 8 insertions(+), 22 deletions(-)

commit 09aed1a65e703ec419980506d12578ca4149f58d
Author: Oliver Sander <oliver.sander@tu-dresden.de>
Date:   Wed Mar 29 08:36:49 2023 +0200

    Use std::string for psFileName, instead of GooString

    This simplifies the memory and error handling a little bit.

 utils/pdftops.cc | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

commit 770b0e130183104e30eb9138a68be187a689737b
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue Mar 28 12:34:10 2023 +0200

    CI: fix mingw

 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 098d2d497b3d8cbc4fdf9eb68385bfbe2ee3e711
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 27 17:52:28 2023 +0200

    Fix crash in bad signature verification

    If the signature existing but too wrong for us to understand, we might
    not get the hashContext object created, so guard against that.

    This is fallout from 08c0766e9d.

    Note the SignHandler does not need the same guards; the hashContext is
    always present.

 poppler/SignatureHandler.cc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

commit 08c0766e9d7ab08cdc7ef380ce9c190ae87d789b
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Fri Mar 3 08:22:13 2023 +0100

    Split signature handler for signing and verification

    Only a little bit of the class state was shared between the signing
    and verification functions, so split it in the shared hashing bits
    and a class for signing and one for verification

    Also clean up a little bit of the memory handling

 poppler/Form.cc             |   8 +--
 poppler/Form.h              |   4 +-
 poppler/SignatureHandler.cc | 125
 +++++++++++++++++++-------------------------
 poppler/SignatureHandler.h  |  64 +++++++++++++++--------
 qt5/src/poppler-form.cc     |   2 +-
 qt6/src/poppler-form.cc     |   2 +-
 6 files changed, 105 insertions(+), 100 deletions(-)

commit e7fa64daa62bd09839d9d52413600889d76ae936
Author: Albert Astals Cid <aacid@kde.org>
Date:   Mon Mar 27 11:42:08 2023 +0200

    clang-format-15 reformat to ignore-revs file

 .git-blame-ignore-revs | 2 ++
 1 file changed, 2 insertions(+)

commit b5aa09403e0f106f51292683c1841908167337ea
Author: Albert Astals Cid <aacid@kde.org>
Date:   Wed Oct 12 11:59:27 2022 +0200

    clang 15

 .clang-tidy               |   2 +-
 .gitlab-ci.yml            |  20 ++--
 README.contributors       |   2 +-
 glib/poppler-document.cc  |   2 +-
 goo/gfile.h               |  10 +-
 poppler/CairoOutputDev.h  | 104 ++++---------------
 poppler/Gfx.h             |  10 +-
 poppler/GfxState.h        |  65 +++---------
 poppler/GlobalParams.cc   |   6 +-
 poppler/OutputDev.h       | 107 ++++---------------
 poppler/PDFDoc.h          | 260
 ++++++++++------------------------------------
 poppler/PSOutputDev.h     | 155 ++++++---------------------
 poppler/SplashOutputDev.h |  15 +--
 poppler/TextOutputDev.h   | 125 +++++-----------------
 qt5/src/poppler-private.h |   5 +-
 qt6/src/poppler-private.h |   5 +-
 splash/Splash.h           |  15 +--
 test/cairo-thread-test.cc |   2 +-
 test/perf-test.cc         |   2 +-
 utils/InMemoryFile.h      |   5 +-
 20 files changed, 195 insertions(+), 722 deletions(-)

commit af911848aa1e3c4bdb90558dc9c8aef2d6498cdf
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Mar 26 23:48:13 2023 +0200

    Update (C)

 poppler/Page.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit ac5cc0244f1131687f7699115e3c1be415c55409
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sun Mar 26 23:37:42 2023 +0200

    Fix leak when calling addAnnot on malformed files

    oss-fuzz/57464

 poppler/Page.cc | 13 ++++++++++---
 poppler/Page.h  |  4 ++--
 2 files changed, 12 insertions(+), 5 deletions(-)

commit d5d23b3bcc4cbfbe58bdfa3e2c82555aa72c4117
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Mar 24 23:52:02 2023 +0100

    Update (C)

 poppler/Page.cc | 2 +-
 poppler/XRef.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit d07818d63677ccd2ea68b580ee45085597681a36
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Mar 23 19:22:21 2023 +0100

    Page::removeAnnot: Reorder code to fix memory leak

    We were removing the annot object from the xref, then calling
    removeReferencedObjects
    that in some cases calls setModifiedObject on the xref with that same
    annot object, which is wrong, we can't modify an object that isn't
    there
    anymore

 poppler/Page.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 96a953dbde5339798ca583a5ced2e6f0384351e7
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Mar 23 19:21:16 2023 +0100

    XRef: Add a warning if calling setModifiedObject on empty ref

 poppler/XRef.cc | 3 +++
 1 file changed, 3 insertions(+)

commit ea5e64f139094ec93b2261d51a61c8a8b9b57e44
Author: Albert Astals Cid <aacid@kde.org>
Date:   Fri Mar 17 00:14:56 2023 +0100

    PDFDoc::sign: Fix memory issue when signing fails

    Issue #1372

 poppler/PDFDoc.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 3d38bd6abacc607e492361f8febf381065913d36
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu Mar 23 09:38:47 2023 +0000

    Fix use of dangling memory

    g_strdup is a macro and thus the intermediate getSignerName() value
    would be destructed after the first line of code in the macro

 glib/poppler-form-field.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit f8d8753fecdb8b4e572d3aec6c654c5efb498b44
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu Mar 16 09:45:02 2023 +0100

    Split HashContext to separate class

    Then we only need one place to do the endHash and memory handling.

 poppler/SignatureHandler.cc | 94
 ++++++++++++++++++++-------------------------
 poppler/SignatureHandler.h  | 27 +++++++++----
 2 files changed, 60 insertions(+), 61 deletions(-)

commit 3a3965a5cc7f20fd0d6cbfe92a45b3999456d7a0
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Tue Mar 14 09:47:51 2023 +0100

    Remove need for dual signing of data

    Instead of creating a placeholder signature of dummy data, just use
    dummy data as a placeholder and then pad the real signature with
    zeroes
    to fit in the same size as the dummy data.

    This is also kind of what the pdf specification suggests.

    It also ensures that for certain smart card setups requiring
    a distinct
    pin per signature will only be asked once.

 poppler/Form.cc             | 30 +++++++++++++++---------------
 poppler/Form.h              |  2 +-
 poppler/SignatureHandler.cc |  7 +------
 poppler/SignatureHandler.h  |  6 +++++-
 4 files changed, 22 insertions(+), 23 deletions(-)

commit 22b794c0535a0f3331428b570d348ee51ca980b8
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Wed Mar 22 17:02:53 2023 +0100

    Minor hardening

    I'm not sure how, but I succeded creating a null certificate info ptr,
    so better guard that for being safe.

    If getting the start/end fails, the objStart/objEnd might not be
    initialized, so guard against that. The document would be quite
    malformed to get here in the first place.

 poppler/Form.cc | 5 +++++
 1 file changed, 5 insertions(+)

commit 7608a427558e54ec401e6f5600ee0e9f4cf6f392
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Wed Mar 22 19:10:37 2023 +0100

    CI: Use FDO_CI_CONCURRENT

    the freedesktop.org ci system suggests to not use more parallel jobs
    than whatever is put in that variable to avoid killing the systems.

 .gitlab-ci.yml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

commit fbc26317d9bd869452d4d3da0ba05077ae619748
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue Mar 21 23:12:03 2023 +0100

    pdfsig: Support --help

 utils/pdfsig.cc | 1 +
 1 file changed, 1 insertion(+)

commit 9ff937311f0764e5f339fbbe15899a9dd6e006f0
Author: Albert Astals Cid <aacid@kde.org>
Date:   Mon Mar 20 14:37:32 2023 +0100

    Update (C)

 poppler/Form.h    | 1 +
 poppler/PDFDoc.cc | 1 +
 poppler/PDFDoc.h  | 1 +
 3 files changed, 3 insertions(+)

commit e5a3052390b5912b19c749e91babfe3d83004184
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu Mar 16 10:20:22 2023 +0100

    Use vector, not malloc/free for signature data

 poppler/Form.cc             | 6 +++---
 poppler/SignatureHandler.cc | 7 +++----
 poppler/SignatureHandler.h  | 3 ++-
 3 files changed, 8 insertions(+), 8 deletions(-)

commit 5ccac116d19c29bc543849a1540921b55c313aa8
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 20 12:07:24 2023 +0100

    pdfsig -dump - allow holes in signature list

    It is perfectly possible to have e.g. 4 signature slots and only
    currently a signature in slot first and last slot. pdfsig should
    be able
    to dump all of them, but it considers a missing signature a stop
    condition. It can just continue and get all of actual ones out.

 utils/pdfsig.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

commit 2b53d5a8ccb7350c00ef135ab40ca3562099265c
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 20 11:48:42 2023 +0100

    Fixup for 8787103a43

    Some codepaths was overlooked; might lead to crashes in pdfsig.

    Also clean up the Qt checkpassword functions; they aren't crashers
    though.

 qt5/src/poppler-form.cc | 4 ++--
 qt6/src/poppler-form.cc | 2 +-
 utils/pdfsig.cc         | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

commit 8787103a43732440e1994c6c72d99a4717af8b95
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Fri Mar 17 14:08:42 2023 +0100

    Switch some const char* to std string

    Also move the weirdness (empty password is nullptr) close to usage,
    rather than have it as far away as possible.

 poppler/Form.cc             | 14 +++++++-------
 poppler/Form.h              |  8 ++++----
 poppler/PDFDoc.cc           |  6 +++---
 poppler/PDFDoc.h            |  6 +++---
 poppler/SignatureHandler.cc |  8 ++++----
 poppler/SignatureHandler.h  |  4 ++--
 qt5/src/poppler-form.cc     |  5 ++---
 qt6/src/poppler-form.cc     |  7 +++----
 utils/pdfsig.cc             |  3 +--
 9 files changed, 29 insertions(+), 32 deletions(-)

commit b39c8cd2bc7757b3c1c4756de345702f852a4706
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Fri Mar 17 14:24:51 2023 +0100

    Add const to a few signature methods

 poppler/SignatureHandler.cc | 8 ++++----
 poppler/SignatureHandler.h  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

commit ede53de1654afe86e25fa22c7e9d50003a217d5a
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 13 14:48:21 2023 +0100

    Valgrind cleanup of signing

    signing_cert is owned by us while verifying, but the data we were
    writing to it while signing was not (directly) owned by us, so don't
    free it. Or well. Don't write it to a class member.

 poppler/SignatureHandler.cc | 30 +++++++++++++++++++-----------
 poppler/SignatureHandler.h  |  2 +-
 2 files changed, 20 insertions(+), 12 deletions(-)

commit fc802d21df3c70f721c0353ab8862a4632c8018e
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Thu Mar 16 09:54:54 2023 +0100

    Make standalone methods standalone

    In previous commits, these functions has been made fully standalone,
    so
    now make it obvious.

 poppler/SignatureHandler.cc | 10 +++++++---
 poppler/SignatureHandler.h  |  3 ---
 2 files changed, 7 insertions(+), 6 deletions(-)

commit e4f80d6461cc26e2dd1494ab2bf548e3382a5153
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Wed Mar 15 12:22:00 2023 +0100

    Simple signature tests

    Document some of the fields we can extract.

 qt5/tests/CMakeLists.txt             |   1 +
 qt5/tests/check_signature_basics.cpp | 133
 +++++++++++++++++++++++++++++++++++
 qt6/tests/CMakeLists.txt             |   1 +
 qt6/tests/check_signature_basics.cpp | 133
 +++++++++++++++++++++++++++++++++++
 4 files changed, 268 insertions(+)

commit e18bdd936d9da551506715f8f7e36c13599c9728
Author: Albert Astals Cid <aacid@kde.org>
Date:   Thu Mar 16 00:53:10 2023 +0100

    SignatureHandler::validateSignature: Use the actual hash length

    It's going to be the same size, but this is more proper

 poppler/SignatureHandler.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 829d03cccd77312886e0bc215366cfe600e65044
Author: Sune Vuorela <sune@vuorela.dk>
Date:   Mon Mar 13 14:05:59 2023 +0100

    Switch second digest buffer to not leak memory

 poppler/SignatureHandler.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

