Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18349/app/xpcom
Modified Files:
rhCoolKey.cpp rhICoolKey.idl
Log Message:
Bugzilla #491019 Security Officer: Format Card operation to format a user card also
formats a security officer card.
Index: rhCoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhCoolKey.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- rhCoolKey.cpp 4 Feb 2009 01:43:46 -0000 1.10
+++ rhCoolKey.cpp 13 Jun 2009 23:44:51 -0000 1.11
@@ -1262,6 +1262,38 @@
}
/* string GetCoolKeyIssuedTo (in unsigned long aKeyType, in string aKeyID); */
+NS_IMETHODIMP rhCoolKey::GetCoolKeyUID(PRUint32 aKeyType, const char *aKeyID, char
**uid)
+{
+ char tBuff[56];
+ if (!aKeyID) {
+ return NS_ERROR_FAILURE;
+ }
+
+ AutoCoolKey key(aKeyType, ( char *)aKeyID);
+
+ char buff[512];
+ int bufLength = 512;
+ buff[0] = 0;
+
+ CoolKeyGetUID(&key, (char *) buff, bufLength);
+
+ if(!buff[0])
+ {
+ return NS_OK;
+ }
+
+ PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetUID %s
\n",GetTStamp(tBuff,56),(char *) buff));
+
+ char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1);
+
+ *uid = temp;
+
+ return NS_OK;
+
+}
+
+
+/* string GetCoolKeyIssuedTo (in unsigned long aKeyType, in string aKeyID); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyIssuedTo(PRUint32 aKeyType, const char *aKeyID, char
**issuedTo)
{
char tBuff[56];
Index: rhICoolKey.idl
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhICoolKey.idl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- rhICoolKey.idl 7 Jun 2007 21:16:28 -0000 1.7
+++ rhICoolKey.idl 13 Jun 2009 23:44:51 -0000 1.8
@@ -66,6 +66,8 @@
string GetCoolKeyCertInfo(in unsigned long aKeyType, in string aKeyID, in string
aCertNickname);
+ string GetCoolKeyUID(in unsigned long aKeyType, in string aKeyID);
+
string GetCoolKeyIssuedTo(in unsigned long aKeyType, in string aKeyID);
string GetCoolKeyIssuer(in unsigned long aKeyType, in string aKeyID);
Show replies by date