r3341 - in trunk: libmikey/include/libmikey libmikey/keyagreement libmikey/mikey libminisip/source/subsystem_gui libminisip/source/subsystem_media libminisip/source/subsystem_signaling/sip libmsip/include/libmsip libmsip/source minisip/minisip/gui/gtkgui

erik at minisip.org erik at minisip.org
Thu Jun 28 15:00:39 CEST 2007


Author: erik
Date: 2007-06-28 15:00:38 +0200 (Thu, 28 Jun 2007)
New Revision: 3341

Modified:
   trunk/libmikey/include/libmikey/KeyAgreementDH.h
   trunk/libmikey/include/libmikey/KeyAgreementPKE.h
   trunk/libmikey/include/libmikey/KeyAgreementRSAR.h
   trunk/libmikey/include/libmikey/MikeyMessage.h
   trunk/libmikey/include/libmikey/MikeyPayloadCERT.h
   trunk/libmikey/keyagreement/KeyAgreementDH.cxx
   trunk/libmikey/keyagreement/KeyAgreementPKE.cxx
   trunk/libmikey/keyagreement/KeyAgreementRSAR.cxx
   trunk/libmikey/mikey/Mikey.cxx
   trunk/libmikey/mikey/MikeyMessage.cxx
   trunk/libmikey/mikey/MikeyMessageDH.cxx
   trunk/libmikey/mikey/MikeyMessagePKE.cxx
   trunk/libmikey/mikey/MikeyMessageRSAR.cxx
   trunk/libmikey/mikey/MikeyPayloadCERT.cxx
   trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx
   trunk/libminisip/source/subsystem_media/Session.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
   trunk/libmsip/include/libmsip/SipLayerTransport.h
   trunk/libmsip/include/libmsip/SipStack.h
   trunk/libmsip/source/SipLayerTransport.cxx
   trunk/libmsip/source/SipStackInternal.cxx
   trunk/minisip/minisip/gui/gtkgui/AccountDialog.cxx
   trunk/minisip/minisip/gui/gtkgui/CertificateDialog.cxx
   trunk/minisip/minisip/gui/gtkgui/CertificateDialog.h
   trunk/minisip/minisip/gui/gtkgui/SettingsDialog.cxx
Log:

 * Update users of libmcrypto/cert.h with the new class and method names.



Modified: trunk/libmikey/include/libmikey/KeyAgreementDH.h
===================================================================
--- trunk/libmikey/include/libmikey/KeyAgreementDH.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/include/libmikey/KeyAgreementDH.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -36,26 +36,26 @@
 
 
 class OakleyDH;
-class certificate_chain;
+class CertificateChain;
 class certificate;
