mac fixes

svn path=/trunk/kdesupport/qca/; revision=405481
This commit is contained in:
Justin Karneges 2005-04-14 06:51:54 +00:00
parent 2a314bd984
commit 55997c30ba
8 changed files with 15 additions and 11 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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);
}
//----------------------------------------------------------------------------

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -1,4 +1,6 @@
QT -= gui
CONFIG += console
CONFIG -= app_bundle
INCLUDEPATH += ../../include/QtCrypto
LIBS += -L../.. -lqca

View File

@ -1,4 +1,6 @@
QT -= gui
CONFIG += console
CONFIG -= app_bundle
INCLUDEPATH += ../../include/QtCrypto
SOURCES = main.cpp