libcryptosec
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Engine Class Reference

Define as características funcionais de uma engine do OpenSSL. More...

#include <Engine.h>

Inheritance diagram for Engine:
DynamicEngine

Public Types

enum  Algorithm {
  RSA, DSA, RAND, ECDSA,
  CIPHERS, DIGESTS, ALL, NONE
}
 
enum  CmdType { STRING, LONG, NO_PARAMETERS, INTERNAL_USE }
 

Public Member Functions

 Engine (ENGINE *engine)
 
 Engine (const Engine &engine)
 
virtual ~Engine ()
 
std::string getId () throw (EngineException)
 
bool testInit ()
 
std::vector< Engine::AlgorithmgetCapabilities ()
 
void setCommand (std::string key) throw (EngineException)
 
void setCommand (std::string key, std::string value) throw (EngineException)
 
void setCommand (std::string key, long value) throw (EngineException)
 
std::vector< std::pair< Engine::CmdType, std::string > > getAvaliableCmds ()
 
virtual void addToEnginesList () throw (EngineException)
 
virtual void removeFromEnginesList () throw (EngineException)
 
ENGINE * getEngine () const
 

Static Public Member Functions

static std::string algorithm2Name (Engine::Algorithm algorithm)
 

Protected Attributes

ENGINE * engine
 

Detailed Description

Define as características funcionais de uma engine do OpenSSL.

See also
DynamicEngine.

Member Enumeration Documentation

◆ Algorithm

Enumerator
RSA 
DSA 
RAND 
ECDSA 
CIPHERS 
DIGESTS 
ALL 
NONE 

◆ CmdType

Enumerator
STRING 
LONG 
NO_PARAMETERS 
INTERNAL_USE 

Constructor & Destructor Documentation

◆ Engine() [1/2]

Engine::Engine ( ENGINE *  engine)

Construtor. Cria um objeto Engine.

Parameters
engineestrutura ENGINE

◆ Engine() [2/2]

Engine::Engine ( const Engine engine)

Construtor de cópia. Cria um objeto Engine a partir de outro do mesmo tipo.

Parameters
engineobjeto Engine.

◆ ~Engine()

Engine::~Engine ( )
virtual

Destrutor. Destroi objeto Engine.

Member Function Documentation

◆ addToEnginesList()

void Engine::addToEnginesList ( )
throw (EngineException
)
virtual

Adiciona engine na lista de engines do Openssl. Essa engine será carregado por getEngineById(). Este método é implementado pelas subclasses de Engine.

Exceptions
EngineExceptionse ocorrer algum erro durante a adição da engine.
See also
DynamicEngine.

Reimplemented in DynamicEngine.

◆ algorithm2Name()

std::string Engine::algorithm2Name ( Engine::Algorithm  algorithm)
static

Retorna string que identifica um algoritmo da engine.

Returns
string referente a um dado algoritmo da engine.

◆ getAvaliableCmds()

std::vector< std::pair< Engine::CmdType, std::string > > Engine::getAvaliableCmds ( )

Retorna os comandos disponíveis pela engine.

Returns
vetor de pares tipo de comando e de seu respectivo nome.

◆ getCapabilities()

std::vector< Engine::Algorithm > Engine::getCapabilities ( )

Retorna os algoritmos suportados pela engine.

Returns
Vetor de algoritmos.

◆ getEngine()

ENGINE * Engine::getEngine ( ) const

Retorna atributo ENGINE do objeto Engine.

Returns
objeto ENGINE.

◆ getId()

std::string Engine::getId ( )
throw (EngineException
)

Retorna o identificador do objeto Engine.

Returns
Identificador do objeto Engine.
Exceptions
EngineExceptioncaso não haja uma estrutura ENGINE associada ou iniciada de maneira correta.

◆ removeFromEnginesList()

void Engine::removeFromEnginesList ( )
throw (EngineException
)
virtual

Remove engine da lista de engines do OpenSSL. Essa engine não será carregada por getEngineById(). Este método é implementado pelas subclasses de Engine.

Exceptions
EngineExceptionse ocorrer algum erro durante a remoção da engine.
See also
DynamicEngine.

Reimplemented in DynamicEngine.

◆ setCommand() [1/3]

void Engine::setCommand ( std::string  key)
throw (EngineException
)

Executa comando na Engine.

Parameters
Comando.
Exceptions
EngineExceptionno caso de falha ao adicionar comando na Engine.

◆ setCommand() [2/3]

void Engine::setCommand ( std::string  key,
std::string  value 
)
throw (EngineException
)

Executa comando na Engine.

Parameters
Comando.
Valordo comando.
Exceptions
EngineExceptionno caso de falha ao adicionar comando na Engine.

◆ setCommand() [3/3]

void Engine::setCommand ( std::string  key,
long  value 
)
throw (EngineException
)

Executa comando na Engine.

Parameters
Comando.
Valordo comando.
Exceptions
EngineExceptionno caso de falha ao executar comando na Engine.

◆ testInit()

bool Engine::testInit ( )

Verifica se a engine pode ser inicializa com sucesso.

Returns
Verdadeiro para sucesso e falso para fracasso.

Member Data Documentation

◆ engine

ENGINE* Engine::engine
protected

Estrutura ENGINE do OpenSSL que representa uma engine.


The documentation for this class was generated from the following files: