1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_ipc_TransportSecurityInfoUtils_h
6 #define mozilla_ipc_TransportSecurityInfoUtils_h
8 #include "CertVerifier.h"
9 #include "ipc/EnumSerializer.h"
10 #include "mozilla/RefPtr.h"
11 #include "nsITransportSecurityInfo.h"
12 #include "nsIX509Cert.h"
23 struct ParamTraits
<nsITransportSecurityInfo
*> {
24 static void Write(MessageWriter
* aWriter
, nsITransportSecurityInfo
* aParam
);
25 static bool Read(MessageReader
* aReader
,
26 RefPtr
<nsITransportSecurityInfo
>* aResult
);
30 struct ParamTraits
<nsIX509Cert
*> {
31 static void Write(MessageWriter
* aWriter
, nsIX509Cert
* aCert
);
32 static bool Read(MessageReader
* aReader
, RefPtr
<nsIX509Cert
>* aResult
);
36 struct ParamTraits
<nsITransportSecurityInfo::OverridableErrorCategory
>
37 : public ContiguousEnumSerializerInclusive
<
38 nsITransportSecurityInfo::OverridableErrorCategory
,
39 nsITransportSecurityInfo::OverridableErrorCategory::ERROR_UNSET
,
40 nsITransportSecurityInfo::OverridableErrorCategory::ERROR_TIME
> {};
43 struct ParamTraits
<mozilla::psm::EVStatus
>
44 : public ContiguousEnumSerializerInclusive
<mozilla::psm::EVStatus
,
45 mozilla::psm::EVStatus::NotEV
,
46 mozilla::psm::EVStatus::EV
> {};
50 #endif // mozilla_ipc_TransportSecurityInfoUtils_h