/***************************************************************************
                            kde_KSSLPKCS12.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_KSSLPKCS12.h"
}

#include <qstring.h>
#include <ksslpkcs12.h>

class KSSLPKCS12Bridge : public KSSLPKCS12
{
public:
	~KSSLPKCS12Bridge() {}
	KSSLPKCS12Bridge() : KSSLPKCS12() {}
	bool  protected_parse(QString pass) {
		return (bool ) KSSLPKCS12::parse(pass);
	}
};

void kde_del_KSSLPKCS12( kde_KSSLPKCS12* p ){
	delete (KSSLPKCS12Bridge*) p;
}
qt_QString * kde_KSSLPKCS12_name( kde_KSSLPKCS12* instPointer){
	return (qt_QString *)new QString(((KSSLPKCS12Bridge*)instPointer)->name());
}
qt_QString * kde_KSSLPKCS12_toString( kde_KSSLPKCS12* instPointer){
	return (qt_QString *)new QString(((KSSLPKCS12Bridge*)instPointer)->toString());
}
void kde_KSSLPKCS12_setCert( kde_KSSLPKCS12* instPointer,PKCS12* c){
	((KSSLPKCS12Bridge*)instPointer)->setCert((PKCS12*)c);
	return;
}
int kde_KSSLPKCS12_changePassword( kde_KSSLPKCS12* instPointer,qt_QString * pold, qt_QString * pnew){
	return (int) ((KSSLPKCS12Bridge*)instPointer)->changePassword((QString)* (QString*)pold, (QString)* (QString*)pnew);
}
EVP_PKEY* kde_KSSLPKCS12_getPrivateKey( kde_KSSLPKCS12* instPointer){
	return (EVP_PKEY*) ((KSSLPKCS12Bridge*)instPointer)->getPrivateKey();
}
kde_KSSLCertificate* kde_KSSLPKCS12_getCertificate( kde_KSSLPKCS12* instPointer){
	return (kde_KSSLCertificate*) ((KSSLPKCS12Bridge*)instPointer)->getCertificate();
}
int kde_KSSLPKCS12_toFile( kde_KSSLPKCS12* instPointer,qt_QString * filename){
	return (int) ((KSSLPKCS12Bridge*)instPointer)->toFile((QString)* (QString*)filename);
}
int kde_KSSLPKCS12_validate( kde_KSSLPKCS12* instPointer){
	return (int) ((KSSLPKCS12Bridge*)instPointer)->validate();
}
int kde_KSSLPKCS12_revalidate( kde_KSSLPKCS12* instPointer){
	return (int) ((KSSLPKCS12Bridge*)instPointer)->revalidate();
}
int kde_KSSLPKCS12_isValid( kde_KSSLPKCS12* instPointer){
	return (int) ((KSSLPKCS12Bridge*)instPointer)->isValid();
}
kde_KSSLPKCS12* kde_KSSLPKCS12_fromString( qt_QString * base64, qt_QString * password){
	return (kde_KSSLPKCS12*) KSSLPKCS12Bridge::fromString((QString)* (QString*)base64, (QString)* (QString*)password);
}
kde_KSSLPKCS12* kde_KSSLPKCS12_loadCertFile( qt_QString * filename, qt_QString * password){
	return (kde_KSSLPKCS12*) KSSLPKCS12Bridge::loadCertFile((QString)* (QString*)filename, (QString)* (QString*)password);
}
kde_KSSLPKCS12 * kde_new_KSSLPKCS12(){
	return (kde_KSSLPKCS12 *) new KSSLPKCS12Bridge();
}
int kde_KSSLPKCS12_parse( kde_KSSLPKCS12* instPointer,qt_QString * pass){
	return (int) ((KSSLPKCS12Bridge*)instPointer)->protected_parse((QString)* (QString*)pass);
}
