mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
676eaf13b4
--HG-- rename : security/insanity/include/insanity/ScopedPtr.h => security/pkix/include/pkix/ScopedPtr.h rename : security/insanity/include/insanity/bind.h => security/pkix/include/pkix/bind.h rename : security/insanity/include/insanity/nullptr.h => security/pkix/include/pkix/nullptr.h rename : security/insanity/include/insanity/pkix.h => security/pkix/include/pkix/pkix.h rename : security/insanity/include/insanity/pkixtypes.h => security/pkix/include/pkix/pkixtypes.h rename : security/insanity/lib/pkixbind.cpp => security/pkix/lib/pkixbind.cpp rename : security/insanity/lib/pkixbuild.cpp => security/pkix/lib/pkixbuild.cpp rename : security/insanity/lib/pkixcheck.cpp => security/pkix/lib/pkixcheck.cpp rename : security/insanity/lib/pkixcheck.h => security/pkix/lib/pkixcheck.h rename : security/insanity/lib/pkixder.cpp => security/pkix/lib/pkixder.cpp rename : security/insanity/lib/pkixder.h => security/pkix/lib/pkixder.h rename : security/insanity/lib/pkixkey.cpp => security/pkix/lib/pkixkey.cpp rename : security/insanity/lib/pkixocsp.cpp => security/pkix/lib/pkixocsp.cpp rename : security/insanity/lib/pkixutil.h => security/pkix/lib/pkixutil.h rename : security/insanity/moz.build => security/pkix/moz.build rename : security/insanity/test/lib/moz.build => security/pkix/test/lib/moz.build rename : security/insanity/test/lib/pkixtestutil.cpp => security/pkix/test/lib/pkixtestutil.cpp rename : security/insanity/test/lib/pkixtestutil.h => security/pkix/test/lib/pkixtestutil.h
68 lines
2.5 KiB
C++
68 lines
2.5 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* Copyright 2013 Mozilla Foundation
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef mozilla_pkix_test__pkixtestutils_h
|
|
#define mozilla_pkix_test__pkixtestutils_h
|
|
|
|
#include "pkix/ScopedPtr.h"
|
|
#include "pkix/pkixtypes.h"
|
|
#include "seccomon.h"
|
|
|
|
namespace mozilla { namespace pkix { namespace test {
|
|
|
|
class OCSPResponseContext
|
|
{
|
|
public:
|
|
OCSPResponseContext(PLArenaPool* arena, CERTCertificate* cert, PRTime time);
|
|
|
|
PLArenaPool* arena;
|
|
// TODO(bug 980538): add a way to specify what certificates are included.
|
|
pkix::ScopedCERTCertificate cert; // The subject of the OCSP response
|
|
pkix::ScopedCERTCertificate issuerCert; // The issuer of the subject
|
|
pkix::ScopedCERTCertificate signerCert; // This cert signs the response
|
|
uint8_t responseStatus; // See the OCSPResponseStatus enum in rfc 6960
|
|
bool skipResponseBytes; // If true, don't include responseBytes
|
|
|
|
// The following fields are on a per-SingleResponse basis. In the future we
|
|
// may support including multiple SingleResponses per response.
|
|
PRTime producedAt;
|
|
PRTime thisUpdate;
|
|
PRTime nextUpdate;
|
|
bool includeNextUpdate;
|
|
SECOidTag certIDHashAlg;
|
|
uint8_t certStatus; // See the CertStatus choice in rfc 6960
|
|
PRTime revocationTime; // For certStatus == revoked
|
|
bool badSignature; // If true, alter the signature to fail verification
|
|
|
|
enum ResponderIDType {
|
|
ByName = 1,
|
|
ByKeyHash = 2
|
|
};
|
|
ResponderIDType responderIDType;
|
|
};
|
|
|
|
// The return value, if non-null, is owned by the arena in the context
|
|
// and MUST NOT be freed.
|
|
// This function does its best to respect the NSPR error code convention
|
|
// (that is, if it returns null, calling PR_GetError() will return the
|
|
// error of the failed operation). However, this is not guaranteed.
|
|
SECItem* CreateEncodedOCSPResponse(OCSPResponseContext& context);
|
|
|
|
} } } // namespace mozilla::pkix::test
|
|
|
|
#endif // mozilla_pkix_test__pkixtestutils_h
|