From e84d3803ed3bdd55e20e3720b375769330966fa0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 2 Aug 2014 05:09:13 +0200 Subject: move clearsign check into pkgAcqMetaClearSig::Failed() --- apt-pkg/acquire-item.cc | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index a6f69944e..bf6866f17 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1551,18 +1551,6 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long long Size,HashStringList } else { - // FIXME: move this into pkgAcqMetaClearSig::Done on the next - // ABI break - - // if we expect a ClearTextSignature (InRelase), ensure that - // this is what we get and if not fail to queue a - // Release/Release.gpg, see #346386 - if (SigFile == DestFile && !StartsWithGPGClearTextSignature(DestFile)) - { - Failed(Message, Cfg); - return; - } - // There was a signature file, so pass it to gpgv for // verification if (_config->FindB("Debug::pkgAcquire::Auth", false)) @@ -1985,6 +1973,17 @@ void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /* // we failed, we will not get additional items from this method ExpectedAdditionalItems = 0; + // if we expect a ClearTextSignature (InRelase), ensure that + // this is what we get and if not fail to queue a + // Release/Release.gpg, see #346386 + if (!StartsWithGPGClearTextSignature(DestFile)) + { + //_error->Error(_("Does not start with a clear sign signature")); + pkgAcquire::Item::Failed(Message, Cnf); + return; + } + + if (AuthPass == false) { // Queue the 'old' InRelease file for removal if we try Release.gpg -- cgit v1.2.3