Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26524
Modified Files:
Makefile.moz rhCoolKey.cpp rhICoolKey.idl
Log Message:
Latest updates.
Index: Makefile.moz
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/Makefile.moz,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile.moz 13 Sep 2006 17:50:07 -0000 1.2
+++ Makefile.moz 27 Sep 2006 17:22:20 -0000 1.3
@@ -103,6 +103,7 @@
install::
ifdef DESTDIR
$(NSINSTALL) $(DEPLOY_OBJDIR)/esc/* $(DESTDIR)
+ $(NSINSTALL) $(CORE_DIST)/bin/escd $(DESTDIR)
endif
all:: export libs
Index: rhCoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhCoolKey.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhCoolKey.cpp 13 Sep 2006 17:50:07 -0000 1.2
+++ rhCoolKey.cpp 27 Sep 2006 17:22:20 -0000 1.3
@@ -39,6 +39,7 @@
#include "nsXPCOMGlue.h"
#include "prlink.h"
#include "nscore.h"
+#include "content/nsCopySupport.h"
#include <vector>
#include <string>
@@ -1066,6 +1067,43 @@
return NS_OK;
}
+
+/* boolean GetCoolKeyIsReallyCoolKey (in unsigned long aKeyType, in string aKeyID); */
+
+
+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID,
PRBool *_retval)
+{
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyIsReallyCoolKey thread:
%p \n",PR_GetCurrentThread()));
+
+ if (ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) {
+ if (aKeyID) {
+ AutoCoolKey key(aKeyType, aKeyID);
+ PRBool isCool = CoolKeyIsReallyCoolKey(&key);
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyIsReallyCoolKey
isCool: %d \n",(int) isCool));
+ *_retval= isCool;
+ return NS_OK;
+ }
+ }
+ *_retval = PR_FALSE;
+ return NS_OK;
+}
+
+/* long GetCoolKeyGetAppletVer (in unsigned long aKeyType, in string aKeyID, in boolean
aIsMajor); */
+NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID,
PRBool aIsMajor, PRInt32 *_retval)
+{
+
+ PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyAppletVer thread: %p
\n",PR_GetCurrentThread()));
+
+ AutoCoolKey key(aKeyType, aKeyID);
+
+ int ver = CoolKeyGetAppletVer(&key, aIsMajor);
+
+ *_retval = ver;
+
+ return S_OK;
+
+}
+
/* boolean rhCoolKeyIsEnrolled (in unsigned long aKeyType, in string aKeyID); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID,
PRBool *_retval)
@@ -1094,6 +1132,9 @@
string certInfo = "";
*aCertInfo = NULL;
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyCertInfo thread: %p
\n",PR_GetCurrentThread()));
+
+
AutoCoolKey key(aKeyType, aKeyID);
@@ -1317,7 +1358,7 @@
{
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyVersion \n"));
- char *version = "1.0.0-10";
+ char *version = "1.0.0-16";
char *versionVal = (char *) nsMemory::Clone(version,sizeof(char) * strlen(version) +
1);
Index: rhICoolKey.idl
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhICoolKey.idl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhICoolKey.idl 13 Sep 2006 17:50:07 -0000 1.2
+++ rhICoolKey.idl 27 Sep 2006 17:22:20 -0000 1.3
@@ -19,6 +19,7 @@
#include "rhIKeyNotify.idl"
#include "nsIObserver.idl"
+interface nsIDOMHTMLDocument;
[scriptable,uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)]
interface rhICoolKey: nsISupports
@@ -73,9 +74,15 @@
void SetCoolKeyDataValue(in unsigned long aKeyType,in string aKeyID,in string
name,in string value);
boolean SetCoolKeyConfigValue(in string aName, in string aValue);
+
+ boolean GetCoolKeyIsReallyCoolKey(in unsigned long aKeyType, in string aKeyID);
+
+ long GetCoolKeyGetAppletVer(in unsigned long aKeyType, in string aKeyID , in
boolean aIsMajor);
+
string GetCoolKeyConfigValue(in string aName);
string GetCoolKeyVersion();
+
};