Commit Graph

102 Commits

Author SHA1 Message Date
Jan de Mooij
418dfe2cf2 Bug 1311996 - Fix code using pkix::Result to not conflict with the new mozilla::Result type. r=keeler 2016-10-31 10:05:13 +01:00
Masatoshi Kimura
d07f34e0d0 Bug 1305561 - Do not check renego extension when TLS version is 1.3. r=keeler
MozReview-Commit-ID: JtT6hLcbl3W
2016-09-27 20:06:22 +09:00
EKR
16f134d58b Bug 1304919 - PSM changes to support TLS 1.3 key exchange, r=mt
MozReview-Commit-ID: 1GMk8PajbHj
2016-09-23 14:27:29 +10:00
Sebastian Hengst
0b50b28d38 Backed out changeset b54d608edfa8 (bug 1304919) 2016-09-24 18:00:17 +02:00
EKR
932d43a9f5 Bug 1304919 - PSM changes to support TLS 1.3 key exchange, r=mt
MozReview-Commit-ID: 1GMk8PajbHj
2016-09-23 14:27:29 +10:00
Ryan VanderMeulen
65e0550627 Merge m-c to inbound. a=merge 2016-08-24 09:09:05 -04:00
Cykesiopka
93dcea2866 Bug 1296316 - Convert nsNSSShutDownObject::CalledFromType to an enum class. r=mgoodwin
enum classes are in general safer than plain enums, and as such should be
preferred.

MozReview-Commit-ID: 1FK89SNhdk4
2016-08-20 23:00:19 +08:00
Dragana Damjanovic
ac872e009d Bug 1264578 - NSS support for http with TLS 1.3. r=keeler 2016-08-19 05:01:00 -04:00
Kan-Ru Chen
a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
Cykesiopka
8f858bb5ed Bug 1296218 - Clean up PK11PasswordPromptRunnable::RunOnTargetThread(). r=keeler
MozReview-Commit-ID: Bhp192YgldD
2016-08-19 22:16:00 +08:00
Nicholas Nethercote
1cef4f427a Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.
2016-08-12 15:19:29 +10:00
Nicholas Nethercote
1f65390cc9 Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
2016-08-08 12:18:10 +10:00
Masatoshi Kimura
3e50081f62 Bug 1284840 - Don't forget TLS intolerance when a DHE-based cipher is used. r=keeler
MozReview-Commit-ID: 70pa7lCLAxQ
2016-07-09 13:44:10 +09:00
Masatoshi Kimura
b390f1a5a2 Bug 1281084 - Enable TLS 1.3 PSK-resumption for AES-256-GCM and ChaCha20/Poly1305. r=keeler 2016-06-22 21:55:13 +09:00
David Keeler
8a14b06114 bug 1278605 - ensure that nsICertOverrideService can be implemented in JS r=Cykesiopka
MozReview-Commit-ID: KSVeraWuRPZ
2016-06-07 11:27:33 -07:00
Masatoshi Kimura
d30e416a43 Bug 975832 - Enable AES-256 variants of the AES-128 GCM cipher suites we have already enabled. r=keeler 2016-06-04 08:19:29 +09:00
Cykesiopka
dc8a31b0f9 Bug 1251133 - Remove DSA telemetry. r=jcj
Firefox no longer supports DSA cipher suites, so this telemetry is dead code.

MozReview-Commit-ID: G3ipd0TADM
2016-05-19 18:42:16 -07:00
Cykesiopka
e82de86c37 Bug 1271501 - Use mozilla::BitwiseCast instead of reinterpret_cast in PSM. r=keeler
mozilla::BitwiseCast does the same thing, but provides static asserts that
mitigate some of the risk of using reinterpret_cast.

MozReview-Commit-ID: ENQ8QC6Nl9o
2016-05-18 21:20:56 -07:00
Cykesiopka
3745ea3b06 Bug 1271501 - Remove unnecessary uses of reinterpret_cast in PSM. r=keeler
These uses of reinterpret_cast are either pointless, or can be removed via
refactoring.

