[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:16:53 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7c8ec6fdff2b98a2508f7ae753c4e326ccef8acf
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 9 02:12:56 2003 +0000

    WebCore:
    
    	Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
    
            Reviewed by mjs.
    
            * WebCore-combined.exp:
            * WebCore.exp:
            * WebCore.pbproj/project.pbxproj:
            * khtml/html/html_formimpl.cpp:
            (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
            (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
            * khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
            * khtml/misc/htmlattrs.c: generated changes
            (hash_attr):
            (findAttr):
            * khtml/misc/htmlattrs.h: generated change
            * khtml/misc/htmlattrs.in: added KEYTYPE
            * kwq/KWQKSSLKeyGen.h:
            * kwq/KWQKSSLKeyGen.mm:
            (KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
            (KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]
            * kwq/WebCoreKeyGenerationFactory.h: Added.
            * kwq/WebCoreKeyGenerationFactory.m: Added.
            (+[WebCoreKeyGenerationFactory sharedFactory]):
            (-[WebCoreKeyGenerationFactory init]):
            (-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
            (-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
            * kwq/WebCoreLocalizedStringFactory.h: Removed.
            * kwq/WebCoreLocalizedStringFactory.m: Removed.
    
    WebKit:
    
    	Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
    
            Reviewed by mjs.
    
            * WebCoreSupport.subproj/WebKeyGeneration.cpp: Added.
            (gnrAddContextAttribute): new
            (gnrGetSubjPubKey): new
            (gnrNullAlgParams): new
            (gnrSign): new
            (gnrFreeCssmData): new
            (signedPublicKeyAndChallengeString): new
            * WebCoreSupport.subproj/WebKeyGeneration.h: Added.
            * WebCoreSupport.subproj/WebKeyGenerationFactory.h: Added. Renamed from WebLocalizedStringFactory.
            * WebCoreSupport.subproj/WebKeyGenerationFactory.m: Added.
            (+[WebKeyGenerationFactory createSharedFactory]): no change
            (-[WebKeyGenerationFactory dealloc]): no change
            (-[WebKeyGenerationFactory strengthMenuItemTitles]): new
            (-[WebKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]): new
            * WebCoreSupport.subproj/WebLocalizedStringFactory.h: Removed.
            * WebCoreSupport.subproj/WebLocalizedStringFactory.m: Removed.
            * WebCoreSupport.subproj/WebNetscapeTemplates.cpp: Added.
            * WebCoreSupport.subproj/WebNetscapeTemplates.h: Added.
            * WebKit.pbproj/project.pbxproj:
            * WebKitPrefix.h:
            * WebView.subproj/WebFrameView.m:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5723 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 528f8da..d8d645b 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,34 @@
+2003-12-08  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
+
+        Reviewed by mjs.
+
+        * WebCore-combined.exp:
+        * WebCore.exp:
+        * WebCore.pbproj/project.pbxproj:
+        * khtml/html/html_formimpl.cpp:
+        (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
+        (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
+        * khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
+        * khtml/misc/htmlattrs.c: generated changes
+        (hash_attr):
+        (findAttr):
+        * khtml/misc/htmlattrs.h: generated change
+        * khtml/misc/htmlattrs.in: added KEYTYPE
+        * kwq/KWQKSSLKeyGen.h:
+        * kwq/KWQKSSLKeyGen.mm:
+        (KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
+        (KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:] 
+        * kwq/WebCoreKeyGenerationFactory.h: Added.
+        * kwq/WebCoreKeyGenerationFactory.m: Added.
+        (+[WebCoreKeyGenerationFactory sharedFactory]):
+        (-[WebCoreKeyGenerationFactory init]):
+        (-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
+        (-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
+        * kwq/WebCoreLocalizedStringFactory.h: Removed.
+        * kwq/WebCoreLocalizedStringFactory.m: Removed.
+
 2003-12-08  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/WebCore-combined.exp b/WebCore/WebCore-combined.exp
index cc3552c..722fe4b 100644
--- a/WebCore/WebCore-combined.exp
+++ b/WebCore/WebCore-combined.exp
@@ -6,7 +6,7 @@
 .objc_class_name_WebCoreGraphicsBridge
 .objc_class_name_WebCoreImageRendererFactory
 .objc_class_name_WebCoreJavaScript
-.objc_class_name_WebCoreLocalizedStringFactory
+.objc_class_name_WebCoreKeyGenerator
 .objc_class_name_WebCoreScrollView
 .objc_class_name_WebCoreSettings
 .objc_class_name_WebCoreTextRendererFactory
diff --git a/WebCore/WebCore.exp b/WebCore/WebCore.exp
index 5e61dd5..b35128a 100644
--- a/WebCore/WebCore.exp
+++ b/WebCore/WebCore.exp
@@ -6,7 +6,7 @@
 .objc_class_name_WebCoreGraphicsBridge
 .objc_class_name_WebCoreImageRendererFactory
 .objc_class_name_WebCoreJavaScript
-.objc_class_name_WebCoreLocalizedStringFactory
+.objc_class_name_WebCoreKeyGenerator
 .objc_class_name_WebCoreScrollView
 .objc_class_name_WebCoreSettings
 .objc_class_name_WebCoreTextRendererFactory
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 18aa988..ef45d5a 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -128,6 +128,7 @@
 				F8216299029F4FB501000131,
 				93F1D31A0558CC5C00821BC0,
 				704FD2FE056972FA003DBED9,
+				848A320F057E688B001A2362,
 			);
 			isa = PBXGroup;
 			name = Frameworks;
@@ -798,6 +799,7 @@
 				F82162D7029F4FB501000131,
 				93F1D31B0558CC5C00821BC0,
 				704FD2FF056972FA003DBED9,
+				848A3210057E688B001A2362,
 			);
 			isa = PBXFrameworksBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1145,11 +1147,25 @@
 //842
 //843
 //844
+		848A320F057E688B001A2362 = {
+			expectedFileType = wrapper.framework;
+			isa = PBXFileReference;
+			name = Security.framework;
+			path = /System/Library/Frameworks/Security.framework;
+			refType = 0;
+			sourceTree = "<absolute>";
+		};
+		848A3210057E688B001A2362 = {
+			fileRef = 848A320F057E688B001A2362;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		84B2B1F7056BEF3A00D2B771 = {
 			expectedFileType = sourcecode.c.h;
 			fileEncoding = 30;
 			isa = PBXFileReference;
-			path = WebCoreLocalizedStringFactory.h;
+			path = WebCoreKeyGenerator.h;
 			refType = 4;
 			sourceTree = "<group>";
 		};
@@ -1157,7 +1173,7 @@
 			expectedFileType = sourcecode.c.objc;
 			fileEncoding = 30;
 			isa = PBXFileReference;
-			path = WebCoreLocalizedStringFactory.m;
+			path = WebCoreKeyGenerator.m;
 			refType = 4;
 			sourceTree = "<group>";
 		};
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 30137fe..546a249 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -2399,6 +2399,10 @@ void HTMLKeygenElementImpl::parseAttribute(AttributeImpl* attr)
     switch(attr->id())
     {
     case ATTR_CHALLENGE:
+        m_challenge = attr->val();
+        break;
+    case ATTR_KEYTYPE:
+        m_keyType = attr->val();
         break;
     default:
         // skip HTMLSelectElementImpl parsing!
@@ -2411,8 +2415,20 @@ bool HTMLKeygenElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
     bool successful = false;
     QCString enc_name = fixUpfromUnicode(codec, name().string());
 
+#if APPLE_CHANGES
+    // Only RSA is supported at this time.
+    if (!m_keyType.isNull() && m_keyType.lower() != "rsa") {
+        return false;
+    }
+    QString value = KSSLKeyGen::signedPublicKeyAndChallengeString((unsigned)selectedIndex(), m_challenge.string());
+    if (!value.isNull()) {
+        encoded_values += enc_name;
+        encoded_values += value.utf8();
+        successful = true;
+    }
+#else
     encoded_values += enc_name;
-
+    
     // pop up the fancy certificate creation dialog here
     KSSLKeyGen *kg = new KSSLKeyGen(static_cast<RenderWidget *>(m_render)->widget(), "Key Generator", true);
 
@@ -2422,7 +2438,8 @@ bool HTMLKeygenElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
     delete kg;
 
     encoded_values += "deadbeef";
-
+#endif
+    
     return successful;
 }
 
diff --git a/WebCore/khtml/html/html_formimpl.h b/WebCore/khtml/html/html_formimpl.h
index 7de462d..171562e 100644
--- a/WebCore/khtml/html/html_formimpl.h
+++ b/WebCore/khtml/html/html_formimpl.h
@@ -482,15 +482,14 @@ public:
 
     DOMString type() const;
 
-    long selectedIndex() const;
-    void setSelectedIndex( long index );
-
     // ### this is just a rough guess
     virtual bool isEnumeratable() const { return false; }
 
     virtual void parseAttribute(AttributeImpl *attr);
     virtual bool encoding(const QTextCodec*, khtml::encodingList&, bool);
-
+protected:
+    DOMString m_challenge;
+    DOMString m_keyType;
 };
 
 // -------------------------------------------------------------------------
diff --git a/WebCore/khtml/misc/htmlattrs.c b/WebCore/khtml/misc/htmlattrs.c
index f77a737..e08c47c 100644
--- a/WebCore/khtml/misc/htmlattrs.c
+++ b/WebCore/khtml/misc/htmlattrs.c
@@ -32,8 +32,8 @@ hash_attr (register const char *str, register unsigned int len)
       1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
       1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
       1236, 1236, 1236, 1236, 1236, 1236, 1236,   45,  175,   10,
-        50,    0,  280,   65,   55,  195,   10,   50,    0,  140,
-         0,    0,    0,    0,   25,    5,    0,    0,  220,   60,
+        50,    0,  280,   65,   55,  195,   10,  100,    0,  140,
+         0,    0,    0,    5,   25,    5,    0,    0,  220,   60,
         80,   45,    0, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
       1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
       1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
@@ -97,7 +97,7 @@ findAttr (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 152,
+      TOTAL_KEYWORDS = 153,
       MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 15,
       MIN_HASH_VALUE = 3,
@@ -135,38 +135,37 @@ findAttr (register const char *str, register unsigned int len)
       {"rows", ATTR_ROWS},
       {"coords", ATTR_COORDS},
       {"onload", ATTR_ONLOAD},
-      {"onkeyup", ATTR_ONKEYUP},
       {"onunload", ATTR_ONUNLOAD},
       {"shape", ATTR_SHAPE},
       {"codetype", ATTR_CODETYPE},
       {"lang", ATTR_LANG},
-      {"unknown", ATTR_UNKNOWN},
       {"hspace", ATTR_HSPACE},
       {"wrap", ATTR_WRAP},
       {"nowrap", ATTR_NOWRAP},
       {"declare", ATTR_DECLARE},
       {"longdesc", ATTR_LONGDESC},
       {"char", ATTR_CHAR},
-      {"onkeypress", ATTR_ONKEYPRESS},
       {"target", ATTR_TARGET},
       {"rowspan", ATTR_ROWSPAN},
       {"data", ATTR_DATA},
       {"charset", ATTR_CHARSET},
+      {"onkeyup", ATTR_ONKEYUP},
       {"onmouseup", ATTR_ONMOUSEUP},
       {"onmouseout", ATTR_ONMOUSEOUT},
       {"pagey", ATTR_PAGEY},
       {"noshade", ATTR_NOSHADE},
+      {"unknown", ATTR_UNKNOWN},
       {"prompt", ATTR_PROMPT},
       {"readonly", ATTR_READONLY},
-      {"accesskey", ATTR_ACCESSKEY},
-      {"checked", ATTR_CHECKED},
       {"onchange", ATTR_ONCHANGE},
       {"challenge", ATTR_CHALLENGE},
       {"headers", ATTR_HEADERS},
       {"name", ATTR_NAME},
+      {"onkeypress", ATTR_ONKEYPRESS},
       {"scrolldelay", ATTR_SCROLLDELAY},
       {"pagex", ATTR_PAGEX},
       {"usemap", ATTR_USEMAP},
+      {"keytype", ATTR_KEYTYPE},
       {"html", ATTR_HTML},
       {"title", ATTR_TITLE},
       {"object", ATTR_OBJECT},
@@ -175,11 +174,12 @@ findAttr (register const char *str, register unsigned int len)
       {"autocomplete", ATTR_AUTOCOMPLETE},
       {"cite", ATTR_CITE},
       {"compact", ATTR_COMPACT},
-      {"onkeydown", ATTR_ONKEYDOWN},
       {"scheme", ATTR_SCHEME},
       {"accept-charset", ATTR_ACCEPT_CHARSET},
       {"label", ATTR_LABEL},
       {"language", ATTR_LANGUAGE},
+      {"accesskey", ATTR_ACCESSKEY},
+      {"checked", ATTR_CHECKED},
       {"noresize", ATTR_NORESIZE},
       {"onresize", ATTR_ONRESIZE},
       {"scrollamount", ATTR_SCROLLAMOUNT},
@@ -187,13 +187,12 @@ findAttr (register const char *str, register unsigned int len)
       {"plain", ATTR_PLAIN},
       {"id", ATTR_ID},
       {"rev", ATTR_REV},
-      {"link", ATTR_LINK},
       {"method", ATTR_METHOD},
       {"onabort", ATTR_ONABORT},
       {"action", ATTR_ACTION},
+      {"onkeydown", ATTR_ONKEYDOWN},
       {"onmousedown", ATTR_ONMOUSEDOWN},
       {"value", ATTR_VALUE},
-      {"onclick", ATTR_ONCLICK},
       {"dir", ATTR_DIR},
       {"nosave", ATTR_NOSAVE},
       {"border", ATTR_BORDER},
@@ -203,7 +202,7 @@ findAttr (register const char *str, register unsigned int len)
       {"oversrc", ATTR_OVERSRC},
       {"codebase", ATTR_CODEBASE},
       {"pluginurl", ATTR_PLUGINURL},
-      {"alink", ATTR_ALINK},
+      {"link", ATTR_LINK},
       {"onfocus", ATTR_ONFOCUS},
       {"for", ATTR_FOR},
       {"scrolling", ATTR_SCROLLING},
@@ -211,12 +210,14 @@ findAttr (register const char *str, register unsigned int len)
       {"classid", ATTR_CLASSID},
       {"valuetype", ATTR_VALUETYPE},
       {"bordercolor", ATTR_BORDERCOLOR},
+      {"onclick", ATTR_ONCLICK},
       {"standby", ATTR_STANDBY},
       {"axis", ATTR_AXIS},
       {"z-index", ATTR_Z_INDEX},
       {"face", ATTR_FACE},
       {"cellspacing", ATTR_CELLSPACING},
       {"multiple", ATTR_MULTIPLE},
+      {"alink", ATTR_ALINK},
       {"hidden", ATTR_HIDDEN},
       {"defer", ATTR_DEFER},
       {"href", ATTR_HREF},
@@ -231,24 +232,24 @@ findAttr (register const char *str, register unsigned int len)
       {"summary", ATTR_SUMMARY},
       {"abbr", ATTR_ABBR},
       {"cellpadding", ATTR_CELLPADDING},
-      {"background", ATTR_BACKGROUND},
       {"media", ATTR_MEDIA},
       {"datetime", ATTR_DATETIME},
       {"version", ATTR_VERSION},
-      {"vlink", ATTR_VLINK},
       {"hreflang", ATTR_HREFLANG},
       {"topmargin", ATTR_TOPMARGIN},
-      {"http-equiv", ATTR_HTTP_EQUIV},
+      {"background", ATTR_BACKGROUND},
       {"direction", ATTR_DIRECTION},
+      {"http-equiv", ATTR_HTTP_EQUIV},
       {"contenteditable", ATTR_CONTENTEDITABLE},
       {"frame", ATTR_FRAME},
-      {"ondblclick", ATTR_ONDBLCLICK},
       {"bgproperties", ATTR_BGPROPERTIES},
       {"profile", ATTR_PROFILE},
       {"onmousemove", ATTR_ONMOUSEMOVE},
+      {"vlink", ATTR_VLINK},
       {"onsubmit", ATTR_ONSUBMIT},
       {"disabled", ATTR_DISABLED},
       {"valign", ATTR_VALIGN},
+      {"ondblclick", ATTR_ONDBLCLICK},
       {"tabindex", ATTR_TABINDEX},
       {"archive", ATTR_ARCHIVE},
       {"charoff", ATTR_CHAROFF},
@@ -274,64 +275,65 @@ findAttr (register const char *str, register unsigned int len)
         -1,   20,   -1,   -1,   -1,   -1,   -1,   -1,
         21,   -1,   22,   -1,   23,   24,   -1,   -1,
         -1,   25,   -1,   -1,   -1,   -1,   26,   -1,
-        27,   -1,   -1,   -1,   -1,   28,   29,   30,
-        -1,   -1,   -1,   -1,   -1,   -1,   31,   -1,
-        -1,   32,   33,   -1,   -1,   34,   -1,   -1,
-        -1,   35,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   36,   -1,
-        37,   38,   39,   40,   41,   42,   43,   -1,
-        44,   -1,   -1,   45,   -1,   -1,   -1,   -1,
-        -1,   -1,   46,   47,   -1,   -1,   -1,   -1,
-        48,   -1,   49,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   50,   -1,   51,   -1,   -1,
-        -1,   -1,   -1,   52,   -1,   -1,   53,   54,
-        55,   -1,   -1,   56,   -1,   57,   -1,   58,
-        -1,   -1,   -1,   59,   60,   -1,   -1,   61,
-        62,   63,   -1,   -1,   64,   -1,   65,   66,
-        -1,   67,   -1,   -1,   68,   -1,   69,   -1,
-        70,   -1,   -1,   71,   -1,   -1,   -1,   -1,
-        -1,   72,   -1,   -1,   73,   -1,   -1,   -1,
-        -1, -387,  -78,   -2,   -1,   76,   -1,   -1,
+        27,   -1,   -1,   -1,   -1,   28,   -1,   29,
+        -1,   -1,   -1,   -1,   -1,   -1,   30,   -1,
+        -1,   31,   32,   -1,   -1,   -1,   -1,   -1,
+        -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   34,   -1,
+        35,   36,   37,   38,   -1,   39,   40,   -1,
+        41,   -1,   -1,   42,   -1,   -1,   -1,   -1,
+        43,   -1,   44,   45,   -1,   -1,   -1,   -1,
+        46,   -1,   47,   -1,   -1,   -1,   -1,   48,
+        -1,   -1,   -1,   49,   -1,   50,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   51,
+        52,   -1,   -1,   53,   -1,   54,   55,   56,
+        -1,   -1,   -1,   57,   58,   59,   -1,   60,
+        61,   62,   -1,   -1,   63,   -1,   64,   65,
+        -1,   66,   -1,   -1,   67,   -1,   -1,   -1,
+        68,   -1,   -1,   69,   -1,   -1,   -1,   -1,
+        -1,   70,   -1,   -1,   71,   72,   -1,   -1,
+        73, -388,  -79,   -2,   -1,   76,   -1,   -1,
         -1,   -1,   -1,   77,   -1,   78,   -1,   79,
-        80,   81,   -1,   82,   83,   -1,   -1,   -1,
-        84,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   85,   -1,   -1,   -1,   86,   -1,
-        87,   88,   -1,   -1,   89,   -1,   -1,   -1,
-        -1,   90,   91,   -1,   92,   -1,   93,   -1,
-        -1,   -1,   -1,   -1,   94,   95,   96,   97,
-        -1,   -1,   -1,   -1,   -1,   -1,   98,   -1,
-        -1,   -1,   -1,   -1,   99,  100,  101,   -1,
-        -1,   -1,   -1,   -1,   -1,  102,   -1,  103,
-        -1,  104,   -1,   -1,   -1,   -1,   -1,  105,
+        80,   -1,   -1,   81,   82,   -1,   -1,   -1,
+        83,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        84,   -1,   85,   -1,   -1,   -1,   86,   -1,
+        -1,   87,   -1,   -1,   88,   -1,   -1,   -1,
+        -1,   89,   90,   -1,   91,   -1,   92,   -1,
+        -1,   -1,   -1,   -1,   93,   94,   95,   -1,
+        -1,   -1,   -1,   96,   -1,   -1,   97,   -1,
+        -1,   -1,   -1,   -1,   98,   99,  100,   -1,
+        -1,   -1,   -1,   -1,   -1,  101,   -1,  102,
+        -1,  103,  104,   -1,   -1,   -1,   -1,  105,
         -1,  106,   -1,   -1,  107,   -1,   -1,   -1,
         -1,   -1,   -1,  108,   -1,  109,   -1,  110,
+        -1,  111,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  112,   -1,   -1,   -1,
+       113,   -1,   -1,   -1,  114,  115,  116,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,  111,   -1,   -1,   -1,
-       112,   -1,   -1,   -1,  113,  114,  115,   -1,
+       117,   -1,   -1,   -1,  118,   -1,   -1,   -1,
+        -1,   -1,  119,   -1,   -1,   -1,  120,   -1,
+        -1,   -1,  121,   -1,   -1,   -1,   -1,   -1,
+        -1,  122,   -1,   -1,   -1,   -1,   -1,  123,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       116,   -1,   -1,   -1,  117,   -1,   -1,   -1,
-        -1,   -1,  118,   -1,   -1,   -1,  119,   -1,
-        -1,   -1,  120,   -1,   -1,   -1,   -1,   -1,
-        -1,  121,   -1,   -1,   -1,   -1,   -1,  122,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       123,   -1,  124,   -1,   -1,   -1,  125,   -1,
+       124,   -1,  125,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,  126,   -1,   -1,  127,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,  128,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  129,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  130,  131,
-       132,   -1,   -1,   -1,  133,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  129,  130,
+       131,   -1,   -1,   -1,  132,  133,   -1,   -1,
         -1,   -1,  134,   -1,   -1,   -1,   -1,  135,
-        -1,   -1,   -1,   -1,  136,   -1,  137,   -1,
-        -1,   -1,   -1,  138,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,  139,   -1,   -1,   -1,
-        -1,   -1,   -1,  140,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  136,   -1,
+        -1,   -1,   -1,  137,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  138,   -1,   -1,   -1,
+       139,   -1,   -1,  140,   -1,   -1,   -1,   -1,
        141,   -1,   -1,  142,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  143,   -1,
+        -1,  144,   -1,   -1,   -1,  145,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  143,   -1,   -1,   -1,  144,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
@@ -348,27 +350,26 @@ findAttr (register const char *str, register unsigned int len)
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  146,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  145,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  147,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  146,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       147,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        148,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       149,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  149,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,  150,   -1,   -1,   -1,
+        -1,  150,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  151,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
@@ -416,7 +417,7 @@ findAttr (register const char *str, register unsigned int len)
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  151
+        -1,   -1,   -1,  152
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -516,6 +517,7 @@ static const char * const attrList[] = {
     "HTTP-EQUIV",
     "ID",
     "ISMAP",
+    "KEYTYPE",
     "LABEL",
     "LANG",
     "LANGUAGE",
diff --git a/WebCore/khtml/misc/htmlattrs.h b/WebCore/khtml/misc/htmlattrs.h
index f9fc8c4..5b72ab9 100644
--- a/WebCore/khtml/misc/htmlattrs.h
+++ b/WebCore/khtml/misc/htmlattrs.h
@@ -68,99 +68,100 @@ using namespace DOM;
 #define ATTR_HTTP_EQUIV 58
 #define ATTR_ID 59
 #define ATTR_ISMAP 60
-#define ATTR_LABEL 61
-#define ATTR_LANG 62
-#define ATTR_LANGUAGE 63
-#define ATTR_LEFT 64
-#define ATTR_LEFTMARGIN 65
-#define ATTR_LINK 66
-#define ATTR_LONGDESC 67
-#define ATTR_LOOP 68
-#define ATTR_MARGINHEIGHT 69
-#define ATTR_MARGINWIDTH 70
-#define ATTR_MAXLENGTH 71
-#define ATTR_MEDIA 72
-#define ATTR_METHOD 73
-#define ATTR_MULTIPLE 74
-#define ATTR_NAME 75
-#define ATTR_NOHREF 76
-#define ATTR_NORESIZE 77
-#define ATTR_NOSAVE 78
-#define ATTR_NOSHADE 79
-#define ATTR_NOWRAP 80
-#define ATTR_OBJECT 81
-#define ATTR_ONABORT 82
-#define ATTR_ONBLUR 83
-#define ATTR_ONCHANGE 84
-#define ATTR_ONCLICK 85
-#define ATTR_ONCONTEXTMENU 86
-#define ATTR_ONDBLCLICK 87
-#define ATTR_ONERROR 88
-#define ATTR_ONFOCUS 89
-#define ATTR_ONKEYDOWN 90
-#define ATTR_ONKEYPRESS 91
-#define ATTR_ONKEYUP 92
-#define ATTR_ONLOAD 93
-#define ATTR_ONMOUSEDOWN 94
-#define ATTR_ONMOUSEMOVE 95
-#define ATTR_ONMOUSEOUT 96
-#define ATTR_ONMOUSEOVER 97
-#define ATTR_ONMOUSEUP 98
-#define ATTR_ONRESET 99
-#define ATTR_ONRESIZE 100
-#define ATTR_ONSELECT 101
-#define ATTR_ONSUBMIT 102
-#define ATTR_ONUNLOAD 103
-#define ATTR_OVERSRC 104
-#define ATTR_PAGEX 105
-#define ATTR_PAGEY 106
-#define ATTR_PLAIN 107
-#define ATTR_PLUGINPAGE 108
-#define ATTR_PLUGINSPAGE 109
-#define ATTR_PLUGINURL 110
-#define ATTR_PROFILE 111
-#define ATTR_PROMPT 112
-#define ATTR_READONLY 113
-#define ATTR_REL 114
-#define ATTR_REV 115
-#define ATTR_ROWS 116
-#define ATTR_ROWSPAN 117
-#define ATTR_RULES 118
-#define ATTR_SCHEME 119
-#define ATTR_SCOPE 120
-#define ATTR_SCROLLAMOUNT 121
-#define ATTR_SCROLLDELAY 122
-#define ATTR_SCROLLING 123
-#define ATTR_SELECTED 124
-#define ATTR_SHAPE 125
-#define ATTR_SIZE 126
-#define ATTR_SPAN 127
-#define ATTR_SRC 128
-#define ATTR_STANDBY 129
-#define ATTR_START 130
-#define ATTR_STYLE 131
-#define ATTR_SUMMARY 132
-#define ATTR_TABINDEX 133
-#define ATTR_TARGET 134
-#define ATTR_TEXT 135
-#define ATTR_TITLE 136
-#define ATTR_TOP 137
-#define ATTR_TOPMARGIN 138
-#define ATTR_TRUESPEED 139
-#define ATTR_TYPE 140
-#define ATTR_UNKNOWN 141
-#define ATTR_USEMAP 142
-#define ATTR_VALIGN 143
-#define ATTR_VALUE 144
-#define ATTR_VALUETYPE 145
-#define ATTR_VERSION 146
-#define ATTR_VISIBILITY 147
-#define ATTR_VLINK 148
-#define ATTR_VSPACE 149
-#define ATTR_WIDTH 150
-#define ATTR_WRAP 151
-#define ATTR_Z_INDEX 152
-#define ATTR_LAST_ATTR 152
+#define ATTR_KEYTYPE 61
+#define ATTR_LABEL 62
+#define ATTR_LANG 63
+#define ATTR_LANGUAGE 64
+#define ATTR_LEFT 65
+#define ATTR_LEFTMARGIN 66
+#define ATTR_LINK 67
+#define ATTR_LONGDESC 68
+#define ATTR_LOOP 69
+#define ATTR_MARGINHEIGHT 70
+#define ATTR_MARGINWIDTH 71
+#define ATTR_MAXLENGTH 72
+#define ATTR_MEDIA 73
+#define ATTR_METHOD 74
+#define ATTR_MULTIPLE 75
+#define ATTR_NAME 76
+#define ATTR_NOHREF 77
+#define ATTR_NORESIZE 78
+#define ATTR_NOSAVE 79
+#define ATTR_NOSHADE 80
+#define ATTR_NOWRAP 81
+#define ATTR_OBJECT 82
+#define ATTR_ONABORT 83
+#define ATTR_ONBLUR 84
+#define ATTR_ONCHANGE 85
+#define ATTR_ONCLICK 86
+#define ATTR_ONCONTEXTMENU 87
+#define ATTR_ONDBLCLICK 88
+#define ATTR_ONERROR 89
+#define ATTR_ONFOCUS 90
+#define ATTR_ONKEYDOWN 91
+#define ATTR_ONKEYPRESS 92
+#define ATTR_ONKEYUP 93
+#define ATTR_ONLOAD 94
+#define ATTR_ONMOUSEDOWN 95
+#define ATTR_ONMOUSEMOVE 96
+#define ATTR_ONMOUSEOUT 97
+#define ATTR_ONMOUSEOVER 98
+#define ATTR_ONMOUSEUP 99
+#define ATTR_ONRESET 100
+#define ATTR_ONRESIZE 101
+#define ATTR_ONSELECT 102
+#define ATTR_ONSUBMIT 103
+#define ATTR_ONUNLOAD 104
+#define ATTR_OVERSRC 105
+#define ATTR_PAGEX 106
+#define ATTR_PAGEY 107
+#define ATTR_PLAIN 108
+#define ATTR_PLUGINPAGE 109
+#define ATTR_PLUGINSPAGE 110
+#define ATTR_PLUGINURL 111
+#define ATTR_PROFILE 112
+#define ATTR_PROMPT 113
+#define ATTR_READONLY 114
+#define ATTR_REL 115
+#define ATTR_REV 116
+#define ATTR_ROWS 117
+#define ATTR_ROWSPAN 118
+#define ATTR_RULES 119
+#define ATTR_SCHEME 120
+#define ATTR_SCOPE 121
+#define ATTR_SCROLLAMOUNT 122
+#define ATTR_SCROLLDELAY 123
+#define ATTR_SCROLLING 124
+#define ATTR_SELECTED 125
+#define ATTR_SHAPE 126
+#define ATTR_SIZE 127
+#define ATTR_SPAN 128
+#define ATTR_SRC 129
+#define ATTR_STANDBY 130
+#define ATTR_START 131
+#define ATTR_STYLE 132
+#define ATTR_SUMMARY 133
+#define ATTR_TABINDEX 134
+#define ATTR_TARGET 135
+#define ATTR_TEXT 136
+#define ATTR_TITLE 137
+#define ATTR_TOP 138
+#define ATTR_TOPMARGIN 139
+#define ATTR_TRUESPEED 140
+#define ATTR_TYPE 141
+#define ATTR_UNKNOWN 142
+#define ATTR_USEMAP 143
+#define ATTR_VALIGN 144
+#define ATTR_VALUE 145
+#define ATTR_VALUETYPE 146
+#define ATTR_VERSION 147
+#define ATTR_VISIBILITY 148
+#define ATTR_VLINK 149
+#define ATTR_VSPACE 150
+#define ATTR_WIDTH 151
+#define ATTR_WRAP 152
+#define ATTR_Z_INDEX 153
+#define ATTR_LAST_ATTR 153
 DOMString getAttrName(unsigned short id);
 
 #endif
diff --git a/WebCore/khtml/misc/htmlattrs.in b/WebCore/khtml/misc/htmlattrs.in
index 05206d8..bb9b1b6 100644
--- a/WebCore/khtml/misc/htmlattrs.in
+++ b/WebCore/khtml/misc/htmlattrs.in
@@ -58,6 +58,7 @@ html
 http-equiv
 id
 ismap
+keytype
 label
 lang
 language
diff --git a/WebCore/kwq/KWQKSSLKeyGen.h b/WebCore/kwq/KWQKSSLKeyGen.h
index 33f3a3b..9892637 100644
--- a/WebCore/kwq/KWQKSSLKeyGen.h
+++ b/WebCore/kwq/KWQKSSLKeyGen.h
@@ -29,19 +29,11 @@
 #include "KWQStringList.h"
 #include "QWidget.h"
 
-class QDialog
-{
-public:
-    enum DialogCode { Accepted, Rejected };
-};
-
 class KSSLKeyGen
 {
 public:
     static QStringList supportedKeySizes();
-    KSSLKeyGen(QWidget *, const char *, bool) { }
-    void setKeySize(int) { }
-    int exec() { return QDialog::Rejected; }
+    static QString signedPublicKeyAndChallengeString(unsigned keySizeIndex, const QString &challengeString);
 };
 
 #endif
diff --git a/WebCore/kwq/KWQKSSLKeyGen.mm b/WebCore/kwq/KWQKSSLKeyGen.mm
index 92ae06b..2e9f1f8 100644
--- a/WebCore/kwq/KWQKSSLKeyGen.mm
+++ b/WebCore/kwq/KWQKSSLKeyGen.mm
@@ -25,12 +25,15 @@
 
 #import "KWQKSSLKeyGen.h"
 
+#import "KWQAssertions.h"
 #import "KWQString.h"
-#import "WebCoreLocalizedStringFactory.h"
+#import "WebCoreKeyGenerator.h"
+
+#import <Security/Security.h>
 
 QStringList KSSLKeyGen::supportedKeySizes()
 { 
-    NSEnumerator *enumerator = [[[WebCoreLocalizedStringFactory sharedFactory] keyGenerationMenuItemTitles] objectEnumerator];
+    NSEnumerator *enumerator = [[[WebCoreKeyGenerator sharedGenerator] strengthMenuItemTitles] objectEnumerator];
     QStringList supportedKeySizes = QStringList(); 
     NSString *string;
     while ((string = [enumerator nextObject]) != nil) {
@@ -38,3 +41,8 @@ QStringList KSSLKeyGen::supportedKeySizes()
     }
     return supportedKeySizes;
 }
+
+QString KSSLKeyGen::signedPublicKeyAndChallengeString(unsigned keySizeIndex, const QString &challengeString)
+{   
+    return QString::fromNSString([[WebCoreKeyGenerator sharedGenerator] signedPublicKeyAndChallengeStringWithStrengthIndex:keySizeIndex challenge:challengeString.getNSString()]);
+}
\ No newline at end of file
diff --git a/WebCore/kwq/WebCoreLocalizedStringFactory.h b/WebCore/kwq/WebCoreKeyGenerator.h
similarity index 86%
rename from WebCore/kwq/WebCoreLocalizedStringFactory.h
rename to WebCore/kwq/WebCoreKeyGenerator.h
index 714160d..9a9f55d 100644
--- a/WebCore/kwq/WebCoreLocalizedStringFactory.h
+++ b/WebCore/kwq/WebCoreKeyGenerator.h
@@ -25,10 +25,10 @@
 
 #import <Foundation/Foundation.h>
 
- at interface WebCoreLocalizedStringFactory : NSObject
+ at interface WebCoreKeyGenerator : NSObject
 
-+ (WebCoreLocalizedStringFactory *)sharedFactory;
-
-- (NSArray *)keyGenerationMenuItemTitles;
++ (WebCoreKeyGenerator *)sharedGenerator;
+- (NSArray *)strengthMenuItemTitles;
+- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)index challenge:(NSString *)challenge;
 
 @end
diff --git a/WebCore/kwq/WebCoreLocalizedStringFactory.m b/WebCore/kwq/WebCoreKeyGenerator.m
similarity index 78%
rename from WebCore/kwq/WebCoreLocalizedStringFactory.m
rename to WebCore/kwq/WebCoreKeyGenerator.m
index 8192cde..7672ba1 100644
--- a/WebCore/kwq/WebCoreLocalizedStringFactory.m
+++ b/WebCore/kwq/WebCoreKeyGenerator.m
@@ -23,30 +23,33 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#import "WebCoreLocalizedStringFactory.h"
+#import "WebCoreKeyGenerator.h"
 
 #import "KWQAssertions.h"
 
-static WebCoreLocalizedStringFactory *sharedFactory;
+static WebCoreKeyGenerator *sharedGenerator;
 
- at implementation WebCoreLocalizedStringFactory
+ at implementation WebCoreKeyGenerator
 
-+ (WebCoreLocalizedStringFactory *)sharedFactory
++ (WebCoreKeyGenerator *)sharedGenerator
 {
-    return sharedFactory;
+    return sharedGenerator;
 }
 
 - init
 {
+    ASSERT(!sharedGenerator);
     [super init];
-    
-    ASSERT(!sharedFactory);
-    sharedFactory = [self retain];
-    
+    sharedGenerator = [self retain];
     return self;
 }
 
-- (NSArray *)keyGenerationMenuItemTitles
+- (NSArray *)strengthMenuItemTitles
+{
+    return nil;
+}
+
+- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)index challenge:(NSString *)challenge
 {
     return nil;
 }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index afaf73e..bd99d72 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,31 @@
+2003-12-08  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
+
+        Reviewed by mjs.
+
+        * WebCoreSupport.subproj/WebKeyGeneration.cpp: Added.
+        (gnrAddContextAttribute): new
+        (gnrGetSubjPubKey): new
+        (gnrNullAlgParams): new
+        (gnrSign): new
+        (gnrFreeCssmData): new
+        (signedPublicKeyAndChallengeString): new
+        * WebCoreSupport.subproj/WebKeyGeneration.h: Added.
+        * WebCoreSupport.subproj/WebKeyGenerationFactory.h: Added. Renamed from WebLocalizedStringFactory.
+        * WebCoreSupport.subproj/WebKeyGenerationFactory.m: Added.
+        (+[WebKeyGenerationFactory createSharedFactory]): no change
+        (-[WebKeyGenerationFactory dealloc]): no change
+        (-[WebKeyGenerationFactory strengthMenuItemTitles]): new
+        (-[WebKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]): new
+        * WebCoreSupport.subproj/WebLocalizedStringFactory.h: Removed.
+        * WebCoreSupport.subproj/WebLocalizedStringFactory.m: Removed.
+        * WebCoreSupport.subproj/WebNetscapeTemplates.cpp: Added.
+        * WebCoreSupport.subproj/WebNetscapeTemplates.h: Added.
+        * WebKit.pbproj/project.pbxproj:
+        * WebKitPrefix.h:
+        * WebView.subproj/WebFrameView.m:
+
 2003-12-05  John Sullivan  <sullivan at apple.com>
 
         - fixed <rdar://problem/3491427>: REGRESSION (100-114): multi-page HTML 
diff --git a/WebKit/WebCoreSupport.subproj/WebKeyGeneration.cpp b/WebKit/WebCoreSupport.subproj/WebKeyGeneration.cpp
new file mode 100644
index 0000000..67ec436
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebKeyGeneration.cpp
@@ -0,0 +1,388 @@
+/*
+ * parseNetscapeCerts - parse a blob containing one or more
+ * downloaded netscape certificates. 
+ *
+ * Requires Apple-private API in libCdsaUtils.a and libnssasn1.a.
+ * NOT FOR USE OUTSIDE OF APPLE COMTPUTER.
+ *
+ * Created 12/4/03 by dmitch
+ */
+
+#import <WebKit/WebKeyGeneration.h>
+
+#import <WebKit/WebAssertions.h>
+
+#include <Security/cuCdsaUtils.h>               /* private libCdsaUtils.a */
+#include <Security/cuFileIo.h>                  /* private libCdsaUtils.a */
+#include <Security/cuEnc64.h>                   /* private libCdsaUtils.a */
+#include <SecurityNssAsn1/SecNssCoder.h>	/* private libnssasn1.a */
+#include <SecurityNssAsn1/nssUtils.h>		/* private libnssasn1.a */
+#include <Security/Security.h>
+#include <Security/SecKeyPriv.h>                /* Security.framework SPI */
+
+/* hard coded params, some of which may come from the user in real life */
+#define GNR_KEY_ALG			CSSM_ALGID_RSA
+#define GNR_SIG_ALG			CSSM_ALGID_SHA1WithRSA
+#define GNR_SIG_ALGOID                  CSSMOID_SHA1WithRSA
+
+const SEC_ASN1Template NetscapeCertSequenceTemplate[] = {
+{ SEC_ASN1_SEQUENCE,
+    0, NULL, sizeof(NetscapeCertSequence) },
+{ SEC_ASN1_OBJECT_ID,
+    offsetof(NetscapeCertSequence, contentType), 0, 0 },
+{ SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | 
+    SEC_ASN1_CONTEXT_SPECIFIC | 0 , 
+    offsetof(NetscapeCertSequence, certs),
+    SEC_SequenceOfAnyTemplate, 0 },
+{ 0, 0, 0, 0 }
+};
+
+const SEC_ASN1Template PublicKeyAndChallengeTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+        0, NULL, sizeof(PublicKeyAndChallenge) },
+    { SEC_ASN1_INLINE,
+        offsetof(PublicKeyAndChallenge, spki),
+        NSS_SubjectPublicKeyInfoTemplate, 0},
+    { SEC_ASN1_INLINE,
+        offsetof(PublicKeyAndChallenge, challenge),
+        SEC_IA5StringTemplate, 0 },
+    { 0, 0, 0, 0}
+};
+
+extern const SEC_ASN1Template SignedPublicKeyAndChallengeTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+        0, NULL, sizeof(SignedPublicKeyAndChallenge) },
+    { SEC_ASN1_INLINE,
+        offsetof(SignedPublicKeyAndChallenge, pubKeyAndChallenge),
+        PublicKeyAndChallengeTemplate, 0 },
+    { SEC_ASN1_INLINE,
+        offsetof(SignedPublicKeyAndChallenge, algId),
+        NSS_AlgorithmIDTemplate, 0 },
+    { SEC_ASN1_BIT_STRING,
+        offsetof(SignedPublicKeyAndChallenge, signature), 0, 0 },
+    { 0, 0, 0, 0 }
+};
+
+/*
+ * Given a context specified via a CSSM_CC_HANDLE, add a new
+ * CSSM_CONTEXT_ATTRIBUTE to the context as specified by AttributeType,
+ * AttributeLength, and an untyped pointer.
+ *
+ * This is currently used to add a second CSSM_KEY attribute when performing
+ * ops with algorithm CSSM_ALGID_FEED and CSSM_ALGID_FEECFILE.
+ */
+static CSSM_RETURN gnrAddContextAttribute(CSSM_CC_HANDLE CCHandle,
+                                          uint32 AttributeType,
+                                          uint32 AttributeLength,
+                                          const void *AttributePtr)
+{
+    CSSM_CONTEXT_ATTRIBUTE		newAttr;	
+    CSSM_RETURN					crtn;
+    
+    newAttr.AttributeType     = AttributeType;
+    newAttr.AttributeLength   = AttributeLength;
+    newAttr.Attribute.Data    = (CSSM_DATA_PTR)AttributePtr;
+    crtn = CSSM_UpdateContextAttributes(CCHandle, 1, &newAttr);
+    if(crtn) {
+        ERROR("CSSM_UpdateContextAttributes", crtn);
+    }
+    return crtn;
+}
+
+/*
+ * Given a public key as a SecKeyRef, obtain the key material in
+ * SubjectPublicKeyInfo format. This entails a NULL wrap to format
+ * in CSSM_KEYBLOB_RAW_FORMAT_X509 form. Caller must eventually
+ * free the returned key via CSSM_FreeKey().
+ */
+static OSStatus gnrGetSubjPubKey(
+                                 CSSM_CSP_HANDLE	cspHand,
+                                 SecKeyRef secKey,
+                                 CSSM_KEY_PTR subjPubKey)		// RETURNED
+{
+    CSSM_CC_HANDLE		ccHand;
+    CSSM_RETURN			crtn;
+    CSSM_ACCESS_CREDENTIALS	creds;
+    const CSSM_KEY		*refPubKey;
+    OSStatus 			ortn;
+    
+    /* Get public key in CSSM form */
+    ortn = SecKeyGetCSSMKey(secKey, &refPubKey);
+    if(ortn) {
+        ERROR("SecKeyGetCSSMKey", ortn);
+        return ortn;
+    }
+    
+    /* NULL wrap via CSPDL */
+    memset(subjPubKey, 0, sizeof(CSSM_KEY));
+    memset(&creds, 0, sizeof(CSSM_ACCESS_CREDENTIALS));
+    crtn = CSSM_CSP_CreateSymmetricContext(cspHand,
+                                           CSSM_ALGID_NONE,
+                                           CSSM_ALGMODE_NONE,
+                                           &creds,				// passPhrase
+                                           NULL,				// wrapping key
+                                           NULL,				// init vector
+                                           CSSM_PADDING_NONE,	// Padding
+                                           0,					// Params
+                                           &ccHand);
+    if(crtn) {
+        ERROR("gnrGetSubjPubKey CSSM_CSP_CreateSymmetricContext", 
+                     crtn);
+        return crtn;
+    }
+    
+    /*
+     * Specify X509 format' that is NOT the default for RSA (PKCS1 is)
+     */
+    crtn = gnrAddContextAttribute(ccHand,
+                                  CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT,
+                                  sizeof(uint32),
+                                  (void *)CSSM_KEYBLOB_RAW_FORMAT_X509);
+    if(crtn) {
+        ERROR("gnrAddContextAttribute", crtn);
+        goto errOut;
+    }
+    
+    crtn = CSSM_WrapKey(ccHand,
+                        &creds,
+                        refPubKey,
+                        NULL,			// DescriptiveData
+                        subjPubKey);
+    if(crtn) {
+        ERROR("CSSM_WrapKey", crtn);
+    }
+errOut:
+        CSSM_DeleteContext(ccHand);
+    return crtn;
+}
+
+/* 
+* Set up a encoded NULL for CSSM_X509_ALGORITHM_IDENTIFIER.parameters.
+ */
+void gnrNullAlgParams(
+                      CSSM_X509_ALGORITHM_IDENTIFIER	*algId)
+{
+    static const uint8 encNull[2] = { SEC_ASN1_NULL, 0 };
+    algId->parameters.Data = (uint8 *)encNull;
+    algId->parameters.Length = 2;
+}
+
+/*
+ * Sign specified plaintext. Caller must free signature data via
+ * gnrFreeCssmData().
+ */
+CSSM_RETURN gnrSign(
+                    CSSM_CSP_HANDLE		cspHand,
+                    const CSSM_DATA		*plainText,
+                    SecKeyRef			privKey,
+                    CSSM_ALGORITHMS		sigAlg,		// e.g., CSSM_ALGID_SHA1WithRSA
+                    CSSM_DATA			*sig)		// allocated by CSP and RETURNED
+{
+    CSSM_CC_HANDLE		ccHand;
+    CSSM_RETURN			crtn;
+    const CSSM_KEY		*refPrivKey;
+    OSStatus 			ortn;
+    const CSSM_ACCESS_CREDENTIALS *creds;
+    
+    /* Get private key in CSSM form */
+    ortn = SecKeyGetCSSMKey(privKey, &refPrivKey);
+    if(ortn) {
+        ERROR("SecKeyGetCSSMKey", ortn);
+        return ortn;
+    }
+    
+    /* Get appropriate access credentials */
+    ortn = SecKeyGetCredentials(privKey,
+                                CSSM_ACL_AUTHORIZATION_SIGN,
+                                kSecCredentialTypeDefault,
+                                &creds);
+    if(ortn) {
+        ERROR("SecKeyGetCredentials", ortn);
+        return ortn;
+    }
+    
+    /* cook up signature context */
+    crtn = CSSM_CSP_CreateSignatureContext(cspHand,
+                                           sigAlg,
+                                           creds,	
+                                           refPrivKey,
+                                           &ccHand);
+    if(crtn) {
+        ERROR("CSSM_CSP_CreateSignatureContext", ortn);
+        return crtn;
+    }
+    
+    /* go for it */
+    sig->Data = NULL;
+    sig->Length = 0;
+    crtn = CSSM_SignData(ccHand,
+                         plainText,
+                         1,
+                         CSSM_ALGID_NONE,
+                         sig);
+    if(crtn) {
+        ERROR("CSSM_SignData", ortn);
+    }
+    CSSM_DeleteContext(ccHand);
+    return crtn;
+}
+
+/*
+ * Free data mallocd on app's behalf by a CSSM module.
+ */
+static void gnrFreeCssmData(
+                            CSSM_HANDLE		modHand,
+                            CSSM_DATA 		*cdata)
+{
+    CSSM_API_MEMORY_FUNCS memFuncs;
+    CSSM_RETURN crtn = CSSM_GetAPIMemoryFunctions(modHand, &memFuncs);
+    if(crtn) {
+        ERROR("CSSM_GetAPIMemoryFunctions", crtn);
+        /* oh well, leak and continue */
+    }
+    else {
+        memFuncs.free_func(cdata->Data, memFuncs.AllocRef);
+    }
+    return;
+}
+
+char *signedPublicKeyAndChallengeString(unsigned keySize, const char *challenge)
+{
+    OSStatus 		ortn;
+    CSSM_RETURN		crtn;
+    SecKeyRef 		pubKey = NULL;
+    SecKeyRef 		privKey = NULL;
+    CSSM_KEY		subjectPubKey;
+    bool			freeSubjPubKey = false;
+    CSSM_CSP_HANDLE	cspHand;
+    SecNssCoder		coder;
+    SignedPublicKeyAndChallenge	spkc;
+    PublicKeyAndChallenge		*pkc = &spkc.pubKeyAndChallenge;
+    /* DER encoded spkc.pubKeyAndChallenge and spkc */
+    CSSM_DATA		encodedPkc = {0, NULL};		
+    CSSM_DATA		encodedSpkc = {0, NULL};
+    CSSM_DATA		signature = {0, NULL};
+    PRErrorCode		perr;
+    unsigned char	*spkcB64 = NULL;		// base64 encoded encodedSpkc
+    unsigned		spkcB64Len;
+    
+    /* Cook up a key pair, just use any old params for now */
+    ortn = SecKeyCreatePair(nil,		// in default KC
+                            GNR_KEY_ALG,					// normally spec'd by user
+                            keySize,				// key size, ditto
+                            0,								// ContextHandle
+                            CSSM_KEYUSE_ANY,				// might want to restrict this
+                            CSSM_KEYATTR_PERMANENT | CSSM_KEYATTR_EXTRACTABLE | 
+                            CSSM_KEYATTR_RETURN_REF,	// pub attrs
+                            CSSM_KEYUSE_ANY,				// might want to restrict this
+                            CSSM_KEYATTR_SENSITIVE | CSSM_KEYATTR_RETURN_REF |
+                            CSSM_KEYATTR_PERMANENT |CSSM_KEYATTR_EXTRACTABLE,
+                            /*
+                             * FIXME: should have a non-NULL initialAccess here, but
+                             * I do not know any easy way of doing that. Ask Perry
+                             * (perry at apple.com) or MIchael (mb at apple.com).
+                             */
+                            NULL,
+                            &pubKey,
+                            &privKey);
+    if (ortn) {
+        ERROR("***SecKeyCreatePair", ortn);
+        goto errOut;
+    }
+    
+    /* get handle of CSPDL for crypto ops */
+    ortn = SecKeyGetCSPHandle(privKey, &cspHand);
+    if (ortn) {
+        ERROR("***SecKeyGetCSPHandle", ortn);
+        goto errOut;
+    }
+    
+    /*
+     * Get the public key in encoded SubjectPublicKeyInfo form.
+     */
+    ortn = gnrGetSubjPubKey(cspHand, pubKey, &subjectPubKey);
+    if (ortn) {
+        goto errOut;
+    }
+    freeSubjPubKey = true;
+    
+    /*
+     * Cook up PublicKeyAndChallenge and DER-encode it.
+     * First, DER-decode the key's SubjectPublicKeyInfo.
+     */
+    memset(&spkc, 0, sizeof(spkc));
+    perr = coder.decodeItem(subjectPubKey.KeyData, 
+                            NSS_SubjectPublicKeyInfoTemplate,
+                            &pkc->spki);
+    if (perr) {
+        /* should never happen */
+        ERROR("***Error decoding subject public key info\n");
+        goto errOut;
+    }
+    pkc->challenge.Data = (uint8 *)challenge;
+    pkc->challenge.Length = strlen(challenge);
+    perr = coder.encodeItem(pkc, 
+                            PublicKeyAndChallengeTemplate,
+                            encodedPkc);
+    if (perr) {
+        /* should never happen */
+        ERROR("***Error enccoding PublicKeyAndChallenge\n");
+        goto errOut;
+    }
+    
+    /*
+     * Sign the encoded PublicKeyAndChallenge.
+     */
+    crtn = gnrSign(cspHand, &encodedPkc, privKey,
+                   GNR_SIG_ALG, &signature);
+    if (crtn) {
+        goto errOut;
+    }
+    
+    /*
+     * Cook up SignedPublicKeyAndChallenge, DER-encode that. 
+     * The PublicKeyAndChallenge stays in place where we originally
+     * created it before we signed it. Now we just add the algId
+     * and the signature proper.
+     */
+    spkc.algId.algorithm = GNR_SIG_ALGOID;
+    gnrNullAlgParams(&spkc.algId);
+    spkc.signature = signature;
+    /* convert to BIT length */
+    spkc.signature.Length *= 8;
+    perr = coder.encodeItem(&spkc, 
+                            SignedPublicKeyAndChallengeTemplate,
+                            encodedSpkc);
+    if (perr) {
+        /* should never happen */
+        ERROR("***Error encoding SignedPublicKeyAndChallenge\n");
+        goto errOut;
+    }
+    
+    /*
+     * Finally base64 the result and write that to outFile.
+     * cuEnc64() gives us a NULL-terminated string; we strip off the NULL.
+     */
+    spkcB64 = cuEnc64(encodedSpkc.Data, encodedSpkc.Length, &spkcB64Len);
+    if (spkcB64 == NULL) {
+        /* should never happen */
+        FATAL("***Error base64-encoding the result\n");
+        goto errOut;
+    }
+    
+errOut:
+        
+    if (freeSubjPubKey) {
+        CSSM_FreeKey(cspHand, NULL, &subjectPubKey, CSSM_FALSE);
+    }
+    if (signature.Data) {
+        gnrFreeCssmData(cspHand, &signature);
+    }
+    if (pubKey) {
+        CFRelease(pubKey);
+    }
+    if (privKey) {
+        CFRelease(privKey);
+    }
+    return spkcB64;
+}	
\ No newline at end of file
diff --git a/WebKit/WebCoreSupport.subproj/WebKeyGeneration.h b/WebKit/WebCoreSupport.subproj/WebKeyGeneration.h
new file mode 100644
index 0000000..1466800
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebKeyGeneration.h
@@ -0,0 +1,76 @@
+/*
+ *  WebKeyGeneration.h
+ *  WebKit
+ *
+ *  Created by Chris Blumenberg on Mon Dec 08 2003.
+ *  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#ifndef	_WEB_KEY_GENERATION_
+#define _WEB_KEY_GENERATION_
+
+#include <SecurityNssAsn1/secasn1t.h>
+#include <Security/cssmtype.h>
+#include <SecurityNssAsn1/X509Templates.h>
+#include <SecurityNssAsn1/keyTemplates.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+    /* 
+    * Netscape Certifiate Sequence is defined by Netscape as a PKCS7
+     * ContentInfo with a contentType of netscape-cert-sequence and a content
+     * consisting of a sequence of certificates.
+     *
+     * For simplicity - i.e., to avoid the general purpose ContentInfo
+     * polymorphism - we'll just hard-code this particular type right here.
+     *
+     * Inside the ContentInfo is an array of standard X509 certificates.
+     * We don't need to parse the certs themselves so they remain as 
+     * opaque data blobs. 
+     */
+    typedef struct {
+        CSSM_OID		contentType;		// netscape-cert-sequence
+        CSSM_DATA		**certs;
+    } NetscapeCertSequence;
+    
+    extern const SEC_ASN1Template NetscapeCertSequenceTemplate[];
+    
+    /*
+     * Public key/challenge, to send to CA.
+     *
+     * PublicKeyAndChallenge ::= SEQUENCE {
+         *
+         *   	spki SubjectPublicKeyInfo,
+         *   	challenge IA5STRING
+         * }
+     *
+     * SignedPublicKeyAndChallenge ::= SEQUENCE {
+         * 		publicKeyAndChallenge PublicKeyAndChallenge,
+         *		signatureAlgorithm AlgorithmIdentifier,
+         *		signature BIT STRING
+         * }
+     */
+    typedef struct {
+        CSSM_X509_SUBJECT_PUBLIC_KEY_INFO	spki;
+        CSSM_DATA							challenge;	// ASCII
+    } PublicKeyAndChallenge;
+    
+    typedef struct {
+        PublicKeyAndChallenge				pubKeyAndChallenge;
+        CSSM_X509_ALGORITHM_IDENTIFIER		algId;
+        CSSM_DATA							signature; // length in BITS
+    } SignedPublicKeyAndChallenge;
+    
+    extern const SEC_ASN1Template PublicKeyAndChallengeTemplate[];
+    extern const SEC_ASN1Template SignedPublicKeyAndChallengeTemplate[];
+
+    char *signedPublicKeyAndChallengeString(unsigned keySize, const char *challenge);
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif	/* _WEB_KEY_GENERATION_ */
diff --git a/WebKit/WebCoreSupport.subproj/WebKeyGenerator.h b/WebKit/WebCoreSupport.subproj/WebKeyGenerator.h
new file mode 100644
index 0000000..73b6fad
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebKeyGenerator.h
@@ -0,0 +1,17 @@
+//
+//  WebKeyGenerator.h
+//  WebKit
+//
+//  Created by Chris Blumenberg on Thu Nov 20 2003.
+//  Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebCore/WebCoreKeyGenerator.h>
+
+
+ at interface WebKeyGenerator : WebCoreKeyGenerator
+{
+    NSArray *strengthMenuItemTitles;
+}
++ (void)createSharedGenerator;
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebKeyGenerator.m b/WebKit/WebCoreSupport.subproj/WebKeyGenerator.m
new file mode 100644
index 0000000..df85e06
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebKeyGenerator.m
@@ -0,0 +1,67 @@
+//
+//  WebKeyGenerationFactory.m
+//  WebKit
+//
+//  Created by Chris Blumenberg on Thu Nov 20 2003.
+//  Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebKit/WebKeyGenerator.h>
+
+#import <WebKit/WebAssertions.h>
+#import <WebKit/WebKeyGeneration.h>
+#import <WebKit/WebLocalizableStrings.h>
+
+ at implementation WebKeyGenerator
+
++ (void)createSharedGenerator
+{
+    if (![self sharedGenerator]) {
+        [[[self alloc] init] release];
+    }
+    ASSERT([[self sharedGenerator] isKindOfClass:self]);
+}
+
+- (void)dealloc
+{
+    [strengthMenuItemTitles release];
+    [super dealloc];
+}
+
+- (NSArray *)strengthMenuItemTitles
+{
+    if (!strengthMenuItemTitles) {
+        strengthMenuItemTitles = [[NSArray alloc] initWithObjects:
+            UI_STRING("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu"),
+            UI_STRING("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu"),
+            UI_STRING("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu"), nil];
+    }
+    return strengthMenuItemTitles;
+}
+
+- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)index challenge:(NSString *)challenge
+{    
+    // This switch statement must always be synced with the UI strings returned by strengthMenuItemTitles.
+    uint32 keySize;
+    switch (index) {
+        case 0:
+            keySize = 2048;
+            break;
+        case 1:
+            keySize = 1024;
+            break;
+        case 2:
+            keySize = 512;
+            break;
+        default:
+            return nil;
+    }
+    
+    char *key = signedPublicKeyAndChallengeString(keySize, [challenge cString]);
+    NSString *result = key ? [NSString stringWithCString:key] : nil;
+    free(key);
+    
+    return result;
+}
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebLocalizedStringFactory.h b/WebKit/WebCoreSupport.subproj/WebLocalizedStringFactory.h
deleted file mode 100644
index 2fbd3fb..0000000
--- a/WebKit/WebCoreSupport.subproj/WebLocalizedStringFactory.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-//  WebLocalizedStringFactory.h
-//  WebKit
-//
-//  Created by Chris Blumenberg on Thu Nov 20 2003.
-//  Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
-//
-
-#import <WebCore/WebCoreLocalizedStringFactory.h>
-
-
- at interface WebLocalizedStringFactory : WebCoreLocalizedStringFactory
-{
-    NSArray *keyGenerationMenuItemTitles;
-}
-+ (void)createSharedFactory;
- at end
diff --git a/WebKit/WebCoreSupport.subproj/WebLocalizedStringFactory.m b/WebKit/WebCoreSupport.subproj/WebLocalizedStringFactory.m
deleted file mode 100644
index ed34c6b..0000000
--- a/WebKit/WebCoreSupport.subproj/WebLocalizedStringFactory.m
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-//  WebLocalizedStringFactory.m
-//  WebKit
-//
-//  Created by Chris Blumenberg on Thu Nov 20 2003.
-//  Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
-//
-
-#import <WebKit/WebLocalizedStringFactory.h>
-
-#import <WebKit/WebAssertions.h>
-#import <WebKit/WebLocalizableStrings.h>
-
- at implementation WebLocalizedStringFactory
-
-+ (void)createSharedFactory
-{
-    if (![self sharedFactory]) {
-        [[[self alloc] init] release];
-    }
-    ASSERT([[self sharedFactory] isKindOfClass:self]);
-}
-
-- (void)dealloc
-{
-    [keyGenerationMenuItemTitles release];
-    [super dealloc];
-}
-
-- (NSArray *)keyGenerationMenuItemTitles
-{
-    if (!keyGenerationMenuItemTitles) {
-        keyGenerationMenuItemTitles = [[NSArray alloc] initWithObjects:
-            UI_STRING("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu"),
-            UI_STRING("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu"),
-            UI_STRING("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu"), nil];
-    }
-    return keyGenerationMenuItemTitles;
-}
-
- at end
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 80aa5da..c0a2a84 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -17,7 +17,7 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				INSTALL_PATH = "@executable_path/../Frameworks";
 				OPTIMIZATION_CFLAGS = "-O0";
-				OTHER_LDFLAGS = "-seg1addr $(LOCAL_SEG1_ADDR)";
+				OTHER_LDFLAGS = "$(COMMON_LDFLAGS) -seg1addr $(LOCAL_SEG1_ADDR)";
 				SECTORDER_FLAGS = "";
 				ZERO_LINK = YES;
 			};
@@ -34,7 +34,7 @@
 				DEPLOYMENT_POSTPROCESSING = YES;
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
 				INSTALL_PATH = "@executable_path/../Frameworks";
-				OTHER_LDFLAGS = "-seg1addr $(LOCAL_SEG1_ADDR)";
+				OTHER_LDFLAGS = "$(COMMON_LDFLAGS) -seg1addr $(LOCAL_SEG1_ADDR)";
 				SECTORDER_FLAGS = "";
 				ZERO_LINK = NO;
 			};
@@ -130,6 +130,8 @@
 				F5C2869302846DCD018635CA,
 				F5C2869402846DCD018635CA,
 				F5C2869502846DCD018635CA,
+				830E81E005853AC000AD0891,
+				830E821505853B0B00AD0891,
 				93D623DD051E791F002F47DD,
 				F738C9E903FAD3DF0321FBE0,
 				F738C9EA03FAD3DF0321FBE0,
@@ -150,6 +152,7 @@
 				6566F34204C12D14008B3232,
 			);
 			buildSettings = {
+				COMMON_LDFLAGS = "-lnssasn1 -lCdsaUtils -no-c++filt";
 				COPY_PHASE_STRIP = NO;
 				DEBUG_CFLAGS = "-DNDEBUG";
 				DYLIB_COMPATIBILITY_VERSION = 1;
@@ -157,21 +160,21 @@
 				EXPORTED_SYMBOLS_FILE = WebKit.exp;
 				FRAMEWORK_SEARCH_PATHS = "\"${DSTROOT}\" \"${MERGE_DIR}/${SYSTEM_LIBRARY_DIR}/Frameworks\" \"${MERGE_DIR}/$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Frameworks\" \"$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Frameworks\" \"$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks\" \"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks\" \"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"";
 				FRAMEWORK_VERSION = A;
-				GCC_TREAT_WARNINGS_AS_ERRORS = YES;
 				HEADER_SEARCH_PATHS = "";
-				INSTALL_PATH = /System/Library/Frameworks;
+				INSTALL_PATH = "\U0001/System/Library/Frameworks";
 				LIBRARY_SEARCH_PATHS = "";
 				LOCAL_SEG1_ADDR = 0x7000000;
 				MACOSX_DEPLOYMENT_TARGET = 10.2;
 				OPTIMIZATION_CFLAGS = "-Os";
 				OTHER_CFLAGS = "$(DEBUG_CFLAGS) -DFRAMEWORK_NAME=WebKit";
-				OTHER_LDFLAGS = "-no-c++filt -sub_umbrella WebCore -sub_umbrella JavaScriptCore";
+				OTHER_LDFLAGS = "$(COMMON_LDFLAGS) -sub_umbrella WebCore -sub_umbrella JavaScriptCore";
 				PRECOMPILE_PREFIX_HEADER = YES;
 				PREFIX_HEADER = WebKitPrefix.h;
 				PRODUCT_NAME = WebKit;
 				SECTORDER_FLAGS = "-sectorder __TEXT __text /AppleInternal/OrderFiles/WebKit.order";
 				USE_GCC3_PFE_SUPPORT = YES;
-				WARNING_CFLAGS = "-Werror -Wall -W -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter";
+				WARNING_CFLAGS = "-Werror -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wbad-function-cast -Wmissing-declarations -Wnested-externs";
+				WARNING_CPLUSPLUSFLAGS = "-Wno-error";
 				WRAPPER_EXTENSION = framework;
 			};
 			dependencies = (
@@ -328,6 +331,7 @@
 				65A7D44B0568AB2600E70EF6,
 				BE887C01056D3A6E009BB3E7,
 				84723BE5056D719E0044BFEA,
+				830E81850585375700AD0891,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -444,6 +448,7 @@
 				BECD142C0565830A005BB09C,
 				BE887C02056D3A6E009BB3E7,
 				84723BE6056D719E0044BFEA,
+				830E81860585375700AD0891,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -458,6 +463,8 @@
 				F738CA5803FAD3DF0321FBE0,
 				BE1B2F5604755C7700CA289C,
 				93D623DE051E791F002F47DD,
+				830E81E105853AC000AD0891,
+				830E821605853B0B00AD0891,
 			);
 			isa = PBXFrameworksBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -518,8 +525,8 @@
 				3944607A020F50ED0ECA1767,
 				3944607B020F50ED0ECA1767,
 				F528E3E9031E91AD01CA2ACA,
