Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2011-01-10 14:44:10 +0000
committerLakshmi Shanmugam2011-01-10 14:44:10 +0000
commitb2a2946474c8e79cc927b1b698d3eeb96c83a55a (patch)
tree2d655ecdaf38878f55249c2cbc85c26b21f9215c /bundles/org.eclipse.swt/Eclipse SWT PI/win32/org
parent0656dc6133d5f888f79be6f4fb7bb3866308fc01 (diff)
downloadeclipse.platform.swt-b2a2946474c8e79cc927b1b698d3eeb96c83a55a.tar.gz
eclipse.platform.swt-b2a2946474c8e79cc927b1b698d3eeb96c83a55a.tar.xz
eclipse.platform.swt-b2a2946474c8e79cc927b1b698d3eeb96c83a55a.zip
Show invalid certificate details
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/win32/org')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java40
9 files changed, 215 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java
new file mode 100644
index 0000000000..3af500ef6b
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_CONTEXT.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CERT_CONTEXT {
+ public int dwCertEncodingType;
+ /** @field cast=(BYTE *) */
+ public int /*long*/ pbCertEncoded;
+ public int cbCertEncoded;
+ /** @field cast=(PCERT_INFO) */
+ public int /*long*/ pCertInfo;
+ /** @field cast=(HCERTSTORE) */
+ public int /*long*/ hCertStore;
+
+ public static final int sizeof = OS.CERT_CONTEXT_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java
new file mode 100644
index 0000000000..27e2618665
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_INFO.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CERT_INFO {
+ public int dwVersion;
+ public CRYPT_INTEGER_BLOB SerialNumber = new CRYPT_INTEGER_BLOB ();
+ public CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm = new CRYPT_ALGORITHM_IDENTIFIER ();
+ public CERT_NAME_BLOB Issuer = new CERT_NAME_BLOB ();
+ public FILETIME NotBefore = new FILETIME ();
+ public FILETIME NotAfter = new FILETIME ();
+ public CERT_NAME_BLOB Subject = new CERT_NAME_BLOB ();
+ public CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo = new CERT_PUBLIC_KEY_INFO ();
+ public CRYPT_BIT_BLOB IssuerUniqueId = new CRYPT_BIT_BLOB ();
+ public CRYPT_BIT_BLOB SubjectUniqueId = new CRYPT_BIT_BLOB ();
+ public int cExtension;
+ /** @field cast=(PCERT_EXTENSION) */
+ public int /*long*/ rgExtension;
+
+ public static final int sizeof = OS.CERT_INFO_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java
new file mode 100644
index 0000000000..4ee97980a8
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_NAME_BLOB.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CERT_NAME_BLOB {
+ public int cbData;
+ /** @field cast=(BYTE *) */
+ public int /*long*/ pbData;
+
+ static final public int sizeof = OS.CERT_NAME_BLOB_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
new file mode 100644
index 0000000000..10a62e1d52
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CERT_PUBLIC_KEY_INFO {
+ public CRYPT_ALGORITHM_IDENTIFIER Algorithm = new CRYPT_ALGORITHM_IDENTIFIER ();
+ public CRYPT_BIT_BLOB PublicKey = new CRYPT_BIT_BLOB ();
+
+ static final public int sizeof = OS.CERT_PUBLIC_KEY_INFO_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java
new file mode 100644
index 0000000000..53dfbd7190
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_ALGORITHM_IDENTIFIER.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CRYPT_ALGORITHM_IDENTIFIER {
+ /** @field cast=(LPSTR) */
+ public int /*long*/ pszObjId;
+ public CRYPT_OBJID_BLOB Parameters = new CRYPT_OBJID_BLOB ();
+
+ static final public int sizeof = OS.CRYPT_ALGORITHM_IDENTIFIER_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java
new file mode 100644
index 0000000000..da4a261372
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_BIT_BLOB.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CRYPT_BIT_BLOB {
+ public int cbData;
+ /** @field cast=(BYTE *) */
+ public int /*long*/ pbData;
+ public int cUnusedBits;
+
+ static final public int sizeof = OS.CRYPT_BIT_BLOB_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java
new file mode 100644
index 0000000000..7b016303d2
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_INTEGER_BLOB.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CRYPT_INTEGER_BLOB {
+ public int cbData;
+ /** @field cast=(BYTE *) */
+ public int /*long*/ pbData;
+
+ static final public int sizeof = OS.CRYPT_INTEGER_BLOB_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java
new file mode 100644
index 0000000000..309b0e2e06
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CRYPT_OBJID_BLOB.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+
+public class CRYPT_OBJID_BLOB {
+ public int cbData;
+ /** @field cast=(BYTE *) */
+ public int /*long*/ pbData;
+
+ static final public int sizeof = OS.CRYPT_OBJID_BLOB_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index 4f76789b90..0cb294e66f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
@@ -438,6 +438,7 @@ public class OS extends C {
public static final int CDRF_NOTIFYSUBITEMDRAW = 0x00000020;
public static final int CDRF_SKIPDEFAULT = 0x04;
public static final int CDRF_SKIPPOSTPAINT = 0x00000100;
+ public static final int CERT_SIMPLE_NAME_STR = 1;
public static final int CFE_AUTOCOLOR = 0x40000000;
public static final int CFE_ITALIC = 0x2;
public static final int CFE_STRIKEOUT = 0x8;
@@ -2219,6 +2220,7 @@ public class OS extends C {
public static final int WM_XBUTTONDBLCLK = 0x020D;
public static final int XBUTTON1 = 0x1;
public static final int XBUTTON2 = 0x2;
+ public static final int X509_ASN_ENCODING = 1;
public static int VERSION (int major, int minor) {
return major << 16 | minor;
@@ -2234,11 +2236,19 @@ public static final native int BP_PAINTPARAMS_sizeof ();
public static final native int BROWSEINFO_sizeof ();
public static final native int BUTTON_IMAGELIST_sizeof ();
public static final native int CANDIDATEFORM_sizeof ();
+public static final native int CERT_CONTEXT_sizeof ();
+public static final native int CERT_INFO_sizeof ();
+public static final native int CERT_NAME_BLOB_sizeof ();
+public static final native int CERT_PUBLIC_KEY_INFO_sizeof ();
public static final native int CHOOSECOLOR_sizeof ();
public static final native int CHOOSEFONT_sizeof ();
public static final native int COMBOBOXINFO_sizeof ();
public static final native int COMPOSITIONFORM_sizeof ();
public static final native int CREATESTRUCT_sizeof ();
+public static final native int CRYPT_ALGORITHM_IDENTIFIER_sizeof ();
+public static final native int CRYPT_BIT_BLOB_sizeof ();
+public static final native int CRYPT_INTEGER_BLOB_sizeof ();
+public static final native int CRYPT_OBJID_BLOB_sizeof ();
public static final native int DEVMODEA_sizeof ();
public static final native int DEVMODEW_sizeof ();
public static final native int DIBSECTION_sizeof ();
@@ -2408,6 +2418,15 @@ public static final int /*long*/ CallWindowProc (int /*long*/ lpPrevWndFunc, int
return CallWindowProcA (lpPrevWndFunc, hWnd, Msg, wParam, lParam);
}
+public static final int CertNameToStr (int dwCertEncodingType, CERT_NAME_BLOB pName, int dwStrType, TCHAR psz, int csz) {
+ if (IsUnicode) {
+ char [] psz1 = psz == null ? null : psz.chars;
+ return CertNameToStrW (dwCertEncodingType, pName, dwStrType, psz1, csz);
+ }
+ byte [] psz1 = psz == null ? null : psz.bytes;
+ return CertNameToStrA (dwCertEncodingType, pName, dwStrType, psz1, csz);
+}
+
public static final int /*long*/ CharUpper (int /*long*/ ch) {
if (IsUnicode) return CharUpperW (ch);
return CharUpperA (ch);
@@ -3546,6 +3565,16 @@ public static final native int /*long*/ CallWindowProcW (int /*long*/ lpPrevWndF
* @param hWnd cast=(HWND)
*/
public static final native int /*long*/ CallWindowProcA (int /*long*/ lpPrevWndFunc, int /*long*/ hWnd, int Msg, int /*long*/ wParam, int /*long*/ lParam);
+/**
+ * @param pName cast=(PCERT_NAME_BLOB)
+ * @param psz cast=(LPWSTR)
+ */
+public static final native int CertNameToStrW(int dwCertEncodingType, CERT_NAME_BLOB pName, int dwStrType, char[] psz, int csz);
+/**
+ * @param pName cast=(PCERT_NAME_BLOB)
+ * @param psz cast=(LPSTR)
+ */
+public static final native int CertNameToStrA(int dwCertEncodingType, CERT_NAME_BLOB pName, int dwStrType, byte[] psz, int csz);
/** @param ch cast=(LPWSTR) */
public static final native int /*long*/ CharLowerW (int /*long*/ ch);
/** @param ch cast=(LPSTR) */
@@ -4064,6 +4093,7 @@ public static final native int ExtractIconExW (char [] lpszFile, int nIconIndex,
* @param phiconSmall cast=(HICON FAR *)
*/
public static final native int ExtractIconExA (byte [] lpszFile, int nIconIndex, int /*long*/ [] phiconLarge, int /*long*/ [] phiconSmall, int nIcons);
+public static final native boolean FileTimeToSystemTime (FILETIME lpFileTime, SYSTEMTIME lpSystemTime);
/**
* @param hDC cast=(HDC)
* @param lprc flags=no_out
@@ -5203,6 +5233,16 @@ public static final native void MoveMemory (BITMAPINFOHEADER Destination, int /*
* @param Destination cast=(PVOID),flags=no_in
* @param Source cast=(CONST VOID *)
*/
+public static final native void MoveMemory (CERT_CONTEXT Destination, int /*long*/ Source, int Length);
+/**
+ * @param Destination cast=(PVOID),flags=no_in
+ * @param Source cast=(CONST VOID *)
+ */
+public static final native void MoveMemory (CERT_INFO Destination, int /*long*/ Source, int Length);
+/**
+ * @param Destination cast=(PVOID),flags=no_in
+ * @param Source cast=(CONST VOID *)
+ */
public static final native void MoveMemory (DEVMODEW Destination, int /*long*/ Source, int Length);
/**
* @param Destination cast=(PVOID),flags=no_in

Back to the top