Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Bor Kraljič (e652bad7f1f0f01540e39cd444acf78a925eb868)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Bor Kraljič <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Bor Kraljič (e652bad7f1f0f01540e39cd444acf78a925eb868)
  • Date: Mon, 26 Sep 2011 01:37:36 -0500

GIT changes to master quill by Bor Kraljič <pyrobor AT ver.si>:

var/lib/quill/ChangeLog | 4 ++++
var/lib/quill/modules/libgpg | 13 +++++++++++++
2 files changed, 17 insertions(+)

New commits:
commit e652bad7f1f0f01540e39cd444acf78a925eb868
Author: Bor Kraljič <pyrobor AT ver.si>
Commit: Bor Kraljič <pyrobor AT ver.si>

libgpg: added two simple checks to ensure nothing breaks unexpectedly

check if signature contains any key
check if key was imported without an error

diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 6fd8f20..03a8500 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-26 Bor Kraljič <pyrobor AT ver.si>
+ * libgpg: added two simple checks to ensure nothing breaks
unexpectedly
+ check if signature contains any key & if key was imported without
an error
+
2011-09-25 Bor Kraljič <pyrobor AT ver.si>
* libgpg: fixed behaviour if there is more than one keyid found in
signature
override current_check for lines that have gurus.gpg
diff --git a/var/lib/quill/modules/libgpg b/var/lib/quill/modules/libgpg
index 06b51db..30c0f45 100644
--- a/var/lib/quill/modules/libgpg
+++ b/var/lib/quill/modules/libgpg
@@ -286,6 +286,12 @@ function quill_get_spell_keyring() {
# get the key id
SPELL_KEYRING_KEYS=$(gpg --verify $SOURCE_CACHE/${SPELL_SIGNATURE##*/}
2>&1 | sed -n 's,^.* key ID ,,p')

+ # check if signature has any key information
+ if [[ $SPELL_KEYRING_KEYS == "" ]]; then
+ error_msg "Signature doesn't have any key information!"
+ continue
+ fi
+
# if there is more than one key name keyring by spellname
if [[ ${#SPELL_KEYRING_KEYS} -gt 8 ]]; then
SPELL_KEYRING=$SPELL.gpg
@@ -296,6 +302,13 @@ function quill_get_spell_keyring() {
# create the keyring
gpg --import-options import-minimal --no-default-keyring --keyring \
$QUILL_SPELL_DIR/$SPELL_NAME/$SPELL_KEYRING --recv-keys
$SPELL_KEYRING_KEYS
+ # check if key was really imported
+ if [[ $? -gt 0 ]]; then
+ rm $QUILL_SPELL_DIR/$SPELL_NAME/$SPELL_KEYRING
+ SPELL_UPDATED=n # otherwise HISTORY gets updated
+ error_msg "There was problem with getting key from hkp server!"
+ continue
+ fi

if query "Is there a more complete keyring available?" y; then
rm $QUILL_SPELL_DIR/$SPELL_NAME/$SPELL_KEYRING



  • [SM-Commit] GIT changes to master quill by Bor Kraljič (e652bad7f1f0f01540e39cd444acf78a925eb868), Bor Kraljič, 09/26/2011

Archive powered by MHonArc 2.6.24.

Top of Page