-				F528E3EB031E91AD01CA2ACA,
 				F528E3EA031E91AD01CA2ACA,
+				F528E3EB031E91AD01CA2ACA,
 				F5934C8802E894F50197FBCF,
 				F5934C8902E894F50197FBCF,
 				BE07CEA7047538F000CA289C,
@@ -1911,6 +1918,62 @@
 //832
 //833
 //834
+		830E81830585375700AD0891 = {
+			expectedFileType = sourcecode.c.h;
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebKeyGeneration.h;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		830E81840585375700AD0891 = {
+			expectedFileType = sourcecode.cpp.cpp;
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebKeyGeneration.cpp;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		830E81850585375700AD0891 = {
+			fileRef = 830E81830585375700AD0891;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		830E81860585375700AD0891 = {
+			fileRef = 830E81840585375700AD0891;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		830E81E005853AC000AD0891 = {
+			expectedFileType = wrapper.framework;
+			isa = PBXFileReference;
+			name = Security.framework;
+			path = /System/Library/Frameworks/Security.framework;
+			refType = 0;
+			sourceTree = "<absolute>";
+		};
+		830E81E105853AC000AD0891 = {
+			fileRef = 830E81E005853AC000AD0891;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		830E821505853B0B00AD0891 = {
+			expectedFileType = wrapper.framework;
+			isa = PBXFileReference;
+			name = SecurityNssAsn1.framework;
+			path = /System/Library/PrivateFrameworks/SecurityNssAsn1.framework;
+			refType = 0;
+			sourceTree = "<absolute>";
+		};
+		830E821605853B0B00AD0891 = {
+			fileRef = 830E821505853B0B00AD0891;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		833987810543012D00EE146E = {
 			expectedFileType = sourcecode.c.h;
 			fileEncoding = 4;
@@ -2091,7 +2154,7 @@
 			expectedFileType = sourcecode.c.h;
 			fileEncoding = 4;
 			isa = PBXFileReference;
-			path = WebLocalizedStringFactory.h;
+			path = WebKeyGenerator.h;
 			refType = 4;
 			sourceTree = "<group>";
 		};
@@ -2099,7 +2162,7 @@
 			expectedFileType = sourcecode.c.objc;
 			fileEncoding = 4;
 			isa = PBXFileReference;
-			path = WebLocalizedStringFactory.m;
+			path = WebKeyGenerator.m;
 			refType = 4;
 			sourceTree = "<group>";
 		};
@@ -3502,7 +3565,7 @@
 				COPY_PHASE_STRIP = NO;
 				DEBUG_CFLAGS = "";
 				INSTALL_PATH = "@executable_path/../Frameworks";
-				OTHER_LDFLAGS = "-seg1addr $(LOCAL_SEG1_ADDR)";
+				OTHER_LDFLAGS = "$(COMMON_LDFLAGS) -seg1addr $(LOCAL_SEG1_ADDR)";
 			};
 			isa = PBXBuildStyle;
 			name = OptimizedWithSymbols;
@@ -3719,6 +3782,8 @@
 				9CE1F8A302A5C6F30ECA2ACD,
 				9345D4EA0365C5B2008635CE,
 				9345D4EB0365C5B2008635CE,
+				830E81830585375700AD0891,
+				830E81840585375700AD0891,
 				84723BE3056D719E0044BFEA,
 				84723BE4056D719E0044BFEA,
 				F5E0E10802BC45F8018635CA,
diff --git a/WebKit/WebKitPrefix.h b/WebKit/WebKitPrefix.h
index 90d0755..3ecbe12 100644
--- a/WebKit/WebKitPrefix.h
+++ b/WebKit/WebKitPrefix.h
@@ -12,20 +12,22 @@
 
 #import <pthread.h>
 
+#import <CoreGraphics/CoreGraphics.h>
+
+#ifdef __cplusplus
+
+#include <cstddef>
+#include <new>
+
+#else
+
 #import <ApplicationServices/ApplicationServices.h>
+#import <Carbon/Carbon.h>
 #import <QD/ATSUnicodePriv.h>
-#import <CoreGraphics/CoreGraphics.h>
 
 #ifdef __OBJC__
 #import <Cocoa/Cocoa.h>
 #import <Foundation/NSPrivateDecls.h>
 #endif
 
-#import <Carbon/Carbon.h>
-
-#ifdef __cplusplus
-
-#include <cstddef>
-#include <new>
-
 #endif
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index fbd3187..f187d3f 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -17,9 +17,9 @@
 #import <WebKit/WebImageRenderer.h>
 #import <WebKit/WebImageRendererFactory.h>
 #import <WebKit/WebImageView.h>
+#import <WebKit/WebKeyGenerator.h>
 #import <WebKit/WebKitErrorsPrivate.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
-#import <WebKit/WebLocalizedStringFactory.h>
 #import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebTextRendererFactory.h>
@@ -414,7 +414,7 @@ static NSMutableDictionary *viewTypes;
     [WebImageRendererFactory createSharedFactory];
     [WebCookieAdapter createSharedAdapter];
     [WebGraphicsBridge createSharedBridge];
-    [WebLocalizedStringFactory createSharedFactory];
+    [WebKeyGenerator createSharedGenerator];
     
     _private = [[WebFrameViewPrivate alloc] init];
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list