mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-27 03:54:31 +00:00
mac fixes
svn path=/trunk/kdesupport/qca/; revision=405481
This commit is contained in:
parent
2a314bd984
commit
55997c30ba
@ -327,7 +327,7 @@ static QByteArray ipaddress_string_to_bytes(const QString &)
|
||||
|
||||
static GENERAL_NAME *new_general_name(QCA::CertificateInfoType t, const QString &val)
|
||||
{
|
||||
GENERAL_NAME *name;
|
||||
GENERAL_NAME *name = 0;
|
||||
switch(t)
|
||||
{
|
||||
case QCA::Email:
|
||||
|
4
qca.pro
4
qca.pro
@ -1,7 +1,7 @@
|
||||
# qca qmake profile
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG += release
|
||||
#CONFIG += release
|
||||
QT -= gui
|
||||
TARGET = qca
|
||||
|
||||
@ -64,7 +64,7 @@ win: {
|
||||
}
|
||||
mac: {
|
||||
SOURCES += $$QCA_CPP/qca_systemstore_mac.cpp
|
||||
QMAKE_LFLAGS += -framework Carbon
|
||||
LIBS += -framework Carbon -framework Security
|
||||
}
|
||||
|
||||
include(conf.pri)
|
||||
|
@ -193,7 +193,7 @@ bool KeyStore::removeEntry(const QString &id)
|
||||
|
||||
void KeyStore::submitPassphrase(const QSecureArray &passphrase)
|
||||
{
|
||||
static_cast<const KeyStoreContext *>(context())->submitPassphrase(passphrase);
|
||||
static_cast<KeyStoreContext *>(context())->submitPassphrase(passphrase);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -823,7 +823,7 @@ QSecureArray PrivateKey::toDER(const QSecureArray &passphrase, PBEAlgorithm pbe)
|
||||
}
|
||||
else
|
||||
{
|
||||
PKeyContext *pk = static_cast<const PKeyContext *>(getContext("pkey", p));
|
||||
PKeyContext *pk = static_cast<PKeyContext *>(getContext("pkey", p));
|
||||
if(pk->importKey(cur->key()))
|
||||
out = pk->privateToDER(passphrase, pbe);
|
||||
delete pk;
|
||||
@ -848,7 +848,7 @@ QString PrivateKey::toPEM(const QSecureArray &passphrase, PBEAlgorithm pbe) cons
|
||||
}
|
||||
else
|
||||
{
|
||||
PKeyContext *pk = static_cast<const PKeyContext *>(getContext("pkey", p));
|
||||
PKeyContext *pk = static_cast<PKeyContext *>(getContext("pkey", p));
|
||||
if(pk->importKey(cur->key()))
|
||||
out = pk->privateToPEM(passphrase, pbe);
|
||||
delete pk;
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
#include "qca_systemstore.h"
|
||||
|
||||
#include "Carbon.h"
|
||||
#include "Security/SecTrust.h"
|
||||
#include "Security/SecCertificate.h"
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <Security/SecTrust.h>
|
||||
#include <Security/SecCertificate.h>
|
||||
|
||||
namespace QCA {
|
||||
|
||||
@ -42,7 +42,7 @@ CertificateCollection qca_get_systemstore(const QString &provider)
|
||||
SecCertificateRef cr = (SecCertificateRef)CFArrayGetValueAtIndex(anchors, n);
|
||||
CSSM_DATA cssm;
|
||||
SecCertificateGetData(cr, &cssm);
|
||||
QByteArray der(cssm.Length);
|
||||
QByteArray der(cssm.Length, 0);
|
||||
memcpy(der.data(), cssm.Data, cssm.Length);
|
||||
|
||||
Certificate cert = Certificate::fromDER(der, 0, provider);
|
||||
|
@ -59,7 +59,7 @@ CertificateCollection qca_get_systemstore(const QString &provider)
|
||||
if(!pc)
|
||||
break;
|
||||
int size = pc->cbCertEncoded;
|
||||
QByteArray der(size);
|
||||
QByteArray der(size, 0);
|
||||
memcpy(der.data(), pc->pbCertEncoded, size);
|
||||
|
||||
Certificate cert = Certificate::fromDER(der, 0, provider);
|
||||
|
@ -1,4 +1,6 @@
|
||||
QT -= gui
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
INCLUDEPATH += ../../include/QtCrypto
|
||||
LIBS += -L../.. -lqca
|
||||
|
@ -1,4 +1,6 @@
|
||||
QT -= gui
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
INCLUDEPATH += ../../include/QtCrypto
|
||||
SOURCES = main.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user