-class ca_db;
+class CertificateSet;
 
 class LIBMIKEY_API PeerCertificates {
 	public:
-		PeerCertificates( MRef<certificate_chain*> aCert,
-				  MRef<ca_db *> aCaDb );
-		PeerCertificates( MRef<certificate_chain*> aCert,
-				  MRef<certificate_chain*> aPeerCert );
+		PeerCertificates( MRef<CertificateChain*> aCert,
+				  MRef<CertificateSet *> aCaDb );
+		PeerCertificates( MRef<CertificateChain*> aCert,
+				  MRef<CertificateChain*> aPeerCert );
 		virtual ~PeerCertificates();
-		virtual MRef<certificate_chain *> certificateChain();
-		virtual MRef<certificate_chain *> peerCertificateChain();
-		virtual void setPeerCertificateChain( MRef<certificate_chain *> chain );
+		virtual MRef<CertificateChain *> certificateChain();
+		virtual MRef<CertificateChain *> peerCertificateChain();
+		virtual void setPeerCertificateChain( MRef<CertificateChain *> chain );
 		virtual int controlPeerCertificate( const std::string &peerUri );
 
 	private:
-		MRef<certificate_chain *> certChainPtr;
-		MRef<certificate_chain *> peerCertChainPtr;
-		MRef<ca_db *> certDbPtr;
+		MRef<CertificateChain *> certChainPtr;
+		MRef<CertificateChain *> peerCertChainPtr;
+		MRef<CertificateSet *> certDbPtr;
 };
 
 class LIBMIKEY_API KeyAgreementDHBase: virtual public ITgk{
@@ -87,8 +87,8 @@
 				    public KeyAgreementDHBase,
 				    public PeerCertificates{
 	public:
-		KeyAgreementDH( MRef<certificate_chain *> cert, 
-				MRef<ca_db *> ca_db );
+		KeyAgreementDH( MRef<CertificateChain *> cert, 
+				MRef<CertificateSet *> CertificateSet );
 		KeyAgreementDH( MRef<SipSim *> sim );
 		~KeyAgreementDH();
 

Modified: trunk/libmikey/include/libmikey/KeyAgreementPKE.h
===================================================================
--- trunk/libmikey/include/libmikey/KeyAgreementPKE.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/include/libmikey/KeyAgreementPKE.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -19,14 +19,14 @@
 		/**
 		 * Initiator
 		 */
-		KeyAgreementPKE( MRef<certificate_chain*> cert,
-				 MRef<certificate_chain*> peerCert );
+		KeyAgreementPKE( MRef<CertificateChain*> cert,
+				 MRef<CertificateChain*> peerCert );
 
 		/**
 		 * Responder
 		 */
-		KeyAgreementPKE( MRef<certificate_chain *> cert, 
-				 MRef<ca_db *> ca_db );
+		KeyAgreementPKE( MRef<CertificateChain *> cert, 
+				 MRef<CertificateSet *> ca_db );
 
 	    /**
 	     * Destructor deletes some objects to prevent memory leaks

Modified: trunk/libmikey/include/libmikey/KeyAgreementRSAR.h
===================================================================
--- trunk/libmikey/include/libmikey/KeyAgreementRSAR.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/include/libmikey/KeyAgreementRSAR.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -34,8 +34,8 @@
 class LIBMIKEY_API KeyAgreementRSAR : public KeyAgreementPKE{
 	public:
 	
-		KeyAgreementRSAR( MRef<certificate_chain *> cert, 
-				  MRef<ca_db *> ca_db );
+		KeyAgreementRSAR( MRef<CertificateChain *> cert, 
+				  MRef<CertificateSet *> CertificateSet );
 	    
 		/**
 		 * Destructor deletes some objects to prevent memory leaks

Modified: trunk/libmikey/include/libmikey/MikeyMessage.h
===================================================================
--- trunk/libmikey/include/libmikey/MikeyMessage.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/include/libmikey/MikeyMessage.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -67,8 +67,8 @@
 
 class aes;
 class SipSim;
-class certificate;
-class certificate_db;
+class Certificate;
+class CertificateSet;
 class KeyAgreementDHHMAC;
 class KeyAgreementPKE;
 class KeyAgreementRSAR;
@@ -84,9 +84,9 @@
 		void operator+=( MRef<MikeyPayload*> payload );
 		void addSignaturePayload( MRef<SipSim*> sim,
 					  bool addIdsAndT = false );
-		void addSignaturePayload( MRef<certificate *> cert,
+		void addSignaturePayload( MRef<Certificate *> cert,
 					  bool addIdsAndT = false );
-		bool verifySignature( MRef<certificate*> cert,
+		bool verifySignature( MRef<Certificate*> cert,
 				      bool addIdsAndT = false );
 
 		void addVPayload( int macAlg, uint64_t receivedT,
@@ -102,8 +102,8 @@
 		bool verifyKemac( KeyAgreementPSK* ka,
 				  bool kemacOnly = false );
 
-		void addCertificatePayloads( MRef<certificate_chain *> certChain );
-		MRef<certificate_chain*> extractCertificateChain() const;
+		void addCertificatePayloads( MRef<CertificateChain *> certChain );
+		MRef<CertificateChain*> extractCertificateChain() const;
 
 		void addPkeKemac( KeyAgreementPKE* ka,
 				  int encrAlg, int macAlg );

Modified: trunk/libmikey/include/libmikey/MikeyPayloadCERT.h
===================================================================
--- trunk/libmikey/include/libmikey/MikeyPayloadCERT.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/include/libmikey/MikeyPayloadCERT.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -41,13 +41,13 @@
  * @author Erik Eliasson, Johan Bilien
 */
 
-class certificate;
-class certificate_db;
+class Certificate;
+class CertificateSet;
 
 class LIBMIKEY_API MikeyPayloadCERT : public MikeyPayload{
 	public:
 	
-		MikeyPayloadCERT( int type, MRef<certificate *> cert );
+		MikeyPayloadCERT( int type, MRef<Certificate *> cert );
 		MikeyPayloadCERT( int type, int length, byte_t *data );
 		MikeyPayloadCERT( byte_t * start, int lengthLimit );
 		~MikeyPayloadCERT();

Modified: trunk/libmikey/keyagreement/KeyAgreementDH.cxx
===================================================================
--- trunk/libmikey/keyagreement/KeyAgreementDH.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/keyagreement/KeyAgreementDH.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -41,16 +41,16 @@
 // 
 // PeerCertificates
 // 
-PeerCertificates::PeerCertificates( MRef<certificate_chain *> aCert,
-				    MRef<ca_db *> aCaDb ):
+PeerCertificates::PeerCertificates( MRef<CertificateChain *> aCert,
+				    MRef<CertificateSet *> aCaDb ):
 		certChainPtr( aCert ),
 		certDbPtr( aCaDb )
 {
-	peerCertChainPtr = certificate_chain::create();
+	peerCertChainPtr = CertificateChain::create();
 }
 
-PeerCertificates::PeerCertificates( MRef<certificate_chain *> aCert,
-				    MRef<certificate_chain *> aPeerCert ):
+PeerCertificates::PeerCertificates( MRef<CertificateChain *> aCert,
+				    MRef<CertificateChain *> aPeerCert ):
 		certChainPtr( aCert ),
 		peerCertChainPtr( aPeerCert )
 {
@@ -63,12 +63,12 @@
 // KeyAgreementDHBase
 //
 KeyAgreementDHBase::KeyAgreementDHBase(MRef<SipSim *> s):
+	sim(s),
+	dh(NULL),
 	peerKeyPtr( NULL ),
 	peerKeyLengthValue( 0 ),
 	publicKeyPtr( NULL ),
-	publicKeyLengthValue( 0 ),
-	sim(s),
-	dh(NULL)
+	publicKeyLengthValue( 0 )
 
 {
 #ifdef SCSIM_SUPPORT
@@ -103,8 +103,8 @@
 // 
 // KeyAgreementDH
 // 
-KeyAgreementDH::KeyAgreementDH( MRef<certificate_chain *> certChainPtr,
-		MRef<ca_db *> certDbPtr ):
+KeyAgreementDH::KeyAgreementDH( MRef<CertificateChain *> certChainPtr,
+		MRef<CertificateSet *> certDbPtr ):
 	KeyAgreement(),
 	KeyAgreementDHBase(NULL),
 	PeerCertificates( certChainPtr, certDbPtr )
@@ -223,15 +223,15 @@
 	return peerKeyPtr;
 }
 
-MRef<certificate_chain *> PeerCertificates::certificateChain(){
+MRef<CertificateChain *> PeerCertificates::certificateChain(){
 	return certChainPtr;
 }
 
-MRef<certificate_chain *> PeerCertificates::peerCertificateChain(){
+MRef<CertificateChain *> PeerCertificates::peerCertificateChain(){
 	return peerCertChainPtr;
 }
 
-void PeerCertificates::setPeerCertificateChain( MRef<certificate_chain *> peerChain ){
+void PeerCertificates::setPeerCertificateChain( MRef<CertificateChain *> peerChain ){
 	peerCertChainPtr = peerChain;
 }
 
@@ -248,9 +248,9 @@
 		return 1;
 	}
 
-	MRef<certificate *> peerCert = peerCertChainPtr->get_first();
+	MRef<Certificate *> peerCert = peerCertChainPtr->getFirst();
 	vector<string> altNames;
-	altNames = peerCert->get_alt_name( certificate::SAN_URI );
+	altNames = peerCert->getAltName( Certificate::SAN_URI );
 	if( find( altNames.begin(), altNames.end(), peerUri ) != altNames.end() ){
 		return 1;
 	}
@@ -262,7 +262,7 @@
 		id = peerUri.substr( pos + 1 );
 	}
 
-	altNames = peerCert->get_alt_name( certificate::SAN_RFC822NAME );
+	altNames = peerCert->getAltName( Certificate::SAN_RFC822NAME );
 	if( find( altNames.begin(), altNames.end(), id ) != altNames.end() ){
 		return 1;
 	}
@@ -272,7 +272,7 @@
 		id = id.substr( pos + 1 );
 	}
 
-	altNames = peerCert->get_alt_name( certificate::SAN_DNSNAME );
+	altNames = peerCert->getAltName( Certificate::SAN_DNSNAME );
 	if( find( altNames.begin(), altNames.end(), id ) != altNames.end() ){
 		return 1;
 	}

Modified: trunk/libmikey/keyagreement/KeyAgreementPKE.cxx
===================================================================
--- trunk/libmikey/keyagreement/KeyAgreementPKE.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/keyagreement/KeyAgreementPKE.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -7,8 +7,8 @@
 
 using namespace std;
 
-KeyAgreementPKE::KeyAgreementPKE( MRef<certificate_chain*> cert,
-				  MRef<certificate_chain*> peerCert )
+KeyAgreementPKE::KeyAgreementPKE( MRef<CertificateChain*> cert,
+				  MRef<CertificateChain*> peerCert )
 		:KeyAgreementPSK(),
 		 PeerCertificates(cert, peerCert){
 	// TODO autodetect length from RSA size
@@ -23,8 +23,8 @@
 	setV(1);
 }
 
-KeyAgreementPKE::KeyAgreementPKE( MRef<certificate_chain *> cert, 
-				  MRef<ca_db *> ca_db )
+KeyAgreementPKE::KeyAgreementPKE( MRef<CertificateChain *> cert, 
+				  MRef<CertificateSet *> ca_db)
 		:KeyAgreementPSK(),
 		 PeerCertificates(cert, ca_db){
 

Modified: trunk/libmikey/keyagreement/KeyAgreementRSAR.cxx
===================================================================
--- trunk/libmikey/keyagreement/KeyAgreementRSAR.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/keyagreement/KeyAgreementRSAR.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -26,9 +26,9 @@
 #include <libmikey/MikeyMessage.h>
 
 
-KeyAgreementRSAR::KeyAgreementRSAR( MRef<certificate_chain *> cert, 
-				    MRef<ca_db *> ca_db )
-		:KeyAgreementPKE(cert, ca_db)
+KeyAgreementRSAR::KeyAgreementRSAR( MRef<CertificateChain *> cert, 
+				    MRef<CertificateSet *> CertificateSet )
+		:KeyAgreementPKE(cert, CertificateSet)
 {
 }
 

Modified: trunk/libmikey/mikey/Mikey.cxx
===================================================================
--- trunk/libmikey/mikey/Mikey.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/mikey/Mikey.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -118,7 +118,7 @@
 				secured = true;
 				setState( STATE_AUTHENTICATED );
 			}
-			catch( certificate_exception &e ){
+			catch( CertificateException &e ){
 				// TODO: Tell the GUI
 				merr << "Could not open certificate " << e.what() << endl;
 				setState( STATE_ERROR );
@@ -189,7 +189,7 @@
 		ts.save( MIKEY_PARSE_END );
 #endif
 	}
-	catch( certificate_exception &e ){
+	catch( CertificateException &e ){
 		// TODO: Tell the GUI
 		merr << "Could not open certificate " << e.what() << endl;
 		setState( STATE_ERROR );
@@ -244,7 +244,7 @@
 		string b64Message = message->b64Message();
 		return "mikey "+b64Message;
 	}
-	catch( certificate_exception &e ){
+	catch( CertificateException &e ){
 		// FIXME: tell the GUI
 		merr << "Could not open certificate " << e.what() << endl;
 		setState( STATE_ERROR );
@@ -358,7 +358,7 @@
 #endif
 
 	}
-	catch( certificate_exception &e ){
+	catch( CertificateException &e ){
 		// TODO: Tell the GUI
 		merr << "Could not open certificate " << e.what() << endl;
 		setState( STATE_ERROR );
@@ -468,11 +468,11 @@
 	}
 
 	MRef<SipSim*> sim = config->getSim();
-	MRef<certificate_chain*> cert_chain =
+	MRef<CertificateChain*> cert_chain =
 		sim->getCertificateChain();
-	MRef<certificate_chain*> peer_chain;
+	MRef<CertificateChain*> peer_chain;
 // 		config->getPeerCertificate();
-	MRef<ca_db*> cert_db =
+	MRef<CertificateSet*> cert_db =
 		sim->getCAs();
 	const byte_t* psk = config->getPsk();
 	size_t psk_len = config->getPskLength();

Modified: trunk/libmikey/mikey/MikeyMessage.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyMessage.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/mikey/MikeyMessage.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -394,7 +394,7 @@
 }
 
 
-void MikeyPayloads::addSignaturePayload( MRef<certificate *> cert,
+void MikeyPayloads::addSignaturePayload( MRef<Certificate *> cert,
 					 bool addIdsAndT ){
 	byte_t signature[4096];
 	int signatureLength = 128;
@@ -416,14 +416,14 @@
 	//1024, we have to re-do the signature calculation with the correct
 	//length.
 	//
-	//Double-signatures would be avoided if the certificate had a 
+	//Double-signatures would be avoided if the Certificate had a 
 	//method to find out the length of the signature.
 	
 	addPayload( ( sign = new MikeyPayloadSIGN(GUESSED_SIGNATURE_LENGTH, MIKEYPAYLOAD_SIGN_TYPE_RSA_PKCS ) ) );
 
 	signData = buildSignData( GUESSED_SIGNATURE_LENGTH, addIdsAndT );
 
-	if (cert->sign_data( &signData.front(), signData.size(),
+	if (cert->signData( &signData.front(), signData.size(),
 			 signature, &signatureLength )){
 		throw MikeyException( "Could not perform digital signature of the message" );
 	}
@@ -434,7 +434,7 @@
 		sign->setSigData(signature, signatureLength); // the length needs to be set to the correct value
 		signData = buildSignData( signatureLength, addIdsAndT );
 
-		cert->sign_data( &signData.front(), signData.size(),
+		cert->signData( &signData.front(), signData.size(),
 				 signature, &signatureLength );
 	}
 
@@ -862,31 +862,31 @@
 	return !error;
 }
 
-void MikeyPayloads::addCertificatePayloads( MRef<certificate_chain *> certChain ){
+void MikeyPayloads::addCertificatePayloads( MRef<CertificateChain *> certChain ){
 	if( certChain.isNull() ){
-		cerr << "No certificates" << endl;
+		cerr << "No Certificates" << endl;
 		return;
 	}
 
 	certChain->lock();
-	certChain->init_index();
-	MRef<certificate*> cert = certChain->get_next();
+	certChain->initIndex();
+	MRef<Certificate*> cert = certChain->getNext();
 	while( ! cert.isNull() ){
 		MRef<MikeyPayload*> payload =
 			new MikeyPayloadCERT( MIKEYPAYLOAD_CERT_TYPE_X509V3SIGN,
 					      cert);
 		addPayload( payload );
-		cert = certChain->get_next();
+		cert = certChain->getNext();
 	}
 
 	certChain->unlock();
 }
 
 
-MRef<certificate_chain*> MikeyPayloads::extractCertificateChain() const{
-	MRef<certificate_chain *> peerChain;
+MRef<CertificateChain*> MikeyPayloads::extractCertificateChain() const{
+	MRef<CertificateChain *> peerChain;
 
-	/* Try to find the certificate chain in the message */
+	/* Try to find the Certificate chain in the message */
 	list<MRef<MikeyPayload*> >::const_iterator i;
 	list<MRef<MikeyPayload*> >::const_iterator last = lastPayload();
 
@@ -898,23 +898,23 @@
 
 		MikeyPayloadCERT * certPayload =
 			dynamic_cast<MikeyPayloadCERT*>(*payload);
-		MRef<certificate*> peerCert = 
-			certificate::load( certPayload->certData(),
+		MRef<Certificate*> peerCert = 
+			Certificate::load( certPayload->certData(),
 					   certPayload->certLength() );
 
 		if( peerChain.isNull() ){
-			peerChain = certificate_chain::create();
+			peerChain = CertificateChain::create();
 		}
 
-// 		cerr << "Add certificate: " << peerCert->get_name() << endl;
+// 		cerr << "Add Certificate: " << peerCert->get_name() << endl;
 
-		peerChain->add_certificate( peerCert );
+		peerChain->addCertificate( peerCert );
 	}
 
 	return peerChain;
 }
 
-bool MikeyPayloads::verifySignature( MRef<certificate*> cert,
+bool MikeyPayloads::verifySignature( MRef<Certificate*> cert,
 				     bool addIdsAndT ){
 	MRef<MikeyPayload*> payload =
 		extractPayload(MIKEYPAYLOAD_SIGN_PAYLOAD_TYPE);
@@ -928,7 +928,7 @@
 
 	signData = buildSignData( sig->sigLength(), addIdsAndT );
 
-	int res = cert->verif_sign( &signData.front(), signData.size(),
+	int res = cert->verifSign( &signData.front(), signData.size(),
 				    sig->sigData(),
 				    sig->sigLength() );
 	return res > 0;
@@ -1089,14 +1089,14 @@
 	rawKeyData = NULL;
 
 	//adding PKE payload
-	MRef<certificate*> certResponder =
-		ka->peerCertificateChain()->get_first();
+	MRef<Certificate*> certResponder =
+		ka->peerCertificateChain()->getFirst();
 
 	byte_t* env_key = ka->getEnvelopeKey();
 	int encEnvKeyLength = 8192; // TODO autodetect?
 	unsigned char* encEnvKey = new unsigned char[ encEnvKeyLength ];
 
-	if( !certResponder->public_encrypt( env_key, ka->getEnvelopeKeyLength(),
+	if( !certResponder->publicEncrypt( env_key, ka->getEnvelopeKeyLength(),
 					    encEnvKey, &encEnvKeyLength ) ){
 		throw MikeyException( "PKE encryption of envelope key failed" );
 	}
@@ -1121,11 +1121,11 @@
 		throw MikeyException( "PKE init did not contain PKE payload" );
 	}
 
-	MRef<certificate*> cert = ka->certificateChain()->get_first();
+	MRef<Certificate*> cert = ka->certificateChain()->getFirst();
 	int envKeyLength = pke->dataLength();
 	byte_t *envKey = new byte_t[ envKeyLength ];
 		
-	if( !cert->private_decrypt( pke->data(), pke->dataLength(),
+	if( !cert->privateDecrypt( pke->data(), pke->dataLength(),
 				    envKey, &envKeyLength ) ){
 		throw MikeyException( "Decryption of envelope key failed" );
 	}

Modified: trunk/libmikey/mikey/MikeyMessageDH.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyMessageDH.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/mikey/MikeyMessageDH.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -90,7 +90,7 @@
 	if (ka->useSim){
 		addSignaturePayload(ka->getSim());
 	}else{
-		addSignaturePayload( ka->certificateChain()->get_first() );
+		addSignaturePayload( ka->certificateChain()->getFirst() );
 	}
 
 }
@@ -178,8 +178,8 @@
 	 * try to get it now */
 
 	// Fetch peer certificate chain
-	MRef<certificate_chain *> peerChain = ka->peerCertificateChain();
-	if( peerChain.isNull() || peerChain->get_first().isNull() ){
+	MRef<CertificateChain *> peerChain = ka->peerCertificateChain();
+	if( peerChain.isNull() || peerChain->getFirst().isNull() ){
 		peerChain = extractCertificateChain();
 
 		if( !peerChain.isNull() ){
@@ -262,7 +262,7 @@
 	if (ka->useSim){
 		result->addSignaturePayload(ka->getSim());
 	}else{
-		result->addSignaturePayload( ka->certificateChain()->get_first() );
+		result->addSignaturePayload( ka->certificateChain()->getFirst() );
 	}
 
 	return result;
@@ -333,8 +333,8 @@
 	addPolicyTo_ka(ka); //Is in MikeyMessage.cxx
 
 	// Fetch peer certificate chain
-	MRef<certificate_chain *> peerChain = ka->peerCertificateChain();
-	if( peerChain.isNull() || peerChain->get_first().isNull() ){
+	MRef<CertificateChain *> peerChain = ka->peerCertificateChain();
+	if( peerChain.isNull() || peerChain->getFirst().isNull() ){
 		peerChain = extractCertificateChain();
 
 		if( !peerChain.isNull() ){
@@ -404,7 +404,7 @@
 		if (ka->useSim){
 			errorMessage->addSignaturePayload(ka->getSim());
 		}else{
-			errorMessage->addSignaturePayload( ka->certificateChain()->get_first() );
+			errorMessage->addSignaturePayload( ka->certificateChain()->getFirst() );
 		}
 		throw MikeyExceptionMessageContent( errorMessage );
 	}
@@ -422,8 +422,8 @@
 	MRef<MikeyPayload *> sign = (*lastPayload());
 
 	// Fetch peer certificate chain
-	MRef<certificate_chain *> peerCert = ka->peerCertificateChain();
-	if( peerCert.isNull() || peerCert->get_first().isNull() ){
+	MRef<CertificateChain *> peerCert = ka->peerCertificateChain();
+	if( peerCert.isNull() || peerCert->getFirst().isNull() ){
 		peerCert = extractCertificateChain();
 
 		if( peerCert.isNull() ){
@@ -441,10 +441,10 @@
 
 #define signPl ((MikeyPayloadSIGN*)*sign)
 	int res; 
-	res = peerCert->get_first()->verif_sign( rawMessageData(),
-												rawMessageLength() - signPl->sigLength(),
-												signPl->sigData(),
-												signPl->sigLength() );
+	res = peerCert->getFirst()->verifSign( rawMessageData(),
+						rawMessageLength() - signPl->sigLength(),
+						signPl->sigData(),
+						signPl->sigLength() );
 	if( res > 0 ) return false;
 	else return true;
 }

Modified: trunk/libmikey/mikey/MikeyMessagePKE.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyMessagePKE.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/mikey/MikeyMessagePKE.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -57,9 +57,9 @@
 	MikeyPayloadT* tPayload;
 	MikeyPayloadRAND* randPayload;
 
-	MRef<certificate_chain*> peerChain =
+	MRef<CertificateChain*> peerChain =
 		ka->peerCertificateChain();
-	if( !peerChain || !peerChain->get_first() ){
+	if( !peerChain || !peerChain->getFirst() ){
 		throw MikeyException( "PKE requires peer certificate" );
 	}
 
@@ -90,7 +90,7 @@
 	// Derive the transport keys from the env_key:
 	addPkeKemac( ka, encrAlg, macAlg );
 
-	addSignaturePayload( ka->certificateChain()->get_first() );
+	addSignaturePayload( ka->certificateChain()->getFirst() );
 }
 
 void MikeyMessagePKE::setOffer(KeyAgreement* kaBase){
@@ -411,8 +411,8 @@
 		}
 
 		// Fetch peer certificate chain
-		MRef<certificate_chain *> peerChain = ka->peerCertificateChain();
-		if( peerChain.isNull() || peerChain->get_first().isNull() ){
+		MRef<CertificateChain *> peerChain = ka->peerCertificateChain();
+		if( peerChain.isNull() || peerChain->getFirst().isNull() ){
 			peerChain = extractCertificateChain();
 
 			if( peerChain.isNull() ){
@@ -423,7 +423,7 @@
 			ka->setPeerCertificateChain( peerChain );
 		}
 
- 		if( !verifySignature( peerChain->get_first() ) ){
+ 		if( !verifySignature( peerChain->getFirst() ) ){
 			cout << "Verification of the PKE init message SIGN payload failed!"  << endl;
 			cout << "Keypair of the initiator probably mismatch!" << endl;
 			return true;

Modified: trunk/libmikey/mikey/MikeyMessageRSAR.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyMessageRSAR.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/mikey/MikeyMessageRSAR.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -91,7 +91,7 @@
 	}
 
 	// Add signature (T)
-	addSignaturePayload( ka->certificateChain()->get_first() );
+	addSignaturePayload( ka->certificateChain()->getFirst() );
 }
 
 void MikeyMessageRSAR::setOffer(KeyAgreement* kaBase){
@@ -229,7 +229,7 @@
 
 	result->addPkeKemac( ka, encrAlg, macAlg );
 
-	result->addSignaturePayload( ka->certificateChain()->get_first(),
+	result->addSignaturePayload( ka->certificateChain()->getFirst(),
 // 				     false );
 				     true );
 
@@ -476,8 +476,8 @@
 		}
 
 		// Fetch peer certificate chain
-		MRef<certificate_chain *> peerChain = ka->peerCertificateChain();
-		if( peerChain.isNull() || peerChain->get_first().isNull() ){
+		MRef<CertificateChain *> peerChain = ka->peerCertificateChain();
+		if( peerChain.isNull() || peerChain->getFirst().isNull() ){
 			peerChain = extractCertificateChain();
 
 			if( peerChain.isNull() ){
@@ -488,7 +488,7 @@
 			ka->setPeerCertificateChain( peerChain );
 		}
 
- 		if( !verifySignature( peerChain->get_first(),
+ 		if( !verifySignature( peerChain->getFirst(),
 				      isResponderMessage() ) ){
 			cout << "Verification of the RSAR init message SIGN payload failed!"  << endl;
 			cout << "Keypair of the initiator probably mismatch!" << endl;

Modified: trunk/libmikey/mikey/MikeyPayloadCERT.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadCERT.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmikey/mikey/MikeyPayloadCERT.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -40,13 +40,13 @@
 
 }
 
-MikeyPayloadCERT::MikeyPayloadCERT( int type, MRef<certificate *> cert ){
+MikeyPayloadCERT::MikeyPayloadCERT( int type, MRef<Certificate *> cert ){
 	this->payloadTypeValue = MIKEYPAYLOAD_CERT_PAYLOAD_TYPE;
 	this->type = type;
-	this->certLengthValue = cert->get_der_length();
+	this->certLengthValue = cert->getDerLength();
 	this->certDataPtr = new byte_t[ certLengthValue ];
 	size_t size = certLengthValue;
-	cert->get_der( this->certDataPtr, &size );
+	cert->getDer( this->certDataPtr, &size );
 }
 
 MikeyPayloadCERT::MikeyPayloadCERT( byte_t *start, int lengthLimit ):

Modified: trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx
===================================================================
--- trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -300,14 +300,14 @@
 		config->sipStackConfig->cert->lock();
 	if (config->sipStackConfig->cert && config->sipStackConfig->cert->length()>0){
 		int n=1;
-		MRef<certificate *> crt=config->sipStackConfig->cert->get_first();
+		MRef<Certificate *> crt=config->sipStackConfig->cert->getFirst();
 		while (crt){
 			cerr << "      certificate "<<n<<endl
-			     << "        name="<<crt->get_name()<<endl
-			     << "        cn="<<crt->get_cn()<<endl
-			     << "        issuer="<<crt->get_issuer()<<endl
-			     << "        issuer_cn="<< crt->get_issuer_cn()<<endl
-			     << "        has_pk="<< crt->has_pk()<<endl
+			     << "        name="<<crt->getName()<<endl
+			     << "        cn="<<crt->getCn()<<endl
+			     << "        issuer="<<crt->getIssuer()<<endl
+			     << "        issuer_cn="<< crt->getIssuerCn()<<endl
+			     << "        has_pk="<< crt->hasPk()<<endl
 			     << "        SubjectAltName,"<< endl;
 #if 0
 //Print all subjectAltName here - FIXME
@@ -320,7 +320,7 @@
 			// multiple values.
 			for (int i=1; types[i]; i++){
 				cerr << "          type "<< types[i]<<": ";
-				vector<string> alt = crt->get_alt_name(san);
+				vector<string> alt = crt->getAltName(san);
 				vector<string>::iterator j;
 				int n=0;
 				for (j=alt.begin(); j!=alt.end(); j++,n++){
@@ -333,7 +333,7 @@
 				san=san+1;
 			}
 #endif
-			crt = config->sipStackConfig->cert->get_next();
+			crt = config->sipStackConfig->cert->getNext();
 			n++;
 		}
 	}else{

Modified: trunk/libminisip/source/subsystem_media/Session.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/Session.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libminisip/source/subsystem_media/Session.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -76,7 +76,7 @@
 		MRef<SipSim*> getSim() const{
 			return identity->getSim();
 		}
-		MRef<certificate_chain*> getPeerCertificate() const{
+		MRef<CertificateChain*> getPeerCertificate() const{
 			return NULL;
 		}
 		size_t getPskLength() const{

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -169,33 +169,33 @@
 		 * Certificate settings
 		 ***********************************************************/
 
-		MRef<certificate_chain*> cert;
+		MRef<CertificateChain*> cert;
 		if ((*iIdent)->getSim()){
 			cert = (*iIdent)->getSim()->getCertificateChain();
 		}else{
-			cert = certificate_chain::create(); //create an empty chain if no SIM to simplify code below
+			cert = CertificateChain::create(); //create an empty chain if no SIM to simplify code below
 		}
 
-		/* Update the certificate part of the configuration file */
+		/* Update the Certificate part of the configuration file */
 		cert->lock();
-		cert->init_index();
-		MRef<certificate *> certItem = cert->get_next();
+		cert->initIndex();
+		MRef<Certificate *> certItem = cert->getNext();
 
-		/* The first element is the personal certificate, the next ones
-		 * are saved as certificate_chain */
+		/* The first element is the personal Certificate, the next ones
+		 * are saved as CertificateChain */
 		if( !certItem.isNull() ){
-			backend->save(accountPath + "certificate",certItem->get_file());
-			backend->save(accountPath + "private_key",certItem->get_pk_file());
-			certItem = cert->get_next();
+			backend->save(accountPath + "Certificate",certItem->getFile());
+			backend->save(accountPath + "private_key",certItem->getPkFile());
+			certItem = cert->getNext();
 		}
 
 		uint32_t i = 0;
 
 		while( !certItem.isNull() ){
-			backend->save(accountPath + "certificate_chain["+itoa(i)+"]",
-					certItem->get_file() );
+			backend->save(accountPath + "CertificateChain["+itoa(i)+"]",
+					certItem->getFile() );
 			i++;
-			certItem = cert->get_next();
+			certItem = cert->getNext();
 		}
 
 		cert->unlock();
@@ -203,15 +203,15 @@
 		/* CA database saved in the config file */
 		uint32_t iFile = 0;
 		uint32_t iDir  = 0;
-		MRef<ca_db*> cert_db;
+		MRef<CertificateSet*> cert_db;
 		if ((*iIdent)->getSim())
 			cert_db = (*iIdent)->getSim()->getCAs();
 		else
-			cert_db = ca_db::create();
+			cert_db = CertificateSet::create();
 
 		cert_db->lock();
-		cert_db->init_index();
-		MRef<ca_db_item*> caDbItem = cert_db->get_next();
+		cert_db->initIndex();
+		MRef<CertificateSetItem*> caDbItem = cert_db->getNext();
 
 
 		while( !caDbItem.isNull() ){
@@ -227,10 +227,10 @@
 					iDir ++;
 					break;
 				default:
-					merr<< "Warning: unknown certificate object type"<<endl;
+					merr<< "Warning: unknown Certificate object type"<<endl;
 			}
 
-			caDbItem = cert_db->get_next();
+			caDbItem = cert_db->getNext();
 		}
 
 		cert_db->unlock();
@@ -549,49 +549,49 @@
 		}
 #endif
 
-		string certFile = backend->loadString(accountPath + "certificate","");
+		string certFile = backend->loadString(accountPath + "Certificate","");
 		string privateKeyFile = backend->loadString(accountPath + "private_key","");
 
-		MRef<certificate_chain*> certchain = certificate_chain::create();
+		MRef<CertificateChain*> certchain = CertificateChain::create();
 
 #ifdef ONLINECONF_SUPPORT
 		if(certFile.substr(0,10)=="httpsrp://") {
 			OnlineConfBack *conf;
 			conf = backend->getConf();
-			certificate *cert=NULL;
+			Certificate *cert=NULL;
 			cert = conf->getOnlineCert();
-			certchain->add_certificate( cert );
+			certchain->addCertificate( cert );
 		} else
 #endif
 
 		if( certFile != "" ){
-			certificate * cert=NULL;
+			Certificate * cert=NULL;
 
 			try{
-				cert = certificate::load( certFile );
-				certchain->add_certificate( cert );
+				cert = Certificate::load( certFile );
+				certchain->addCertificate( cert );
 			}
-			catch( certificate_exception & ){
-				merr << "Could not open the given certificate " << certFile <<endl;
+			catch( CertificateException & ){
+				merr << "Could not open the given Certificate " << certFile <<endl;
 			}
 
 			if( privateKeyFile != "" ){
 
 				try{
-					cert->set_pk( privateKeyFile );
+					cert->setPk( privateKeyFile );
 				}
-				catch( certificate_exception_pkey & ){
-					merr << "The given private key " << privateKeyFile << " does not match the certificate"<<endl; 
+				catch( CertificateExceptionPkey & ){
+					merr << "The given private key " << privateKeyFile << " does not match the Certificate"<<endl; 
 				}
 
-				catch( certificate_exception &){
+				catch( CertificateException &){
 					merr << "Could not open the given private key "<< privateKeyFile << endl;
 				}
 			}
 		}
 
 		uint32_t iCertFile = 0;
-		certFile = backend->loadString(accountPath + "certificate_chain[0]","");
+		certFile = backend->loadString(accountPath + "CertificateChain[0]","");
 
 
 
@@ -601,15 +601,15 @@
 			conf = backend->getConf();
 			vector<struct contdata*> res;
 			string user = conf->getUser();
-			conf->downloadReq(user, "certificate_chain",res);/*gets the whole chain*/
+			conf->downloadReq(user, "CertificateChain",res);/*gets the whole chain*/
 			for(int i=0;i<res.size();i++) {
 				try {
-					certificate *cert = certificate::load((unsigned char *)res.at(i)->data,
+					Certificate *cert = Certificate::load((unsigned char *)res.at(i)->data,
 							(size_t) res.at(i)->size,
-							"httpsrp:///"+user + "/certificate_chain" );
-					certchain->add_certificate( cert );
-				} catch(certificate_exception &) {
-					merr << "Could not open the given certificate" << endl;
+							"httpsrp:///"+user + "/CertificateChain" );
+					certchain->addCertificate( cert );
+				} catch(CertificateException &) {
+					merr << "Could not open the given Certificate" << endl;
 				}
 			}
 		}
@@ -620,18 +620,18 @@
 
 		while( certFile != "" ){
 			try{
-				certificate * cert = certificate::load( certFile );
-				certchain->add_certificate( cert );
+				Certificate * cert = Certificate::load( certFile );
+				certchain->addCertificate( cert );
 			}
-			catch( certificate_exception &){
-				merr << "Could not open the given certificate" << endl;
+			catch( CertificateException &){
+				merr << "Could not open the given Certificate" << endl;
 			}
 			iCertFile ++;
-			certFile = backend->loadString(accountPath + "certificate_chain["+itoa(iCertFile)+"]","");
+			certFile = backend->loadString(accountPath + "CertificateChain["+itoa(iCertFile)+"]","");
 
 		}
 
-		MRef<ca_db*> cert_db = ca_db::create();
+		MRef<CertificateSet*> cert_db = CertificateSet::create();
 		iCertFile = 0;
 		certFile = backend->loadString(accountPath + "ca_file[0]","");
 
@@ -644,17 +644,17 @@
 			conf = backend->getConf();
 			vector<struct contdata*> res;
 			string user = conf->getUser();
-			conf->downloadReq(user, "certificate_chain",res);
+			conf->downloadReq(user, "CertificateChain",res);
 			for(int i=0;i<res.size();i++)
 			{
 				try{
-					certificate *cert = certificate::load((unsigned char *)res.at(i)->data,
+					Certificate *cert = Certificate::load((unsigned char *)res.at(i)->data,
 							(size_t) res.at(i)->size,
 							"httpsrp:///"+user + "/root_cert" );
-					cert_db->add_certificate( cert );
+					cert_db->addCertificate( cert );
 				}
-				catch( certificate_exception &){
-					merr << "Could not open the CA certificate" << endl;
+				catch( CertificateException &){
+					merr << "Could not open the CA Certificate" << endl;
 				}
 			}
 		}
@@ -665,10 +665,10 @@
 
 		while( certFile != ""){
 			try{
-				cert_db->add_file( certFile );
+				cert_db->addFile( certFile );
 			}
-			catch( certificate_exception &e){
-				merr << "Could not open the CA certificate " << e.what() << endl;
+			catch( CertificateException &e){
+				merr << "Could not open the CA Certificate " << e.what() << endl;
 			}
 			iCertFile ++;
 			certFile = backend->loadString(accountPath + "ca_file["+itoa(iCertFile)+"]","");
@@ -680,10 +680,10 @@
 
 		while( certFile != ""){
 			try{
-				cert_db->add_directory( certFile );
+				cert_db->addDirectory( certFile );
 			}
-			catch( certificate_exception &){
-				merr << "Could not open the CA certificate directory " << certFile << endl;
+			catch( CertificateException &){
+				merr << "Could not open the CA Certificate directory " << certFile << endl;
 			}
 			iCertFile ++;
 			certFile = backend->loadString(accountPath + "ca_dir["+itoa(iCertFile)+"]","");
@@ -912,7 +912,7 @@
 	be->saveBool( "account[0]/secured", false );
 	be->save( "account[0]/ka_type", "psk" );
 	be->save( "account[0]/psk", "Unspecified PSK" );
-	be->save( "account[0]/certificate", "" );
+	be->save( "account[0]/Certificate", "" );
 	be->save( "account[0]/private_key", "" );
 	be->save( "account[0]/ca_file", "" );
 	be->saveBool( "account[0]/dh_enabled", false );

Modified: trunk/libmsip/include/libmsip/SipLayerTransport.h
===================================================================
--- trunk/libmsip/include/libmsip/SipLayerTransport.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmsip/include/libmsip/SipLayerTransport.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -50,8 +50,8 @@
 
 class SipLayerTransport : public SipSMCommandReceiver {
 	public:
-		SipLayerTransport( MRef<certificate_chain *> cchain=NULL,
-				   MRef<ca_db *> cert_db = NULL
+		SipLayerTransport( MRef<CertificateChain *> cchain=NULL,
+				   MRef<CertificateSet *> cert_db = NULL
 		);
 
 		virtual ~SipLayerTransport();
@@ -73,9 +73,9 @@
 
 		void addServer(MRef<SipSocketServer *> server);
 
-		MRef<certificate_chain *> getCertificateChain();
-		MRef<certificate*> getMyCertificate();
-		MRef<ca_db *> getCA_db ();
+		MRef<CertificateChain *> getCertificateChain();
+		MRef<Certificate*> getMyCertificate();
+		MRef<CertificateSet *> getCertificateSet ();
 
 		void datagramSocketRead(MRef<DatagramSocket *> sock);
 
@@ -129,8 +129,8 @@
 		std::list<MRef<SipSocketServer *> > servers;
 		MRef<SocketServer*> manager;
 
-		MRef<certificate_chain *> cert_chain;
-		MRef<ca_db *> cert_db;
+		MRef<CertificateChain *> cert_chain;
+		MRef<CertificateSet *> cert_db;
 		void * tls_ctx;
 
 		MRef<SipCommandDispatcher*> dispatcher;

Modified: trunk/libmsip/include/libmsip/SipStack.h
===================================================================
--- trunk/libmsip/include/libmsip/SipStack.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmsip/include/libmsip/SipStack.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -183,12 +183,12 @@
 		/**
 		 * The certificate chain is used by TLS
 		 */
-		MRef<certificate_chain *> cert;
+		MRef<CertificateChain *> cert;
 
 		/**
 		* TODO: TLS should use the whole chain instead of only the first certificate --EE
 		*/
-		MRef<ca_db *> cert_db;
+		MRef<CertificateSet *> cert_db;
 
 		/**
 		 * "sip.instance" media feature tag in the Contact

Modified: trunk/libmsip/source/SipLayerTransport.cxx
===================================================================
--- trunk/libmsip/source/SipLayerTransport.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmsip/source/SipLayerTransport.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -335,8 +335,8 @@
 	mout << endl;
 }
 
-SipLayerTransport::SipLayerTransport(MRef<certificate_chain *> cchain,
-				     MRef<ca_db *> cert_db_):
+SipLayerTransport::SipLayerTransport(MRef<CertificateChain *> cchain,
+				     MRef<CertificateSet *> cert_db_):
 		cert_chain(cchain), cert_db(cert_db_), tls_ctx(NULL)
 {
 	manager = new SocketServer();
@@ -1008,15 +1008,15 @@
 	}
 }
 
-MRef<certificate_chain *> SipLayerTransport::getCertificateChain(){ 
+MRef<CertificateChain *> SipLayerTransport::getCertificateChain(){ 
 	return cert_chain; 
 }
 
-MRef<certificate*> SipLayerTransport::getMyCertificate(){ 
-	return cert_chain->get_first();
+MRef<Certificate*> SipLayerTransport::getMyCertificate(){ 
+	return cert_chain->getFirst();
 }
 
-MRef<ca_db *> SipLayerTransport::getCA_db () {
+MRef<CertificateSet *> SipLayerTransport::getCertificateSet () {
 	return cert_db;
 }
 

Modified: trunk/libmsip/source/SipStackInternal.cxx
===================================================================
--- trunk/libmsip/source/SipStackInternal.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/libmsip/source/SipStackInternal.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -417,7 +417,7 @@
 	MRef<SipSocketServer *> server;
 	int32_t port = config->localTlsPort;
 
-	sock = TLSServerSocket::create( ipv6, port, config->cert->get_first(),
+	sock = TLSServerSocket::create( ipv6, port, config->cert->getFirst(),
 					config->cert_db );
 	server = new StreamSocketServer( dispatcher->getLayerTransport(), sock );
 	server->setExternalIp( ipString );
@@ -465,7 +465,7 @@
 void SipStackInternal::startTlsServer(){
 	MRef<SipSocketServer *> server;
 
-	if( config->cert->get_first().isNull() ){
+	if( config->cert->getFirst().isNull() ){
 		merr << "You need a personal certificate to run "
 			"a TLS server. Please specify one in "
 			"the certificate settings. minisip will "

Modified: trunk/minisip/minisip/gui/gtkgui/AccountDialog.cxx
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/AccountDialog.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/minisip/minisip/gui/gtkgui/AccountDialog.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -108,8 +108,8 @@
 void AccountDialog::addAccount(){
 	reset();
 	MRef<SipIdentity*> identity = new SipIdentity;
-	MRef<ca_db*> ca = ca_db::create();
-	MRef<certificate_chain*> cert = certificate_chain::create();
+	MRef<CertificateSet*> ca = CertificateSet::create();
+	MRef<CertificateChain*> cert = CertificateChain::create();
 	MRef<SipSim*> sim =
 		new SipSimSoft( cert, ca );
 	identity->setSim( sim );

Modified: trunk/minisip/minisip/gui/gtkgui/CertificateDialog.cxx
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/CertificateDialog.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/minisip/minisip/gui/gtkgui/CertificateDialog.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -99,7 +99,7 @@
 
 void CertificateDialog::chooseCert(){
 	string result;
-	MRef<certificate *> chosenCert;
+	MRef<Certificate *> chosenCert;
 #ifdef OLDLIBGLADEMM
 	Gtk::FileSelection * dialog = new Gtk::FileSelection( 
 			"Choose your certificate file" );
@@ -116,9 +116,9 @@
 		result = dialog->get_filename();
 
 		try{
-			chosenCert = certificate::load( result );
+			chosenCert = Certificate::load( result );
 		}
-		catch( certificate_exception & exc ){
+		catch( CertificateException & exc ){
 			Gtk::MessageDialog messageDialog( 
 			"Minisip could not open that certificate file. "
 			"Please check that the file is a correct "
@@ -136,7 +136,7 @@
 
 		certChain->lock();
 		certChain->clear();
-		certChain->add_certificate( chosenCert );
+		certChain->addCertificate( chosenCert );
 		certChain->unlock();
 		
 		/* Update the tree consequently */
@@ -174,9 +174,9 @@
 		result = dialog->get_filename();
 
 		try{
-			cert->set_pk( result );
+			cert->setPk( result );
 		}
-		catch( certificate_exception_pkey & exc ){
+		catch( CertificateExceptionPkey & exc ){
 			Gtk::MessageDialog messageDialog( 
 			"The private key file you selected does not. "
 			"match the selected certificate ",
@@ -186,7 +186,7 @@
 			delete dialog;
 			return;
 		}
-		catch( certificate_exception & exc ){
+		catch( CertificateException & exc ){
 			Gtk::MessageDialog messageDialog( 
 			"Minisip could not open that file. "
 			"Please check that the file is a correct "
@@ -210,7 +210,7 @@
 
 void CertificateDialog::addCert(){
 	string result;
-	MRef<certificate *> chosenCert;
+	MRef<Certificate *> chosenCert;
 
 #ifdef OLDLIBGLADEMM
 	Gtk::FileSelection * dialog = new Gtk::FileSelection( 
@@ -228,13 +228,13 @@
 		result = dialog->get_filename();
 
 		try{
-			chosenCert = certificate::load( result );
+			chosenCert = Certificate::load( result );
 
 			certChain->lock();
-			certChain->add_certificate( chosenCert );
+			certChain->addCertificate( chosenCert );
 			certChain->unlock();
 		}
-		catch( certificate_exception_chain & exc ){
+		catch( CertificateExceptionChain & exc ){
 			Gtk::MessageDialog messageDialog( 
 			"The selected certificate is not "
 			"assigned to the issuer of the previous "
@@ -246,7 +246,7 @@
 			delete dialog;
 			return;
 		}
-		catch( certificate_exception & exc ){
+		catch( CertificateException & exc ){
 			Gtk::MessageDialog messageDialog( 
 			"Minisip could not open that file. "
 			"Please check that the file is a correct "
@@ -270,11 +270,11 @@
 	
 	/* update the internal chain */
 	certChain->lock();
-	certChain->remove_last();
+	certChain->removeLast();
 	certChain->unlock();
 
 	/* update the GUI */
-	if( certChain->is_empty() ){
+	if( certChain->isEmpty() ){
 		pkeyButton->set_sensitive( false );
 		certTreeView->set_sensitive( false );
 		addCertButton->set_sensitive( false );
@@ -289,7 +289,7 @@
 
 void CertificateDialog::addFileCa(){
 	string result;
-	MRef<certificate *> chosenCert;
+	MRef<Certificate *> chosenCert;
 
 #ifdef OLDLIBGLADEMM
 	Gtk::FileSelection * dialog = new Gtk::FileSelection( 
@@ -309,10 +309,10 @@
 		try{
 			/* Update the internal DB */
 			caDb->lock();
-			caDb->add_file( result );
+			caDb->addFile( result );
 			caDb->unlock();
 		}
-		catch( certificate_exception & exc ){
+		catch( CertificateException & exc ){
 			caDb->unlock();
 			Gtk::MessageDialog messageDialog( 
 			"Minisip could not open that file. "
@@ -326,7 +326,7 @@
 		}
 
 		/* Update the GUI */
-		MRef<ca_db_item*> item = new ca_db_item();
+		MRef<CertificateSetItem*> item = new CertificateSetItem();
 		item->type = CERT_DB_ITEM_TYPE_FILE;
 		item->item = result;
 		caListStore->addCaItem( item );
@@ -337,7 +337,7 @@
 
 void CertificateDialog::addDirCa(){
 	string result;
-	MRef<certificate *> chosenCert;
+	MRef<Certificate *> chosenCert;
 
 #ifdef OLDLIBGLADEMM
 	Gtk::FileSelection * dialog = new Gtk::FileSelection( 
@@ -363,11 +363,11 @@
 
 		/* Update CA internal db */
 		caDb->lock();
-		caDb->add_directory( result );
+		caDb->addDirectory( result );
 		caDb->unlock();
 
 		/* Update the GUI */
-		MRef<ca_db_item*> item = new ca_db_item();
+		MRef<CertificateSetItem*> item = new CertificateSetItem();
 		item->type = CERT_DB_ITEM_TYPE_DIR;
 		item->item = result;
 		caListStore->addCaItem( item );
@@ -377,7 +377,7 @@
 }
 
 void CertificateDialog::removeCa(){
-	MRef<ca_db_item*> removed;
+	MRef<CertificateSetItem*> removed;
 	 Glib::RefPtr<Gtk::TreeSelection> selection;
 	
 	selection = caTreeView->get_selection();
@@ -395,25 +395,25 @@
 	
 }
 
-void CertificateDialog::setCertChain( MRef<certificate_chain *> chain ){
+void CertificateDialog::setCertChain( MRef<CertificateChain *> chain ){
 	certChain = chain;
 	certTreeStore->clear();
-	MRef<certificate *> item;
+	MRef<Certificate *> item;
 
 	if( chain.isNull() ){
 		return;
 	}
 
 
-	item = chain->get_first();
+	item = chain->getFirst();
         if( !item.isNull() ){
                 cert = item;
 		certTreeView->set_sensitive( true );
                 addCertButton->set_sensitive( true );
                 removeCertButton->set_sensitive( true );
                 pkeyButton->set_sensitive( true );
-                certLabel->set_text( cert->get_file() );
-                pkeyLabel->set_text( cert->get_pk_file() );
+                certLabel->set_text( cert->getFile() );
+                pkeyLabel->set_text( cert->getPkFile() );
         }
 	else{
 		certTreeView->set_sensitive( false );
@@ -428,11 +428,11 @@
 
 	chain->lock();
 
-	item = chain->get_next();
+	item = chain->getNext();
         while( !item.isNull() ){
 
 		certTreeStore->addCertificate( item );
-		item = chain->get_next();
+		item = chain->getNext();
         }
         chain->unlock();
 
@@ -441,10 +441,10 @@
 }
 
                 
-void CertificateDialog::setRootCa( MRef<ca_db *> caDb ){
+void CertificateDialog::setRootCa( MRef<CertificateSet *> caDb ){
 
 
-	MRef<ca_db_item*> item = NULL;
+	MRef<CertificateSetItem*> item = NULL;
 
         this->caDb = caDb;
 	caListStore->clear();
@@ -453,21 +453,21 @@
         }
 
         caDb->lock();
-        caDb->init_index();
-        item = caDb->get_next();
+        caDb->initIndex();
+        item = caDb->getNext();
 
         while( item ){
 		caListStore->addCaItem( item );
-                item = caDb->get_next();
+                item = caDb->getNext();
         }
         caDb->unlock();
 }
 
-MRef<certificate_chain*> CertificateDialog::getCertChain() const{
+MRef<CertificateChain*> CertificateDialog::getCertChain() const{
 	return certChain;
 }
 
-MRef<ca_db*> CertificateDialog::getRootCa() const{
+MRef<CertificateSet*> CertificateDialog::getRootCa() const{
 	return caDb;
 }
 
@@ -478,7 +478,7 @@
 	treeStore = Gtk::TreeStore::create( certColumns );
 }
 
-void CertTreeStore::addCertificate( MRef<certificate *> cert ){
+void CertTreeStore::addCertificate( MRef<Certificate *> cert ){
 	if( isEmpty() ){
 		lastElement = treeStore->append();
 	}
@@ -487,8 +487,8 @@
 		lastElement = treeStore->append( (*lastElement).children() );
 	}
 
-	(*lastElement)[ commonNameColumn ] = cert->get_cn();
-	(*lastElement)[ issuerColumn ] = cert->get_issuer_cn();
+	(*lastElement)[ commonNameColumn ] = cert->getCn();
+	(*lastElement)[ issuerColumn ] = cert->getIssuerCn();
 }
 
 void CertTreeStore::associateTreeView( Gtk::TreeView * treeView ){
@@ -522,7 +522,7 @@
 	listStore = Gtk::ListStore::create( caColumns );
 }
 
-void CaListStore::addCaItem( MRef<ca_db_item*> caItem ){
+void CaListStore::addCaItem( MRef<CertificateSetItem*> caItem ){
 		
 	Gtk::TreeModel::iterator iter = listStore->append();
 
@@ -552,8 +552,8 @@
 	return listStore->children().empty();
 }
 
-MRef<ca_db_item*> CaListStore::remove( Gtk::TreeModel::iterator selectedItem ){
-	ca_db_item * ret = new ca_db_item;
+MRef<CertificateSetItem*> CaListStore::remove( Gtk::TreeModel::iterator selectedItem ){
+	CertificateSetItem * ret = new CertificateSetItem;
 
 
 	if( (*selectedItem)[typeColumn] == "file"  ){

Modified: trunk/minisip/minisip/gui/gtkgui/CertificateDialog.h
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/CertificateDialog.h	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/minisip/minisip/gui/gtkgui/CertificateDialog.h	2007-06-28 13:00:38 UTC (rev 3341)
@@ -43,11 +43,11 @@
 		CertificateDialog( Glib::RefPtr<Gnome::Glade::Xml>  refXml );
 		~CertificateDialog();
 
-		MRef<certificate_chain*> getCertChain() const;
-		MRef<ca_db*> getRootCa() const;
+		MRef<CertificateChain*> getCertChain() const;
+		MRef<CertificateSet*> getRootCa() const;
 
-		void setCertChain( MRef<certificate_chain *> chain );
-		void setRootCa( MRef<ca_db *> caDb );
+		void setCertChain( MRef<CertificateChain *> chain );
+		void setRootCa( MRef<CertificateSet *> caDb );
 
 		void run();
 
@@ -55,9 +55,9 @@
 
 	//	Glib::RefPtr<Gnome::Glade::Xml>  refXml;
 
-		MRef<certificate_chain *> certChain;
-		MRef<ca_db *> caDb;
-		MRef<certificate *> cert;
+		MRef<CertificateChain *> certChain;
+		MRef<CertificateSet *> caDb;
+		MRef<Certificate *> cert;
 
 		void addDirCa();
                 void addFileCa();
@@ -101,8 +101,8 @@
 		CertTreeStore();
 
 		virtual std::string getMemObjectType() const {return "CertTreeStore";}
-		void addCertificate( MRef<certificate *> );
-		MRef<certificate_chain *> getCertChain();
+		void addCertificate( MRef<Certificate *> );
+		MRef<CertificateChain *> getCertChain();
 		void associateTreeView( Gtk::TreeView * certTreeView );
 		bool isEmpty();
 		void clear();
@@ -121,13 +121,13 @@
 	public:
 		CaListStore();
 
-		void addCaItem( MRef<ca_db_item*> caItem );
+		void addCaItem( MRef<CertificateSetItem*> caItem );
 		virtual std::string getMemObjectType() const {return "CaListStore";}
-		//MRef<certificate_chain *> getCertChain();
+		//MRef<CertificateChain *> getCertChain();
 		
 		void associateTreeView( Gtk::TreeView * caTreeView );
 		bool isEmpty();
-		MRef<ca_db_item*> remove( Gtk::TreeModel::iterator );
+		MRef<CertificateSetItem*> remove( Gtk::TreeModel::iterator );
 		void clear();
 
 	private:

Modified: trunk/minisip/minisip/gui/gtkgui/SettingsDialog.cxx
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/SettingsDialog.cxx	2007-06-28 12:50:27 UTC (rev 3340)
+++ trunk/minisip/minisip/gui/gtkgui/SettingsDialog.cxx	2007-06-28 13:00:38 UTC (rev 3341)
@@ -610,8 +610,8 @@
 
 	secureCheck->set_active( false );
 
-	MRef<ca_db*> caDb = ca_db::create();
-	MRef<certificate_chain*> certChain = certificate_chain::create();
+	MRef<CertificateSet*> caDb = CertificateSet::create();
+	MRef<CertificateChain*> certChain = CertificateChain::create();
 
 	certDialog->setRootCa( caDb );
 	certDialog->setCertChain( certChain );
@@ -652,10 +652,10 @@
 
 	secureCheck->set_active( identity->securityEnabled );
 
-	MRef<ca_db*> caDb =
+	MRef<CertificateSet*> caDb =
 		identity->getSim()->getCAs()->clone();
 
-	MRef<certificate_chain*> certChain = 
+	MRef<CertificateChain*> certChain = 
 		identity->getSim()->getCertificateChain()->clone();
 
 	certDialog->setRootCa( caDb );
@@ -721,14 +721,14 @@
 	string err;
 	if( dhCheck->get_active() ){
 		identity->getSim()->getCertificateChain()->lock();
-		if( identity->getSim()->getCertificateChain()->is_empty() ){
+		if( identity->getSim()->getCertificateChain()->isEmpty() ){
 			err += "You have selected the Diffie-Hellman key agreement\n"
 		       "but have not selected a certificate file.\n"
 		       "The D-H key agreement has been disabled.";
 			dhCheck->set_active( false );
 		}
 		
-		else if( !identity->getSim()->getCertificateChain()->get_first()->has_pk() ){
+		else if( !identity->getSim()->getCertificateChain()->getFirst()->hasPk() ){
 			err += "You have selected the Diffie-Hellman key agreement\n"
 		       "but have not selected a private key file.\n"
 		       "The D-H key agreement has been disabled.";



More information about the Minisip-devel mailing list