diff --git a/.gitignore b/.gitignore
index 95e66f5c050c1f86a6d093a47931b9f9901c0055..1bde3846142a58806e9a87339dfba7c7e4a230c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,6 +72,10 @@ dlls/crypt32/tests/*.ok
 dlls/crypt32/tests/crypt32_crosstest.exe
 dlls/crypt32/tests/testlist.c
 dlls/cryptdll/libcryptdll.def
+dlls/cryptnet/libcryptnet.def
+dlls/cryptnet/tests/*.ok
+dlls/cryptnet/tests/cryptnet_crosstest.exe
+dlls/cryptnet/tests/testlist.c
 dlls/ctl3d.dll16
 dlls/ctl3d32/libctl3d32.def
 dlls/ctl3dv2.dll16
@@ -688,6 +692,7 @@ programs/winetest/comcat_test.exe
 programs/winetest/comctl32_test.exe
 programs/winetest/comdlg32_test.exe
 programs/winetest/crypt32_test.exe
+programs/winetest/cryptnet_test.exe
 programs/winetest/d3d8_test.exe
 programs/winetest/d3d9_test.exe
 programs/winetest/d3drm_test.exe
diff --git a/Makefile.in b/Makefile.in
index 46f330c44ca6e729c2da66be90a69d29645e94c6..31bfb087a4c031c1c50bfa2f9c0f547bc097ed60 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -188,6 +188,7 @@ ALL_MAKEFILES = \
 	dlls/crypt32/tests/Makefile \
 	dlls/cryptdll/Makefile \
 	dlls/cryptnet/Makefile \
+	dlls/cryptnet/tests/Makefile \
 	dlls/ctl3d32/Makefile \
 	dlls/d3d10/Makefile \
 	dlls/d3d8/Makefile \
@@ -561,6 +562,7 @@ dlls/crypt32/Makefile: dlls/crypt32/Makefile.in dlls/Makedll.rules
 dlls/crypt32/tests/Makefile: dlls/crypt32/tests/Makefile.in dlls/Maketest.rules
 dlls/cryptdll/Makefile: dlls/cryptdll/Makefile.in dlls/Makedll.rules
 dlls/cryptnet/Makefile: dlls/cryptnet/Makefile.in dlls/Makedll.rules
+dlls/cryptnet/tests/Makefile: dlls/cryptnet/tests/Makefile.in dlls/Maketest.rules
 dlls/ctl3d32/Makefile: dlls/ctl3d32/Makefile.in dlls/Makedll.rules
 dlls/d3d10/Makefile: dlls/d3d10/Makefile.in dlls/Makedll.rules
 dlls/d3d8/Makefile: dlls/d3d8/Makefile.in dlls/Makedll.rules
diff --git a/configure b/configure
index d456d447858cccb5ab6eea30b64d399e7342288c..4a32d48e713cce468887e131c5e24543d6f34fbc 100755
--- a/configure
+++ b/configure
@@ -20571,6 +20571,8 @@ ac_config_files="$ac_config_files dlls/cryptdll/Makefile"
 
 ac_config_files="$ac_config_files dlls/cryptnet/Makefile"
 
+ac_config_files="$ac_config_files dlls/cryptnet/tests/Makefile"
+
 ac_config_files="$ac_config_files dlls/ctl3d32/Makefile"
 
 ac_config_files="$ac_config_files dlls/d3d10/Makefile"
@@ -21823,6 +21825,7 @@ do
     "dlls/crypt32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/crypt32/tests/Makefile" ;;
     "dlls/cryptdll/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/cryptdll/Makefile" ;;
     "dlls/cryptnet/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/cryptnet/Makefile" ;;
+    "dlls/cryptnet/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/cryptnet/tests/Makefile" ;;
     "dlls/ctl3d32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/ctl3d32/Makefile" ;;
     "dlls/d3d10/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/Makefile" ;;
     "dlls/d3d8/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 3f569748c73aa4b9e73d236acbe20ffa6ae062e5..92c763e11cb37a21ef730fcdbad078b956fc52a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1601,6 +1601,7 @@ AC_CONFIG_FILES([dlls/crypt32/Makefile])
 AC_CONFIG_FILES([dlls/crypt32/tests/Makefile])
 AC_CONFIG_FILES([dlls/cryptdll/Makefile])
 AC_CONFIG_FILES([dlls/cryptnet/Makefile])
+AC_CONFIG_FILES([dlls/cryptnet/tests/Makefile])
 AC_CONFIG_FILES([dlls/ctl3d32/Makefile])
 AC_CONFIG_FILES([dlls/d3d10/Makefile])
 AC_CONFIG_FILES([dlls/d3d8/Makefile])
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 1672d6a5c7de5c3d4c6d5e3e6429319560066955..4eb4dd8261f349c0603dc791c65d7ee9bf300218 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -252,6 +252,7 @@ TESTSUBDIRS = \
 	comctl32/tests \
 	comdlg32/tests \
 	crypt32/tests \
+	cryptnet/tests \
 	d3d8/tests \
 	d3d9/tests \
 	d3drm/tests \
@@ -501,6 +502,7 @@ IMPORT_LIBS = \
 	crtdll/libcrtdll.$(IMPLIBEXT) \
 	crypt32/libcrypt32.$(IMPLIBEXT) \
 	cryptdll/libcryptdll.$(IMPLIBEXT) \
+	cryptnet/libcryptnet.$(IMPLIBEXT) \
 	ctl3d32/libctl3d32.$(IMPLIBEXT) \
 	d3d8/libd3d8.$(IMPLIBEXT) \
 	d3d9/libd3d9.$(IMPLIBEXT) \
@@ -666,6 +668,9 @@ crypt32/libcrypt32.$(IMPLIBEXT): crypt32/crypt32.spec $(WINEBUILD)
 cryptdll/libcryptdll.$(IMPLIBEXT): cryptdll/cryptdll.spec $(WINEBUILD)
 	@cd cryptdll && $(MAKE) libcryptdll.$(IMPLIBEXT)
 
+cryptnet/libcryptnet.$(IMPLIBEXT): cryptnet/cryptnet.spec $(WINEBUILD)
+	@cd cryptnet && $(MAKE) libcryptnet.$(IMPLIBEXT)
+
 ctl3d32/libctl3d32.$(IMPLIBEXT): ctl3d32/ctl3d32.spec $(WINEBUILD)
 	@cd ctl3d32 && $(MAKE) libctl3d32.$(IMPLIBEXT)
 
diff --git a/dlls/cryptnet/Makefile.in b/dlls/cryptnet/Makefile.in
index 6f023019d59f0daa898bfeddb0a5d3d8b58cdd87..ed180f4b227fccffe28ded2a035990b04ec955f0 100644
--- a/dlls/cryptnet/Makefile.in
+++ b/dlls/cryptnet/Makefile.in
@@ -3,6 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = cryptnet.dll
+IMPORTLIB = libcryptnet.$(IMPLIBEXT)
 IMPORTS   = crypt32 kernel32
 
 C_SRCS = \
diff --git a/dlls/cryptnet/tests/Makefile.in b/dlls/cryptnet/tests/Makefile.in
new file mode 100644
index 0000000000000000000000000000000000000000..2bf626e9660c83a7e39c790067eafff40d7f82d4
--- /dev/null
+++ b/dlls/cryptnet/tests/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+TESTDLL   = cryptnet.dll
+IMPORTS   = cryptnet crypt32 kernel32
+
+CTESTS = \
+	cryptnet.c
+
+@MAKE_TEST_RULES@
+
+@DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c
new file mode 100644
index 0000000000000000000000000000000000000000..25ad872611847f3a63005a3bd0ff6e3c17abe0ae
--- /dev/null
+++ b/dlls/cryptnet/tests/cryptnet.c
@@ -0,0 +1,239 @@
+/*
+ * Unit test suite for cryptnet.dll
+ *
+ * Copyright 2007 Juan Lang
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#include <stdarg.h>
+#define NONAMELESSUNION
+#include <windef.h>
+#include <winbase.h>
+#include <winerror.h>
+#include <wincrypt.h>
+#include "wine/test.h"
+
+static const BYTE bigCert[] = {
+0x30,0x78,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x14,0x31,0x12,0x30,0x10,
+0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
+0x67,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,
+0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
+0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03,
+0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x30,
+0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,
+0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,
+0x01,0x01};
+static const BYTE certWithIssuingDistPoint[] = {
+0x30,0x81,0x99,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,
+0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x14,0x31,0x12,
+0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,
+0x61,0x6e,0x67,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
+0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
+0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10,
+0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
+0x67,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x27,0x30,0x25,0x30,
+0x23,0x06,0x03,0x55,0x1d,0x1c,0x01,0x01,0xff,0x04,0x19,0x30,0x17,0xa0,0x15,
+0xa0,0x13,0x86,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65,
+0x68,0x71,0x2e,0x6f,0x72,0x67, };
+static const BYTE certWithCRLDistPoint[] = {
+0x30,0x81,0x9b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,
+0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x14,0x31,0x12,
+0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,
+0x61,0x6e,0x67,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
+0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
+0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10,
+0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
+0x67,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x29,0x30,0x27,0x30,
+0x25,0x06,0x03,0x55,0x1d,0x1f,0x01,0x01,0xff,0x04,0x1b,0x30,0x19,0x30,0x17,
+0xa0,0x15,0xa0,0x13,0x86,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,
+0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67, };
+
+static void compareUrlArray(const CRYPT_URL_ARRAY *expected,
+ const CRYPT_URL_ARRAY *got)
+{
+    ok(expected->cUrl == got->cUrl, "Expected %d URLs, got %d\n",
+     expected->cUrl, got->cUrl);
+    if (expected->cUrl == got->cUrl)
+    {
+        DWORD i;
+
+        for (i = 0; i < got->cUrl; i++)
+            ok(!lstrcmpiW(expected->rgwszUrl[i], got->rgwszUrl[i]),
+             "%d: unexpected URL\n", i);
+    }
+}
+
+static WCHAR url[] =
+ { 'h','t','t','p',':','/','/','w','i','n','e','h','q','.','o','r','g',0 };
+
+static void test_getObjectUrl(void)
+{
+    BOOL ret;
+    DWORD urlArraySize = 0, infoSize = 0;
+    PCCERT_CONTEXT cert;
+
+    SetLastError(0xdeadbeef);
+    ret = CryptGetObjectUrl(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
+    ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
+     "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
+    /* Crash
+    ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL, NULL,
+     NULL, NULL, NULL);
+    ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL, NULL,
+     NULL, &infoSize, NULL);
+    ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL,
+     &urlArraySize, NULL, &infoSize, NULL);
+     */
+    /* A cert with no CRL dist point extension fails.. */
+    cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
+     sizeof(bigCert));
+    SetLastError(0xdeadbeef);
+    ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, NULL,
+     NULL, NULL, NULL, NULL);
+    ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+     "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+    CertFreeCertificateContext(cert);
+
+    cert = CertCreateCertificateContext(X509_ASN_ENCODING,
+     certWithIssuingDistPoint, sizeof(certWithIssuingDistPoint));
+    if (cert)
+    {
+        /* This cert has no AIA extension, so expect this to fail */
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0,
+         NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert,
+         CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert,
+         CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        /* It does have an issuing dist point extension, but that's not what
+         * this is looking for (it wants a CRL dist points extension)
+         */
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, 0, NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL,
+         NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL,
+         NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+    }
+    cert = CertCreateCertificateContext(X509_ASN_ENCODING,
+     certWithCRLDistPoint, sizeof(certWithCRLDistPoint));
+    if (cert)
+    {
+        PCRYPT_URL_ARRAY urlArray;
+
+        /* This cert has no AIA extension, so expect this to fail */
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0,
+         NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert,
+         CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert,
+         CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        /* It does have a CRL dist points extension */
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, 0, NULL, NULL, NULL, NULL, NULL);
+        todo_wine
+        ok(!ret && GetLastError() == E_INVALIDARG,
+         "Expected E_INVALIDARG, got %08x\n", GetLastError());
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, 0, NULL, NULL, NULL, &infoSize, NULL);
+        todo_wine
+        ok(!ret && GetLastError() == E_INVALIDARG,
+         "Expected E_INVALIDARG, got %08x\n", GetLastError());
+        /* Can get it without specifying the location: */
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL);
+        ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError());
+        urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize);
+        if (urlArray)
+        {
+            ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+             (void *)cert, 0, urlArray, &urlArraySize, NULL, NULL, NULL);
+            ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError());
+            if (ret)
+            {
+                LPWSTR pUrl = url;
+                CRYPT_URL_ARRAY expectedUrl = { 1, &pUrl };
+
+                compareUrlArray(&expectedUrl, urlArray);
+            }
+            HeapFree(GetProcessHeap(), 0, urlArray);
+        }
+        /* or by specifying it's an extension: */
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, &urlArraySize, NULL,
+         NULL, NULL);
+        ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError());
+        urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize);
+        if (urlArray)
+        {
+            ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+             (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, urlArray,
+             &urlArraySize, NULL, NULL, NULL);
+            ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError());
+            if (ret)
+            {
+                LPWSTR pUrl = url;
+                CRYPT_URL_ARRAY expectedUrl = { 1, &pUrl };
+
+                compareUrlArray(&expectedUrl, urlArray);
+            }
+            HeapFree(GetProcessHeap(), 0, urlArray);
+        }
+        /* but it isn't contained in a property: */
+        SetLastError(0xdeadbeef);
+        ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
+         (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, &urlArraySize, NULL,
+         NULL, NULL);
+        ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
+         "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+        CertFreeCertificateContext(cert);
+    }
+}
+
+START_TEST(cryptnet)
+{
+    test_getObjectUrl();
+}
diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index 8858a88a014b99db2acdee8bfc646b60f710f24c..b1342e0a55e262a24ef54a6e033b0044510082a0 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -28,6 +28,7 @@ TESTBINS = \
 	comctl32_test.exe \
 	comdlg32_test.exe \
 	crypt32_test.exe \
