Skip to content

Commit

Permalink
bug 1030963 - remove non-standard window.crypto functions/properties …
Browse files Browse the repository at this point in the history
…r=jst r=briansmith r=glandium
  • Loading branch information
mozkeeler committed Aug 14, 2014
1 parent 1a7a60c commit c3d3df5
Show file tree
Hide file tree
Showing 62 changed files with 66 additions and 4,118 deletions.
2 changes: 1 addition & 1 deletion b2g/confvars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MOZ_SERVICES_METRICS=1
MOZ_CAPTIVEDETECT=1

MOZ_WEBSMS_BACKEND=1
MOZ_DISABLE_CRYPTOLEGACY=1
MOZ_NO_SMART_CARDS=1
MOZ_APP_STATIC_INI=1
NSS_NO_LIBPKIX=1
NSS_DISABLE_DBM=1
Expand Down
10 changes: 5 additions & 5 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3832,7 +3832,7 @@ MOZ_XUL=1
MOZ_ZIPWRITER=1
NS_PRINTING=1
MOZ_PDF_PRINTING=
MOZ_DISABLE_CRYPTOLEGACY=
MOZ_NO_SMART_CARDS=
NSS_DISABLE_DBM=
NECKO_COOKIES=1
NECKO_PROTOCOLS_DEFAULT="about app data file ftp http res viewsource websocket wyciwyg device"
Expand Down Expand Up @@ -6348,12 +6348,12 @@ fi
AC_SUBST(MOZ_DISABLE_PARENTAL_CONTROLS)

dnl ========================================================
dnl = Disable DOMCrypto
dnl = Disable smartcard support
dnl ========================================================
if test -n "$MOZ_DISABLE_CRYPTOLEGACY"; then
AC_DEFINE(MOZ_DISABLE_CRYPTOLEGACY)
if test -n "$MOZ_NO_SMART_CARDS"; then
AC_DEFINE(MOZ_NO_SMART_CARDS)
fi
AC_SUBST(MOZ_DISABLE_CRYPTOLEGACY)
AC_SUBST(MOZ_NO_SMART_CARDS)

dnl ========================================================
dnl = Disable EV certificate verification
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.html

This file was deleted.

This file was deleted.

48 changes: 0 additions & 48 deletions content/base/test/csp/file_CSP_evalscript_main_getCRMFRequest.js

This file was deleted.

12 changes: 0 additions & 12 deletions content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.html

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions content/base/test/csp/file_CSP_evalscript_no_CSP_at_all.js

This file was deleted.

11 changes: 0 additions & 11 deletions content/base/test/csp/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,10 @@ support-files =
file_CSP_bug888172.sjs
file_CSP_evalscript_main.js
file_CSP_evalscript_main_allowed.js
file_CSP_evalscript_main_allowed_getCRMFRequest.js
file_CSP_evalscript_main_getCRMFRequest.js
file_CSP_evalscript_main.html
file_CSP_evalscript_main.html^headers^
file_CSP_evalscript_main_allowed.html
file_CSP_evalscript_main_allowed.html^headers^
file_CSP_evalscript_main_allowed_getCRMFRequest.html
file_CSP_evalscript_main_allowed_getCRMFRequest.html^headers^
file_CSP_evalscript_main_getCRMFRequest.html
file_CSP_evalscript_main_getCRMFRequest.html^headers^
file_CSP_evalscript_no_CSP_at_all.html
file_CSP_evalscript_no_CSP_at_all.html^headers^
file_CSP_evalscript_no_CSP_at_all.js
file_CSP_frameancestors_main.html
file_CSP_frameancestors_main.js
file_CSP_frameancestors.sjs
Expand Down Expand Up @@ -112,8 +103,6 @@ support-files =
[test_CSP_bug885433.html]
[test_CSP_bug888172.html]
[test_CSP_evalscript.html]
[test_CSP_evalscript_getCRMFRequest.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # no (deprecated) window.crypto support in multiprocess (bug 824652)
[test_CSP_frameancestors.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' # Times out, not sure why (bug 1008445)
[test_CSP_inlinescript.html]
Expand Down
63 changes: 0 additions & 63 deletions content/base/test/csp/test_CSP_evalscript_getCRMFRequest.html

This file was deleted.

76 changes: 0 additions & 76 deletions dom/base/Crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,82 +127,6 @@ Crypto::Subtle()
return mSubtle;
}

#ifndef MOZ_DISABLE_CRYPTOLEGACY
// Stub out the legacy nsIDOMCrypto methods. The actual
// implementations are in security/manager/ssl/src/nsCrypto.{cpp,h}

NS_IMETHODIMP
Crypto::GetEnableSmartCardEvents(bool *aEnableSmartCardEvents)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

NS_IMETHODIMP
Crypto::SetEnableSmartCardEvents(bool aEnableSmartCardEvents)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

bool
Crypto::EnableSmartCardEvents()
{
return false;
}

void
Crypto::SetEnableSmartCardEvents(bool aEnable, ErrorResult& aRv)
{
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
}

void
Crypto::GetVersion(nsString& aVersion)
{
}

mozilla::dom::CRMFObject*
Crypto::GenerateCRMFRequest(JSContext* aContext,
const nsCString& aReqDN,
const nsCString& aRegToken,
const nsCString& aAuthenticator,
const nsCString& aEaCert,
const nsCString& aJsCallback,
const Sequence<JS::Value>& aArgs,
ErrorResult& aRv)
{
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}

void
Crypto::ImportUserCertificates(const nsAString& aNickname,
const nsAString& aCmmfResponse,
bool aDoForcedBackup,
nsAString& aReturn,
ErrorResult& aRv)
{
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
}

void
Crypto::SignText(JSContext* aContext,
const nsAString& aStringToSign,
const nsAString& aCaOption,
const Sequence<nsCString>& aArgs,
nsAString& aReturn)

{
aReturn.AssignLiteral("error:internalError");
}

void
Crypto::Logout(ErrorResult& aRv)
{
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
}

#endif

/* static */ uint8_t*
Crypto::GetRandomValues(uint32_t aLength)
{
Expand Down
Loading

0 comments on commit c3d3df5

Please sign in to comment.