summaryrefslogtreecommitdiff
path: root/src/trust.cc
blob: 29b31b1c8f0c5393973fa19c51dafdbbedd3b8c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// trust.cc

#include "aptitude.h"
#include "trust.h"

#include <generic/apt/apt.h>

#include <vscreen/fragment.h>
#include <vscreen/config/colors.h>

fragment *make_untrusted_warning(const pkgCache::VerIterator &ver)
{
  if(package_trusted(ver))
    return NULL;
  else
    return indentbox(0,
		     strlen(_("WARNING"))+2,
		     flowbox(fragf(_("%F: This version of %s is from an %Buntrusted source%b!  Installing this package could allow a malicious individual to damage or take control of your system."),
				   text_fragment(_("WARNING"),
						 get_style("TrustWarning")),
				   ver.ParentPkg().Name())));
}