[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/qca
From:       Justin Karneges <infiniti () affinix ! com>
Date:       2005-03-03 23:16:42
Message-ID: 20050303231642.4D78B1751E () office ! kde ! org
[Download RAW message or body]

CVS commit by infiniti: 

app name, remove unneeded friend declarations


  M +0 -2      TODO   1.84
  M +0 -10     include/QtCrypto/qca_cert.h   1.13
  M +0 -9      include/QtCrypto/qca_publickey.h   1.11
  M +13 -2     src/qca_core.cpp   1.10


--- kdesupport/qca/TODO  #1.83:1.84
@@ -30,6 +30,4 @@
 
 * finish code for APIs:
-  core: app name
-  now that algorithm::context is public, get rid of many friend declarations
   cert/crl/store/csr/ca/etc
   tls

--- kdesupport/qca/include/QtCrypto/qca_cert.h  #1.12:1.13
@@ -190,8 +190,4 @@ namespace QCA
                 bool operator==(const Certificate &a) const;
                 bool operator!=(const Certificate &a) const;
-
-        private:
-                friend class Store;
-                friend class TLS;
         };
 
@@ -288,7 +284,4 @@ namespace QCA
                 static CRL fromDER(const QSecureArray &a, const QString &provider = QString());
                 static CRL fromPEM(const QString &s, const QString &provider = QString());
-
-        private:
-                friend class Store;
         };
 
@@ -328,7 +321,4 @@ namespace QCA
                 Store operator+(const Store &a) const;
                 Store & operator+=(const Store &a);
-
-        private:
-                friend class TLS;
         };
 

--- kdesupport/qca/include/QtCrypto/qca_publickey.h  #1.10:1.11
@@ -122,6 +122,4 @@ namespace QCA
                 PrivateKey toPrivateKey() const;
 
-                friend class KeyGenerator;
-
         protected:
                 PKey(const QString &type, const QString &provider);
@@ -175,8 +173,4 @@ namespace QCA
         protected:
                 PublicKey(const QString &type, const QString &provider);
-
-        private:
-                friend class PrivateKey;
-                friend class Certificate;
         };
 
@@ -213,7 +207,4 @@ namespace QCA
         protected:
                 PrivateKey(const QString &type, const QString &provider);
-
-        private:
-                friend class TLS;
         };
 

--- kdesupport/qca/src/qca_core.cpp  #1.9:1.10
@@ -45,4 +45,5 @@ Provider *create_default_provider();
 //----------------------------------------------------------------------------
 static QMutex *manager_mutex = 0;
+static QString *app_name = 0;
 static QCA::ProviderManager *manager = 0;
 static QCA::Random *global_rng = 0;
@@ -98,4 +99,6 @@ void init(MemoryMode mode, int prealloc)
         manager = new ProviderManager;
         manager->setDefault(create_default_provider()); // manager owns it
+
+        app_name = new QString;
 }
 
@@ -108,4 +111,7 @@ void deinit()
         global_rng = 0;
 
+        delete app_name;
+        app_name = 0;
+
         delete manager;
         manager = 0;
@@ -263,9 +269,14 @@ Store systemStore(const QString &provide
 QString appName()
 {
+        if(!qca_init)
         return QString();
+        return *app_name;
 }
 
-void setAppName(const QString &)
+void setAppName(const QString &s)
 {
+        if(!qca_init)
+                return;
+        *app_name = s;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic