• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • KNS3
  • Security
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
KNS3::Security Class Reference

#include <security.h>

Inheritance diagram for KNS3::Security:
Inheritance graph
[legend]

Public Types

enum  Results {
  MD5_OK = 1, SIGNED_OK = 2, SIGNED_BAD = 4, TRUSTED = 8,
  UNKNOWN = 16, SIGNED_BAD_CLEAR = 27, BAD_PASSPHRASE = 32
}
 

Public Slots

void readKeys ()
 
void readSecretKeys ()
 
void slotCheckValidity ()
 
void slotSignFile ()
 

Signals

void fileSigned (int result)
 
void validityResult (int result)
 

Public Member Functions

 ~Security ()
 
void checkValidity (const QString &fileName)
 
KeyStruct signatureKey ()
 
void signFile (const QString &fileName)
 

Static Public Member Functions

static Security * ref ()
 

Detailed Description

Handles security related issues, like signing, verifying.

It is a private class, not meant to be used by third party applications.

Author
Andras Mantia amant.nosp@m.ia@k.nosp@m.de.or.nosp@m.g

Definition at line 47 of file knewstuff3/core/security.h.

Member Enumeration Documentation

enum KNS3::Security::Results
Enumerator
MD5_OK 
SIGNED_OK 

The MD5 sum check is OK.

SIGNED_BAD 

The file is signed with a good signature.

TRUSTED 

The file is signed with a bad signature.

UNKNOWN 

The signature is trusted.

SIGNED_BAD_CLEAR 

The key is unknown.

BAD_PASSPHRASE 

used to clear the SIGNED_BAD flag

Definition at line 84 of file knewstuff3/core/security.h.

Constructor & Destructor Documentation

Security::~Security ( )

Definition at line 62 of file knewstuff3/core/security.cpp.

Member Function Documentation

void Security::checkValidity ( const QString &  fileName)

Verifies the integrity and the signature of a tarball file.

Parameters
fileNamethe file to be verified. It should be a tar.gz (.tgz) file. The directory where the file is should contain a "signature" and a "md5sum" file, otherwise verification will fail. The method is asynchronous and the result is signalled with validityResult.

Definition at line 227 of file knewstuff3/core/security.cpp.

void KNS3::Security::fileSigned ( int  result)
signal

Sent when the signing is done.

Returns
the result of the operation. See Results
void Security::readKeys ( )
slot

Reads the available public keys.

Definition at line 66 of file knewstuff3/core/security.cpp.

void Security::readSecretKeys ( )
slot

Reads the available secret keys.

Definition at line 93 of file knewstuff3/core/security.cpp.

static Security* KNS3::Security::ref ( )
inlinestatic

Definition at line 51 of file knewstuff3/core/security.h.

KeyStruct KNS3::Security::signatureKey ( )
inline

Get the key used for signing.

This method is valid only if:

  • the checkValidity was called
  • the result of the validity check does not have the UNKNOWN bit set
Returns
the key used for signing the file

Definition at line 80 of file knewstuff3/core/security.h.

void Security::signFile ( const QString &  fileName)

Creates a signature and an md5sum file for the fileName and packs everything into a gzipped tarball.

Parameters
fileNamethe file with full path to sign

The method is asynchronous and the result is signalled with fileSigned.

Definition at line 296 of file knewstuff3/core/security.cpp.

void Security::slotCheckValidity ( )
slot

Verifies the integrity and the signature of a tarball file (see m_fileName).

Definition at line 233 of file knewstuff3/core/security.cpp.

void Security::slotSignFile ( )
slot

Creates a signature and an md5sum file for the m_fileName and packs everything into a gzipped tarball.

Definition at line 302 of file knewstuff3/core/security.cpp.

void KNS3::Security::validityResult ( int  result)
signal

Sent when the validity check is done.

Returns
the result of the check. See Results

The documentation for this class was generated from the following files:
  • knewstuff3/core/security.h
  • knewstuff3/core/security.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal