diff options
author | Grant Gayed <ggayed> | 2009-08-19 20:18:49 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2009-08-19 20:18:49 +0000 |
commit | b72bc1d2aeff462f0ad0e8ecfa6bc39ebd385109 (patch) | |
tree | f33e94cbdbb616a8ae4ddfa04b4325d6cb13a909 | |
parent | b1a31ab4f172a1a2e228d0d4b5317b0bc24de7aa (diff) | |
download | eclipse.platform.swt-b72bc1d2aeff462f0ad0e8ecfa6bc39ebd385109.tar.gz eclipse.platform.swt-b72bc1d2aeff462f0ad0e8ecfa6bc39ebd385109.tar.xz eclipse.platform.swt-b72bc1d2aeff462f0ad0e8ecfa6bc39ebd385109.zip |
214807 - xulrunner 1.9 has changed invalid certificate behaviour
14 files changed, 1604 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp index 0b864d2d63..1e5ec46838 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp @@ -694,6 +694,41 @@ fail: } #endif +#if (!defined(NO__1VtblCall__IIIIII_3I_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJIIII_3I_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jintArray arg7, jintArray arg8); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jintArray arg7, jintArray arg8) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJIIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jintArray arg7, jintArray arg8); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJIIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jintArray arg7, jintArray arg8) +#endif +{ + jint *lparg6=NULL; + jint *lparg7=NULL; + jint *lparg8=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIIIII_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJIIII_3I_3I_3I_FUNC); +#endif + if (arg6) if ((lparg6 = env->GetIntArrayElements(arg6, NULL)) == NULL) goto fail; + if (arg7) if ((lparg7 = env->GetIntArrayElements(arg7, NULL)) == NULL) goto fail; + if (arg8) if ((lparg8 = env->GetIntArrayElements(arg8, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint, jint *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, lparg6, lparg7, lparg8); +fail: + if (arg8 && lparg8) env->ReleaseIntArrayElements(arg8, lparg8, 0); + if (arg7 && lparg7) env->ReleaseIntArrayElements(arg7, lparg7, 0); + if (arg6 && lparg6) env->ReleaseIntArrayElements(arg6, lparg6, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIIIII_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJIIII_3I_3I_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIIII_3B_3BI) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJIII_3B_3BI) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIII_3B_3BI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jbyteArray arg5, jbyteArray arg6, jint arg7); @@ -784,6 +819,41 @@ fail: } #endif +#if (!defined(NO__1VtblCall__IIIII_3I_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJIII_3I_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6, jintArray arg7); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6, jintArray arg7) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6, jintArray arg7); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJIII_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6, jintArray arg7) +#endif +{ + jint *lparg5=NULL; + jint *lparg6=NULL; + jint *lparg7=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIIII_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJIII_3I_3I_3I_FUNC); +#endif + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + if (arg6) if ((lparg6 = env->GetIntArrayElements(arg6, NULL)) == NULL) goto fail; + if (arg7) if ((lparg7 = env->GetIntArrayElements(arg7, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5, lparg6, lparg7); +fail: + if (arg7 && lparg7) env->ReleaseIntArrayElements(arg7, lparg7, 0); + if (arg6 && lparg6) env->ReleaseIntArrayElements(arg6, lparg6, 0); + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIIII_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJIII_3I_3I_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIIIJJJJ) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJIIJJJJ) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIIJJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jlong arg4, jlong arg5, jlong arg6, jlong arg7); @@ -1079,6 +1149,38 @@ fail: } #endif +#if (!defined(NO__1VtblCall__IIII_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJII_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5) +#endif +{ + jint *lparg4=NULL; + jint *lparg5=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIII_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJII_3I_3I_FUNC); +#endif + if (arg4) if ((lparg4 = env->GetIntArrayElements(arg4, NULL)) == NULL) goto fail; + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5); +fail: + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); + if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIII_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJII_3I_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIII_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJII_3J) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jlongArray arg4); @@ -1923,6 +2025,99 @@ fail: } #endif +#if (!defined(NO__1VtblCall__III_3II) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJI_3II) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3II)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4) +#endif +{ + jint *lparg3=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__III_3II_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJI_3II_FUNC); +#endif + if (arg3) if ((lparg3 = env->GetIntArrayElements(arg3, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4); +fail: + if (arg3 && lparg3) env->ReleaseIntArrayElements(arg3, lparg3, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__III_3II_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJI_3II_FUNC); +#endif + return rc; +} +#endif + +#if (!defined(NO__1VtblCall__III_3IJ) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJI_3IJ) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3IJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jlong arg4); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3IJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jlong arg4) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3IJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jlong arg4); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3IJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jlong arg4) +#endif +{ + jint *lparg3=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__III_3IJ_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJI_3IJ_FUNC); +#endif + if (arg3) if ((lparg3 = env->GetIntArrayElements(arg3, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, arg4); +fail: + if (arg3 && lparg3) env->ReleaseIntArrayElements(arg3, lparg3, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__III_3IJ_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJI_3IJ_FUNC); +#endif + return rc; +} +#endif + +#if (!defined(NO__1VtblCall__III_3I_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJI_3I_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5) +#endif +{ + jint *lparg3=NULL; + jint *lparg4=NULL; + jint *lparg5=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__III_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJI_3I_3I_3I_FUNC); +#endif + if (arg3) if ((lparg3 = env->GetIntArrayElements(arg3, NULL)) == NULL) goto fail; + if (arg4) if ((lparg4 = env->GetIntArrayElements(arg4, NULL)) == NULL) goto fail; + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5); +fail: + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); + if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0); + if (arg3 && lparg3) env->ReleaseIntArrayElements(arg3, lparg3, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__III_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJI_3I_3I_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__III_3I_3I_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJI_3I_3I_3I_3I) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3I_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jintArray arg5, jintArray arg6); @@ -1961,6 +2156,41 @@ fail: } #endif +#if (!defined(NO__1VtblCall__III_3I_3I_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJI_3I_3I_3J) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3I_3I_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jlongArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3I_3I_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jlongArray arg5) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3I_3I_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jlongArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3I_3I_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4, jlongArray arg5) +#endif +{ + jint *lparg3=NULL; + jint *lparg4=NULL; + jlong *lparg5=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__III_3I_3I_3J_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJI_3I_3I_3J_FUNC); +#endif + if (arg3) if ((lparg3 = env->GetIntArrayElements(arg3, NULL)) == NULL) goto fail; + if (arg4) if ((lparg4 = env->GetIntArrayElements(arg4, NULL)) == NULL) goto fail; + if (arg5) if ((lparg5 = env->GetLongArrayElements(arg5, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *, jint *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3, lparg4, lparg5); +fail: + if (arg5 && lparg5) env->ReleaseLongArrayElements(arg5, lparg5, 0); + if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0); + if (arg3 && lparg3) env->ReleaseIntArrayElements(arg3, lparg3, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__III_3I_3I_3J_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJI_3I_3I_3J_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIJ) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJ) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2); @@ -2093,6 +2323,130 @@ fail: } #endif +#if (!defined(NO__1VtblCall__IIJII_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJII_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jintArray arg5) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jintArray arg5) +#endif +{ + jint *lparg5=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJII_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJII_3I_FUNC); +#endif + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5); +fail: + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJII_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJII_3I_FUNC); +#endif + return rc; +} +#endif + +#if (!defined(NO__1VtblCall__IIJIJII) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJIJII) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJIJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jint arg5, jint arg6); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJIJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jint arg5, jint arg6) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJIJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jint arg5, jint arg6); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJIJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jint arg5, jint arg6) +#endif +{ + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJIJII_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJIJII_FUNC); +#endif + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jlong, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, arg6); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJIJII_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJIJII_FUNC); +#endif + return rc; +} +#endif + +#if (!defined(NO__1VtblCall__IIJIJJ_3I_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJIJJ_3I_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJIJJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jlong arg5, jintArray arg6, jintArray arg7, jintArray arg8); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJIJJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jlong arg5, jintArray arg6, jintArray arg7, jintArray arg8) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJIJJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jlong arg5, jintArray arg6, jintArray arg7, jintArray arg8); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJIJJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jlong arg5, jintArray arg6, jintArray arg7, jintArray arg8) +#endif +{ + jint *lparg6=NULL; + jint *lparg7=NULL; + jint *lparg8=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJIJJ_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJIJJ_3I_3I_3I_FUNC); +#endif + if (arg6) if ((lparg6 = env->GetIntArrayElements(arg6, NULL)) == NULL) goto fail; + if (arg7) if ((lparg7 = env->GetIntArrayElements(arg7, NULL)) == NULL) goto fail; + if (arg8) if ((lparg8 = env->GetIntArrayElements(arg8, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jlong, jlong, jint *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, lparg6, lparg7, lparg8); +fail: + if (arg8 && lparg8) env->ReleaseIntArrayElements(arg8, lparg8, 0); + if (arg7 && lparg7) env->ReleaseIntArrayElements(arg7, lparg7, 0); + if (arg6 && lparg6) env->ReleaseIntArrayElements(arg6, lparg6, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJIJJ_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJIJJ_3I_3I_3I_FUNC); +#endif + return rc; +} +#endif + +#if (!defined(NO__1VtblCall__IIJIJ_3I_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJIJ_3I_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJIJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jintArray arg5, jintArray arg6, jintArray arg7); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJIJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jintArray arg5, jintArray arg6, jintArray arg7) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJIJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jintArray arg5, jintArray arg6, jintArray arg7); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJIJ_3I_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlong arg4, jintArray arg5, jintArray arg6, jintArray arg7) +#endif +{ + jint *lparg5=NULL; + jint *lparg6=NULL; + jint *lparg7=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJIJ_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJIJ_3I_3I_3I_FUNC); +#endif + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + if (arg6) if ((lparg6 = env->GetIntArrayElements(arg6, NULL)) == NULL) goto fail; + if (arg7) if ((lparg7 = env->GetIntArrayElements(arg7, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jlong, jint *, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5, lparg6, lparg7); +fail: + if (arg7 && lparg7) env->ReleaseIntArrayElements(arg7, lparg7, 0); + if (arg6 && lparg6) env->ReleaseIntArrayElements(arg6, lparg6, 0); + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJIJ_3I_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJIJ_3I_3I_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIJI_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJI_3J) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4); @@ -2609,6 +2963,35 @@ fail: } #endif +#if (!defined(NO__1VtblCall__IIJJJ_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJJ_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4, jintArray arg5) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJJ_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4, jintArray arg5) +#endif +{ + jint *lparg5=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJJJ_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJJJ_3I_FUNC); +#endif + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jlong, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, lparg5); +fail: + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJJJ_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJJJ_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIJJJ_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJJ_3J) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4, jlongArray arg5); @@ -2879,6 +3262,38 @@ fail: } #endif +#if (!defined(NO__1VtblCall__IIJJ_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJ_3I_3I) && defined(JNI64)) +#ifndef JNI64 +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJ_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jintArray arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJ_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jintArray arg4, jintArray arg5) +#else +extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJ_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jintArray arg4, jintArray arg5); +JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJ_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jintArray arg4, jintArray arg5) +#endif +{ + jint *lparg4=NULL; + jint *lparg5=NULL; + jint rc = 0; +#ifndef JNI64 + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJJ_3I_3I_FUNC); +#else + XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJJ_3I_3I_FUNC); +#endif + if (arg4) if ((lparg4 = env->GetIntArrayElements(arg4, NULL)) == NULL) goto fail; + if (arg5) if ((lparg5 = env->GetIntArrayElements(arg5, NULL)) == NULL) goto fail; + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jint *, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5); +fail: + if (arg5 && lparg5) env->ReleaseIntArrayElements(arg5, lparg5, 0); + if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0); +#ifndef JNI64 + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJJ_3I_3I_FUNC); +#else + XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJJ_3I_3I_FUNC); +#endif + return rc; +} +#endif + #if (!defined(NO__1VtblCall__IIJJ_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJ_3J) && defined(JNI64)) #ifndef JNI64 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJ_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlongArray arg4); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp index f3b088a39d..3e9979b1bc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp @@ -14,8 +14,8 @@ #ifdef NATIVE_STATS -int XPCOM_nativeFunctionCount = 213; -int XPCOM_nativeFunctionCallCount[213]; +int XPCOM_nativeFunctionCount = 226; +int XPCOM_nativeFunctionCallCount[226]; char * XPCOM_nativeFunctionNames[] = { "GetAddress", #ifndef JNI64 @@ -134,6 +134,11 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJIIII_3I_3I", #endif #ifndef JNI64 + "_1VtblCall__IIIIII_3I_3I_3I", +#else + "_1VtblCall__IJIIII_3I_3I_3I", +#endif +#ifndef JNI64 "_1VtblCall__IIIII_3B_3BI", #else "_1VtblCall__IJIII_3B_3BI", @@ -149,6 +154,11 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJIII_3I", #endif #ifndef JNI64 + "_1VtblCall__IIIII_3I_3I_3I", +#else + "_1VtblCall__IJIII_3I_3I_3I", +#endif +#ifndef JNI64 "_1VtblCall__IIIIJJJJ", #else "_1VtblCall__IJIIJJJJ", @@ -199,6 +209,11 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJII_3I", #endif #ifndef JNI64 + "_1VtblCall__IIII_3I_3I", +#else + "_1VtblCall__IJII_3I_3I", +#endif +#ifndef JNI64 "_1VtblCall__IIII_3J", #else "_1VtblCall__IJII_3J", @@ -324,11 +339,31 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJI_3I", #endif #ifndef JNI64 + "_1VtblCall__III_3II", +#else + "_1VtblCall__IJI_3II", +#endif +#ifndef JNI64 + "_1VtblCall__III_3IJ", +#else + "_1VtblCall__IJI_3IJ", +#endif +#ifndef JNI64 + "_1VtblCall__III_3I_3I_3I", +#else + "_1VtblCall__IJI_3I_3I_3I", +#endif +#ifndef JNI64 "_1VtblCall__III_3I_3I_3I_3I", #else "_1VtblCall__IJI_3I_3I_3I_3I", #endif #ifndef JNI64 + "_1VtblCall__III_3I_3I_3J", +#else + "_1VtblCall__IJI_3I_3I_3J", +#endif +#ifndef JNI64 "_1VtblCall__IIJ", #else "_1VtblCall__IJJ", @@ -354,6 +389,26 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJJIIJ_3I_3J", #endif #ifndef JNI64 + "_1VtblCall__IIJII_3I", +#else + "_1VtblCall__IJJII_3I", +#endif +#ifndef JNI64 + "_1VtblCall__IIJIJII", +#else + "_1VtblCall__IJJIJII", +#endif +#ifndef JNI64 + "_1VtblCall__IIJIJJ_3I_3I_3I", +#else + "_1VtblCall__IJJIJJ_3I_3I_3I", +#endif +#ifndef JNI64 + "_1VtblCall__IIJIJ_3I_3I_3I", +#else + "_1VtblCall__IJJIJ_3I_3I_3I", +#endif +#ifndef JNI64 "_1VtblCall__IIJI_3J", #else "_1VtblCall__IJJI_3J", @@ -444,6 +499,11 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJJJJ_3B_3BJ", #endif #ifndef JNI64 + "_1VtblCall__IIJJJ_3I", +#else + "_1VtblCall__IJJJJ_3I", +#endif +#ifndef JNI64 "_1VtblCall__IIJJJ_3J", #else "_1VtblCall__IJJJJ_3J", @@ -489,6 +549,11 @@ char * XPCOM_nativeFunctionNames[] = { "_1VtblCall__IJJJ_3I", #endif #ifndef JNI64 + "_1VtblCall__IIJJ_3I_3I", +#else + "_1VtblCall__IJJJ_3I_3I", +#endif +#ifndef JNI64 "_1VtblCall__IIJJ_3J", #else "_1VtblCall__IJJJ_3J", diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h index b7263584f4..0e0c0dc3a4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h @@ -142,6 +142,11 @@ typedef enum { _1VtblCall__IJIIII_3I_3I_FUNC, #endif #ifndef JNI64 + _1VtblCall__IIIIII_3I_3I_3I_FUNC, +#else + _1VtblCall__IJIIII_3I_3I_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIIII_3B_3BI_FUNC, #else _1VtblCall__IJIII_3B_3BI_FUNC, @@ -157,6 +162,11 @@ typedef enum { _1VtblCall__IJIII_3I_FUNC, #endif #ifndef JNI64 + _1VtblCall__IIIII_3I_3I_3I_FUNC, +#else + _1VtblCall__IJIII_3I_3I_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIIIJJJJ_FUNC, #else _1VtblCall__IJIIJJJJ_FUNC, @@ -207,6 +217,11 @@ typedef enum { _1VtblCall__IJII_3I_FUNC, #endif #ifndef JNI64 + _1VtblCall__IIII_3I_3I_FUNC, +#else + _1VtblCall__IJII_3I_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIII_3J_FUNC, #else _1VtblCall__IJII_3J_FUNC, @@ -332,11 +347,31 @@ typedef enum { _1VtblCall__IJI_3I_FUNC, #endif #ifndef JNI64 + _1VtblCall__III_3II_FUNC, +#else + _1VtblCall__IJI_3II_FUNC, +#endif +#ifndef JNI64 + _1VtblCall__III_3IJ_FUNC, +#else + _1VtblCall__IJI_3IJ_FUNC, +#endif +#ifndef JNI64 + _1VtblCall__III_3I_3I_3I_FUNC, +#else + _1VtblCall__IJI_3I_3I_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__III_3I_3I_3I_3I_FUNC, #else _1VtblCall__IJI_3I_3I_3I_3I_FUNC, #endif #ifndef JNI64 + _1VtblCall__III_3I_3I_3J_FUNC, +#else + _1VtblCall__IJI_3I_3I_3J_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIJ_FUNC, #else _1VtblCall__IJJ_FUNC, @@ -362,6 +397,26 @@ typedef enum { _1VtblCall__IJJIIJ_3I_3J_FUNC, #endif #ifndef JNI64 + _1VtblCall__IIJII_3I_FUNC, +#else + _1VtblCall__IJJII_3I_FUNC, +#endif +#ifndef JNI64 + _1VtblCall__IIJIJII_FUNC, +#else + _1VtblCall__IJJIJII_FUNC, +#endif +#ifndef JNI64 + _1VtblCall__IIJIJJ_3I_3I_3I_FUNC, +#else + _1VtblCall__IJJIJJ_3I_3I_3I_FUNC, +#endif +#ifndef JNI64 + _1VtblCall__IIJIJ_3I_3I_3I_FUNC, +#else + _1VtblCall__IJJIJ_3I_3I_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIJI_3J_FUNC, #else _1VtblCall__IJJI_3J_FUNC, @@ -452,6 +507,11 @@ typedef enum { _1VtblCall__IJJJJ_3B_3BJ_FUNC, #endif #ifndef JNI64 + _1VtblCall__IIJJJ_3I_FUNC, +#else + _1VtblCall__IJJJJ_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIJJJ_3J_FUNC, #else _1VtblCall__IJJJJ_3J_FUNC, @@ -497,6 +557,11 @@ typedef enum { _1VtblCall__IJJJ_3I_FUNC, #endif #ifndef JNI64 + _1VtblCall__IIJJ_3I_3I_FUNC, +#else + _1VtblCall__IJJJ_3I_3I_FUNC, +#endif +#ifndef JNI64 _1VtblCall__IIJJ_3J_FUNC, #else _1VtblCall__IJJJ_3J_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java index bc3c8085d5..8507faa75d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java @@ -41,12 +41,13 @@ class Mozilla extends WebBrowser { XPCOMObject uriContentListener; XPCOMObject tooltipListener; XPCOMObject domEventListener; + XPCOMObject badCertListener; int chromeFlags = nsIWebBrowserChrome.CHROME_DEFAULT; int registerFunctionsOnState = 0; int refCount, lastKeyCode, lastCharCode, authCount; int /*long*/ request; Point location, size; - boolean visible, isChild, ignoreDispose; + boolean visible, isChild, ignoreDispose, isRetrievingBadCert, isViewingErrorPage; Shell tip = null; Listener listener; Vector unhookedDOMWindows = new Vector (); @@ -581,6 +582,10 @@ public void create (Composite parent, int style) { C.free (functionLoad.function); C.free (functionLoad.functionName); C.free (ptr); + if (functionPtr == 0) { + browser.dispose (); + error (XPCOM.NS_ERROR_NULL_POINTER); + } rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress (), 0, 0); if (rc == XPCOM.NS_OK) { System.setProperty (XULRUNNER_PATH, mozillaPath); @@ -787,6 +792,35 @@ public void create (Composite parent, int style) { error (rc); } observerService.Release (); + + if (IsXULRunner) { + int size = XPCOM.nsDynamicFunctionLoad_sizeof (); + /* alloc memory for two structs, the second is empty to signify the end of the list */ + ptr = C.malloc (size * 2); + C.memset (ptr, 0, size * 2); + nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad (); + byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_NotifyProfile", true); //$NON-NLS-1$ + functionLoad.functionName = C.malloc (bytes.length); + C.memmove (functionLoad.functionName, bytes, bytes.length); + functionLoad.function = C.malloc (C.PTR_SIZEOF); + C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF); + XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ()); + XPCOM.XPCOMGlueLoadXULFunctions (ptr); + C.memmove (result, functionLoad.function, C.PTR_SIZEOF); + int /*long*/ functionPtr = result[0]; + result[0] = 0; + C.free (functionLoad.function); + C.free (functionLoad.functionName); + C.free (ptr); + /* functionPtr == 0 for xulrunner < 1.9 */ + if (functionPtr != 0) { + rc = XPCOM.Call (functionPtr); + if (rc != XPCOM.NS_OK) { + browser.dispose (); + error (rc); + } + } + } } /* @@ -1630,6 +1664,13 @@ void createCOMInterfaces () { public int /*long*/ method2 (int /*long*/[] args) {return Release ();} public int /*long*/ method3 (int /*long*/[] args) {return HandleEvent (args[0]);} }; + + badCertListener = new XPCOMObject (new int[] {2, 0, 0, 4}) { + public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} + public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} + public int /*long*/ method2 (int /*long*/[] args) {return Release ();} + public int /*long*/ method3 (int /*long*/[] args) {return NotifyCertProblem (args[0], args[1], args[2], args[3]);} + }; } void deregisterFunction (BrowserFunction function) { @@ -1686,6 +1727,10 @@ void disposeCOMInterfaces () { domEventListener.dispose (); domEventListener = null; } + if (badCertListener != null) { + badCertListener.dispose (); + badCertListener = null; + } } public boolean execute (String script) { @@ -2544,6 +2589,11 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { AddRef (); return XPCOM.NS_OK; } + if (guid.Equals (nsIBadCertListener2.NS_IBADCERTLISTENER2_IID)) { + XPCOM.memmove (ppvObject, new int /*long*/[] {badCertListener.getAddress ()}, C.PTR_SIZEOF); + AddRef (); + return XPCOM.NS_OK; + } XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); return XPCOM.NS_ERROR_NO_INTERFACE; } @@ -2602,6 +2652,27 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF if ((aStateFlags & nsIWebProgressListener.STATE_IS_DOCUMENT) == 0) return XPCOM.NS_OK; if ((aStateFlags & nsIWebProgressListener.STATE_START) != 0) { + int /*long*/[] result = new int /*long*/[1]; + + /* + * When navigating to a site that is known to have a bad certificate, request notification + * callbacks on the channel so that our nsIBadCertListener2 will be invoked. + */ + if (isRetrievingBadCert) { + isRetrievingBadCert = false; + nsIRequest request = new nsIRequest (aRequest); + int rc = request.QueryInterface (nsIChannel.NS_ICHANNEL_IID, result); + if (rc != XPCOM.NS_OK) error (rc); + if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); + + nsIChannel channel = new nsIChannel (result[0]); + result[0] = 0; + rc = channel.SetNotificationCallbacks (interfaceRequestor.getAddress ()); + if (rc != XPCOM.NS_OK) error (rc); + channel.Release (); + return XPCOM.NS_OK; + } + if (request == 0) request = aRequest; registerFunctionsOnState = nsIWebProgressListener.STATE_IS_REQUEST | nsIWebProgressListener.STATE_START; /* @@ -2610,7 +2681,6 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF * process. These listeners cannot be added yet because the * nsIDOMWindow is not ready to take them at this stage. */ - int /*long*/[] result = new int /*long*/[1]; nsIWebProgress progress = new nsIWebProgress (aWebProgress); int rc = progress.GetDOMWindow (result); if (rc != XPCOM.NS_OK) error (rc); @@ -3287,6 +3357,7 @@ int OnShowContextMenu (int aContextFlags, int /*long*/ aEvent, int /*long*/ aNod /* nsIURIContentListener */ int OnStartURIOpen (int /*long*/ aURI, int /*long*/ retval) { + if (isRetrievingBadCert) return XPCOM.NS_OK; authCount = 0; nsIURI location = new nsIURI (aURI); @@ -3299,6 +3370,21 @@ int OnStartURIOpen (int /*long*/ aURI, int /*long*/ retval) { XPCOM.memmove (dest, buffer, length); XPCOM.nsEmbedCString_delete (aSpec); String value = new String (dest); + + /* + * Navigating to "...aboutCertError.xhtml", or to "javascript:showSecuritySection()" when + * the page "netError.xhtml" is showing, indicates that the last attempted page view had + * an invalid certificate. When this happens, veto the current navigate and re-navigate + * to the page with the bad certificate so that NotifyCertProblem will be invoked. + */ + if (value.indexOf ("aboutCertError.xhtml") != -1 || (isViewingErrorPage && value.indexOf ("javascript:showSecuritySection") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$ + XPCOM.memmove (retval, new int[] {1}, 4); /* PRBool */ + isRetrievingBadCert = true; + setUrl (lastNavigateURL); + return XPCOM.NS_OK; + } + isViewingErrorPage = value.indexOf ("netError.xhtml") != -1; //$NON-NLS-1$ + boolean doit = true; if (request == 0) { /* @@ -3338,7 +3424,7 @@ int OnStartURIOpen (int /*long*/ aURI, int /*long*/ retval) { if (rc != XPCOM.NS_OK) error (rc); setup.Release (); } - lastNavigateURL = value; + if (!isViewingErrorPage) lastNavigateURL = value; } } } @@ -3817,4 +3903,152 @@ int HandleEvent (int /*long*/ event) { } return XPCOM.NS_OK; } + +/* nsIBadCertListener2 */ + +int NotifyCertProblem (int /*long*/ socketInfo, int /*long*/ status, int /*long*/ targetSite, int /*long*/ _suppressError) { + /* determine the host name and port */ + int length = XPCOM.nsEmbedCString_Length (targetSite); + int /*long*/ buffer = XPCOM.nsEmbedCString_get (targetSite); + byte[] dest = new byte[length]; + XPCOM.memmove (dest, buffer, length); + final String urlPort = new String (dest); + int index = urlPort.indexOf (':'); + final String host = urlPort.substring (0,index); + final int port = Integer.valueOf (urlPort.substring (index + 1)).intValue (); + + /* create text descriptions of the certificate problem(s) */ + + int /*long*/[] result = new int /*long*/[1]; + nsISupports supports = new nsISupports (status); + int rc = supports.QueryInterface (nsISSLStatus.NS_ISSLSTATUS_IID, result); + if (rc != XPCOM.NS_OK) error (rc); + if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); + + nsISSLStatus sslStatus = new nsISSLStatus (result[0]); + result[0] = 0; + rc = sslStatus.GetServerCert (result); + if (rc != XPCOM.NS_OK) error (rc); + if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER); + + final nsIX509Cert cert = new nsIX509Cert (result[0]); + result[0] = 0; + String[] problems = new String[3]; + int problemCount = 0, flags = 0; + int[] intResult = new int[1]; + + rc = sslStatus.GetIsDomainMismatch (intResult); + if (intResult[0] != 0) { + int /*long*/ ptr = XPCOM.nsEmbedString_new (); + rc = cert.GetCommonName (ptr); + if (rc != XPCOM.NS_OK) SWT.error (rc); + length = XPCOM.nsEmbedString_Length (ptr); + buffer = XPCOM.nsEmbedString_get (ptr); + char[] chars = new char[length]; + XPCOM.memmove (chars, buffer, length * 2); + String name = new String (chars); + problems[problemCount++] = Compatibility.getMessage ("SWT_InvalidCert_InvalidName", new String[] {name}); //$NON-NLS-1$ + flags |= nsICertOverrideService.ERROR_MISMATCH; + XPCOM.nsEmbedString_delete (ptr); + } + intResult[0] = 0; + + rc = sslStatus.GetIsNotValidAtThisTime (intResult); + if (intResult[0] != 0) { + rc = cert.GetValidity (result); + if (rc != XPCOM.NS_OK) SWT.error (rc); + if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER); + + nsIX509CertValidity validity = new nsIX509CertValidity(result[0]); + result[0] = 0; + + int /*long*/ ptr = XPCOM.nsEmbedString_new (); + rc = validity.GetNotBeforeGMT (ptr); + if (rc != XPCOM.NS_OK) SWT.error (rc); + length = XPCOM.nsEmbedString_Length (ptr); + buffer = XPCOM.nsEmbedString_get (ptr); + char[] chars = new char[length]; + XPCOM.memmove (chars, buffer, length * 2); + String notBefore = new String (chars); + XPCOM.nsEmbedString_delete (ptr); + + ptr = XPCOM.nsEmbedString_new (); + rc = validity.GetNotAfterGMT (ptr); + if (rc != XPCOM.NS_OK) SWT.error (rc); + length = XPCOM.nsEmbedString_Length (ptr); + buffer = XPCOM.nsEmbedString_get (ptr); + chars = new char[length]; + XPCOM.memmove (chars, buffer, length * 2); + String notAfter = new String (chars); + XPCOM.nsEmbedString_delete (ptr); + + String range = notBefore + " - " + notAfter; //$NON-NLS-1$ + problems[problemCount++] = Compatibility.getMessage ("SWT_InvalidCert_NotValid", new String[] {range}); //$NON-NLS-1$ + flags |= nsICertOverrideService.ERROR_TIME; + validity.Release (); + } + intResult[0] = 0; + + rc = sslStatus.GetIsUntrusted (intResult); + if (intResult[0] != 0) { + int /*long*/ ptr = XPCOM.nsEmbedString_new (); + rc = cert.GetIssuerCommonName (ptr); + if (rc != XPCOM.NS_OK) SWT.error (rc); + length = XPCOM.nsEmbedString_Length (ptr); + buffer = XPCOM.nsEmbedString_get (ptr); + char[] chars = new char[length]; + XPCOM.memmove (chars, buffer, length * 2); + String name = new String (chars); + problems[problemCount++] = Compatibility.getMessage ("SWT_InvalidCert_NotTrusted", new String[] {name}); //$NON-NLS-1$ + flags |= nsICertOverrideService.ERROR_UNTRUSTED; + XPCOM.nsEmbedString_delete (ptr); + } + intResult[0] = 0; + sslStatus.Release (); + + /* + * The invalid certificate dialog must be shown asynchronously because + * NotifyCertProblem implementations cannot block. + */ + final int finalFlags = flags; + final String[] finalProblems = new String[problemCount]; + System.arraycopy (problems, 0, finalProblems, 0, problemCount); + final String url = lastNavigateURL; + browser.getDisplay().asyncExec(new Runnable() { + public void run() { + if (browser.isDisposed ()) return; + if (!url.equals (lastNavigateURL)) return; /* user has navigated elsewhere */ + + String message = Compatibility.getMessage ("SWT_InvalidCert_Message", new String[] {urlPort}); //$NON-NLS-1$ + if (new PromptDialog (browser.getShell ()).invalidCert (browser, message, finalProblems, cert)) { + int /*long*/[] result = new int /*long*/[1]; + int rc = XPCOM.NS_GetServiceManager (result); + if (rc != XPCOM.NS_OK) error (rc); + if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); + + nsIServiceManager serviceManager = new nsIServiceManager (result[0]); + result[0] = 0; + byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_CERTOVERRIDE_CONTRACTID, true); + rc = serviceManager.GetServiceByContractID (aContractID, nsICertOverrideService.NS_ICERTOVERRIDESERVICE_IID, result); + if (rc != XPCOM.NS_OK) error (rc); + if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); + serviceManager.Release (); + + nsICertOverrideService overrideService = new nsICertOverrideService (result[0]); + result[0] = 0; + byte[] hostBytes = MozillaDelegate.wcsToMbcs (null, host, false); + int /*long*/ hostString = XPCOM.nsEmbedCString_new (hostBytes, hostBytes.length); + rc = overrideService.RememberValidityOverride (hostString, port, cert.getAddress (), finalFlags, 1); + browser.setUrl (url); + XPCOM.nsEmbedCString_delete (hostString); + overrideService.Release (); + } + cert.Release (); + } + }); + + C.memmove (_suppressError, new int[] {1}, 4); /* PRInt32 */ + return XPCOM.NS_OK; +} + } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java index f4558d082f..df4267434e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java @@ -11,6 +11,10 @@ package org.eclipse.swt.browser; import org.eclipse.swt.*; +import org.eclipse.swt.custom.*; +import org.eclipse.swt.graphics.*; +import org.eclipse.swt.internal.Compatibility; +import org.eclipse.swt.internal.mozilla.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; @@ -69,6 +73,140 @@ class PromptDialog extends Dialog { } } + boolean invalidCert(final Browser browser, String message, String[] problems, final nsIX509Cert cert) { + Shell parent = getParent(); + Display display = parent.getDisplay(); + Monitor monitor = parent.getMonitor(); + int maxWidth = monitor.getBounds().width * 2 / 3; + final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); + shell.setText(Compatibility.getMessage("SWT_InvalidCert_Title")); //$NON-NLS-1$ + shell.setLayout(new GridLayout()); + + Composite messageComposite = new Composite(shell, SWT.NONE); + messageComposite.setLayout(new GridLayout(2, false)); + Image image = display.getSystemImage(SWT.ICON_WARNING); + new Label(messageComposite, SWT.NONE).setImage(image); + Text text = new Text(messageComposite, SWT.WRAP); + text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + text.setEditable(false); + text.setBackground(shell.getBackground()); + text.setText(message); + int width = messageComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x; + GridData data = new GridData(); + data.widthHint = Math.min(width, maxWidth); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + messageComposite.setLayoutData(data); + + StyledText problemsText = new StyledText(shell, SWT.WRAP); + problemsText.setMargins(30, 0, 30, 0); + problemsText.setEditable(false); + problemsText.setBackground(shell.getBackground()); + for (int i = 0; i < problems.length; i++) { + problemsText.append(problems[i] + '\n'); + } + StyleRange style = new StyleRange(); + style.metrics = new GlyphMetrics(0, 0, 30); + Bullet bullet0 = new Bullet (style); + problemsText.setLineBullet(0, problems.length, bullet0); + width = problemsText.computeSize(SWT.DEFAULT, SWT.DEFAULT).x; + data = new GridData(); + data.widthHint = Math.min(width, maxWidth); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + problemsText.setLayoutData(data); + + text = new Text(shell, SWT.SINGLE); + text.setEditable(false); + text.setBackground(shell.getBackground()); + text.setText(Compatibility.getMessage("SWT_InvalidCert_Connect")); //$NON-NLS-1$ + + new Label(shell, SWT.NONE); /* vertical spacer */ + + /* + * Create a local invisible Browser to be passed to the ViewCert call, + * so that this prompter can be the certificate view dialog's parent. + */ + final Browser localBrowser = new Browser(shell, browser.getStyle()); + data = new GridData(); + data.exclude = true; + localBrowser.setLayoutData(data); + + Composite buttonsComposite = new Composite(shell, SWT.NONE); + buttonsComposite.setLayout(new GridLayout(3, true)); + buttonsComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false)); + + Button viewCertButton = new Button(buttonsComposite, SWT.PUSH); + viewCertButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); + viewCertButton.setText(Compatibility.getMessage("View Certificate")); //$NON-NLS-1$ + viewCertButton.addListener(SWT.Selection, new Listener() { + public void handleEvent(Event event) { + int /*long*/[] result = new int /*long*/[1]; + int rc = XPCOM.NS_GetServiceManager (result); + if (rc != XPCOM.NS_OK) Mozilla.error (rc); + if (result[0] == 0) Mozilla.error (XPCOM.NS_NOINTERFACE); + + nsIServiceManager serviceManager = new nsIServiceManager(result[0]); + result[0] = 0; + byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_CERTIFICATEDIALOGS_CONTRACTID, true); + rc = serviceManager.GetServiceByContractID (aContractID, nsICertificateDialogs.NS_ICERTIFICATEDIALOGS_IID, result); + if (rc != XPCOM.NS_OK) Mozilla.error (rc); + if (result[0] == 0) Mozilla.error (XPCOM.NS_NOINTERFACE); + serviceManager.Release(); + + nsICertificateDialogs dialogs = new nsICertificateDialogs(result[0]); + result[0] = 0; + + /* + * Bug in Mozilla. The certificate viewer dialog does not show its content when + * opened. The workaround is to periodically wake up the UI thread. + */ + Runnable runnable = new Runnable() { + public void run() { + browser.getDisplay().timerExec(1000, this); + } + }; + runnable.run(); + + rc = ((Mozilla)localBrowser.webBrowser).webBrowser.GetContentDOMWindow(result); + if (rc != XPCOM.NS_OK) Mozilla.error (rc); + if (result[0] == 0) Mozilla.error (XPCOM.NS_NOINTERFACE); + nsIDOMWindow window = new nsIDOMWindow(result[0]); + result[0] = 0; + + rc = dialogs.ViewCert(window.getAddress(), cert.getAddress()); + browser.getDisplay().timerExec(-1, runnable); + window.Release(); + dialogs.Release(); + } + }); + + final Button okButton = new Button(buttonsComposite, SWT.PUSH); + okButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); + okButton.setText(Compatibility.getMessage("SWT_OK")); //$NON-NLS-1$ + Button cancelButton = new Button(buttonsComposite, SWT.PUSH); + cancelButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); + cancelButton.setText(Compatibility.getMessage("SWT_Cancel")); //$NON-NLS-1$ + final boolean[] result = new boolean[1]; + Listener listener = new Listener() { + public void handleEvent(Event event) { + shell.dispose(); + result[0] = event.widget == okButton; + } + }; + okButton.addListener(SWT.Selection, listener); + cancelButton.addListener(SWT.Selection, listener); + + cancelButton.setFocus(); + shell.setDefaultButton(cancelButton); + shell.pack(); + shell.open(); + while (!shell.isDisposed()) { + if (!display.readAndDispatch()) display.sleep(); + } + return result[0]; + } + void confirmEx(String title, String text, String check, String button0, String button1, String button2, int defaultIndex, final int[] checkValue, final int[] result) { Shell parent = getParent(); final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java index 41452c212b..e41b97a2f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java @@ -149,7 +149,7 @@ String getLabel (int buttonFlag, int index, int /*long*/ buttonTitle) { /* nsIPromptService */ int Alert (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText) { - Browser browser = getBrowser (aParent); + final Browser browser = getBrowser (aParent); int length = XPCOM.strlen_PRUnichar (aDialogTitle); char[] dest = new char[length]; @@ -161,6 +161,25 @@ int Alert (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText) XPCOM.memmove (dest, aText, length * 2); String textLabel = new String (dest); + /* + * If mozilla is showing its errors with dialogs (as opposed to pages) then the only + * opportunity to detect that a page has an invalid certificate, without receiving + * all notification callbacks on the channel, is to detect the displaying of an alert + * whose message contains an internal cert error code. If a such a message is + * detected then instead of showing it, re-navigate to the page with the invalid + * certificate so that the browser's nsIBadCertListener2 will be invoked. + */ + if (textLabel.indexOf ("ssl_error_bad_cert_domain") != -1 || + textLabel.indexOf ("sec_error_unknown_issuer") != -1 || + textLabel.indexOf ("sec_error_expired_certificate") != -1) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + if (browser != null) { + Mozilla mozilla = (Mozilla)browser.webBrowser; + mozilla.isRetrievingBadCert = true; + browser.setUrl (mozilla.lastNavigateURL); + return XPCOM.NS_OK; + } + } + Shell shell = browser == null ? new Shell () : browser.getShell (); MessageBox messageBox = new MessageBox (shell, SWT.OK | SWT.ICON_WARNING); messageBox.setText (titleLabel); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java index bebef9393b..f474386816 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java @@ -61,6 +61,8 @@ public class XPCOM extends C { public static final nsID NS_PROMPTSERVICE_CID = new nsID("a2112d6a-0e28-421f-b46a-25c0b308cbd0"); //$NON-NLS-1$ public static final String EXTERNAL_CONTRACTID = "@eclipse.org/external;1"; //$NON-NLS-1$ + public static final String NS_CERTOVERRIDE_CONTRACTID = "@mozilla.org/security/certoverride;1"; //$NON-NLS-1$ + public static final String NS_CERTIFICATEDIALOGS_CONTRACTID = "@mozilla.org/nsCertificateDialogs;1"; //$NON-NLS-1$ public static final String NS_CONTEXTSTACK_CONTRACTID = "@mozilla.org/js/xpc/ContextStack;1"; //$NON-NLS-1$ public static final String NS_COOKIEMANAGER_CONTRACTID = "@mozilla.org/cookiemanager;1"; //$NON-NLS-1$ public static final String NS_COOKIESERVICE_CONTRACTID = "@mozilla.org/cookieService;1"; //$NON-NLS-1$ @@ -904,6 +906,24 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long [] arg0, long lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int arg2); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int arg2) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2); + } finally { + lock.unlock(); + } +} +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, long arg2); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, long arg2) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long [] arg0, long [] arg1, long [] arg2); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long [] arg0, long [] arg1, long [] arg2) { lock.lock(); @@ -1429,6 +1449,15 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int[] arg3); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int[] arg3) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long[] arg3); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long[] arg3) { lock.lock(); @@ -1456,6 +1485,24 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] a lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3); + } finally { + lock.unlock(); + } +} +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, long[] arg3); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, long[] arg3) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, int arg3); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, int arg3) { lock.lock(); @@ -1564,6 +1611,33 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, short[] arg0, long lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, int[] arg3); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, int[] arg3) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3); + } finally { + lock.unlock(); + } +} +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int[] arg2, int[] arg3); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int[] arg2, int[] arg3) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3); + } finally { + lock.unlock(); + } +} +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int[] arg2, int[] arg3); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int[] arg2, int[] arg3) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int arg4); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int arg4) { @@ -1683,6 +1757,15 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, nsID arg lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long arg2, int arg3, int arg4); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long arg2, int arg3, int arg4) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, byte[] arg2, byte[] arg3, int arg4, int[] arg5); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, byte[] arg2, byte[] arg3, int arg4, int[] arg5) { @@ -1920,6 +2003,24 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int[] arg3, int[] arg4, int[] arg5); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int[] arg3, int[] arg4, int[] arg5) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5); + } finally { + lock.unlock(); + } +} +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long arg2, int[] arg3, int[] arg4, int[] arg5); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long arg2, int[] arg3, int[] arg4, int[] arg5) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int arg3, int[] arg4, int[] arg5, int[] arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int arg3, int[] arg4, int[] arg5, int[] arg6) { @@ -1930,7 +2031,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] ar lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int arg3, long[] arg4, int[] arg5, int[] arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int arg3, long[] arg4, int[] arg5, int[] arg6) { lock.lock(); @@ -1940,7 +2040,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] a lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, char[] arg4, int[] arg5, int[] arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, char[] arg4, int[] arg5, int[] arg6) { lock.lock(); @@ -1950,7 +2049,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] ar lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long[] arg3, char[] arg4, int[] arg5, int[] arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long[] arg3, char[] arg4, int[] arg5, int[] arg6) { lock.lock(); @@ -1960,7 +2058,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] a lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, int[] arg5, int[] arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, int[] arg5, int[] arg6) { lock.lock(); @@ -1970,7 +2067,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, long arg3, char[] arg4, int[] arg5, int[] arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, long arg3, char[] arg4, int[] arg5, int[] arg6) { lock.lock(); @@ -1980,7 +2076,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, long arg4, int arg5, int arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, long arg4, int arg5, int arg6) { lock.lock(); @@ -1990,7 +2085,6 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, lock.unlock(); } } - static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) { lock.lock(); @@ -2000,6 +2094,24 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg lock.unlock(); } } +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int[] arg4, int[] arg5, int[] arg6); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int[] arg4, int[] arg5, int[] arg6) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6); + } finally { + lock.unlock(); + } +} +static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long arg2, long arg3, int[] arg4, int[] arg5, int[] arg6); +static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long arg2, long arg3, int[] arg4, int[] arg5, int[] arg6) { + lock.lock(); + try { + return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6); + } finally { + lock.unlock(); + } +} static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, int[] arg4, char[] arg5, int[] arg6, int[] arg7); static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, int[] arg4, char[] arg5, int[] arg6, int[] arg7) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIBadCertListener2.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIBadCertListener2.java new file mode 100644 index 0000000000..361bc5d15b --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIBadCertListener2.java @@ -0,0 +1,47 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and SWT + * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. + * + * ***** END LICENSE BLOCK ***** */ +package org.eclipse.swt.internal.mozilla; + +public class nsIBadCertListener2 extends nsISupports { + + static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1; + + public static final String NS_IBADCERTLISTENER2_IID_STR = + "2c3d268c-ad82-49f3-99aa-e9ffddd7a0dc"; + + public static final nsID NS_IBADCERTLISTENER2_IID = + new nsID(NS_IBADCERTLISTENER2_IID_STR); + + public nsIBadCertListener2(int /*long*/ address) { + super(address); + } + + public int NotifyCertProblem(int /*long*/ socketInfo, int /*long*/ status, int /*long*/ targetSite, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), socketInfo, status, targetSite, _retval); + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java new file mode 100644 index 0000000000..bd5752a560 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java @@ -0,0 +1,73 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and SWT + * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. + * + * ***** END LICENSE BLOCK ***** */ +package org.eclipse.swt.internal.mozilla; + +public class nsICertOverrideService extends nsISupports { + + static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 6; + + public static final String NS_ICERTOVERRIDESERVICE_IID_STR = + "31738d2a-77d3-4359-84c9-4be2f38fb8c5"; + + public static final nsID NS_ICERTOVERRIDESERVICE_IID = + new nsID(NS_ICERTOVERRIDESERVICE_IID_STR); + + public nsICertOverrideService(int /*long*/ address) { + super(address); + } + + public static final int ERROR_UNTRUSTED = 1; + + public static final int ERROR_MISMATCH = 2; + + public static final int ERROR_TIME = 4; + + public int RememberValidityOverride(int /*long*/ aHostName, int aPort, int /*long*/ aCert, int aOverrideBits, int aTemporary) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aHostName, aPort, aCert, aOverrideBits, aTemporary); + } + + public int HasMatchingOverride(int /*long*/ aHostName, int aPort, int /*long*/ aCert, int[] aOverrideBits, int[] aIsTemporary, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aHostName, aPort, aCert, aOverrideBits, aIsTemporary, _retval); + } + + public int GetValidityOverride(int /*long*/ aHostName, int aPort, int /*long*/ aHashAlg, int /*long*/ aFingerprint, int[] aOverrideBits, int[] aIsTemporary, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aHostName, aPort, aHashAlg, aFingerprint, aOverrideBits, aIsTemporary, _retval); + } + + public int ClearValidityOverride(int /*long*/ aHostName, int aPort) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aHostName, aPort); + } + + public int GetAllOverrideHostsWithPorts(int[] aCount, int /*long*/[] aHostsWithPortsArray) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aCount, aHostsWithPortsArray); + } + + public int IsCertUsedForOverrides(int /*long*/ aCert, int aCheckTemporaries, int aCheckPermanents, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aCert, aCheckTemporaries, aCheckPermanents, _retval); + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java new file mode 100644 index 0000000000..44d581d4bd --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java @@ -0,0 +1,67 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and SWT + * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. + * + * ***** END LICENSE BLOCK ***** */ +package org.eclipse.swt.internal.mozilla; + +public class nsICertificateDialogs extends nsISupports { + + static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 6; + + public static final String NS_ICERTIFICATEDIALOGS_IID_STR = + "a03ca940-09be-11d5-ac5d-000064657374"; + + public static final nsID NS_ICERTIFICATEDIALOGS_IID = + new nsID(NS_ICERTIFICATEDIALOGS_IID_STR); + + public nsICertificateDialogs(int /*long*/ address) { + super(address); + } + + public int ConfirmDownloadCACert(int /*long*/ ctx, int /*long*/ cert, int[] trust, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), ctx, cert, trust, _retval); + } + + public int NotifyCACertExists(int /*long*/ ctx) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), ctx); + } + + public int SetPKCS12FilePassword(int /*long*/ ctx, int /*long*/ password, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), ctx, password, _retval); + } + + public int GetPKCS12FilePassword(int /*long*/ ctx, int /*long*/ password, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), ctx, password, _retval); + } + + public int ViewCert(int /*long*/ ctx, int /*long*/ cert) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), ctx, cert); + } + + public int CrlImportStatusDialog(int /*long*/ ctx, int /*long*/ crl) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), ctx, crl); + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISSLStatus.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISSLStatus.java new file mode 100644 index 0000000000..2754d624de --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISSLStatus.java @@ -0,0 +1,71 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and SWT + * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. + * + * ***** END LICENSE BLOCK ***** */ +package org.eclipse.swt.internal.mozilla; + +public class nsISSLStatus extends nsISupports { + + static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 7; + + public static final String NS_ISSLSTATUS_IID_STR = + "cfede939-def1-49be-81ed-d401b3a07d1c"; + + public static final nsID NS_ISSLSTATUS_IID = + new nsID(NS_ISSLSTATUS_IID_STR); + + public nsISSLStatus(int /*long*/ address) { + super(address); + } + + public int GetServerCert(int /*long*/[] aServerCert) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aServerCert); + } + + public int GetCipherName(int /*long*/[] aCipherName) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aCipherName); + } + + public int GetKeyLength(int[] aKeyLength) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aKeyLength); + } + + public int GetSecretKeyLength(int[] aSecretKeyLength) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aSecretKeyLength); + } + + public int GetIsDomainMismatch(int[] aIsDomainMismatch) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aIsDomainMismatch); + } + + public int GetIsNotValidAtThisTime(int[] aIsNotValidAtThisTime) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aIsNotValidAtThisTime); + } + + public int GetIsUntrusted(int[] aIsUntrusted) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aIsUntrusted); + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509Cert.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509Cert.java new file mode 100644 index 0000000000..6023055154 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509Cert.java @@ -0,0 +1,203 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and SWT + * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. + * + * ***** END LICENSE BLOCK ***** */ +package org.eclipse.swt.internal.mozilla; + +public class nsIX509Cert extends nsISupports { + + static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 27; + + public static final String NS_IX509CERT_IID_STR = + "f0980f60-ee3d-11d4-998b-00b0d02354a0"; + + public static final nsID NS_IX509CERT_IID = + new nsID(NS_IX509CERT_IID_STR); + + public nsIX509Cert(int /*long*/ address) { + super(address); + } + + public int GetNickname(int /*long*/ aNickname) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aNickname); + } + + public int GetEmailAddress(int /*long*/ aEmailAddress) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aEmailAddress); + } + + public int GetEmailAddresses(int[] length, int /*long*/[] addresses) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), length, addresses); + } + + public int ContainsEmailAddress(int /*long*/ aEmailAddress, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aEmailAddress, _retval); + } + + public int GetSubjectName(int /*long*/ aSubjectName) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aSubjectName); + } + + public int GetCommonName(int /*long*/ aCommonName) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aCommonName); + } + + public int GetOrganization(int /*long*/ aOrganization) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aOrganization); + } + + public int GetOrganizationalUnit(int /*long*/ aOrganizationalUnit) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aOrganizationalUnit); + } + + public int GetSha1Fingerprint(int /*long*/ aSha1Fingerprint) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aSha1Fingerprint); + } + + public int GetMd5Fingerprint(int /*long*/ aMd5Fingerprint) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aMd5Fingerprint); + } + + public int GetTokenName(int /*long*/ aTokenName) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aTokenName); + } + + public int GetIssuerName(int /*long*/ aIssuerName) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aIssuerName); + } + + public int GetSerialNumber(int /*long*/ aSerialNumber) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aSerialNumber); + } + + public int GetIssuerCommonName(int /*long*/ aIssuerCommonName) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aIssuerCommonName); + } + + public int GetIssuerOrganization(int /*long*/ aIssuerOrganization) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aIssuerOrganization); + } + + public int GetIssuerOrganizationUnit(int /*long*/ aIssuerOrganizationUnit) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aIssuerOrganizationUnit); + } + + public int GetIssuer(int /*long*/[] aIssuer) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aIssuer); + } + + public int GetValidity(int /*long*/[] aValidity) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aValidity); + } + + public int GetDbKey(int /*long*/[] aDbKey) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aDbKey); + } + + public int GetWindowTitle(int /*long*/[] aWindowTitle) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aWindowTitle); + } + + public static final int UNKNOWN_CERT = 0; + + public static final int CA_CERT = 1; + + public static final int USER_CERT = 2; + + public static final int EMAIL_CERT = 4; + + public static final int SERVER_CERT = 8; + + public static final int VERIFIED_OK = 0; + + public static final int NOT_VERIFIED_UNKNOWN = 1; + + public static final int CERT_REVOKED = 2; + + public static final int CERT_EXPIRED = 4; + + public static final int CERT_NOT_TRUSTED = 8; + + public static final int ISSUER_NOT_TRUSTED = 16; + + public static final int ISSUER_UNKNOWN = 32; + + public static final int INVALID_CA = 64; + + public static final int USAGE_NOT_ALLOWED = 128; + + public static final int CERT_USAGE_SSLClient = 0; + + public static final int CERT_USAGE_SSLServer = 1; + + public static final int CERT_USAGE_SSLServerWithStepUp = 2; + + public static final int CERT_USAGE_SSLCA = 3; + + public static final int CERT_USAGE_EmailSigner = 4; + + public static final int CERT_USAGE_EmailRecipient = 5; + + public static final int CERT_USAGE_ObjectSigner = 6; + + public static final int CERT_USAGE_UserCertImport = 7; + + public static final int CERT_USAGE_VerifyCA = 8; + + public static final int CERT_USAGE_ProtectedObjectSigner = 9; + + public static final int CERT_USAGE_StatusResponder = 10; + + public static final int CERT_USAGE_AnyCA = 11; + + public int GetChain(int /*long*/[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), _retval); + } + + public int GetUsagesArray(int ignoreOcsp, int[] verified, int[] count, int /*long*/[] usages) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), ignoreOcsp, verified, count, usages); + } + + public int GetUsagesString(int ignoreOcsp, int[] verified, int /*long*/ usages) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), ignoreOcsp, verified, usages); + } + + public int VerifyForUsage(int usage, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), usage, _retval); + } + + public int GetASN1Structure(int /*long*/[] aASN1Structure) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aASN1Structure); + } + + public int GetRawDER(int[] length, int /*long*/[] data) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), length, data); + } + + public int Equals(int /*long*/ other, int[] _retval) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), other, _retval); + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java new file mode 100644 index 0000000000..2357b4d704 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java @@ -0,0 +1,75 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by Netscape are Copyright (C) 1998-1999 + * Netscape Communications Corporation. All Rights Reserved. + * + * Contributor(s): + * + * IBM + * - Binding to permit interfacing between Mozilla and SWT + * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. + * + * ***** END LICENSE BLOCK ***** */ +package org.eclipse.swt.internal.mozilla; + +public class nsIX509CertValidity extends nsISupports { + + static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8; + + public static final String NS_IX509CERTVALIDITY_IID_STR = + "e701dfd8-1dd1-11b2-a172-ffa6cc6156ad"; + + public static final nsID NS_IX509CERTVALIDITY_IID = + new nsID(NS_IX509CERTVALIDITY_IID_STR); + + public nsIX509CertValidity(int /*long*/ address) { + super(address); + } + + public int GetNotBefore(int /*long*/ aNotBefore) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aNotBefore); + } + + public int GetNotBeforeLocalTime(int /*long*/ aNotBeforeLocalTime) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aNotBeforeLocalTime); + } + + public int GetNotBeforeLocalDay(int /*long*/ aNotBeforeLocalDay) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aNotBeforeLocalDay); + } + + public int GetNotBeforeGMT(int /*long*/ aNotBeforeGMT) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aNotBeforeGMT); + } + + public int GetNotAfter(int /*long*/ aNotAfter) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aNotAfter); + } + + public int GetNotAfterLocalTime(int /*long*/ aNotAfterLocalTime) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aNotAfterLocalTime); + } + + public int GetNotAfterLocalDay(int /*long*/ aNotAfterLocalDay) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aNotAfterLocalDay); + } + + public int GetNotAfterGMT(int /*long*/ aNotAfterGMT) { + return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aNotAfterGMT); + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties b/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties index 04dbd0f4e5..1aef25673b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties +++ b/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties @@ -72,4 +72,10 @@ SWT_Download_Started=Downloading... SWT_Download_Status=Download: {0,number,integer} KB of {1,number,integer} KB SWT_Authentication_Required=Authentication Required SWT_Enter_Username_and_Password=Enter user name and password for {0} at {1} -SWT_Page_Load_Failed=Page load failed with error: {0}
\ No newline at end of file +SWT_Page_Load_Failed=Page load failed with error: {0} +SWT_InvalidCert_Title=Invalid Certificate +SWT_InvalidCert_Message=The security certificate presented by "{0}" has the following problem(s): +SWT_InvalidCert_InvalidName=Certificate name is invalid or does not match site name. Certificate issued to: "{0}". +SWT_InvalidCert_NotValid=Certificate is not currently valid. Valid date range: "{0}". +SWT_InvalidCert_NotTrusted=Certificate is not from a trusted certifying authority. Certificate issuer: "{0}". +SWT_InvalidCert_Connect=Would you like to connect to this site anyways? |