+	cryptnet_test.exe \
 	d3d8_test.exe \
 	d3d9_test.exe \
 	d3drm_test.exe \
@@ -106,6 +107,8 @@ comdlg32_test.exe: $(DLLDIR)/comdlg32/tests/comdlg32_test.exe$(DLLEXT)
 	cp $(DLLDIR)/comdlg32/tests/comdlg32_test.exe$(DLLEXT) $@ && $(STRIP) $@
 crypt32_test.exe: $(DLLDIR)/crypt32/tests/crypt32_test.exe$(DLLEXT)
 	cp $(DLLDIR)/crypt32/tests/crypt32_test.exe$(DLLEXT) $@ && $(STRIP) $@
+cryptnet_test.exe: $(DLLDIR)/cryptnet/tests/cryptnet_test.exe$(DLLEXT)
+	cp $(DLLDIR)/cryptnet/tests/cryptnet_test.exe$(DLLEXT) $@ && $(STRIP) $@
 d3d8_test.exe: $(DLLDIR)/d3d8/tests/d3d8_test.exe$(DLLEXT)
 	cp $(DLLDIR)/d3d8/tests/d3d8_test.exe$(DLLEXT) $@ && $(STRIP) $@
 d3d9_test.exe: $(DLLDIR)/d3d9/tests/d3d9_test.exe$(DLLEXT)
diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc
index fb8cee20983989b6b26b95b21b37842f21f2a8ff..9b8a8ebfc0be3c933432b2e25bd17d763c72cc6d 100644
--- a/programs/winetest/winetest.rc
+++ b/programs/winetest/winetest.rc
@@ -86,6 +86,7 @@ comcat_test.exe TESTRES "comcat_test.exe"
 comctl32_test.exe TESTRES "comctl32_test.exe"
 comdlg32_test.exe TESTRES "comdlg32_test.exe"
 crypt32_test.exe TESTRES "crypt32_test.exe"
+cryptnet_test.exe TESTRES "cryptnet_test.exe"
 d3d8_test.exe TESTRES "d3d8_test.exe"
 d3d9_test.exe TESTRES "d3d9_test.exe"
 d3drm_test.exe TESTRES "d3drm_test.exe"