MozReview-Commit-ID: Aw2rlJfrT6J
2016-05-18 18:58:40 -07:00
Martin Thomson
15e36308f5 Bug 1250568 - Adding ECDHE_PSK suites, r=keeler
MozReview-Commit-ID: 1MGB7ewpDuZ
2016-04-04 16:21:19 -03:00
Cykesiopka
cc29e694eb Bug 1265164 - Always use nsCOMPtrs with getNSSDialogs(). r=keeler
MozReview-Commit-ID: 430uuWHIZjC
2016-04-27 18:16:48 -07:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Cykesiopka
0bfd71da46 Bug 1260643 - Convert most uses of ScopedCERTCertificate in PSM to UniqueCERTCertificate. r=keeler
MozReview-Commit-ID: JnjoUd7d2M0
2016-04-20 01:14:22 -07:00
Martin Thomson
7337208148 Bug 1238001 - Allow TLS info to be updated on renegotiation, r=keeler
MozReview-Commit-ID: KJaPgEwTvhv
2016-02-23 08:00:00 -08:00
Cykesiopka
e9be440825 Bug 1004149 - Return mozilla::pkix::Result values in nsNSSHttpInterface functions. r=keeler
MozReview-Commit-ID: Kx1E3HLP7zC
2016-03-18 21:11:03 -07:00
Cykesiopka
cd1f3d61af Bug 1004149 - Remove some dead code. r=keeler
MozReview-Commit-ID: JF6IgVCEUVe
2016-03-18 21:10:54 -07:00
sajitk
35d9982d18 Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in security subdirectory.r=nfroyd 2016-01-28 10:36:00 -08:00
Tim Taubert
a3cc74a9c6 Bug 1247860 - Enable ChaCha20/Poly1305 cipher suites r=emk,keeler 2016-02-26 12:37:19 +01:00
Nihanth Subramanya
070a8e2757 Bug 1201437 - Add new WebProgress state flag for user-overridden cert. r=keeler
MozReview-Commit-ID: cvBYSZykK0
2016-02-24 22:46:52 -08:00
Aidin Gharibnavaz
bb0750ec60 Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley 2016-02-10 08:23:00 +01:00
Carsten "Tomcat" Book
498dd069da Backed out changeset c18e29c1b369 (bug 1164581) for cpp unit tests test failures 2016-02-08 11:17:38 +01:00
Aidin Gharibnavaz
d9bbb0c446 Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley 2016-02-07 10:56:00 +01:00
Wes Kocher
8f36d57440 Backed out changeset 7ec471c99263 (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE 2016-01-29 10:15:34 -08:00
sajitk
942a08ea8b Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in security subdirectory. r=froydnj 2016-01-28 10:36:00 -05:00
Masatoshi Kimura
5dbe4f5141 Bug 1223131 - Don't remove a host from the whitelist if the version fallback was needed. r=keeler 2015-11-12 07:18:37 +09:00
David Keeler
c0de9ffccb bug 1215690 - remove nsPSMUITracker r=Cykesiopka r=mgoodwin
nsPSMUITracker was problematic. Apparently it was originally intended to prevent
NSS shutdown while NSS-related UI operations were going on (such as choosing a
client certificate). However, when nsNSSComponent would receive the event that
told it to shutdown NSS, it would attempt to call
mShutdownObjectList->evaporateAllNSSResources(), which would call
mActivityState.restrictActivityToCurrentThread(), which failed if such a UI
operation was in progress. This actually prevented the important part of
evaporateAllNSSResources, which is the releasing of all NSS objects in use by
PSM objects. Importantly, nsNSSComponent didn't check for or handle this failure
and proceeded to call NSS_Shutdown(), leaving PSM in an inconsistent state where
it thought it was okay to keep using the NSS objects it had when in fact it
wasn't.
In any case, nsPSMUITracker isn't really necessary as long as we have the
nsNSSShutDownPreventionLock mechanism, which mostly works and is what we should
use instead (or not at all, if no such lock is needed for the operation being
performed (for example, if no NSS functions are being called)).
2015-10-16 14:31:57 -07:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Nathan Froyd
bf7f6dda03 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Masatoshi Kimura
2bc320d8ca Bug 1168635 - Add an XPCOM interface to allow RC4. r=keeler 2015-10-15 05:48:27 +09:00
Carsten "Tomcat" Book
0ead66d658 Backed out changeset 66e3972e9150 (bug 1168635) 2015-10-14 16:28:41 +02:00
Masatoshi Kimura
bb6597e1a1 Bug 1168635 - Add an XPCOM interface to allow RC4. r=keeler 2015-10-14 21:12:35 +09:00
Ben Kelly
4bd07c995d Bug 1210941 P10 Use LOAD_BYPASS_SERVICE_WORKER in nsNSSCallbacks. r=ehsan 2015-10-06 06:37:07 -07:00
Ehsan Akhgari
f49362ea34 Bug 1205302 - Disallow intercepting OCSP requests; r=jdm 2015-09-16 19:15:32 -04:00
Cykesiopka
1f00291bb0 Bug 1197644 - Remove the security.ssl.warn_missing_rfc5746 pref. r=keeler 2015-08-24 22:53:42 -07:00
Christoph Kerschbaumer
048979ada5 Bug 1195606 - Use channel->ascynOpen2 in security/manager/ssl/nsNSSCallbacks.cpp (r=sicking) 2015-08-18 09:54:09 -07:00
Birunthan Mohanathas
a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Eric Rahm
900b3ebc4d Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Carsten "Tomcat" Book
89becff57d Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)
2015-06-02 13:05:56 +02:00
Eric Rahm
f5003d5120 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Wes Kocher
2a7ed059f1 Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00