Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/api-constants.h +75 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/atomic-entry-flag.h +48 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/base-page-handle.h +43 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/caged-heap-local-data.h +117 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/caged-heap.h +64 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/compiler-specific.h +46 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/conditional-stack-allocated.h +41 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/finalizer-trait.h +93 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/gc-info.h +150 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/logging.h +50 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/member-storage.h +305 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/name-trait.h +141 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/persistent-node.h +219 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/pointer-policies.h +280 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/write-barrier.h +487 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h +33 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/crypto/bn_conf.h +29 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/crypto/dso_conf.h +19 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/asn1.h +1134 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/asn1t.h +946 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/bio.h +1022 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/cmp.h +727 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/cms.h +511 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/comp.h +98 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/conf.h +214 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/configuration.h +182 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/core_names.h +575 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/crmf.h +278 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ct.h +573 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/err.h +512 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ess.h +128 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/fipskey.h +41 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/lhash.h +398 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ocsp.h +483 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/opensslv.h +109 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/pkcs12.h +366 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/pkcs7.h +430 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/safestack.h +297 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/srp.h +285 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ssl.h +0 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ui.h +407 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/x509.h +1303 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/x509_acert.h +294 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/x509v3.h +0 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/progs.h +125 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_digests.h +160 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_dsa.h +94 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_ec.h +286 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_ecx.h +50 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_ml_dsa.h +40 -0
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/api-constants.h
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_
|
| 7 |
+
|
| 8 |
+
#include <cstddef>
|
| 9 |
+
#include <cstdint>
|
| 10 |
+
|
| 11 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 12 |
+
|
| 13 |
+
namespace cppgc {
|
| 14 |
+
namespace internal {
|
| 15 |
+
|
| 16 |
+
// Embedders should not rely on this code!
|
| 17 |
+
|
| 18 |
+
// Internal constants to avoid exposing internal types on the API surface.
|
| 19 |
+
namespace api_constants {
|
| 20 |
+
|
| 21 |
+
constexpr size_t kKB = 1024;
|
| 22 |
+
constexpr size_t kMB = kKB * 1024;
|
| 23 |
+
constexpr size_t kGB = kMB * 1024;
|
| 24 |
+
|
| 25 |
+
// Offset of the uint16_t bitfield from the payload contaning the
|
| 26 |
+
// in-construction bit. This is subtracted from the payload pointer to get
|
| 27 |
+
// to the right bitfield.
|
| 28 |
+
static constexpr size_t kFullyConstructedBitFieldOffsetFromPayload =
|
| 29 |
+
2 * sizeof(uint16_t);
|
| 30 |
+
// Mask for in-construction bit.
|
| 31 |
+
static constexpr uint16_t kFullyConstructedBitMask = uint16_t{1};
|
| 32 |
+
|
| 33 |
+
static constexpr size_t kPageSizeBits = 17;
|
| 34 |
+
static constexpr size_t kPageSize = size_t{1} << kPageSizeBits;
|
| 35 |
+
|
| 36 |
+
static constexpr size_t kLargeObjectSizeThreshold = kPageSize / 2;
|
| 37 |
+
|
| 38 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 39 |
+
#if defined(CPPGC_ENABLE_LARGER_CAGE)
|
| 40 |
+
constexpr unsigned kPointerCompressionShift = 3;
|
| 41 |
+
#else // !defined(CPPGC_ENABLE_LARGER_CAGE)
|
| 42 |
+
constexpr unsigned kPointerCompressionShift = 1;
|
| 43 |
+
#endif // !defined(CPPGC_ENABLE_LARGER_CAGE)
|
| 44 |
+
#endif // !defined(CPPGC_POINTER_COMPRESSION)
|
| 45 |
+
|
| 46 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 47 |
+
constexpr size_t kCagedHeapDefaultReservationSize =
|
| 48 |
+
static_cast<size_t>(4) * kGB;
|
| 49 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 50 |
+
constexpr size_t kCagedHeapMaxReservationSize =
|
| 51 |
+
size_t{1} << (31 + kPointerCompressionShift);
|
| 52 |
+
#else // !defined(CPPGC_POINTER_COMPRESSION)
|
| 53 |
+
constexpr size_t kCagedHeapMaxReservationSize =
|
| 54 |
+
kCagedHeapDefaultReservationSize;
|
| 55 |
+
#endif // !defined(CPPGC_POINTER_COMPRESSION)
|
| 56 |
+
constexpr size_t kCagedHeapReservationAlignment = kCagedHeapMaxReservationSize;
|
| 57 |
+
#endif // defined(CPPGC_CAGED_HEAP)
|
| 58 |
+
|
| 59 |
+
static constexpr size_t kDefaultAlignment = sizeof(void*);
|
| 60 |
+
|
| 61 |
+
// Maximum support alignment for a type as in `alignof(T)`.
|
| 62 |
+
static constexpr size_t kMaxSupportedAlignment = 2 * kDefaultAlignment;
|
| 63 |
+
|
| 64 |
+
// Granularity of heap allocations.
|
| 65 |
+
constexpr size_t kAllocationGranularity = sizeof(void*);
|
| 66 |
+
|
| 67 |
+
// Default cacheline size.
|
| 68 |
+
constexpr size_t kCachelineSize = 64;
|
| 69 |
+
|
| 70 |
+
} // namespace api_constants
|
| 71 |
+
|
| 72 |
+
} // namespace internal
|
| 73 |
+
} // namespace cppgc
|
| 74 |
+
|
| 75 |
+
#endif // INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/atomic-entry-flag.h
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_ATOMIC_ENTRY_FLAG_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_ATOMIC_ENTRY_FLAG_H_
|
| 7 |
+
|
| 8 |
+
#include <atomic>
|
| 9 |
+
|
| 10 |
+
namespace cppgc {
|
| 11 |
+
namespace internal {
|
| 12 |
+
|
| 13 |
+
// A flag which provides a fast check whether a scope may be entered on the
|
| 14 |
+
// current thread, without needing to access thread-local storage or mutex. Can
|
| 15 |
+
// have false positives (i.e., spuriously report that it might be entered), so
|
| 16 |
+
// it is expected that this will be used in tandem with a precise check that the
|
| 17 |
+
// scope is in fact entered on that thread.
|
| 18 |
+
//
|
| 19 |
+
// Example:
|
| 20 |
+
// g_frobnicating_flag.MightBeEntered() &&
|
| 21 |
+
// ThreadLocalFrobnicator().IsFrobnicating()
|
| 22 |
+
//
|
| 23 |
+
// Relaxed atomic operations are sufficient, since:
|
| 24 |
+
// - all accesses remain atomic
|
| 25 |
+
// - each thread must observe its own operations in order
|
| 26 |
+
// - no thread ever exits the flag more times than it enters (if used correctly)
|
| 27 |
+
// And so if a thread observes zero, it must be because it has observed an equal
|
| 28 |
+
// number of exits as entries.
|
| 29 |
+
class AtomicEntryFlag final {
|
| 30 |
+
public:
|
| 31 |
+
void Enter() { entries_.fetch_add(1, std::memory_order_relaxed); }
|
| 32 |
+
void Exit() { entries_.fetch_sub(1, std::memory_order_relaxed); }
|
| 33 |
+
|
| 34 |
+
// Returns false only if the current thread is not between a call to Enter
|
| 35 |
+
// and a call to Exit. Returns true if this thread or another thread may
|
| 36 |
+
// currently be in the scope guarded by this flag.
|
| 37 |
+
bool MightBeEntered() const {
|
| 38 |
+
return entries_.load(std::memory_order_relaxed) != 0;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
private:
|
| 42 |
+
std::atomic_int entries_{0};
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
} // namespace internal
|
| 46 |
+
} // namespace cppgc
|
| 47 |
+
|
| 48 |
+
#endif // INCLUDE_CPPGC_INTERNAL_ATOMIC_ENTRY_FLAG_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/base-page-handle.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2022 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_BASE_PAGE_HANDLE_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_BASE_PAGE_HANDLE_H_
|
| 7 |
+
|
| 8 |
+
#include "cppgc/heap-handle.h"
|
| 9 |
+
#include "cppgc/internal/api-constants.h"
|
| 10 |
+
#include "cppgc/internal/logging.h"
|
| 11 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 12 |
+
|
| 13 |
+
namespace cppgc {
|
| 14 |
+
namespace internal {
|
| 15 |
+
|
| 16 |
+
// The class is needed in the header to allow for fast access to HeapHandle in
|
| 17 |
+
// the write barrier.
|
| 18 |
+
class BasePageHandle {
|
| 19 |
+
public:
|
| 20 |
+
static V8_INLINE BasePageHandle* FromPayload(void* payload) {
|
| 21 |
+
return reinterpret_cast<BasePageHandle*>(
|
| 22 |
+
reinterpret_cast<uintptr_t>(payload) & ~(api_constants::kPageSize - 1));
|
| 23 |
+
}
|
| 24 |
+
static V8_INLINE const BasePageHandle* FromPayload(const void* payload) {
|
| 25 |
+
return FromPayload(const_cast<void*>(payload));
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
HeapHandle& heap_handle() { return heap_handle_; }
|
| 29 |
+
const HeapHandle& heap_handle() const { return heap_handle_; }
|
| 30 |
+
|
| 31 |
+
protected:
|
| 32 |
+
explicit BasePageHandle(HeapHandle& heap_handle) : heap_handle_(heap_handle) {
|
| 33 |
+
CPPGC_DCHECK(reinterpret_cast<uintptr_t>(this) % api_constants::kPageSize ==
|
| 34 |
+
0);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
HeapHandle& heap_handle_;
|
| 38 |
+
};
|
| 39 |
+
|
| 40 |
+
} // namespace internal
|
| 41 |
+
} // namespace cppgc
|
| 42 |
+
|
| 43 |
+
#endif // INCLUDE_CPPGC_INTERNAL_BASE_PAGE_HANDLE_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/caged-heap-local-data.h
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_LOCAL_DATA_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_LOCAL_DATA_H_
|
| 7 |
+
|
| 8 |
+
#include <array>
|
| 9 |
+
#include <cstddef>
|
| 10 |
+
#include <cstdint>
|
| 11 |
+
|
| 12 |
+
#include "cppgc/internal/api-constants.h"
|
| 13 |
+
#include "cppgc/internal/caged-heap.h"
|
| 14 |
+
#include "cppgc/internal/logging.h"
|
| 15 |
+
#include "cppgc/platform.h"
|
| 16 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 17 |
+
|
| 18 |
+
#if __cpp_lib_bitopts
|
| 19 |
+
#include <bit>
|
| 20 |
+
#endif // __cpp_lib_bitopts
|
| 21 |
+
|
| 22 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 23 |
+
|
| 24 |
+
namespace cppgc {
|
| 25 |
+
namespace internal {
|
| 26 |
+
|
| 27 |
+
class HeapBase;
|
| 28 |
+
class HeapBaseHandle;
|
| 29 |
+
|
| 30 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 31 |
+
|
| 32 |
+
// AgeTable is the bytemap needed for the fast generation check in the write
|
| 33 |
+
// barrier. AgeTable contains entries that correspond to 4096 bytes memory
|
| 34 |
+
// regions (cards). Each entry in the table represents generation of the objects
|
| 35 |
+
// that reside on the corresponding card (young, old or mixed).
|
| 36 |
+
class V8_EXPORT AgeTable final {
|
| 37 |
+
static constexpr size_t kRequiredSize = 1 * api_constants::kMB;
|
| 38 |
+
static constexpr size_t kAllocationGranularity =
|
| 39 |
+
api_constants::kAllocationGranularity;
|
| 40 |
+
|
| 41 |
+
public:
|
| 42 |
+
// Represents age of the objects living on a single card.
|
| 43 |
+
enum class Age : uint8_t { kOld, kYoung, kMixed };
|
| 44 |
+
// When setting age for a range, consider or ignore ages of the adjacent
|
| 45 |
+
// cards.
|
| 46 |
+
enum class AdjacentCardsPolicy : uint8_t { kConsider, kIgnore };
|
| 47 |
+
|
| 48 |
+
static constexpr size_t kCardSizeInBytes =
|
| 49 |
+
api_constants::kCagedHeapDefaultReservationSize / kRequiredSize;
|
| 50 |
+
|
| 51 |
+
static constexpr size_t CalculateAgeTableSizeForHeapSize(size_t heap_size) {
|
| 52 |
+
return heap_size / kCardSizeInBytes;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
void SetAge(uintptr_t cage_offset, Age age) {
|
| 56 |
+
table_[card(cage_offset)] = age;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
V8_INLINE Age GetAge(uintptr_t cage_offset) const {
|
| 60 |
+
return table_[card(cage_offset)];
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
void SetAgeForRange(uintptr_t cage_offset_begin, uintptr_t cage_offset_end,
|
| 64 |
+
Age age, AdjacentCardsPolicy adjacent_cards_policy);
|
| 65 |
+
|
| 66 |
+
Age GetAgeForRange(uintptr_t cage_offset_begin,
|
| 67 |
+
uintptr_t cage_offset_end) const;
|
| 68 |
+
|
| 69 |
+
void ResetForTesting();
|
| 70 |
+
|
| 71 |
+
private:
|
| 72 |
+
V8_INLINE size_t card(uintptr_t offset) const {
|
| 73 |
+
constexpr size_t kGranularityBits =
|
| 74 |
+
#if __cpp_lib_bitopts
|
| 75 |
+
std::countr_zero(static_cast<uint32_t>(kCardSizeInBytes));
|
| 76 |
+
#elif V8_HAS_BUILTIN_CTZ
|
| 77 |
+
__builtin_ctz(static_cast<uint32_t>(kCardSizeInBytes));
|
| 78 |
+
#else //! V8_HAS_BUILTIN_CTZ
|
| 79 |
+
// Hardcode and check with assert.
|
| 80 |
+
12;
|
| 81 |
+
#endif // !V8_HAS_BUILTIN_CTZ
|
| 82 |
+
static_assert((1 << kGranularityBits) == kCardSizeInBytes);
|
| 83 |
+
const size_t entry = offset >> kGranularityBits;
|
| 84 |
+
CPPGC_DCHECK(CagedHeapBase::GetAgeTableSize() > entry);
|
| 85 |
+
return entry;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
#if defined(V8_CC_GNU)
|
| 89 |
+
// gcc disallows flexible arrays in otherwise empty classes.
|
| 90 |
+
Age table_[0];
|
| 91 |
+
#else // !defined(V8_CC_GNU)
|
| 92 |
+
Age table_[];
|
| 93 |
+
#endif // !defined(V8_CC_GNU)
|
| 94 |
+
};
|
| 95 |
+
|
| 96 |
+
#endif // CPPGC_YOUNG_GENERATION
|
| 97 |
+
|
| 98 |
+
struct CagedHeapLocalData final {
|
| 99 |
+
V8_INLINE static CagedHeapLocalData& Get() {
|
| 100 |
+
return *reinterpret_cast<CagedHeapLocalData*>(CagedHeapBase::GetBase());
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
static constexpr size_t CalculateLocalDataSizeForHeapSize(size_t heap_size) {
|
| 104 |
+
return AgeTable::CalculateAgeTableSizeForHeapSize(heap_size);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 108 |
+
AgeTable age_table;
|
| 109 |
+
#endif
|
| 110 |
+
};
|
| 111 |
+
|
| 112 |
+
} // namespace internal
|
| 113 |
+
} // namespace cppgc
|
| 114 |
+
|
| 115 |
+
#endif // defined(CPPGC_CAGED_HEAP)
|
| 116 |
+
|
| 117 |
+
#endif // INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_LOCAL_DATA_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/caged-heap.h
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2022 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_H_
|
| 7 |
+
|
| 8 |
+
#include <climits>
|
| 9 |
+
#include <cstddef>
|
| 10 |
+
|
| 11 |
+
#include "cppgc/internal/api-constants.h"
|
| 12 |
+
#include "cppgc/internal/base-page-handle.h"
|
| 13 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 14 |
+
|
| 15 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 16 |
+
|
| 17 |
+
namespace cppgc {
|
| 18 |
+
namespace internal {
|
| 19 |
+
|
| 20 |
+
class V8_EXPORT CagedHeapBase {
|
| 21 |
+
public:
|
| 22 |
+
V8_INLINE static uintptr_t OffsetFromAddress(const void* address) {
|
| 23 |
+
return reinterpret_cast<uintptr_t>(address) &
|
| 24 |
+
(api_constants::kCagedHeapReservationAlignment - 1);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
V8_INLINE static bool IsWithinCage(const void* address) {
|
| 28 |
+
CPPGC_DCHECK(g_heap_base_);
|
| 29 |
+
return (reinterpret_cast<uintptr_t>(address) &
|
| 30 |
+
~(api_constants::kCagedHeapReservationAlignment - 1)) ==
|
| 31 |
+
g_heap_base_;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
V8_INLINE static bool AreWithinCage(const void* addr1, const void* addr2) {
|
| 35 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 36 |
+
static constexpr size_t kHeapBaseShift =
|
| 37 |
+
31 + api_constants::kPointerCompressionShift;
|
| 38 |
+
#else // !defined(CPPGC_POINTER_COMPRESSION)
|
| 39 |
+
static constexpr size_t kHeapBaseShift = sizeof(uint32_t) * CHAR_BIT;
|
| 40 |
+
#endif // !defined(CPPGC_POINTER_COMPRESSION)
|
| 41 |
+
static_assert((static_cast<size_t>(1) << kHeapBaseShift) ==
|
| 42 |
+
api_constants::kCagedHeapMaxReservationSize);
|
| 43 |
+
CPPGC_DCHECK(g_heap_base_);
|
| 44 |
+
return !(((reinterpret_cast<uintptr_t>(addr1) ^ g_heap_base_) |
|
| 45 |
+
(reinterpret_cast<uintptr_t>(addr2) ^ g_heap_base_)) >>
|
| 46 |
+
kHeapBaseShift);
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
V8_INLINE static uintptr_t GetBase() { return g_heap_base_; }
|
| 50 |
+
V8_INLINE static size_t GetAgeTableSize() { return g_age_table_size_; }
|
| 51 |
+
|
| 52 |
+
private:
|
| 53 |
+
friend class CagedHeap;
|
| 54 |
+
|
| 55 |
+
static uintptr_t g_heap_base_;
|
| 56 |
+
static size_t g_age_table_size_;
|
| 57 |
+
};
|
| 58 |
+
|
| 59 |
+
} // namespace internal
|
| 60 |
+
} // namespace cppgc
|
| 61 |
+
|
| 62 |
+
#endif // defined(CPPGC_CAGED_HEAP)
|
| 63 |
+
|
| 64 |
+
#endif // INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/compiler-specific.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_COMPILER_SPECIFIC_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_COMPILER_SPECIFIC_H_
|
| 7 |
+
|
| 8 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 9 |
+
|
| 10 |
+
namespace cppgc {
|
| 11 |
+
|
| 12 |
+
#if defined(__has_attribute)
|
| 13 |
+
#define CPPGC_HAS_ATTRIBUTE(FEATURE) __has_attribute(FEATURE)
|
| 14 |
+
#else
|
| 15 |
+
#define CPPGC_HAS_ATTRIBUTE(FEATURE) 0
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
#if defined(__has_cpp_attribute)
|
| 19 |
+
#define CPPGC_HAS_CPP_ATTRIBUTE(FEATURE) __has_cpp_attribute(FEATURE)
|
| 20 |
+
#else
|
| 21 |
+
#define CPPGC_HAS_CPP_ATTRIBUTE(FEATURE) 0
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
// [[no_unique_address]] comes in C++20 but supported in clang with -std >=
|
| 25 |
+
// c++11.
|
| 26 |
+
#if defined(V8_CC_MSVC) && CPPGC_HAS_CPP_ATTRIBUTE(msvc::no_unique_address)
|
| 27 |
+
// Unfortunately MSVC ignores [[no_unique_address]] (see
|
| 28 |
+
// https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#msvc-extensions-and-abi),
|
| 29 |
+
// and clang-cl matches it for ABI compatibility reasons. We need to prefer
|
| 30 |
+
// [[msvc::no_unique_address]] when available if we actually want any effect.
|
| 31 |
+
#define CPPGC_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
|
| 32 |
+
#elif CPPGC_HAS_CPP_ATTRIBUTE(no_unique_address)
|
| 33 |
+
#define CPPGC_NO_UNIQUE_ADDRESS [[no_unique_address]]
|
| 34 |
+
#else
|
| 35 |
+
#define CPPGC_NO_UNIQUE_ADDRESS
|
| 36 |
+
#endif
|
| 37 |
+
|
| 38 |
+
#if CPPGC_HAS_ATTRIBUTE(unused)
|
| 39 |
+
#define CPPGC_UNUSED __attribute__((unused))
|
| 40 |
+
#else
|
| 41 |
+
#define CPPGC_UNUSED
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
} // namespace cppgc
|
| 45 |
+
|
| 46 |
+
#endif // INCLUDE_CPPGC_INTERNAL_COMPILER_SPECIFIC_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/conditional-stack-allocated.h
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2025 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_CONDITIONAL_STACK_ALLOCATED_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_CONDITIONAL_STACK_ALLOCATED_H_
|
| 7 |
+
|
| 8 |
+
#include <type_traits>
|
| 9 |
+
|
| 10 |
+
#include "cppgc/macros.h" // NOLINT(build/include_directory)
|
| 11 |
+
#include "cppgc/type-traits.h" // NOLINT(build/include_directory)
|
| 12 |
+
|
| 13 |
+
namespace cppgc {
|
| 14 |
+
namespace internal {
|
| 15 |
+
|
| 16 |
+
// Base class that is marked as stack allocated if T is either marked as stack
|
| 17 |
+
// allocated or a traceable type.
|
| 18 |
+
template <typename T>
|
| 19 |
+
class ConditionalStackAllocatedBase;
|
| 20 |
+
|
| 21 |
+
template <typename T>
|
| 22 |
+
concept RequiresStackAllocated =
|
| 23 |
+
!std::is_void_v<T> &&
|
| 24 |
+
(cppgc::IsStackAllocatedType<T> || cppgc::internal::IsTraceableV<T> ||
|
| 25 |
+
cppgc::IsGarbageCollectedOrMixinTypeV<T>);
|
| 26 |
+
|
| 27 |
+
template <typename T>
|
| 28 |
+
requires(RequiresStackAllocated<T>)
|
| 29 |
+
class ConditionalStackAllocatedBase<T> {
|
| 30 |
+
public:
|
| 31 |
+
CPPGC_STACK_ALLOCATED();
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
template <typename T>
|
| 35 |
+
requires(!RequiresStackAllocated<T>)
|
| 36 |
+
class ConditionalStackAllocatedBase<T> {};
|
| 37 |
+
|
| 38 |
+
} // namespace internal
|
| 39 |
+
} // namespace cppgc
|
| 40 |
+
|
| 41 |
+
#endif // INCLUDE_CPPGC_INTERNAL_CONDITIONAL_STACK_ALLOCATED_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/finalizer-trait.h
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_FINALIZER_TRAIT_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_FINALIZER_TRAIT_H_
|
| 7 |
+
|
| 8 |
+
#include <type_traits>
|
| 9 |
+
|
| 10 |
+
#include "cppgc/type-traits.h"
|
| 11 |
+
|
| 12 |
+
namespace cppgc {
|
| 13 |
+
namespace internal {
|
| 14 |
+
|
| 15 |
+
using FinalizationCallback = void (*)(void*);
|
| 16 |
+
|
| 17 |
+
template <typename T, typename = void>
|
| 18 |
+
struct HasFinalizeGarbageCollectedObject : std::false_type {};
|
| 19 |
+
|
| 20 |
+
template <typename T>
|
| 21 |
+
struct HasFinalizeGarbageCollectedObject<
|
| 22 |
+
T,
|
| 23 |
+
std::void_t<decltype(std::declval<T>().FinalizeGarbageCollectedObject())>>
|
| 24 |
+
: std::true_type {};
|
| 25 |
+
|
| 26 |
+
// The FinalizerTraitImpl specifies how to finalize objects.
|
| 27 |
+
template <typename T, bool isFinalized>
|
| 28 |
+
struct FinalizerTraitImpl;
|
| 29 |
+
|
| 30 |
+
template <typename T>
|
| 31 |
+
struct FinalizerTraitImpl<T, true> {
|
| 32 |
+
private:
|
| 33 |
+
// Dispatch to custom FinalizeGarbageCollectedObject().
|
| 34 |
+
struct Custom {
|
| 35 |
+
static void Call(void* obj) {
|
| 36 |
+
static_cast<T*>(obj)->FinalizeGarbageCollectedObject();
|
| 37 |
+
}
|
| 38 |
+
};
|
| 39 |
+
|
| 40 |
+
// Dispatch to regular destructor.
|
| 41 |
+
struct Destructor {
|
| 42 |
+
static void Call(void* obj) { static_cast<T*>(obj)->~T(); }
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
using FinalizeImpl =
|
| 46 |
+
std::conditional_t<HasFinalizeGarbageCollectedObject<T>::value, Custom,
|
| 47 |
+
Destructor>;
|
| 48 |
+
|
| 49 |
+
public:
|
| 50 |
+
static void Finalize(void* obj) {
|
| 51 |
+
static_assert(sizeof(T), "T must be fully defined");
|
| 52 |
+
FinalizeImpl::Call(obj);
|
| 53 |
+
}
|
| 54 |
+
};
|
| 55 |
+
|
| 56 |
+
template <typename T>
|
| 57 |
+
struct FinalizerTraitImpl<T, false> {
|
| 58 |
+
static void Finalize(void* obj) {
|
| 59 |
+
static_assert(sizeof(T), "T must be fully defined");
|
| 60 |
+
}
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
// The FinalizerTrait is used to determine if a type requires finalization and
|
| 64 |
+
// what finalization means.
|
| 65 |
+
template <typename T>
|
| 66 |
+
struct FinalizerTrait {
|
| 67 |
+
private:
|
| 68 |
+
// Object has a finalizer if it has
|
| 69 |
+
// - a custom FinalizeGarbageCollectedObject method, or
|
| 70 |
+
// - a destructor.
|
| 71 |
+
static constexpr bool kNonTrivialFinalizer =
|
| 72 |
+
internal::HasFinalizeGarbageCollectedObject<T>::value ||
|
| 73 |
+
!std::is_trivially_destructible<typename std::remove_cv<T>::type>::value;
|
| 74 |
+
|
| 75 |
+
static void Finalize(void* obj) {
|
| 76 |
+
internal::FinalizerTraitImpl<T, kNonTrivialFinalizer>::Finalize(obj);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
public:
|
| 80 |
+
static constexpr bool HasFinalizer() { return kNonTrivialFinalizer; }
|
| 81 |
+
|
| 82 |
+
// The callback used to finalize an object of type T.
|
| 83 |
+
static constexpr FinalizationCallback kCallback =
|
| 84 |
+
kNonTrivialFinalizer ? Finalize : nullptr;
|
| 85 |
+
};
|
| 86 |
+
|
| 87 |
+
template <typename T>
|
| 88 |
+
constexpr FinalizationCallback FinalizerTrait<T>::kCallback;
|
| 89 |
+
|
| 90 |
+
} // namespace internal
|
| 91 |
+
} // namespace cppgc
|
| 92 |
+
|
| 93 |
+
#endif // INCLUDE_CPPGC_INTERNAL_FINALIZER_TRAIT_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/gc-info.h
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_GC_INFO_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_GC_INFO_H_
|
| 7 |
+
|
| 8 |
+
#include <atomic>
|
| 9 |
+
#include <cstdint>
|
| 10 |
+
#include <type_traits>
|
| 11 |
+
|
| 12 |
+
#include "cppgc/internal/finalizer-trait.h"
|
| 13 |
+
#include "cppgc/internal/logging.h"
|
| 14 |
+
#include "cppgc/internal/name-trait.h"
|
| 15 |
+
#include "cppgc/trace-trait.h"
|
| 16 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 17 |
+
|
| 18 |
+
namespace cppgc {
|
| 19 |
+
namespace internal {
|
| 20 |
+
|
| 21 |
+
using GCInfoIndex = uint16_t;
|
| 22 |
+
|
| 23 |
+
struct V8_EXPORT EnsureGCInfoIndexTrait final {
|
| 24 |
+
// Acquires a new GC info object and updates `registered_index` with the index
|
| 25 |
+
// that identifies that new info accordingly.
|
| 26 |
+
template <typename T>
|
| 27 |
+
V8_INLINE static GCInfoIndex EnsureIndex(
|
| 28 |
+
std::atomic<GCInfoIndex>& registered_index) {
|
| 29 |
+
return EnsureGCInfoIndexTraitDispatch<T>{}(registered_index);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
private:
|
| 33 |
+
template <typename T, bool = FinalizerTrait<T>::HasFinalizer(),
|
| 34 |
+
bool = NameTrait<T>::HasNonHiddenName()>
|
| 35 |
+
struct EnsureGCInfoIndexTraitDispatch;
|
| 36 |
+
|
| 37 |
+
static GCInfoIndex V8_PRESERVE_MOST
|
| 38 |
+
EnsureGCInfoIndex(std::atomic<GCInfoIndex>&, TraceCallback,
|
| 39 |
+
FinalizationCallback, NameCallback);
|
| 40 |
+
static GCInfoIndex V8_PRESERVE_MOST EnsureGCInfoIndex(
|
| 41 |
+
std::atomic<GCInfoIndex>&, TraceCallback, FinalizationCallback);
|
| 42 |
+
static GCInfoIndex V8_PRESERVE_MOST
|
| 43 |
+
EnsureGCInfoIndex(std::atomic<GCInfoIndex>&, TraceCallback, NameCallback);
|
| 44 |
+
static GCInfoIndex V8_PRESERVE_MOST
|
| 45 |
+
EnsureGCInfoIndex(std::atomic<GCInfoIndex>&, TraceCallback);
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
#define DISPATCH(has_finalizer, has_non_hidden_name, function) \
|
| 49 |
+
template <typename T> \
|
| 50 |
+
struct EnsureGCInfoIndexTrait::EnsureGCInfoIndexTraitDispatch< \
|
| 51 |
+
T, has_finalizer, has_non_hidden_name> { \
|
| 52 |
+
V8_INLINE GCInfoIndex \
|
| 53 |
+
operator()(std::atomic<GCInfoIndex>& registered_index) { \
|
| 54 |
+
return function; \
|
| 55 |
+
} \
|
| 56 |
+
};
|
| 57 |
+
|
| 58 |
+
// ------------------------------------------------------- //
|
| 59 |
+
// DISPATCH(has_finalizer, has_non_hidden_name, function) //
|
| 60 |
+
// ------------------------------------------------------- //
|
| 61 |
+
DISPATCH(true, true, //
|
| 62 |
+
EnsureGCInfoIndex(registered_index, //
|
| 63 |
+
TraceTrait<T>::Trace, //
|
| 64 |
+
FinalizerTrait<T>::kCallback, //
|
| 65 |
+
NameTrait<T>::GetName)) //
|
| 66 |
+
DISPATCH(true, false, //
|
| 67 |
+
EnsureGCInfoIndex(registered_index, //
|
| 68 |
+
TraceTrait<T>::Trace, //
|
| 69 |
+
FinalizerTrait<T>::kCallback)) //
|
| 70 |
+
DISPATCH(false, true, //
|
| 71 |
+
EnsureGCInfoIndex(registered_index, //
|
| 72 |
+
TraceTrait<T>::Trace, //
|
| 73 |
+
NameTrait<T>::GetName)) //
|
| 74 |
+
DISPATCH(false, false, //
|
| 75 |
+
EnsureGCInfoIndex(registered_index, //
|
| 76 |
+
TraceTrait<T>::Trace)) //
|
| 77 |
+
|
| 78 |
+
#undef DISPATCH
|
| 79 |
+
|
| 80 |
+
// Trait determines how the garbage collector treats objects wrt. to traversing,
|
| 81 |
+
// finalization, and naming.
|
| 82 |
+
template <typename T>
|
| 83 |
+
struct GCInfoTrait final {
|
| 84 |
+
V8_INLINE static GCInfoIndex Index() {
|
| 85 |
+
static_assert(sizeof(T), "T must be fully defined");
|
| 86 |
+
static std::atomic<GCInfoIndex>
|
| 87 |
+
registered_index; // Uses zero initialization.
|
| 88 |
+
GCInfoIndex index = registered_index.load(std::memory_order_acquire);
|
| 89 |
+
if (V8_UNLIKELY(!index)) {
|
| 90 |
+
index = EnsureGCInfoIndexTrait::EnsureIndex<T>(registered_index);
|
| 91 |
+
CPPGC_DCHECK(index != 0);
|
| 92 |
+
CPPGC_DCHECK(index == registered_index.load(std::memory_order_acquire));
|
| 93 |
+
}
|
| 94 |
+
return index;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
static constexpr void CheckCallbacksAreDefined() {
|
| 98 |
+
// No USE() macro available.
|
| 99 |
+
(void)static_cast<TraceCallback>(TraceTrait<T>::Trace);
|
| 100 |
+
(void)static_cast<FinalizationCallback>(FinalizerTrait<T>::kCallback);
|
| 101 |
+
(void)static_cast<NameCallback>(NameTrait<T>::GetName);
|
| 102 |
+
}
|
| 103 |
+
};
|
| 104 |
+
|
| 105 |
+
// Fold types based on finalizer behavior. Note that finalizer characteristics
|
| 106 |
+
// align with trace behavior, i.e., destructors are virtual when trace methods
|
| 107 |
+
// are and vice versa.
|
| 108 |
+
template <typename T, typename ParentMostGarbageCollectedType>
|
| 109 |
+
struct GCInfoFolding final {
|
| 110 |
+
static constexpr bool kHasVirtualDestructorAtBase =
|
| 111 |
+
std::has_virtual_destructor<ParentMostGarbageCollectedType>::value;
|
| 112 |
+
static constexpr bool kBothTypesAreTriviallyDestructible =
|
| 113 |
+
std::is_trivially_destructible<ParentMostGarbageCollectedType>::value &&
|
| 114 |
+
std::is_trivially_destructible<T>::value;
|
| 115 |
+
static constexpr bool kHasCustomFinalizerDispatchAtBase =
|
| 116 |
+
internal::HasFinalizeGarbageCollectedObject<
|
| 117 |
+
ParentMostGarbageCollectedType>::value;
|
| 118 |
+
#ifdef CPPGC_SUPPORTS_OBJECT_NAMES
|
| 119 |
+
static constexpr bool kWantsDetailedObjectNames = true;
|
| 120 |
+
#else // !CPPGC_SUPPORTS_OBJECT_NAMES
|
| 121 |
+
static constexpr bool kWantsDetailedObjectNames = false;
|
| 122 |
+
#endif // !CPPGC_SUPPORTS_OBJECT_NAMES
|
| 123 |
+
|
| 124 |
+
// Always true. Forces the compiler to resolve callbacks which ensures that
|
| 125 |
+
// both modes don't break without requiring compiling a separate
|
| 126 |
+
// configuration. Only a single GCInfo (for `ResultType` below) will actually
|
| 127 |
+
// be instantiated but existence (and well-formedness) of all callbacks is
|
| 128 |
+
// checked.
|
| 129 |
+
static constexpr bool WantToFold() {
|
| 130 |
+
if constexpr ((kHasVirtualDestructorAtBase ||
|
| 131 |
+
kBothTypesAreTriviallyDestructible ||
|
| 132 |
+
kHasCustomFinalizerDispatchAtBase) &&
|
| 133 |
+
!kWantsDetailedObjectNames) {
|
| 134 |
+
GCInfoTrait<T>::CheckCallbacksAreDefined();
|
| 135 |
+
GCInfoTrait<ParentMostGarbageCollectedType>::CheckCallbacksAreDefined();
|
| 136 |
+
return true;
|
| 137 |
+
}
|
| 138 |
+
return false;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
// Folding would regress name resolution when deriving names from C++
|
| 142 |
+
// class names as it would just folds a name to the base class name.
|
| 143 |
+
using ResultType =
|
| 144 |
+
std::conditional_t<WantToFold(), ParentMostGarbageCollectedType, T>;
|
| 145 |
+
};
|
| 146 |
+
|
| 147 |
+
} // namespace internal
|
| 148 |
+
} // namespace cppgc
|
| 149 |
+
|
| 150 |
+
#endif // INCLUDE_CPPGC_INTERNAL_GC_INFO_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/logging.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_LOGGING_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_LOGGING_H_
|
| 7 |
+
|
| 8 |
+
#include "cppgc/source-location.h"
|
| 9 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 10 |
+
|
| 11 |
+
namespace cppgc {
|
| 12 |
+
namespace internal {
|
| 13 |
+
|
| 14 |
+
void V8_EXPORT DCheckImpl(const char*,
|
| 15 |
+
const SourceLocation& = SourceLocation::Current());
|
| 16 |
+
[[noreturn]] void V8_EXPORT
|
| 17 |
+
FatalImpl(const char*, const SourceLocation& = SourceLocation::Current());
|
| 18 |
+
|
| 19 |
+
// Used to ignore -Wunused-variable.
|
| 20 |
+
template <typename>
|
| 21 |
+
struct EatParams {};
|
| 22 |
+
|
| 23 |
+
#ifdef CPPGC_ENABLE_API_CHECKS
|
| 24 |
+
#define CPPGC_DCHECK_MSG(condition, message) \
|
| 25 |
+
do { \
|
| 26 |
+
if (V8_UNLIKELY(!(condition))) { \
|
| 27 |
+
::cppgc::internal::DCheckImpl(message); \
|
| 28 |
+
} \
|
| 29 |
+
} while (false)
|
| 30 |
+
#else // !CPPGC_ENABLE_API_CHECKS
|
| 31 |
+
#define CPPGC_DCHECK_MSG(condition, message) \
|
| 32 |
+
(static_cast<void>(::cppgc::internal::EatParams<decltype( \
|
| 33 |
+
static_cast<void>(condition), message)>{}))
|
| 34 |
+
#endif // !CPPGC_ENABLE_API_CHECKS
|
| 35 |
+
|
| 36 |
+
#define CPPGC_DCHECK(condition) CPPGC_DCHECK_MSG(condition, #condition)
|
| 37 |
+
|
| 38 |
+
#define CPPGC_CHECK_MSG(condition, message) \
|
| 39 |
+
do { \
|
| 40 |
+
if (V8_UNLIKELY(!(condition))) { \
|
| 41 |
+
::cppgc::internal::FatalImpl(message); \
|
| 42 |
+
} \
|
| 43 |
+
} while (false)
|
| 44 |
+
|
| 45 |
+
#define CPPGC_CHECK(condition) CPPGC_CHECK_MSG(condition, #condition)
|
| 46 |
+
|
| 47 |
+
} // namespace internal
|
| 48 |
+
} // namespace cppgc
|
| 49 |
+
|
| 50 |
+
#endif // INCLUDE_CPPGC_INTERNAL_LOGGING_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/member-storage.h
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2022 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_MEMBER_STORAGE_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_MEMBER_STORAGE_H_
|
| 7 |
+
|
| 8 |
+
#include <atomic>
|
| 9 |
+
#include <cstddef>
|
| 10 |
+
#include <type_traits>
|
| 11 |
+
|
| 12 |
+
#include "cppgc/internal/api-constants.h"
|
| 13 |
+
#include "cppgc/internal/caged-heap.h"
|
| 14 |
+
#include "cppgc/internal/logging.h"
|
| 15 |
+
#include "cppgc/sentinel-pointer.h"
|
| 16 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 17 |
+
|
| 18 |
+
namespace cppgc {
|
| 19 |
+
namespace internal {
|
| 20 |
+
|
| 21 |
+
enum class WriteBarrierSlotType {
|
| 22 |
+
kCompressed,
|
| 23 |
+
kUncompressed,
|
| 24 |
+
};
|
| 25 |
+
|
| 26 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 27 |
+
|
| 28 |
+
#if defined(__clang__)
|
| 29 |
+
// Attribute const allows the compiler to assume that CageBaseGlobal::g_base_
|
| 30 |
+
// doesn't change (e.g. across calls) and thereby avoid redundant loads.
|
| 31 |
+
#define CPPGC_CONST __attribute__((const))
|
| 32 |
+
#define CPPGC_REQUIRE_CONSTANT_INIT \
|
| 33 |
+
__attribute__((require_constant_initialization))
|
| 34 |
+
#else // defined(__clang__)
|
| 35 |
+
#define CPPGC_CONST
|
| 36 |
+
#define CPPGC_REQUIRE_CONSTANT_INIT
|
| 37 |
+
#endif // defined(__clang__)
|
| 38 |
+
|
| 39 |
+
class V8_EXPORT CageBaseGlobal final {
|
| 40 |
+
public:
|
| 41 |
+
V8_INLINE CPPGC_CONST static uintptr_t Get() {
|
| 42 |
+
CPPGC_DCHECK(IsBaseConsistent());
|
| 43 |
+
return g_base_.base;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
V8_INLINE CPPGC_CONST static bool IsSet() {
|
| 47 |
+
CPPGC_DCHECK(IsBaseConsistent());
|
| 48 |
+
return (g_base_.base & ~kLowerHalfWordMask) != 0;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
private:
|
| 52 |
+
// We keep the lower halfword as ones to speed up decompression.
|
| 53 |
+
static constexpr uintptr_t kLowerHalfWordMask =
|
| 54 |
+
(api_constants::kCagedHeapReservationAlignment - 1);
|
| 55 |
+
|
| 56 |
+
static union alignas(api_constants::kCachelineSize) Base {
|
| 57 |
+
uintptr_t base;
|
| 58 |
+
char cache_line[api_constants::kCachelineSize];
|
| 59 |
+
} g_base_ CPPGC_REQUIRE_CONSTANT_INIT;
|
| 60 |
+
|
| 61 |
+
CageBaseGlobal() = delete;
|
| 62 |
+
|
| 63 |
+
V8_INLINE static bool IsBaseConsistent() {
|
| 64 |
+
return kLowerHalfWordMask == (g_base_.base & kLowerHalfWordMask);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
friend class CageBaseGlobalUpdater;
|
| 68 |
+
};
|
| 69 |
+
|
| 70 |
+
#undef CPPGC_REQUIRE_CONSTANT_INIT
|
| 71 |
+
#undef CPPGC_CONST
|
| 72 |
+
|
| 73 |
+
class V8_TRIVIAL_ABI CompressedPointer final {
|
| 74 |
+
public:
|
| 75 |
+
struct AtomicInitializerTag {};
|
| 76 |
+
|
| 77 |
+
using IntegralType = uint32_t;
|
| 78 |
+
static constexpr auto kWriteBarrierSlotType =
|
| 79 |
+
WriteBarrierSlotType::kCompressed;
|
| 80 |
+
|
| 81 |
+
V8_INLINE CompressedPointer() : value_(0u) {}
|
| 82 |
+
V8_INLINE explicit CompressedPointer(const void* value,
|
| 83 |
+
AtomicInitializerTag) {
|
| 84 |
+
StoreAtomic(value);
|
| 85 |
+
}
|
| 86 |
+
V8_INLINE explicit CompressedPointer(const void* ptr)
|
| 87 |
+
: value_(Compress(ptr)) {}
|
| 88 |
+
V8_INLINE explicit CompressedPointer(std::nullptr_t) : value_(0u) {}
|
| 89 |
+
V8_INLINE explicit CompressedPointer(SentinelPointer)
|
| 90 |
+
: value_(kCompressedSentinel) {}
|
| 91 |
+
|
| 92 |
+
V8_INLINE const void* Load() const { return Decompress(value_); }
|
| 93 |
+
V8_INLINE const void* LoadAtomic() const {
|
| 94 |
+
return Decompress(
|
| 95 |
+
reinterpret_cast<const std::atomic<IntegralType>&>(value_).load(
|
| 96 |
+
std::memory_order_relaxed));
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
V8_INLINE void Store(const void* ptr) { value_ = Compress(ptr); }
|
| 100 |
+
V8_INLINE void StoreAtomic(const void* value) {
|
| 101 |
+
reinterpret_cast<std::atomic<IntegralType>&>(value_).store(
|
| 102 |
+
Compress(value), std::memory_order_relaxed);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
V8_INLINE void Clear() { value_ = 0u; }
|
| 106 |
+
V8_INLINE bool IsCleared() const { return !value_; }
|
| 107 |
+
|
| 108 |
+
V8_INLINE bool IsSentinel() const { return value_ == kCompressedSentinel; }
|
| 109 |
+
|
| 110 |
+
V8_INLINE uint32_t GetAsInteger() const { return value_; }
|
| 111 |
+
|
| 112 |
+
V8_INLINE friend bool operator==(CompressedPointer a, CompressedPointer b) {
|
| 113 |
+
return a.value_ == b.value_;
|
| 114 |
+
}
|
| 115 |
+
V8_INLINE friend bool operator!=(CompressedPointer a, CompressedPointer b) {
|
| 116 |
+
return a.value_ != b.value_;
|
| 117 |
+
}
|
| 118 |
+
V8_INLINE friend bool operator<(CompressedPointer a, CompressedPointer b) {
|
| 119 |
+
return a.value_ < b.value_;
|
| 120 |
+
}
|
| 121 |
+
V8_INLINE friend bool operator<=(CompressedPointer a, CompressedPointer b) {
|
| 122 |
+
return a.value_ <= b.value_;
|
| 123 |
+
}
|
| 124 |
+
V8_INLINE friend bool operator>(CompressedPointer a, CompressedPointer b) {
|
| 125 |
+
return a.value_ > b.value_;
|
| 126 |
+
}
|
| 127 |
+
V8_INLINE friend bool operator>=(CompressedPointer a, CompressedPointer b) {
|
| 128 |
+
return a.value_ >= b.value_;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
static V8_INLINE IntegralType Compress(const void* ptr) {
|
| 132 |
+
static_assert(SentinelPointer::kSentinelValue ==
|
| 133 |
+
1 << api_constants::kPointerCompressionShift,
|
| 134 |
+
"The compression scheme relies on the sentinel encoded as 1 "
|
| 135 |
+
"<< kPointerCompressionShift");
|
| 136 |
+
static constexpr size_t kGigaCageMask =
|
| 137 |
+
~(api_constants::kCagedHeapReservationAlignment - 1);
|
| 138 |
+
static constexpr size_t kPointerCompressionShiftMask =
|
| 139 |
+
(1 << api_constants::kPointerCompressionShift) - 1;
|
| 140 |
+
|
| 141 |
+
CPPGC_DCHECK(CageBaseGlobal::IsSet());
|
| 142 |
+
const uintptr_t base = CageBaseGlobal::Get();
|
| 143 |
+
CPPGC_DCHECK(!ptr || ptr == kSentinelPointer ||
|
| 144 |
+
(base & kGigaCageMask) ==
|
| 145 |
+
(reinterpret_cast<uintptr_t>(ptr) & kGigaCageMask));
|
| 146 |
+
CPPGC_DCHECK(
|
| 147 |
+
(reinterpret_cast<uintptr_t>(ptr) & kPointerCompressionShiftMask) == 0);
|
| 148 |
+
|
| 149 |
+
const auto uptr = reinterpret_cast<uintptr_t>(ptr);
|
| 150 |
+
// Shift the pointer and truncate.
|
| 151 |
+
auto compressed = static_cast<IntegralType>(
|
| 152 |
+
uptr >> api_constants::kPointerCompressionShift);
|
| 153 |
+
// Normal compressed pointers must have the MSB set. This is guaranteed by
|
| 154 |
+
// the cage alignment.
|
| 155 |
+
CPPGC_DCHECK((!compressed || compressed == kCompressedSentinel) ||
|
| 156 |
+
(compressed & (1 << 31)));
|
| 157 |
+
return compressed;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
static V8_INLINE void* Decompress(IntegralType ptr) {
|
| 161 |
+
CPPGC_DCHECK(CageBaseGlobal::IsSet());
|
| 162 |
+
const uintptr_t base = CageBaseGlobal::Get();
|
| 163 |
+
return Decompress(ptr, base);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
static V8_INLINE void* Decompress(IntegralType ptr, uintptr_t base) {
|
| 167 |
+
CPPGC_DCHECK(CageBaseGlobal::IsSet());
|
| 168 |
+
CPPGC_DCHECK(base == CageBaseGlobal::Get());
|
| 169 |
+
// Sign-extend compressed pointer to full width. This ensure that normal
|
| 170 |
+
// pointers have only 1s in the base part of the address. It's also
|
| 171 |
+
// important to shift the unsigned value, as otherwise it would result in
|
| 172 |
+
// undefined behavior.
|
| 173 |
+
const uint64_t mask = static_cast<uint64_t>(static_cast<int32_t>(ptr))
|
| 174 |
+
<< api_constants::kPointerCompressionShift;
|
| 175 |
+
// Set the base part of the address for normal compressed pointers. Note
|
| 176 |
+
// that nullptr and the sentinel value do not have 1s in the base part and
|
| 177 |
+
// remain as-is in this operation.
|
| 178 |
+
return reinterpret_cast<void*>(mask & base);
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
// For a given memory `address`, this method iterates all possible pointers
|
| 182 |
+
// that can be reasonably recovered with the current compression scheme and
|
| 183 |
+
// passes them to `callback`.
|
| 184 |
+
template <typename Callback>
|
| 185 |
+
static V8_INLINE void VisitPossiblePointers(const void* address,
|
| 186 |
+
Callback callback);
|
| 187 |
+
|
| 188 |
+
private:
|
| 189 |
+
static constexpr IntegralType kCompressedSentinel =
|
| 190 |
+
SentinelPointer::kSentinelValue >>
|
| 191 |
+
api_constants::kPointerCompressionShift;
|
| 192 |
+
// All constructors initialize `value_`. Do not add a default value here as it
|
| 193 |
+
// results in a non-atomic write on some builds, even when the atomic version
|
| 194 |
+
// of the constructor is used.
|
| 195 |
+
IntegralType value_;
|
| 196 |
+
};
|
| 197 |
+
|
| 198 |
+
template <typename Callback>
|
| 199 |
+
// static
|
| 200 |
+
void CompressedPointer::VisitPossiblePointers(const void* address,
|
| 201 |
+
Callback callback) {
|
| 202 |
+
const uintptr_t base = CageBaseGlobal::Get();
|
| 203 |
+
CPPGC_DCHECK(base);
|
| 204 |
+
// We may have random compressed pointers on stack (e.g. due to inlined
|
| 205 |
+
// collections). These could be present in both halfwords.
|
| 206 |
+
const uint32_t compressed_low =
|
| 207 |
+
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(address));
|
| 208 |
+
callback(CompressedPointer::Decompress(compressed_low, base));
|
| 209 |
+
const uint32_t compressed_high = static_cast<uint32_t>(
|
| 210 |
+
reinterpret_cast<uintptr_t>(address) >> (sizeof(uint32_t) * CHAR_BIT));
|
| 211 |
+
callback(CompressedPointer::Decompress(compressed_high, base));
|
| 212 |
+
// Iterate possible intermediate values, see `Decompress()`. The intermediate
|
| 213 |
+
// value of decompressing is a 64-bit value where 35 bits are the offset. We
|
| 214 |
+
// don't assume sign extension is stored and recover that part.
|
| 215 |
+
//
|
| 216 |
+
// Note that this case conveniently also recovers the full pointer.
|
| 217 |
+
static constexpr uintptr_t kBitForIntermediateValue =
|
| 218 |
+
(sizeof(uint32_t) * CHAR_BIT) + api_constants::kPointerCompressionShift;
|
| 219 |
+
static constexpr uintptr_t kSignExtensionMask =
|
| 220 |
+
~((uintptr_t{1} << kBitForIntermediateValue) - 1);
|
| 221 |
+
const uintptr_t intermediate_sign_extended =
|
| 222 |
+
reinterpret_cast<uintptr_t>(address) | kSignExtensionMask;
|
| 223 |
+
callback(reinterpret_cast<void*>(intermediate_sign_extended & base));
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
#endif // defined(CPPGC_POINTER_COMPRESSION)
|
| 227 |
+
|
| 228 |
+
class V8_TRIVIAL_ABI RawPointer final {
|
| 229 |
+
public:
|
| 230 |
+
struct AtomicInitializerTag {};
|
| 231 |
+
|
| 232 |
+
using IntegralType = uintptr_t;
|
| 233 |
+
static constexpr auto kWriteBarrierSlotType =
|
| 234 |
+
WriteBarrierSlotType::kUncompressed;
|
| 235 |
+
|
| 236 |
+
V8_INLINE RawPointer() : ptr_(nullptr) {}
|
| 237 |
+
V8_INLINE explicit RawPointer(const void* ptr, AtomicInitializerTag) {
|
| 238 |
+
StoreAtomic(ptr);
|
| 239 |
+
}
|
| 240 |
+
V8_INLINE explicit RawPointer(const void* ptr) : ptr_(ptr) {}
|
| 241 |
+
|
| 242 |
+
V8_INLINE const void* Load() const { return ptr_; }
|
| 243 |
+
V8_INLINE const void* LoadAtomic() const {
|
| 244 |
+
return reinterpret_cast<const std::atomic<const void*>&>(ptr_).load(
|
| 245 |
+
std::memory_order_relaxed);
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
V8_INLINE void Store(const void* ptr) { ptr_ = ptr; }
|
| 249 |
+
V8_INLINE void StoreAtomic(const void* ptr) {
|
| 250 |
+
reinterpret_cast<std::atomic<const void*>&>(ptr_).store(
|
| 251 |
+
ptr, std::memory_order_relaxed);
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
V8_INLINE void Clear() { ptr_ = nullptr; }
|
| 255 |
+
V8_INLINE bool IsCleared() const { return !ptr_; }
|
| 256 |
+
|
| 257 |
+
V8_INLINE bool IsSentinel() const { return ptr_ == kSentinelPointer; }
|
| 258 |
+
|
| 259 |
+
V8_INLINE uintptr_t GetAsInteger() const {
|
| 260 |
+
return reinterpret_cast<uintptr_t>(ptr_);
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
V8_INLINE friend bool operator==(RawPointer a, RawPointer b) {
|
| 264 |
+
return a.ptr_ == b.ptr_;
|
| 265 |
+
}
|
| 266 |
+
V8_INLINE friend bool operator!=(RawPointer a, RawPointer b) {
|
| 267 |
+
return a.ptr_ != b.ptr_;
|
| 268 |
+
}
|
| 269 |
+
V8_INLINE friend bool operator<(RawPointer a, RawPointer b) {
|
| 270 |
+
return a.ptr_ < b.ptr_;
|
| 271 |
+
}
|
| 272 |
+
V8_INLINE friend bool operator<=(RawPointer a, RawPointer b) {
|
| 273 |
+
return a.ptr_ <= b.ptr_;
|
| 274 |
+
}
|
| 275 |
+
V8_INLINE friend bool operator>(RawPointer a, RawPointer b) {
|
| 276 |
+
return a.ptr_ > b.ptr_;
|
| 277 |
+
}
|
| 278 |
+
V8_INLINE friend bool operator>=(RawPointer a, RawPointer b) {
|
| 279 |
+
return a.ptr_ >= b.ptr_;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
template <typename Callback>
|
| 283 |
+
static V8_INLINE void VisitPossiblePointers(const void* address,
|
| 284 |
+
Callback callback) {
|
| 285 |
+
// Pass along the full pointer.
|
| 286 |
+
return callback(const_cast<void*>(address));
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
private:
|
| 290 |
+
// All constructors initialize `ptr_`. Do not add a default value here as it
|
| 291 |
+
// results in a non-atomic write on some builds, even when the atomic version
|
| 292 |
+
// of the constructor is used.
|
| 293 |
+
const void* ptr_;
|
| 294 |
+
};
|
| 295 |
+
|
| 296 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 297 |
+
using DefaultMemberStorage = CompressedPointer;
|
| 298 |
+
#else // !defined(CPPGC_POINTER_COMPRESSION)
|
| 299 |
+
using DefaultMemberStorage = RawPointer;
|
| 300 |
+
#endif // !defined(CPPGC_POINTER_COMPRESSION)
|
| 301 |
+
|
| 302 |
+
} // namespace internal
|
| 303 |
+
} // namespace cppgc
|
| 304 |
+
|
| 305 |
+
#endif // INCLUDE_CPPGC_INTERNAL_MEMBER_STORAGE_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/name-trait.h
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_NAME_TRAIT_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_NAME_TRAIT_H_
|
| 7 |
+
|
| 8 |
+
#include <cstddef>
|
| 9 |
+
#include <cstdint>
|
| 10 |
+
#include <type_traits>
|
| 11 |
+
|
| 12 |
+
#include "cppgc/name-provider.h"
|
| 13 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 14 |
+
|
| 15 |
+
namespace cppgc {
|
| 16 |
+
namespace internal {
|
| 17 |
+
|
| 18 |
+
#if CPPGC_SUPPORTS_OBJECT_NAMES && defined(__clang__)
|
| 19 |
+
#define CPPGC_SUPPORTS_COMPILE_TIME_TYPENAME 1
|
| 20 |
+
|
| 21 |
+
// Provides constexpr c-string storage for a name of fixed |Size| characters.
|
| 22 |
+
// Automatically appends terminating 0 byte.
|
| 23 |
+
template <size_t Size>
|
| 24 |
+
struct NameBuffer {
|
| 25 |
+
char name[Size + 1]{};
|
| 26 |
+
|
| 27 |
+
static constexpr NameBuffer FromCString(const char* str) {
|
| 28 |
+
NameBuffer result;
|
| 29 |
+
for (size_t i = 0; i < Size; ++i) result.name[i] = str[i];
|
| 30 |
+
result.name[Size] = 0;
|
| 31 |
+
return result;
|
| 32 |
+
}
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
template <typename T>
|
| 36 |
+
const char* GetTypename() {
|
| 37 |
+
static constexpr char kSelfPrefix[] =
|
| 38 |
+
"const char *cppgc::internal::GetTypename() [T =";
|
| 39 |
+
static_assert(__builtin_strncmp(__PRETTY_FUNCTION__, kSelfPrefix,
|
| 40 |
+
sizeof(kSelfPrefix) - 1) == 0,
|
| 41 |
+
"The prefix must match");
|
| 42 |
+
static constexpr const char* kTypenameStart =
|
| 43 |
+
__PRETTY_FUNCTION__ + sizeof(kSelfPrefix);
|
| 44 |
+
static constexpr size_t kTypenameSize =
|
| 45 |
+
__builtin_strlen(__PRETTY_FUNCTION__) - sizeof(kSelfPrefix) - 1;
|
| 46 |
+
// NameBuffer is an indirection that is needed to make sure that only a
|
| 47 |
+
// substring of __PRETTY_FUNCTION__ gets materialized in the binary.
|
| 48 |
+
static constexpr auto buffer =
|
| 49 |
+
NameBuffer<kTypenameSize>::FromCString(kTypenameStart);
|
| 50 |
+
return buffer.name;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
#else
|
| 54 |
+
#define CPPGC_SUPPORTS_COMPILE_TIME_TYPENAME 0
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
struct HeapObjectName {
|
| 58 |
+
const char* value;
|
| 59 |
+
bool name_was_hidden;
|
| 60 |
+
};
|
| 61 |
+
|
| 62 |
+
enum class HeapObjectNameForUnnamedObject : uint8_t {
|
| 63 |
+
kUseClassNameIfSupported,
|
| 64 |
+
kUseHiddenName,
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
class V8_EXPORT NameTraitBase {
|
| 68 |
+
protected:
|
| 69 |
+
static HeapObjectName GetNameFromTypeSignature(const char*);
|
| 70 |
+
};
|
| 71 |
+
|
| 72 |
+
// Trait that specifies how the garbage collector retrieves the name for a
|
| 73 |
+
// given object.
|
| 74 |
+
template <typename T>
|
| 75 |
+
class NameTrait final : public NameTraitBase {
|
| 76 |
+
public:
|
| 77 |
+
static constexpr bool HasNonHiddenName() {
|
| 78 |
+
#if CPPGC_SUPPORTS_COMPILE_TIME_TYPENAME
|
| 79 |
+
return true;
|
| 80 |
+
#elif CPPGC_SUPPORTS_OBJECT_NAMES
|
| 81 |
+
return true;
|
| 82 |
+
#else // !CPPGC_SUPPORTS_OBJECT_NAMES
|
| 83 |
+
return std::is_base_of<NameProvider, T>::value;
|
| 84 |
+
#endif // !CPPGC_SUPPORTS_OBJECT_NAMES
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
static HeapObjectName GetName(
|
| 88 |
+
const void* obj, HeapObjectNameForUnnamedObject name_retrieval_mode) {
|
| 89 |
+
return GetNameFor(static_cast<const T*>(obj), name_retrieval_mode);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
private:
|
| 93 |
+
static HeapObjectName GetNameFor(const NameProvider* name_provider,
|
| 94 |
+
HeapObjectNameForUnnamedObject) {
|
| 95 |
+
// Objects inheriting from `NameProvider` are not considered unnamed as
|
| 96 |
+
// users already provided a name for them.
|
| 97 |
+
return {name_provider->GetHumanReadableName(), false};
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
static HeapObjectName GetNameFor(
|
| 101 |
+
const void*, HeapObjectNameForUnnamedObject name_retrieval_mode) {
|
| 102 |
+
if (name_retrieval_mode == HeapObjectNameForUnnamedObject::kUseHiddenName)
|
| 103 |
+
return {NameProvider::kHiddenName, true};
|
| 104 |
+
|
| 105 |
+
#if CPPGC_SUPPORTS_COMPILE_TIME_TYPENAME
|
| 106 |
+
return {GetTypename<T>(), false};
|
| 107 |
+
#elif CPPGC_SUPPORTS_OBJECT_NAMES
|
| 108 |
+
|
| 109 |
+
#if defined(V8_CC_GNU)
|
| 110 |
+
#define PRETTY_FUNCTION_VALUE __PRETTY_FUNCTION__
|
| 111 |
+
#elif defined(V8_CC_MSVC)
|
| 112 |
+
#define PRETTY_FUNCTION_VALUE __FUNCSIG__
|
| 113 |
+
#else
|
| 114 |
+
#define PRETTY_FUNCTION_VALUE nullptr
|
| 115 |
+
#endif
|
| 116 |
+
|
| 117 |
+
static const HeapObjectName leaky_name =
|
| 118 |
+
GetNameFromTypeSignature(PRETTY_FUNCTION_VALUE);
|
| 119 |
+
return leaky_name;
|
| 120 |
+
|
| 121 |
+
#undef PRETTY_FUNCTION_VALUE
|
| 122 |
+
|
| 123 |
+
#else // !CPPGC_SUPPORTS_OBJECT_NAMES
|
| 124 |
+
// We wanted to use a class name but were unable to provide one due to
|
| 125 |
+
// compiler limitations or build configuration. As such, return the hidden
|
| 126 |
+
// name with name_was_hidden=false, which will cause this object to be
|
| 127 |
+
// visible in the snapshot.
|
| 128 |
+
return {NameProvider::kHiddenName, false};
|
| 129 |
+
#endif // !CPPGC_SUPPORTS_OBJECT_NAMES
|
| 130 |
+
}
|
| 131 |
+
};
|
| 132 |
+
|
| 133 |
+
using NameCallback = HeapObjectName (*)(const void*,
|
| 134 |
+
HeapObjectNameForUnnamedObject);
|
| 135 |
+
|
| 136 |
+
} // namespace internal
|
| 137 |
+
} // namespace cppgc
|
| 138 |
+
|
| 139 |
+
#undef CPPGC_SUPPORTS_COMPILE_TIME_TYPENAME
|
| 140 |
+
|
| 141 |
+
#endif // INCLUDE_CPPGC_INTERNAL_NAME_TRAIT_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/persistent-node.h
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_PERSISTENT_NODE_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_PERSISTENT_NODE_H_
|
| 7 |
+
|
| 8 |
+
#include <array>
|
| 9 |
+
#include <memory>
|
| 10 |
+
#include <vector>
|
| 11 |
+
|
| 12 |
+
#include "cppgc/internal/logging.h"
|
| 13 |
+
#include "cppgc/trace-trait.h"
|
| 14 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 15 |
+
|
| 16 |
+
namespace cppgc {
|
| 17 |
+
namespace internal {
|
| 18 |
+
|
| 19 |
+
class CrossThreadPersistentRegion;
|
| 20 |
+
class FatalOutOfMemoryHandler;
|
| 21 |
+
class HeapBase;
|
| 22 |
+
class RootVisitor;
|
| 23 |
+
|
| 24 |
+
// PersistentNode represents a variant of two states:
|
| 25 |
+
// 1) traceable node with a back pointer to the Persistent object;
|
| 26 |
+
// 2) freelist entry.
|
| 27 |
+
class PersistentNode final {
|
| 28 |
+
public:
|
| 29 |
+
PersistentNode() = default;
|
| 30 |
+
|
| 31 |
+
PersistentNode(const PersistentNode&) = delete;
|
| 32 |
+
PersistentNode& operator=(const PersistentNode&) = delete;
|
| 33 |
+
|
| 34 |
+
void InitializeAsUsedNode(void* owner, TraceRootCallback trace) {
|
| 35 |
+
CPPGC_DCHECK(trace);
|
| 36 |
+
owner_ = owner;
|
| 37 |
+
trace_ = trace;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
void InitializeAsFreeNode(PersistentNode* next) {
|
| 41 |
+
next_ = next;
|
| 42 |
+
trace_ = nullptr;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
void UpdateOwner(void* owner) {
|
| 46 |
+
CPPGC_DCHECK(IsUsed());
|
| 47 |
+
owner_ = owner;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
PersistentNode* FreeListNext() const {
|
| 51 |
+
CPPGC_DCHECK(!IsUsed());
|
| 52 |
+
return next_;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
void Trace(RootVisitor& root_visitor) const {
|
| 56 |
+
CPPGC_DCHECK(IsUsed());
|
| 57 |
+
trace_(root_visitor, owner_);
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
bool IsUsed() const { return trace_; }
|
| 61 |
+
|
| 62 |
+
void* owner() const {
|
| 63 |
+
CPPGC_DCHECK(IsUsed());
|
| 64 |
+
return owner_;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
private:
|
| 68 |
+
// PersistentNode acts as a designated union:
|
| 69 |
+
// If trace_ != nullptr, owner_ points to the corresponding Persistent handle.
|
| 70 |
+
// Otherwise, next_ points to the next freed PersistentNode.
|
| 71 |
+
union {
|
| 72 |
+
void* owner_ = nullptr;
|
| 73 |
+
PersistentNode* next_;
|
| 74 |
+
};
|
| 75 |
+
TraceRootCallback trace_ = nullptr;
|
| 76 |
+
};
|
| 77 |
+
|
| 78 |
+
class V8_EXPORT PersistentRegionBase {
|
| 79 |
+
using PersistentNodeSlots = std::array<PersistentNode, 256u>;
|
| 80 |
+
|
| 81 |
+
public:
|
| 82 |
+
// Clears Persistent fields to avoid stale pointers after heap teardown.
|
| 83 |
+
~PersistentRegionBase();
|
| 84 |
+
|
| 85 |
+
PersistentRegionBase(const PersistentRegionBase&) = delete;
|
| 86 |
+
PersistentRegionBase& operator=(const PersistentRegionBase&) = delete;
|
| 87 |
+
|
| 88 |
+
void Iterate(RootVisitor&);
|
| 89 |
+
|
| 90 |
+
size_t NodesInUse() const;
|
| 91 |
+
|
| 92 |
+
void ClearAllUsedNodes();
|
| 93 |
+
|
| 94 |
+
protected:
|
| 95 |
+
explicit PersistentRegionBase(const FatalOutOfMemoryHandler& oom_handler);
|
| 96 |
+
|
| 97 |
+
PersistentNode* TryAllocateNodeFromFreeList(void* owner,
|
| 98 |
+
TraceRootCallback trace) {
|
| 99 |
+
PersistentNode* node = nullptr;
|
| 100 |
+
if (V8_LIKELY(free_list_head_)) {
|
| 101 |
+
node = free_list_head_;
|
| 102 |
+
free_list_head_ = free_list_head_->FreeListNext();
|
| 103 |
+
CPPGC_DCHECK(!node->IsUsed());
|
| 104 |
+
node->InitializeAsUsedNode(owner, trace);
|
| 105 |
+
nodes_in_use_++;
|
| 106 |
+
}
|
| 107 |
+
return node;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
void FreeNode(PersistentNode* node) {
|
| 111 |
+
CPPGC_DCHECK(node);
|
| 112 |
+
CPPGC_DCHECK(node->IsUsed());
|
| 113 |
+
node->InitializeAsFreeNode(free_list_head_);
|
| 114 |
+
free_list_head_ = node;
|
| 115 |
+
CPPGC_DCHECK(nodes_in_use_ > 0);
|
| 116 |
+
nodes_in_use_--;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
PersistentNode* RefillFreeListAndAllocateNode(void* owner,
|
| 120 |
+
TraceRootCallback trace);
|
| 121 |
+
|
| 122 |
+
private:
|
| 123 |
+
template <typename PersistentBaseClass>
|
| 124 |
+
void ClearAllUsedNodes();
|
| 125 |
+
|
| 126 |
+
void RefillFreeList();
|
| 127 |
+
|
| 128 |
+
std::vector<std::unique_ptr<PersistentNodeSlots>> nodes_;
|
| 129 |
+
PersistentNode* free_list_head_ = nullptr;
|
| 130 |
+
size_t nodes_in_use_ = 0;
|
| 131 |
+
const FatalOutOfMemoryHandler& oom_handler_;
|
| 132 |
+
|
| 133 |
+
friend class CrossThreadPersistentRegion;
|
| 134 |
+
};
|
| 135 |
+
|
| 136 |
+
// Variant of PersistentRegionBase that checks whether the allocation and
|
| 137 |
+
// freeing happens only on the thread that created the heap.
|
| 138 |
+
class V8_EXPORT PersistentRegion final : public PersistentRegionBase {
|
| 139 |
+
public:
|
| 140 |
+
V8_INLINE PersistentRegion(const HeapBase& heap,
|
| 141 |
+
const FatalOutOfMemoryHandler& oom_handler)
|
| 142 |
+
: PersistentRegionBase(oom_handler), heap_(heap) {
|
| 143 |
+
CPPGC_DCHECK(IsCreationThread());
|
| 144 |
+
}
|
| 145 |
+
// Clears Persistent fields to avoid stale pointers after heap teardown.
|
| 146 |
+
~PersistentRegion() = default;
|
| 147 |
+
|
| 148 |
+
PersistentRegion(const PersistentRegion&) = delete;
|
| 149 |
+
PersistentRegion& operator=(const PersistentRegion&) = delete;
|
| 150 |
+
|
| 151 |
+
V8_INLINE PersistentNode* AllocateNode(void* owner, TraceRootCallback trace) {
|
| 152 |
+
CPPGC_DCHECK(IsCreationThread());
|
| 153 |
+
auto* node = TryAllocateNodeFromFreeList(owner, trace);
|
| 154 |
+
if (V8_LIKELY(node)) return node;
|
| 155 |
+
|
| 156 |
+
// Slow path allocation allows for checking thread correspondence.
|
| 157 |
+
CPPGC_CHECK(IsCreationThread());
|
| 158 |
+
return RefillFreeListAndAllocateNode(owner, trace);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
V8_INLINE void FreeNode(PersistentNode* node) {
|
| 162 |
+
CPPGC_DCHECK(IsCreationThread());
|
| 163 |
+
PersistentRegionBase::FreeNode(node);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
private:
|
| 167 |
+
bool IsCreationThread();
|
| 168 |
+
|
| 169 |
+
const HeapBase& heap_;
|
| 170 |
+
};
|
| 171 |
+
|
| 172 |
+
// CrossThreadPersistent uses PersistentRegionBase but protects it using this
|
| 173 |
+
// lock when needed.
|
| 174 |
+
class V8_EXPORT PersistentRegionLock final {
|
| 175 |
+
public:
|
| 176 |
+
PersistentRegionLock();
|
| 177 |
+
~PersistentRegionLock();
|
| 178 |
+
|
| 179 |
+
static void AssertLocked();
|
| 180 |
+
};
|
| 181 |
+
|
| 182 |
+
// Variant of PersistentRegionBase that checks whether the PersistentRegionLock
|
| 183 |
+
// is locked.
|
| 184 |
+
class V8_EXPORT CrossThreadPersistentRegion final
|
| 185 |
+
: protected PersistentRegionBase {
|
| 186 |
+
public:
|
| 187 |
+
explicit CrossThreadPersistentRegion(const FatalOutOfMemoryHandler&);
|
| 188 |
+
// Clears Persistent fields to avoid stale pointers after heap teardown.
|
| 189 |
+
~CrossThreadPersistentRegion();
|
| 190 |
+
|
| 191 |
+
CrossThreadPersistentRegion(const CrossThreadPersistentRegion&) = delete;
|
| 192 |
+
CrossThreadPersistentRegion& operator=(const CrossThreadPersistentRegion&) =
|
| 193 |
+
delete;
|
| 194 |
+
|
| 195 |
+
V8_INLINE PersistentNode* AllocateNode(void* owner, TraceRootCallback trace) {
|
| 196 |
+
PersistentRegionLock::AssertLocked();
|
| 197 |
+
auto* node = TryAllocateNodeFromFreeList(owner, trace);
|
| 198 |
+
if (V8_LIKELY(node)) return node;
|
| 199 |
+
|
| 200 |
+
return RefillFreeListAndAllocateNode(owner, trace);
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
V8_INLINE void FreeNode(PersistentNode* node) {
|
| 204 |
+
PersistentRegionLock::AssertLocked();
|
| 205 |
+
PersistentRegionBase::FreeNode(node);
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
void Iterate(RootVisitor&);
|
| 209 |
+
|
| 210 |
+
size_t NodesInUse() const;
|
| 211 |
+
|
| 212 |
+
void ClearAllUsedNodes();
|
| 213 |
+
};
|
| 214 |
+
|
| 215 |
+
} // namespace internal
|
| 216 |
+
|
| 217 |
+
} // namespace cppgc
|
| 218 |
+
|
| 219 |
+
#endif // INCLUDE_CPPGC_INTERNAL_PERSISTENT_NODE_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/pointer-policies.h
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
|
| 7 |
+
|
| 8 |
+
#include <cstdint>
|
| 9 |
+
#include <type_traits>
|
| 10 |
+
|
| 11 |
+
#include "cppgc/internal/member-storage.h"
|
| 12 |
+
#include "cppgc/internal/write-barrier.h"
|
| 13 |
+
#include "cppgc/sentinel-pointer.h"
|
| 14 |
+
#include "cppgc/source-location.h"
|
| 15 |
+
#include "cppgc/type-traits.h"
|
| 16 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 17 |
+
|
| 18 |
+
namespace cppgc {
|
| 19 |
+
namespace internal {
|
| 20 |
+
|
| 21 |
+
class HeapBase;
|
| 22 |
+
class PersistentRegion;
|
| 23 |
+
class CrossThreadPersistentRegion;
|
| 24 |
+
|
| 25 |
+
// Tags to distinguish between strong and weak member types.
|
| 26 |
+
class StrongMemberTag;
|
| 27 |
+
class WeakMemberTag;
|
| 28 |
+
class UntracedMemberTag;
|
| 29 |
+
|
| 30 |
+
struct DijkstraWriteBarrierPolicy {
|
| 31 |
+
// Since in initializing writes the source object is always white, having no
|
| 32 |
+
// barrier doesn't break the tri-color invariant.
|
| 33 |
+
V8_INLINE static void InitializingBarrier(const void*, const void*) {}
|
| 34 |
+
V8_INLINE static void InitializingBarrier(const void*, RawPointer storage) {
|
| 35 |
+
}
|
| 36 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 37 |
+
V8_INLINE static void InitializingBarrier(const void*,
|
| 38 |
+
CompressedPointer storage) {}
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
template <WriteBarrierSlotType SlotType>
|
| 42 |
+
V8_INLINE static void AssigningBarrier(const void* slot,
|
| 43 |
+
const void* value) {
|
| 44 |
+
#ifdef CPPGC_SLIM_WRITE_BARRIER
|
| 45 |
+
if (V8_UNLIKELY(WriteBarrier::IsEnabled()))
|
| 46 |
+
WriteBarrier::CombinedWriteBarrierSlow<SlotType>(slot);
|
| 47 |
+
#else // !CPPGC_SLIM_WRITE_BARRIER
|
| 48 |
+
WriteBarrier::Params params;
|
| 49 |
+
const WriteBarrier::Type type =
|
| 50 |
+
WriteBarrier::GetWriteBarrierType(slot, value, params);
|
| 51 |
+
WriteBarrier(type, params, slot, value);
|
| 52 |
+
#endif // !CPPGC_SLIM_WRITE_BARRIER
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
template <WriteBarrierSlotType SlotType>
|
| 56 |
+
V8_INLINE static void AssigningBarrier(const void* slot, RawPointer storage) {
|
| 57 |
+
static_assert(
|
| 58 |
+
SlotType == WriteBarrierSlotType::kUncompressed,
|
| 59 |
+
"Assigning storages of Member and UncompressedMember is not supported");
|
| 60 |
+
#ifdef CPPGC_SLIM_WRITE_BARRIER
|
| 61 |
+
if (V8_UNLIKELY(WriteBarrier::IsEnabled()))
|
| 62 |
+
WriteBarrier::CombinedWriteBarrierSlow<SlotType>(slot);
|
| 63 |
+
#else // !CPPGC_SLIM_WRITE_BARRIER
|
| 64 |
+
WriteBarrier::Params params;
|
| 65 |
+
const WriteBarrier::Type type =
|
| 66 |
+
WriteBarrier::GetWriteBarrierType(slot, storage, params);
|
| 67 |
+
WriteBarrier(type, params, slot, storage.Load());
|
| 68 |
+
#endif // !CPPGC_SLIM_WRITE_BARRIER
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 72 |
+
template <WriteBarrierSlotType SlotType>
|
| 73 |
+
V8_INLINE static void AssigningBarrier(const void* slot,
|
| 74 |
+
CompressedPointer storage) {
|
| 75 |
+
static_assert(
|
| 76 |
+
SlotType == WriteBarrierSlotType::kCompressed,
|
| 77 |
+
"Assigning storages of Member and UncompressedMember is not supported");
|
| 78 |
+
#ifdef CPPGC_SLIM_WRITE_BARRIER
|
| 79 |
+
if (V8_UNLIKELY(WriteBarrier::IsEnabled()))
|
| 80 |
+
WriteBarrier::CombinedWriteBarrierSlow<SlotType>(slot);
|
| 81 |
+
#else // !CPPGC_SLIM_WRITE_BARRIER
|
| 82 |
+
WriteBarrier::Params params;
|
| 83 |
+
const WriteBarrier::Type type =
|
| 84 |
+
WriteBarrier::GetWriteBarrierType(slot, storage, params);
|
| 85 |
+
WriteBarrier(type, params, slot, storage.Load());
|
| 86 |
+
#endif // !CPPGC_SLIM_WRITE_BARRIER
|
| 87 |
+
}
|
| 88 |
+
#endif // defined(CPPGC_POINTER_COMPRESSION)
|
| 89 |
+
|
| 90 |
+
private:
|
| 91 |
+
V8_INLINE static void WriteBarrier(WriteBarrier::Type type,
|
| 92 |
+
const WriteBarrier::Params& params,
|
| 93 |
+
const void* slot, const void* value) {
|
| 94 |
+
switch (type) {
|
| 95 |
+
case WriteBarrier::Type::kGenerational:
|
| 96 |
+
WriteBarrier::GenerationalBarrier<
|
| 97 |
+
WriteBarrier::GenerationalBarrierType::kPreciseSlot>(params, slot);
|
| 98 |
+
break;
|
| 99 |
+
case WriteBarrier::Type::kMarking:
|
| 100 |
+
WriteBarrier::DijkstraMarkingBarrier(params, value);
|
| 101 |
+
break;
|
| 102 |
+
case WriteBarrier::Type::kNone:
|
| 103 |
+
break;
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
};
|
| 107 |
+
|
| 108 |
+
struct NoWriteBarrierPolicy {
|
| 109 |
+
V8_INLINE static void InitializingBarrier(const void*, const void*) {}
|
| 110 |
+
V8_INLINE static void InitializingBarrier(const void*, RawPointer storage) {}
|
| 111 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 112 |
+
V8_INLINE static void InitializingBarrier(const void*,
|
| 113 |
+
CompressedPointer storage) {}
|
| 114 |
+
#endif
|
| 115 |
+
template <WriteBarrierSlotType>
|
| 116 |
+
V8_INLINE static void AssigningBarrier(const void*, const void*) {}
|
| 117 |
+
template <WriteBarrierSlotType, typename MemberStorage>
|
| 118 |
+
V8_INLINE static void AssigningBarrier(const void*, MemberStorage) {}
|
| 119 |
+
};
|
| 120 |
+
|
| 121 |
+
class V8_EXPORT SameThreadEnabledCheckingPolicyBase {
|
| 122 |
+
protected:
|
| 123 |
+
void CheckPointerImpl(const void* ptr, bool points_to_payload,
|
| 124 |
+
bool check_off_heap_assignments);
|
| 125 |
+
|
| 126 |
+
const HeapBase* heap_ = nullptr;
|
| 127 |
+
};
|
| 128 |
+
|
| 129 |
+
template <bool kCheckOffHeapAssignments>
|
| 130 |
+
class V8_EXPORT SameThreadEnabledCheckingPolicy
|
| 131 |
+
: private SameThreadEnabledCheckingPolicyBase {
|
| 132 |
+
protected:
|
| 133 |
+
template <typename T>
|
| 134 |
+
V8_INLINE void CheckPointer(RawPointer raw_pointer) {
|
| 135 |
+
if (raw_pointer.IsCleared() || raw_pointer.IsSentinel()) {
|
| 136 |
+
return;
|
| 137 |
+
}
|
| 138 |
+
CheckPointersImplTrampoline<T>::Call(
|
| 139 |
+
this, static_cast<const T*>(raw_pointer.Load()));
|
| 140 |
+
}
|
| 141 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 142 |
+
template <typename T>
|
| 143 |
+
V8_INLINE void CheckPointer(CompressedPointer compressed_pointer) {
|
| 144 |
+
if (compressed_pointer.IsCleared() || compressed_pointer.IsSentinel()) {
|
| 145 |
+
return;
|
| 146 |
+
}
|
| 147 |
+
CheckPointersImplTrampoline<T>::Call(
|
| 148 |
+
this, static_cast<const T*>(compressed_pointer.Load()));
|
| 149 |
+
}
|
| 150 |
+
#endif
|
| 151 |
+
template <typename T>
|
| 152 |
+
void CheckPointer(const T* ptr) {
|
| 153 |
+
if (!ptr || (kSentinelPointer == ptr)) {
|
| 154 |
+
return;
|
| 155 |
+
}
|
| 156 |
+
CheckPointersImplTrampoline<T>::Call(this, ptr);
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
private:
|
| 160 |
+
template <typename T, bool = IsCompleteV<T>>
|
| 161 |
+
struct CheckPointersImplTrampoline {
|
| 162 |
+
static void Call(SameThreadEnabledCheckingPolicy* policy, const T* ptr) {
|
| 163 |
+
policy->CheckPointerImpl(ptr, false, kCheckOffHeapAssignments);
|
| 164 |
+
}
|
| 165 |
+
};
|
| 166 |
+
|
| 167 |
+
template <typename T>
|
| 168 |
+
struct CheckPointersImplTrampoline<T, true> {
|
| 169 |
+
static void Call(SameThreadEnabledCheckingPolicy* policy, const T* ptr) {
|
| 170 |
+
policy->CheckPointerImpl(ptr, IsGarbageCollectedTypeV<T>,
|
| 171 |
+
kCheckOffHeapAssignments);
|
| 172 |
+
}
|
| 173 |
+
};
|
| 174 |
+
};
|
| 175 |
+
|
| 176 |
+
class DisabledCheckingPolicy {
|
| 177 |
+
protected:
|
| 178 |
+
template <typename T>
|
| 179 |
+
V8_INLINE void CheckPointer(T*) {}
|
| 180 |
+
template <typename T>
|
| 181 |
+
V8_INLINE void CheckPointer(RawPointer) {}
|
| 182 |
+
#if defined(CPPGC_POINTER_COMPRESSION)
|
| 183 |
+
template <typename T>
|
| 184 |
+
V8_INLINE void CheckPointer(CompressedPointer) {}
|
| 185 |
+
#endif
|
| 186 |
+
};
|
| 187 |
+
|
| 188 |
+
#ifdef CPPGC_ENABLE_SLOW_API_CHECKS
|
| 189 |
+
// Off heap members are not connected to object graph and thus cannot ressurect
|
| 190 |
+
// dead objects.
|
| 191 |
+
using DefaultMemberCheckingPolicy =
|
| 192 |
+
SameThreadEnabledCheckingPolicy<false /* kCheckOffHeapAssignments*/>;
|
| 193 |
+
using DefaultPersistentCheckingPolicy =
|
| 194 |
+
SameThreadEnabledCheckingPolicy<true /* kCheckOffHeapAssignments*/>;
|
| 195 |
+
#else // !CPPGC_ENABLE_SLOW_API_CHECKS
|
| 196 |
+
using DefaultMemberCheckingPolicy = DisabledCheckingPolicy;
|
| 197 |
+
using DefaultPersistentCheckingPolicy = DisabledCheckingPolicy;
|
| 198 |
+
#endif // !CPPGC_ENABLE_SLOW_API_CHECKS
|
| 199 |
+
// For CT(W)P neither marking information (for value), nor objectstart bitmap
|
| 200 |
+
// (for slot) are guaranteed to be present because there's no synchronization
|
| 201 |
+
// between heaps after marking.
|
| 202 |
+
using DefaultCrossThreadPersistentCheckingPolicy = DisabledCheckingPolicy;
|
| 203 |
+
|
| 204 |
+
class KeepLocationPolicy {
|
| 205 |
+
public:
|
| 206 |
+
constexpr const SourceLocation& Location() const { return location_; }
|
| 207 |
+
|
| 208 |
+
protected:
|
| 209 |
+
constexpr KeepLocationPolicy() = default;
|
| 210 |
+
constexpr explicit KeepLocationPolicy(const SourceLocation& location)
|
| 211 |
+
: location_(location) {}
|
| 212 |
+
|
| 213 |
+
// KeepLocationPolicy must not copy underlying source locations.
|
| 214 |
+
KeepLocationPolicy(const KeepLocationPolicy&) = delete;
|
| 215 |
+
KeepLocationPolicy& operator=(const KeepLocationPolicy&) = delete;
|
| 216 |
+
|
| 217 |
+
// Location of the original moved from object should be preserved.
|
| 218 |
+
KeepLocationPolicy(KeepLocationPolicy&&) = default;
|
| 219 |
+
KeepLocationPolicy& operator=(KeepLocationPolicy&&) = default;
|
| 220 |
+
|
| 221 |
+
private:
|
| 222 |
+
SourceLocation location_;
|
| 223 |
+
};
|
| 224 |
+
|
| 225 |
+
class IgnoreLocationPolicy {
|
| 226 |
+
public:
|
| 227 |
+
constexpr SourceLocation Location() const { return {}; }
|
| 228 |
+
|
| 229 |
+
protected:
|
| 230 |
+
constexpr IgnoreLocationPolicy() = default;
|
| 231 |
+
constexpr explicit IgnoreLocationPolicy(const SourceLocation&) {}
|
| 232 |
+
};
|
| 233 |
+
|
| 234 |
+
#if CPPGC_SUPPORTS_OBJECT_NAMES
|
| 235 |
+
using DefaultLocationPolicy = KeepLocationPolicy;
|
| 236 |
+
#else
|
| 237 |
+
using DefaultLocationPolicy = IgnoreLocationPolicy;
|
| 238 |
+
#endif
|
| 239 |
+
|
| 240 |
+
struct StrongPersistentPolicy {
|
| 241 |
+
using IsStrongPersistent = std::true_type;
|
| 242 |
+
static V8_EXPORT PersistentRegion& GetPersistentRegion(const void* object);
|
| 243 |
+
};
|
| 244 |
+
|
| 245 |
+
struct WeakPersistentPolicy {
|
| 246 |
+
using IsStrongPersistent = std::false_type;
|
| 247 |
+
static V8_EXPORT PersistentRegion& GetPersistentRegion(const void* object);
|
| 248 |
+
};
|
| 249 |
+
|
| 250 |
+
struct StrongCrossThreadPersistentPolicy {
|
| 251 |
+
using IsStrongPersistent = std::true_type;
|
| 252 |
+
static V8_EXPORT CrossThreadPersistentRegion& GetPersistentRegion(
|
| 253 |
+
const void* object);
|
| 254 |
+
};
|
| 255 |
+
|
| 256 |
+
struct WeakCrossThreadPersistentPolicy {
|
| 257 |
+
using IsStrongPersistent = std::false_type;
|
| 258 |
+
static V8_EXPORT CrossThreadPersistentRegion& GetPersistentRegion(
|
| 259 |
+
const void* object);
|
| 260 |
+
};
|
| 261 |
+
|
| 262 |
+
// Forward declarations setting up the default policies.
|
| 263 |
+
template <typename T, typename WeaknessPolicy,
|
| 264 |
+
typename LocationPolicy = DefaultLocationPolicy,
|
| 265 |
+
typename CheckingPolicy = DefaultCrossThreadPersistentCheckingPolicy>
|
| 266 |
+
class BasicCrossThreadPersistent;
|
| 267 |
+
template <typename T, typename WeaknessPolicy,
|
| 268 |
+
typename LocationPolicy = DefaultLocationPolicy,
|
| 269 |
+
typename CheckingPolicy = DefaultPersistentCheckingPolicy>
|
| 270 |
+
class BasicPersistent;
|
| 271 |
+
template <typename T, typename WeaknessTag, typename WriteBarrierPolicy,
|
| 272 |
+
typename CheckingPolicy = DefaultMemberCheckingPolicy,
|
| 273 |
+
typename StorageType = DefaultMemberStorage>
|
| 274 |
+
class BasicMember;
|
| 275 |
+
|
| 276 |
+
} // namespace internal
|
| 277 |
+
|
| 278 |
+
} // namespace cppgc
|
| 279 |
+
|
| 280 |
+
#endif // INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/cppgc/internal/write-barrier.h
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
| 2 |
+
// Use of this source code is governed by a BSD-style license that can be
|
| 3 |
+
// found in the LICENSE file.
|
| 4 |
+
|
| 5 |
+
#ifndef INCLUDE_CPPGC_INTERNAL_WRITE_BARRIER_H_
|
| 6 |
+
#define INCLUDE_CPPGC_INTERNAL_WRITE_BARRIER_H_
|
| 7 |
+
|
| 8 |
+
#include <cstddef>
|
| 9 |
+
#include <cstdint>
|
| 10 |
+
|
| 11 |
+
#include "cppgc/heap-handle.h"
|
| 12 |
+
#include "cppgc/heap-state.h"
|
| 13 |
+
#include "cppgc/internal/api-constants.h"
|
| 14 |
+
#include "cppgc/internal/atomic-entry-flag.h"
|
| 15 |
+
#include "cppgc/internal/base-page-handle.h"
|
| 16 |
+
#include "cppgc/internal/member-storage.h"
|
| 17 |
+
#include "cppgc/platform.h"
|
| 18 |
+
#include "cppgc/sentinel-pointer.h"
|
| 19 |
+
#include "cppgc/trace-trait.h"
|
| 20 |
+
#include "v8config.h" // NOLINT(build/include_directory)
|
| 21 |
+
|
| 22 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 23 |
+
#include "cppgc/internal/caged-heap-local-data.h"
|
| 24 |
+
#include "cppgc/internal/caged-heap.h"
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
namespace cppgc {
|
| 28 |
+
|
| 29 |
+
class HeapHandle;
|
| 30 |
+
|
| 31 |
+
namespace internal {
|
| 32 |
+
|
| 33 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 34 |
+
class WriteBarrierTypeForCagedHeapPolicy;
|
| 35 |
+
#else // !CPPGC_CAGED_HEAP
|
| 36 |
+
class WriteBarrierTypeForNonCagedHeapPolicy;
|
| 37 |
+
#endif // !CPPGC_CAGED_HEAP
|
| 38 |
+
|
| 39 |
+
class V8_EXPORT WriteBarrier final {
|
| 40 |
+
public:
|
| 41 |
+
enum class Type : uint8_t {
|
| 42 |
+
kNone,
|
| 43 |
+
kMarking,
|
| 44 |
+
kGenerational,
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
enum class GenerationalBarrierType : uint8_t {
|
| 48 |
+
kPreciseSlot,
|
| 49 |
+
kPreciseUncompressedSlot,
|
| 50 |
+
kImpreciseSlot,
|
| 51 |
+
};
|
| 52 |
+
|
| 53 |
+
struct Params {
|
| 54 |
+
HeapHandle* heap = nullptr;
|
| 55 |
+
#if V8_ENABLE_CHECKS
|
| 56 |
+
Type type = Type::kNone;
|
| 57 |
+
#endif // !V8_ENABLE_CHECKS
|
| 58 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 59 |
+
uintptr_t slot_offset = 0;
|
| 60 |
+
uintptr_t value_offset = 0;
|
| 61 |
+
#endif // CPPGC_CAGED_HEAP
|
| 62 |
+
};
|
| 63 |
+
|
| 64 |
+
enum class ValueMode {
|
| 65 |
+
kValuePresent,
|
| 66 |
+
kNoValuePresent,
|
| 67 |
+
};
|
| 68 |
+
|
| 69 |
+
// Returns the required write barrier for a given `slot` and `value`.
|
| 70 |
+
static V8_INLINE Type GetWriteBarrierType(const void* slot, const void* value,
|
| 71 |
+
Params& params);
|
| 72 |
+
// Returns the required write barrier for a given `slot` and `value`.
|
| 73 |
+
template <typename MemberStorage>
|
| 74 |
+
static V8_INLINE Type GetWriteBarrierType(const void* slot, MemberStorage,
|
| 75 |
+
Params& params);
|
| 76 |
+
// Returns the required write barrier for a given `slot`.
|
| 77 |
+
template <typename HeapHandleCallback>
|
| 78 |
+
static V8_INLINE Type GetWriteBarrierType(const void* slot, Params& params,
|
| 79 |
+
HeapHandleCallback callback);
|
| 80 |
+
// Returns the required write barrier for a given `value`.
|
| 81 |
+
static V8_INLINE Type GetWriteBarrierType(const void* value, Params& params);
|
| 82 |
+
|
| 83 |
+
#ifdef CPPGC_SLIM_WRITE_BARRIER
|
| 84 |
+
// A write barrier that combines `GenerationalBarrier()` and
|
| 85 |
+
// `DijkstraMarkingBarrier()`. We only pass a single parameter here to clobber
|
| 86 |
+
// as few registers as possible.
|
| 87 |
+
template <WriteBarrierSlotType>
|
| 88 |
+
static V8_NOINLINE void V8_PRESERVE_MOST
|
| 89 |
+
CombinedWriteBarrierSlow(const void* slot);
|
| 90 |
+
#endif // CPPGC_SLIM_WRITE_BARRIER
|
| 91 |
+
|
| 92 |
+
static V8_INLINE void DijkstraMarkingBarrier(const Params& params,
|
| 93 |
+
const void* object);
|
| 94 |
+
static V8_INLINE void DijkstraMarkingBarrierRange(
|
| 95 |
+
const Params& params, const void* first_element, size_t element_size,
|
| 96 |
+
size_t number_of_elements, TraceCallback trace_callback);
|
| 97 |
+
static V8_INLINE void SteeleMarkingBarrier(const Params& params,
|
| 98 |
+
const void* object);
|
| 99 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 100 |
+
template <GenerationalBarrierType>
|
| 101 |
+
static V8_INLINE void GenerationalBarrier(const Params& params,
|
| 102 |
+
const void* slot);
|
| 103 |
+
#else // !CPPGC_YOUNG_GENERATION
|
| 104 |
+
template <GenerationalBarrierType>
|
| 105 |
+
static V8_INLINE void GenerationalBarrier(const Params& params,
|
| 106 |
+
const void* slot){}
|
| 107 |
+
#endif // CPPGC_YOUNG_GENERATION
|
| 108 |
+
|
| 109 |
+
#if V8_ENABLE_CHECKS
|
| 110 |
+
static void CheckParams(Type expected_type, const Params& params);
|
| 111 |
+
#else // !V8_ENABLE_CHECKS
|
| 112 |
+
static void CheckParams(Type expected_type, const Params& params) {}
|
| 113 |
+
#endif // !V8_ENABLE_CHECKS
|
| 114 |
+
|
| 115 |
+
// The FlagUpdater class allows cppgc internal to update
|
| 116 |
+
// |write_barrier_enabled_|.
|
| 117 |
+
class FlagUpdater;
|
| 118 |
+
static bool IsEnabled() { return write_barrier_enabled_.MightBeEntered(); }
|
| 119 |
+
|
| 120 |
+
private:
|
| 121 |
+
WriteBarrier() = delete;
|
| 122 |
+
|
| 123 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 124 |
+
using WriteBarrierTypePolicy = WriteBarrierTypeForCagedHeapPolicy;
|
| 125 |
+
#else // !CPPGC_CAGED_HEAP
|
| 126 |
+
using WriteBarrierTypePolicy = WriteBarrierTypeForNonCagedHeapPolicy;
|
| 127 |
+
#endif // !CPPGC_CAGED_HEAP
|
| 128 |
+
|
| 129 |
+
static void DijkstraMarkingBarrierSlow(const void* value);
|
| 130 |
+
static void DijkstraMarkingBarrierSlowWithSentinelCheck(const void* value);
|
| 131 |
+
static void DijkstraMarkingBarrierRangeSlow(HeapHandle& heap_handle,
|
| 132 |
+
const void* first_element,
|
| 133 |
+
size_t element_size,
|
| 134 |
+
size_t number_of_elements,
|
| 135 |
+
TraceCallback trace_callback);
|
| 136 |
+
static void SteeleMarkingBarrierSlow(const void* value);
|
| 137 |
+
static void SteeleMarkingBarrierSlowWithSentinelCheck(const void* value);
|
| 138 |
+
|
| 139 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 140 |
+
static CagedHeapLocalData& GetLocalData(HeapHandle&);
|
| 141 |
+
static void GenerationalBarrierSlow(const CagedHeapLocalData& local_data,
|
| 142 |
+
const AgeTable& age_table,
|
| 143 |
+
const void* slot, uintptr_t value_offset,
|
| 144 |
+
HeapHandle* heap_handle);
|
| 145 |
+
static void GenerationalBarrierForUncompressedSlotSlow(
|
| 146 |
+
const CagedHeapLocalData& local_data, const AgeTable& age_table,
|
| 147 |
+
const void* slot, uintptr_t value_offset, HeapHandle* heap_handle);
|
| 148 |
+
static void GenerationalBarrierForSourceObjectSlow(
|
| 149 |
+
const CagedHeapLocalData& local_data, const void* object,
|
| 150 |
+
HeapHandle* heap_handle);
|
| 151 |
+
#endif // CPPGC_YOUNG_GENERATION
|
| 152 |
+
|
| 153 |
+
static AtomicEntryFlag write_barrier_enabled_;
|
| 154 |
+
};
|
| 155 |
+
|
| 156 |
+
template <WriteBarrier::Type type>
|
| 157 |
+
V8_INLINE WriteBarrier::Type SetAndReturnType(WriteBarrier::Params& params) {
|
| 158 |
+
if constexpr (type == WriteBarrier::Type::kNone)
|
| 159 |
+
return WriteBarrier::Type::kNone;
|
| 160 |
+
#if V8_ENABLE_CHECKS
|
| 161 |
+
params.type = type;
|
| 162 |
+
#endif // !V8_ENABLE_CHECKS
|
| 163 |
+
return type;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 167 |
+
class V8_EXPORT WriteBarrierTypeForCagedHeapPolicy final {
|
| 168 |
+
public:
|
| 169 |
+
template <WriteBarrier::ValueMode value_mode, typename HeapHandleCallback>
|
| 170 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot, const void* value,
|
| 171 |
+
WriteBarrier::Params& params,
|
| 172 |
+
HeapHandleCallback callback) {
|
| 173 |
+
return ValueModeDispatch<value_mode>::Get(slot, value, params, callback);
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
template <WriteBarrier::ValueMode value_mode, typename HeapHandleCallback,
|
| 177 |
+
typename MemberStorage>
|
| 178 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot, MemberStorage value,
|
| 179 |
+
WriteBarrier::Params& params,
|
| 180 |
+
HeapHandleCallback callback) {
|
| 181 |
+
return ValueModeDispatch<value_mode>::Get(slot, value, params, callback);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
template <WriteBarrier::ValueMode value_mode, typename HeapHandleCallback>
|
| 185 |
+
static V8_INLINE WriteBarrier::Type Get(const void* value,
|
| 186 |
+
WriteBarrier::Params& params,
|
| 187 |
+
HeapHandleCallback callback) {
|
| 188 |
+
return GetNoSlot(value, params, callback);
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
private:
|
| 192 |
+
WriteBarrierTypeForCagedHeapPolicy() = delete;
|
| 193 |
+
|
| 194 |
+
template <typename HeapHandleCallback>
|
| 195 |
+
static V8_INLINE WriteBarrier::Type GetNoSlot(const void* value,
|
| 196 |
+
WriteBarrier::Params& params,
|
| 197 |
+
HeapHandleCallback) {
|
| 198 |
+
const bool within_cage = CagedHeapBase::IsWithinCage(value);
|
| 199 |
+
if (!within_cage) return WriteBarrier::Type::kNone;
|
| 200 |
+
|
| 201 |
+
// We know that |value| points either within the normal page or to the
|
| 202 |
+
// beginning of large-page, so extract the page header by bitmasking.
|
| 203 |
+
BasePageHandle* page =
|
| 204 |
+
BasePageHandle::FromPayload(const_cast<void*>(value));
|
| 205 |
+
|
| 206 |
+
HeapHandle& heap_handle = page->heap_handle();
|
| 207 |
+
if (V8_UNLIKELY(heap_handle.is_incremental_marking_in_progress())) {
|
| 208 |
+
return SetAndReturnType<WriteBarrier::Type::kMarking>(params);
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
template <WriteBarrier::ValueMode value_mode>
|
| 215 |
+
struct ValueModeDispatch;
|
| 216 |
+
};
|
| 217 |
+
|
| 218 |
+
template <>
|
| 219 |
+
struct WriteBarrierTypeForCagedHeapPolicy::ValueModeDispatch<
|
| 220 |
+
WriteBarrier::ValueMode::kValuePresent> {
|
| 221 |
+
template <typename HeapHandleCallback, typename MemberStorage>
|
| 222 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot,
|
| 223 |
+
MemberStorage storage,
|
| 224 |
+
WriteBarrier::Params& params,
|
| 225 |
+
HeapHandleCallback) {
|
| 226 |
+
if (V8_LIKELY(!WriteBarrier::IsEnabled()))
|
| 227 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 228 |
+
|
| 229 |
+
return BarrierEnabledGet(slot, storage.Load(), params);
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
template <typename HeapHandleCallback>
|
| 233 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot, const void* value,
|
| 234 |
+
WriteBarrier::Params& params,
|
| 235 |
+
HeapHandleCallback) {
|
| 236 |
+
if (V8_LIKELY(!WriteBarrier::IsEnabled()))
|
| 237 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 238 |
+
|
| 239 |
+
return BarrierEnabledGet(slot, value, params);
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
private:
|
| 243 |
+
static V8_INLINE WriteBarrier::Type BarrierEnabledGet(
|
| 244 |
+
const void* slot, const void* value, WriteBarrier::Params& params) {
|
| 245 |
+
const bool within_cage = CagedHeapBase::AreWithinCage(slot, value);
|
| 246 |
+
if (!within_cage) return WriteBarrier::Type::kNone;
|
| 247 |
+
|
| 248 |
+
// We know that |value| points either within the normal page or to the
|
| 249 |
+
// beginning of large-page, so extract the page header by bitmasking.
|
| 250 |
+
BasePageHandle* page =
|
| 251 |
+
BasePageHandle::FromPayload(const_cast<void*>(value));
|
| 252 |
+
|
| 253 |
+
HeapHandle& heap_handle = page->heap_handle();
|
| 254 |
+
if (V8_LIKELY(!heap_handle.is_incremental_marking_in_progress())) {
|
| 255 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 256 |
+
if (!heap_handle.is_young_generation_enabled())
|
| 257 |
+
return WriteBarrier::Type::kNone;
|
| 258 |
+
params.heap = &heap_handle;
|
| 259 |
+
params.slot_offset = CagedHeapBase::OffsetFromAddress(slot);
|
| 260 |
+
params.value_offset = CagedHeapBase::OffsetFromAddress(value);
|
| 261 |
+
return SetAndReturnType<WriteBarrier::Type::kGenerational>(params);
|
| 262 |
+
#else // !CPPGC_YOUNG_GENERATION
|
| 263 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 264 |
+
#endif // !CPPGC_YOUNG_GENERATION
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
// Use marking barrier.
|
| 268 |
+
params.heap = &heap_handle;
|
| 269 |
+
return SetAndReturnType<WriteBarrier::Type::kMarking>(params);
|
| 270 |
+
}
|
| 271 |
+
};
|
| 272 |
+
|
| 273 |
+
template <>
|
| 274 |
+
struct WriteBarrierTypeForCagedHeapPolicy::ValueModeDispatch<
|
| 275 |
+
WriteBarrier::ValueMode::kNoValuePresent> {
|
| 276 |
+
template <typename HeapHandleCallback>
|
| 277 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot, const void*,
|
| 278 |
+
WriteBarrier::Params& params,
|
| 279 |
+
HeapHandleCallback callback) {
|
| 280 |
+
if (V8_LIKELY(!WriteBarrier::IsEnabled()))
|
| 281 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 282 |
+
|
| 283 |
+
HeapHandle& handle = callback();
|
| 284 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 285 |
+
if (V8_LIKELY(!handle.is_incremental_marking_in_progress())) {
|
| 286 |
+
if (!handle.is_young_generation_enabled()) {
|
| 287 |
+
return WriteBarrier::Type::kNone;
|
| 288 |
+
}
|
| 289 |
+
params.heap = &handle;
|
| 290 |
+
// Check if slot is on stack.
|
| 291 |
+
if (V8_UNLIKELY(!CagedHeapBase::IsWithinCage(slot))) {
|
| 292 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 293 |
+
}
|
| 294 |
+
params.slot_offset = CagedHeapBase::OffsetFromAddress(slot);
|
| 295 |
+
return SetAndReturnType<WriteBarrier::Type::kGenerational>(params);
|
| 296 |
+
}
|
| 297 |
+
#else // !defined(CPPGC_YOUNG_GENERATION)
|
| 298 |
+
if (V8_UNLIKELY(!handle.is_incremental_marking_in_progress())) {
|
| 299 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 300 |
+
}
|
| 301 |
+
#endif // !defined(CPPGC_YOUNG_GENERATION)
|
| 302 |
+
params.heap = &handle;
|
| 303 |
+
return SetAndReturnType<WriteBarrier::Type::kMarking>(params);
|
| 304 |
+
}
|
| 305 |
+
};
|
| 306 |
+
|
| 307 |
+
#endif // CPPGC_CAGED_HEAP
|
| 308 |
+
|
| 309 |
+
class V8_EXPORT WriteBarrierTypeForNonCagedHeapPolicy final {
|
| 310 |
+
public:
|
| 311 |
+
template <WriteBarrier::ValueMode value_mode, typename HeapHandleCallback>
|
| 312 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot, const void* value,
|
| 313 |
+
WriteBarrier::Params& params,
|
| 314 |
+
HeapHandleCallback callback) {
|
| 315 |
+
return ValueModeDispatch<value_mode>::Get(slot, value, params, callback);
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
template <WriteBarrier::ValueMode value_mode, typename HeapHandleCallback>
|
| 319 |
+
static V8_INLINE WriteBarrier::Type Get(const void* slot, RawPointer value,
|
| 320 |
+
WriteBarrier::Params& params,
|
| 321 |
+
HeapHandleCallback callback) {
|
| 322 |
+
return ValueModeDispatch<value_mode>::Get(slot, value.Load(), params,
|
| 323 |
+
callback);
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
template <WriteBarrier::ValueMode value_mode, typename HeapHandleCallback>
|
| 327 |
+
static V8_INLINE WriteBarrier::Type Get(const void* value,
|
| 328 |
+
WriteBarrier::Params& params,
|
| 329 |
+
HeapHandleCallback callback) {
|
| 330 |
+
// The slot will never be used in `Get()` below.
|
| 331 |
+
return Get<WriteBarrier::ValueMode::kValuePresent>(nullptr, value, params,
|
| 332 |
+
callback);
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
private:
|
| 336 |
+
template <WriteBarrier::ValueMode value_mode>
|
| 337 |
+
struct ValueModeDispatch;
|
| 338 |
+
|
| 339 |
+
WriteBarrierTypeForNonCagedHeapPolicy() = delete;
|
| 340 |
+
};
|
| 341 |
+
|
| 342 |
+
template <>
|
| 343 |
+
struct WriteBarrierTypeForNonCagedHeapPolicy::ValueModeDispatch<
|
| 344 |
+
WriteBarrier::ValueMode::kValuePresent> {
|
| 345 |
+
template <typename HeapHandleCallback>
|
| 346 |
+
static V8_INLINE WriteBarrier::Type Get(const void*, const void* object,
|
| 347 |
+
WriteBarrier::Params& params,
|
| 348 |
+
HeapHandleCallback callback) {
|
| 349 |
+
// The following check covers nullptr as well as sentinel pointer.
|
| 350 |
+
if (object <= static_cast<void*>(kSentinelPointer)) {
|
| 351 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 352 |
+
}
|
| 353 |
+
if (V8_LIKELY(!WriteBarrier::IsEnabled())) {
|
| 354 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 355 |
+
}
|
| 356 |
+
// We know that |object| is within the normal page or in the beginning of a
|
| 357 |
+
// large page, so extract the page header by bitmasking.
|
| 358 |
+
BasePageHandle* page =
|
| 359 |
+
BasePageHandle::FromPayload(const_cast<void*>(object));
|
| 360 |
+
|
| 361 |
+
HeapHandle& heap_handle = page->heap_handle();
|
| 362 |
+
if (V8_LIKELY(heap_handle.is_incremental_marking_in_progress())) {
|
| 363 |
+
return SetAndReturnType<WriteBarrier::Type::kMarking>(params);
|
| 364 |
+
}
|
| 365 |
+
return SetAndReturnType<WriteBarrier::Type::kNone>(params);
|
| 366 |
+
}
|
| 367 |
+
};
|
| 368 |
+
|
| 369 |
+
template <>
|
| 370 |
+
struct WriteBarrierTypeForNonCagedHeapPolicy::ValueModeDispatch<
|
| 371 |
+
WriteBarrier::ValueMode::kNoValuePresent> {
|
| 372 |
+
template <typename HeapHandleCallback>
|
| 373 |
+
static V8_INLINE WriteBarrier::Type Get(const void*, const void*,
|
| 374 |
+
WriteBarrier::Params& params,
|
| 375 |
+
HeapHandleCallback callback) {
|
| 376 |
+
if (V8_UNLIKELY(WriteBarrier::IsEnabled())) {
|
| 377 |
+
HeapHandle& handle = callback();
|
| 378 |
+
if (V8_LIKELY(handle.is_incremental_marking_in_progress())) {
|
| 379 |
+
params.heap = &handle;
|
| 380 |
+
return SetAndReturnType<WriteBarrier::Type::kMarking>(params);
|
| 381 |
+
}
|
| 382 |
+
}
|
| 383 |
+
return WriteBarrier::Type::kNone;
|
| 384 |
+
}
|
| 385 |
+
};
|
| 386 |
+
|
| 387 |
+
// static
|
| 388 |
+
WriteBarrier::Type WriteBarrier::GetWriteBarrierType(
|
| 389 |
+
const void* slot, const void* value, WriteBarrier::Params& params) {
|
| 390 |
+
return WriteBarrierTypePolicy::Get<ValueMode::kValuePresent>(slot, value,
|
| 391 |
+
params, []() {});
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
// static
|
| 395 |
+
template <typename MemberStorage>
|
| 396 |
+
WriteBarrier::Type WriteBarrier::GetWriteBarrierType(
|
| 397 |
+
const void* slot, MemberStorage value, WriteBarrier::Params& params) {
|
| 398 |
+
return WriteBarrierTypePolicy::Get<ValueMode::kValuePresent>(slot, value,
|
| 399 |
+
params, []() {});
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
// static
|
| 403 |
+
template <typename HeapHandleCallback>
|
| 404 |
+
WriteBarrier::Type WriteBarrier::GetWriteBarrierType(
|
| 405 |
+
const void* slot, WriteBarrier::Params& params,
|
| 406 |
+
HeapHandleCallback callback) {
|
| 407 |
+
return WriteBarrierTypePolicy::Get<ValueMode::kNoValuePresent>(
|
| 408 |
+
slot, nullptr, params, callback);
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
// static
|
| 412 |
+
WriteBarrier::Type WriteBarrier::GetWriteBarrierType(
|
| 413 |
+
const void* value, WriteBarrier::Params& params) {
|
| 414 |
+
return WriteBarrierTypePolicy::Get<ValueMode::kValuePresent>(value, params,
|
| 415 |
+
[]() {});
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
// static
|
| 419 |
+
void WriteBarrier::DijkstraMarkingBarrier(const Params& params,
|
| 420 |
+
const void* object) {
|
| 421 |
+
CheckParams(Type::kMarking, params);
|
| 422 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 423 |
+
// Caged heap already filters out sentinels.
|
| 424 |
+
DijkstraMarkingBarrierSlow(object);
|
| 425 |
+
#else // !CPPGC_CAGED_HEAP
|
| 426 |
+
DijkstraMarkingBarrierSlowWithSentinelCheck(object);
|
| 427 |
+
#endif // !CPPGC_CAGED_HEAP
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
// static
|
| 431 |
+
void WriteBarrier::DijkstraMarkingBarrierRange(const Params& params,
|
| 432 |
+
const void* first_element,
|
| 433 |
+
size_t element_size,
|
| 434 |
+
size_t number_of_elements,
|
| 435 |
+
TraceCallback trace_callback) {
|
| 436 |
+
CheckParams(Type::kMarking, params);
|
| 437 |
+
DijkstraMarkingBarrierRangeSlow(*params.heap, first_element, element_size,
|
| 438 |
+
number_of_elements, trace_callback);
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
// static
|
| 442 |
+
void WriteBarrier::SteeleMarkingBarrier(const Params& params,
|
| 443 |
+
const void* object) {
|
| 444 |
+
CheckParams(Type::kMarking, params);
|
| 445 |
+
#if defined(CPPGC_CAGED_HEAP)
|
| 446 |
+
// Caged heap already filters out sentinels.
|
| 447 |
+
SteeleMarkingBarrierSlow(object);
|
| 448 |
+
#else // !CPPGC_CAGED_HEAP
|
| 449 |
+
SteeleMarkingBarrierSlowWithSentinelCheck(object);
|
| 450 |
+
#endif // !CPPGC_CAGED_HEAP
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
#if defined(CPPGC_YOUNG_GENERATION)
|
| 454 |
+
|
| 455 |
+
// static
|
| 456 |
+
template <WriteBarrier::GenerationalBarrierType type>
|
| 457 |
+
void WriteBarrier::GenerationalBarrier(const Params& params, const void* slot) {
|
| 458 |
+
CheckParams(Type::kGenerational, params);
|
| 459 |
+
|
| 460 |
+
const CagedHeapLocalData& local_data = CagedHeapLocalData::Get();
|
| 461 |
+
const AgeTable& age_table = local_data.age_table;
|
| 462 |
+
|
| 463 |
+
// Bail out if the slot (precise or imprecise) is in young generation.
|
| 464 |
+
if (V8_LIKELY(age_table.GetAge(params.slot_offset) == AgeTable::Age::kYoung))
|
| 465 |
+
return;
|
| 466 |
+
|
| 467 |
+
// Dispatch between different types of barriers.
|
| 468 |
+
// TODO(chromium:1029379): Consider reload local_data in the slow path to
|
| 469 |
+
// reduce register pressure.
|
| 470 |
+
if constexpr (type == GenerationalBarrierType::kPreciseSlot) {
|
| 471 |
+
GenerationalBarrierSlow(local_data, age_table, slot, params.value_offset,
|
| 472 |
+
params.heap);
|
| 473 |
+
} else if constexpr (type ==
|
| 474 |
+
GenerationalBarrierType::kPreciseUncompressedSlot) {
|
| 475 |
+
GenerationalBarrierForUncompressedSlotSlow(
|
| 476 |
+
local_data, age_table, slot, params.value_offset, params.heap);
|
| 477 |
+
} else {
|
| 478 |
+
GenerationalBarrierForSourceObjectSlow(local_data, slot, params.heap);
|
| 479 |
+
}
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
#endif // !CPPGC_YOUNG_GENERATION
|
| 483 |
+
|
| 484 |
+
} // namespace internal
|
| 485 |
+
} // namespace cppgc
|
| 486 |
+
|
| 487 |
+
#endif // INCLUDE_CPPGC_INTERNAL_WRITE_BARRIER_H_
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by util/mkbuildinf.pl
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2014-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#define PLATFORM "platform: BSD-x86"
|
| 14 |
+
#define DATE "built on: Wed Oct 1 18:52:09 2025 UTC"
|
| 15 |
+
|
| 16 |
+
/*
|
| 17 |
+
* Generate compiler_flags as an array of individual characters. This is a
|
| 18 |
+
* workaround for the situation where CFLAGS gets too long for a C90 string
|
| 19 |
+
* literal
|
| 20 |
+
*/
|
| 21 |
+
static const char compiler_flags[] = {
|
| 22 |
+
'c','o','m','p','i','l','e','r',':',' ','g','c','c',' ','-','f',
|
| 23 |
+
'P','I','C',' ','-','p','t','h','r','e','a','d',' ','-','W','a',
|
| 24 |
+
',','-','-','n','o','e','x','e','c','s','t','a','c','k',' ','-',
|
| 25 |
+
'W','a','l','l',' ','-','O','3',' ','-','f','o','m','i','t','-',
|
| 26 |
+
'f','r','a','m','e','-','p','o','i','n','t','e','r',' ','-','D',
|
| 27 |
+
'L','_','E','N','D','I','A','N',' ','-','D','O','P','E','N','S',
|
| 28 |
+
'S','L','_','P','I','C',' ','-','D','_','T','H','R','E','A','D',
|
| 29 |
+
'_','S','A','F','E',' ','-','D','_','R','E','E','N','T','R','A',
|
| 30 |
+
'N','T',' ','-','D','O','P','E','N','S','S','L','_','B','U','I',
|
| 31 |
+
'L','D','I','N','G','_','O','P','E','N','S','S','L',' ','-','D',
|
| 32 |
+
'N','D','E','B','U','G','\0'
|
| 33 |
+
};
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/crypto/bn_conf.h
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* WARNING: do not edit! */
|
| 2 |
+
/* Generated by Makefile from include/crypto/bn_conf.h.in */
|
| 3 |
+
/*
|
| 4 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OSSL_CRYPTO_BN_CONF_H
|
| 13 |
+
# define OSSL_CRYPTO_BN_CONF_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
/*
|
| 17 |
+
* The contents of this file are not used in the UEFI build, as
|
| 18 |
+
* both 32-bit and 64-bit builds are supported from a single run
|
| 19 |
+
* of the Configure script.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
/* Should we define BN_DIV2W here? */
|
| 23 |
+
|
| 24 |
+
/* Only one for the following should be defined */
|
| 25 |
+
#undef SIXTY_FOUR_BIT_LONG
|
| 26 |
+
#undef SIXTY_FOUR_BIT
|
| 27 |
+
#define THIRTY_TWO_BIT
|
| 28 |
+
|
| 29 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/crypto/dso_conf.h
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* WARNING: do not edit! */
|
| 2 |
+
/* Generated by Makefile from include/crypto/dso_conf.h.in */
|
| 3 |
+
/*
|
| 4 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OSSL_CRYPTO_DSO_CONF_H
|
| 13 |
+
# define OSSL_CRYPTO_DSO_CONF_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# define DSO_DLFCN
|
| 17 |
+
# define HAVE_DLFCN_H
|
| 18 |
+
# define DSO_EXTENSION ".so"
|
| 19 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/asn1.h
ADDED
|
@@ -0,0 +1,1134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ASN1_H
|
| 16 |
+
# define OPENSSL_ASN1_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_ASN1_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# ifndef OPENSSL_NO_STDIO
|
| 25 |
+
# include <stdio.h>
|
| 26 |
+
# endif
|
| 27 |
+
# include <time.h>
|
| 28 |
+
# include <openssl/e_os2.h>
|
| 29 |
+
# include <openssl/opensslconf.h>
|
| 30 |
+
# include <openssl/bio.h>
|
| 31 |
+
# include <openssl/safestack.h>
|
| 32 |
+
# include <openssl/asn1err.h>
|
| 33 |
+
# include <openssl/symhacks.h>
|
| 34 |
+
|
| 35 |
+
# include <openssl/types.h>
|
| 36 |
+
# include <openssl/bn.h>
|
| 37 |
+
|
| 38 |
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 39 |
+
# undef OPENSSL_EXTERN
|
| 40 |
+
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 41 |
+
# endif
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
extern "C" {
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
# define V_ASN1_UNIVERSAL 0x00
|
| 48 |
+
# define V_ASN1_APPLICATION 0x40
|
| 49 |
+
# define V_ASN1_CONTEXT_SPECIFIC 0x80
|
| 50 |
+
# define V_ASN1_PRIVATE 0xc0
|
| 51 |
+
|
| 52 |
+
# define V_ASN1_CONSTRUCTED 0x20
|
| 53 |
+
# define V_ASN1_PRIMITIVE_TAG 0x1f
|
| 54 |
+
# define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG
|
| 55 |
+
|
| 56 |
+
# define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
|
| 57 |
+
# define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
|
| 58 |
+
# define V_ASN1_ANY -4 /* used in ASN1 template code */
|
| 59 |
+
|
| 60 |
+
# define V_ASN1_UNDEF -1
|
| 61 |
+
/* ASN.1 tag values */
|
| 62 |
+
# define V_ASN1_EOC 0
|
| 63 |
+
# define V_ASN1_BOOLEAN 1
|
| 64 |
+
# define V_ASN1_INTEGER 2
|
| 65 |
+
# define V_ASN1_BIT_STRING 3
|
| 66 |
+
# define V_ASN1_OCTET_STRING 4
|
| 67 |
+
# define V_ASN1_NULL 5
|
| 68 |
+
# define V_ASN1_OBJECT 6
|
| 69 |
+
# define V_ASN1_OBJECT_DESCRIPTOR 7
|
| 70 |
+
# define V_ASN1_EXTERNAL 8
|
| 71 |
+
# define V_ASN1_REAL 9
|
| 72 |
+
# define V_ASN1_ENUMERATED 10
|
| 73 |
+
# define V_ASN1_UTF8STRING 12
|
| 74 |
+
# define V_ASN1_SEQUENCE 16
|
| 75 |
+
# define V_ASN1_SET 17
|
| 76 |
+
# define V_ASN1_NUMERICSTRING 18
|
| 77 |
+
# define V_ASN1_PRINTABLESTRING 19
|
| 78 |
+
# define V_ASN1_T61STRING 20
|
| 79 |
+
# define V_ASN1_TELETEXSTRING 20 /* alias */
|
| 80 |
+
# define V_ASN1_VIDEOTEXSTRING 21
|
| 81 |
+
# define V_ASN1_IA5STRING 22
|
| 82 |
+
# define V_ASN1_UTCTIME 23
|
| 83 |
+
# define V_ASN1_GENERALIZEDTIME 24
|
| 84 |
+
# define V_ASN1_GRAPHICSTRING 25
|
| 85 |
+
# define V_ASN1_ISO64STRING 26
|
| 86 |
+
# define V_ASN1_VISIBLESTRING 26 /* alias */
|
| 87 |
+
# define V_ASN1_GENERALSTRING 27
|
| 88 |
+
# define V_ASN1_UNIVERSALSTRING 28
|
| 89 |
+
# define V_ASN1_BMPSTRING 30
|
| 90 |
+
|
| 91 |
+
/*
|
| 92 |
+
* NB the constants below are used internally by ASN1_INTEGER
|
| 93 |
+
* and ASN1_ENUMERATED to indicate the sign. They are *not* on
|
| 94 |
+
* the wire tag values.
|
| 95 |
+
*/
|
| 96 |
+
|
| 97 |
+
# define V_ASN1_NEG 0x100
|
| 98 |
+
# define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
|
| 99 |
+
# define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG)
|
| 100 |
+
|
| 101 |
+
/* For use with d2i_ASN1_type_bytes() */
|
| 102 |
+
# define B_ASN1_NUMERICSTRING 0x0001
|
| 103 |
+
# define B_ASN1_PRINTABLESTRING 0x0002
|
| 104 |
+
# define B_ASN1_T61STRING 0x0004
|
| 105 |
+
# define B_ASN1_TELETEXSTRING 0x0004
|
| 106 |
+
# define B_ASN1_VIDEOTEXSTRING 0x0008
|
| 107 |
+
# define B_ASN1_IA5STRING 0x0010
|
| 108 |
+
# define B_ASN1_GRAPHICSTRING 0x0020
|
| 109 |
+
# define B_ASN1_ISO64STRING 0x0040
|
| 110 |
+
# define B_ASN1_VISIBLESTRING 0x0040
|
| 111 |
+
# define B_ASN1_GENERALSTRING 0x0080
|
| 112 |
+
# define B_ASN1_UNIVERSALSTRING 0x0100
|
| 113 |
+
# define B_ASN1_OCTET_STRING 0x0200
|
| 114 |
+
# define B_ASN1_BIT_STRING 0x0400
|
| 115 |
+
# define B_ASN1_BMPSTRING 0x0800
|
| 116 |
+
# define B_ASN1_UNKNOWN 0x1000
|
| 117 |
+
# define B_ASN1_UTF8STRING 0x2000
|
| 118 |
+
# define B_ASN1_UTCTIME 0x4000
|
| 119 |
+
# define B_ASN1_GENERALIZEDTIME 0x8000
|
| 120 |
+
# define B_ASN1_SEQUENCE 0x10000
|
| 121 |
+
/* For use with ASN1_mbstring_copy() */
|
| 122 |
+
# define MBSTRING_FLAG 0x1000
|
| 123 |
+
# define MBSTRING_UTF8 (MBSTRING_FLAG)
|
| 124 |
+
# define MBSTRING_ASC (MBSTRING_FLAG|1)
|
| 125 |
+
# define MBSTRING_BMP (MBSTRING_FLAG|2)
|
| 126 |
+
# define MBSTRING_UNIV (MBSTRING_FLAG|4)
|
| 127 |
+
# define SMIME_OLDMIME 0x400
|
| 128 |
+
# define SMIME_CRLFEOL 0x800
|
| 129 |
+
# define SMIME_STREAM 0x1000
|
| 130 |
+
|
| 131 |
+
/* Stacks for types not otherwise defined in this header */
|
| 132 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_ALGOR, X509_ALGOR, X509_ALGOR)
|
| 133 |
+
#define sk_X509_ALGOR_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 134 |
+
#define sk_X509_ALGOR_value(sk, idx) ((X509_ALGOR *)OPENSSL_sk_value(ossl_check_const_X509_ALGOR_sk_type(sk), (idx)))
|
| 135 |
+
#define sk_X509_ALGOR_new(cmp) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new(ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 136 |
+
#define sk_X509_ALGOR_new_null() ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_null())
|
| 137 |
+
#define sk_X509_ALGOR_new_reserve(cmp, n) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_reserve(ossl_check_X509_ALGOR_compfunc_type(cmp), (n)))
|
| 138 |
+
#define sk_X509_ALGOR_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ALGOR_sk_type(sk), (n))
|
| 139 |
+
#define sk_X509_ALGOR_free(sk) OPENSSL_sk_free(ossl_check_X509_ALGOR_sk_type(sk))
|
| 140 |
+
#define sk_X509_ALGOR_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ALGOR_sk_type(sk))
|
| 141 |
+
#define sk_X509_ALGOR_delete(sk, i) ((X509_ALGOR *)OPENSSL_sk_delete(ossl_check_X509_ALGOR_sk_type(sk), (i)))
|
| 142 |
+
#define sk_X509_ALGOR_delete_ptr(sk, ptr) ((X509_ALGOR *)OPENSSL_sk_delete_ptr(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr)))
|
| 143 |
+
#define sk_X509_ALGOR_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 144 |
+
#define sk_X509_ALGOR_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 145 |
+
#define sk_X509_ALGOR_pop(sk) ((X509_ALGOR *)OPENSSL_sk_pop(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 146 |
+
#define sk_X509_ALGOR_shift(sk) ((X509_ALGOR *)OPENSSL_sk_shift(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 147 |
+
#define sk_X509_ALGOR_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ALGOR_sk_type(sk),ossl_check_X509_ALGOR_freefunc_type(freefunc))
|
| 148 |
+
#define sk_X509_ALGOR_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), (idx))
|
| 149 |
+
#define sk_X509_ALGOR_set(sk, idx, ptr) ((X509_ALGOR *)OPENSSL_sk_set(ossl_check_X509_ALGOR_sk_type(sk), (idx), ossl_check_X509_ALGOR_type(ptr)))
|
| 150 |
+
#define sk_X509_ALGOR_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 151 |
+
#define sk_X509_ALGOR_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 152 |
+
#define sk_X509_ALGOR_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), pnum)
|
| 153 |
+
#define sk_X509_ALGOR_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ALGOR_sk_type(sk))
|
| 154 |
+
#define sk_X509_ALGOR_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 155 |
+
#define sk_X509_ALGOR_dup(sk) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_dup(ossl_check_const_X509_ALGOR_sk_type(sk)))
|
| 156 |
+
#define sk_X509_ALGOR_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_copyfunc_type(copyfunc), ossl_check_X509_ALGOR_freefunc_type(freefunc)))
|
| 157 |
+
#define sk_X509_ALGOR_set_cmp_func(sk, cmp) ((sk_X509_ALGOR_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
# define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
|
| 162 |
+
/*
|
| 163 |
+
* This indicates that the ASN1_STRING is not a real value but just a place
|
| 164 |
+
* holder for the location where indefinite length constructed data should be
|
| 165 |
+
* inserted in the memory buffer
|
| 166 |
+
*/
|
| 167 |
+
# define ASN1_STRING_FLAG_NDEF 0x010
|
| 168 |
+
|
| 169 |
+
/*
|
| 170 |
+
* This flag is used by the CMS code to indicate that a string is not
|
| 171 |
+
* complete and is a place holder for content when it had all been accessed.
|
| 172 |
+
* The flag will be reset when content has been written to it.
|
| 173 |
+
*/
|
| 174 |
+
|
| 175 |
+
# define ASN1_STRING_FLAG_CONT 0x020
|
| 176 |
+
/*
|
| 177 |
+
* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
|
| 178 |
+
* type.
|
| 179 |
+
*/
|
| 180 |
+
# define ASN1_STRING_FLAG_MSTRING 0x040
|
| 181 |
+
/* String is embedded and only content should be freed */
|
| 182 |
+
# define ASN1_STRING_FLAG_EMBED 0x080
|
| 183 |
+
/* String should be parsed in RFC 5280's time format */
|
| 184 |
+
# define ASN1_STRING_FLAG_X509_TIME 0x100
|
| 185 |
+
/* This is the base type that holds just about everything :-) */
|
| 186 |
+
struct asn1_string_st {
|
| 187 |
+
int length;
|
| 188 |
+
int type;
|
| 189 |
+
unsigned char *data;
|
| 190 |
+
/*
|
| 191 |
+
* The value of the following field depends on the type being held. It
|
| 192 |
+
* is mostly being used for BIT_STRING so if the input data has a
|
| 193 |
+
* non-zero 'unused bits' value, it will be handled correctly
|
| 194 |
+
*/
|
| 195 |
+
long flags;
|
| 196 |
+
};
|
| 197 |
+
|
| 198 |
+
/*
|
| 199 |
+
* ASN1_ENCODING structure: this is used to save the received encoding of an
|
| 200 |
+
* ASN1 type. This is useful to get round problems with invalid encodings
|
| 201 |
+
* which can break signatures.
|
| 202 |
+
*/
|
| 203 |
+
|
| 204 |
+
typedef struct ASN1_ENCODING_st {
|
| 205 |
+
unsigned char *enc; /* DER encoding */
|
| 206 |
+
long len; /* Length of encoding */
|
| 207 |
+
int modified; /* set to 1 if 'enc' is invalid */
|
| 208 |
+
} ASN1_ENCODING;
|
| 209 |
+
|
| 210 |
+
/* Used with ASN1 LONG type: if a long is set to this it is omitted */
|
| 211 |
+
# define ASN1_LONG_UNDEF 0x7fffffffL
|
| 212 |
+
|
| 213 |
+
# define STABLE_FLAGS_MALLOC 0x01
|
| 214 |
+
/*
|
| 215 |
+
* A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted
|
| 216 |
+
* as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting
|
| 217 |
+
* STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias
|
| 218 |
+
* STABLE_FLAGS_CLEAR to reflect this.
|
| 219 |
+
*/
|
| 220 |
+
# define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC
|
| 221 |
+
# define STABLE_NO_MASK 0x02
|
| 222 |
+
# define DIRSTRING_TYPE \
|
| 223 |
+
(B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
|
| 224 |
+
# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
|
| 225 |
+
|
| 226 |
+
struct asn1_string_table_st {
|
| 227 |
+
int nid;
|
| 228 |
+
long minsize;
|
| 229 |
+
long maxsize;
|
| 230 |
+
unsigned long mask;
|
| 231 |
+
unsigned long flags;
|
| 232 |
+
};
|
| 233 |
+
|
| 234 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
|
| 235 |
+
#define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 236 |
+
#define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))
|
| 237 |
+
#define sk_ASN1_STRING_TABLE_new(cmp) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 238 |
+
#define sk_ASN1_STRING_TABLE_new_null() ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_null())
|
| 239 |
+
#define sk_ASN1_STRING_TABLE_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp), (n)))
|
| 240 |
+
#define sk_ASN1_STRING_TABLE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (n))
|
| 241 |
+
#define sk_ASN1_STRING_TABLE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 242 |
+
#define sk_ASN1_STRING_TABLE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 243 |
+
#define sk_ASN1_STRING_TABLE_delete(sk, i) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (i)))
|
| 244 |
+
#define sk_ASN1_STRING_TABLE_delete_ptr(sk, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 245 |
+
#define sk_ASN1_STRING_TABLE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 246 |
+
#define sk_ASN1_STRING_TABLE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 247 |
+
#define sk_ASN1_STRING_TABLE_pop(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 248 |
+
#define sk_ASN1_STRING_TABLE_shift(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 249 |
+
#define sk_ASN1_STRING_TABLE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk),ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc))
|
| 250 |
+
#define sk_ASN1_STRING_TABLE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), (idx))
|
| 251 |
+
#define sk_ASN1_STRING_TABLE_set(sk, idx, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_set(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (idx), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 252 |
+
#define sk_ASN1_STRING_TABLE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 253 |
+
#define sk_ASN1_STRING_TABLE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 254 |
+
#define sk_ASN1_STRING_TABLE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), pnum)
|
| 255 |
+
#define sk_ASN1_STRING_TABLE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 256 |
+
#define sk_ASN1_STRING_TABLE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 257 |
+
#define sk_ASN1_STRING_TABLE_dup(sk) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk)))
|
| 258 |
+
#define sk_ASN1_STRING_TABLE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc)))
|
| 259 |
+
#define sk_ASN1_STRING_TABLE_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_TABLE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
/* size limits: this stuff is taken straight from RFC2459 */
|
| 263 |
+
|
| 264 |
+
# define ub_name 32768
|
| 265 |
+
# define ub_common_name 64
|
| 266 |
+
# define ub_locality_name 128
|
| 267 |
+
# define ub_state_name 128
|
| 268 |
+
# define ub_organization_name 64
|
| 269 |
+
# define ub_organization_unit_name 64
|
| 270 |
+
# define ub_title 64
|
| 271 |
+
# define ub_email_address 128
|
| 272 |
+
|
| 273 |
+
/*
|
| 274 |
+
* Declarations for template structures: for full definitions see asn1t.h
|
| 275 |
+
*/
|
| 276 |
+
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
|
| 277 |
+
typedef struct ASN1_TLC_st ASN1_TLC;
|
| 278 |
+
/* This is just an opaque pointer */
|
| 279 |
+
typedef struct ASN1_VALUE_st ASN1_VALUE;
|
| 280 |
+
|
| 281 |
+
/* Declare ASN1 functions: the implement macro is in asn1t.h */
|
| 282 |
+
|
| 283 |
+
/*
|
| 284 |
+
* The mysterious 'extern' that's passed to some macros is innocuous,
|
| 285 |
+
* and is there to quiet pre-C99 compilers that may complain about empty
|
| 286 |
+
* arguments in macro calls.
|
| 287 |
+
*/
|
| 288 |
+
|
| 289 |
+
# define DECLARE_ASN1_FUNCTIONS_attr(attr, type) \
|
| 290 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
|
| 291 |
+
# define DECLARE_ASN1_FUNCTIONS(type) \
|
| 292 |
+
DECLARE_ASN1_FUNCTIONS_attr(extern, type)
|
| 293 |
+
|
| 294 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_attr(attr, type) \
|
| 295 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, type)
|
| 296 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
|
| 297 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_attr(extern, type)
|
| 298 |
+
|
| 299 |
+
# define DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, name) \
|
| 300 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 301 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name)
|
| 302 |
+
# define DECLARE_ASN1_FUNCTIONS_name(type, name) \
|
| 303 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(extern, type, name)
|
| 304 |
+
|
| 305 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, itname, name) \
|
| 306 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 307 |
+
DECLARE_ASN1_ITEM_attr(attr, itname)
|
| 308 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
|
| 309 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(extern, type, itname, name)
|
| 310 |
+
|
| 311 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name) \
|
| 312 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, name, name)
|
| 313 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_name(type, name) \
|
| 314 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(extern, type, name)
|
| 315 |
+
|
| 316 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 317 |
+
attr type *d2i_##name(type **a, const unsigned char **in, long len); \
|
| 318 |
+
attr int i2d_##name(const type *a, unsigned char **out);
|
| 319 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_only(type, name) \
|
| 320 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(extern, type, name)
|
| 321 |
+
|
| 322 |
+
# define DECLARE_ASN1_NDEF_FUNCTION_attr(attr, name) \
|
| 323 |
+
attr int i2d_##name##_NDEF(const name *a, unsigned char **out);
|
| 324 |
+
# define DECLARE_ASN1_NDEF_FUNCTION(name) \
|
| 325 |
+
DECLARE_ASN1_NDEF_FUNCTION_attr(extern, name)
|
| 326 |
+
|
| 327 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 328 |
+
attr type *name##_new(void); \
|
| 329 |
+
attr void name##_free(type *a);
|
| 330 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 331 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(extern, type, name)
|
| 332 |
+
|
| 333 |
+
# define DECLARE_ASN1_DUP_FUNCTION_attr(attr, type) \
|
| 334 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, type)
|
| 335 |
+
# define DECLARE_ASN1_DUP_FUNCTION(type) \
|
| 336 |
+
DECLARE_ASN1_DUP_FUNCTION_attr(extern, type)
|
| 337 |
+
|
| 338 |
+
# define DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, name) \
|
| 339 |
+
attr type *name##_dup(const type *a);
|
| 340 |
+
# define DECLARE_ASN1_DUP_FUNCTION_name(type, name) \
|
| 341 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(extern, type, name)
|
| 342 |
+
|
| 343 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_attr(attr, stname) \
|
| 344 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, stname)
|
| 345 |
+
# define DECLARE_ASN1_PRINT_FUNCTION(stname) \
|
| 346 |
+
DECLARE_ASN1_PRINT_FUNCTION_attr(extern, stname)
|
| 347 |
+
|
| 348 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, fname) \
|
| 349 |
+
attr int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 350 |
+
const ASN1_PCTX *pctx);
|
| 351 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
|
| 352 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(extern, stname, fname)
|
| 353 |
+
|
| 354 |
+
# define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
|
| 355 |
+
# define I2D_OF(type) int (*)(const type *,unsigned char **)
|
| 356 |
+
|
| 357 |
+
# define CHECKED_D2I_OF(type, d2i) \
|
| 358 |
+
((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))
|
| 359 |
+
# define CHECKED_I2D_OF(type, i2d) \
|
| 360 |
+
((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))
|
| 361 |
+
# define CHECKED_NEW_OF(type, xnew) \
|
| 362 |
+
((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))
|
| 363 |
+
# define CHECKED_PTR_OF(type, p) \
|
| 364 |
+
((void*) (1 ? p : (type*)0))
|
| 365 |
+
# define CHECKED_PPTR_OF(type, p) \
|
| 366 |
+
((void**) (1 ? p : (type**)0))
|
| 367 |
+
|
| 368 |
+
# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
|
| 369 |
+
# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *,unsigned char **)
|
| 370 |
+
# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
|
| 371 |
+
|
| 372 |
+
typedef void *d2i_of_void(void **, const unsigned char **, long);
|
| 373 |
+
typedef int i2d_of_void(const void *, unsigned char **);
|
| 374 |
+
typedef int OSSL_i2d_of_void_ctx(const void *, unsigned char **, void *vctx);
|
| 375 |
+
|
| 376 |
+
/*-
|
| 377 |
+
* The following macros and typedefs allow an ASN1_ITEM
|
| 378 |
+
* to be embedded in a structure and referenced. Since
|
| 379 |
+
* the ASN1_ITEM pointers need to be globally accessible
|
| 380 |
+
* (possibly from shared libraries) they may exist in
|
| 381 |
+
* different forms. On platforms that support it the
|
| 382 |
+
* ASN1_ITEM structure itself will be globally exported.
|
| 383 |
+
* Other platforms will export a function that returns
|
| 384 |
+
* an ASN1_ITEM pointer.
|
| 385 |
+
*
|
| 386 |
+
* To handle both cases transparently the macros below
|
| 387 |
+
* should be used instead of hard coding an ASN1_ITEM
|
| 388 |
+
* pointer in a structure.
|
| 389 |
+
*
|
| 390 |
+
* The structure will look like this:
|
| 391 |
+
*
|
| 392 |
+
* typedef struct SOMETHING_st {
|
| 393 |
+
* ...
|
| 394 |
+
* ASN1_ITEM_EXP *iptr;
|
| 395 |
+
* ...
|
| 396 |
+
* } SOMETHING;
|
| 397 |
+
*
|
| 398 |
+
* It would be initialised as e.g.:
|
| 399 |
+
*
|
| 400 |
+
* SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
|
| 401 |
+
*
|
| 402 |
+
* and the actual pointer extracted with:
|
| 403 |
+
*
|
| 404 |
+
* const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
|
| 405 |
+
*
|
| 406 |
+
* Finally an ASN1_ITEM pointer can be extracted from an
|
| 407 |
+
* appropriate reference with: ASN1_ITEM_rptr(X509). This
|
| 408 |
+
* would be used when a function takes an ASN1_ITEM * argument.
|
| 409 |
+
*
|
| 410 |
+
*/
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
/*
|
| 414 |
+
* Platforms that can't easily handle shared global variables are declared as
|
| 415 |
+
* functions returning ASN1_ITEM pointers.
|
| 416 |
+
*/
|
| 417 |
+
|
| 418 |
+
/* ASN1_ITEM pointer exported type */
|
| 419 |
+
typedef const ASN1_ITEM *ASN1_ITEM_EXP (void);
|
| 420 |
+
|
| 421 |
+
/* Macro to obtain ASN1_ITEM pointer from exported type */
|
| 422 |
+
# define ASN1_ITEM_ptr(iptr) (iptr())
|
| 423 |
+
|
| 424 |
+
/* Macro to include ASN1_ITEM pointer from base type */
|
| 425 |
+
# define ASN1_ITEM_ref(iptr) (iptr##_it)
|
| 426 |
+
|
| 427 |
+
# define ASN1_ITEM_rptr(ref) (ref##_it())
|
| 428 |
+
|
| 429 |
+
# define DECLARE_ASN1_ITEM_attr(attr, name) \
|
| 430 |
+
attr const ASN1_ITEM * name##_it(void);
|
| 431 |
+
# define DECLARE_ASN1_ITEM(name) \
|
| 432 |
+
DECLARE_ASN1_ITEM_attr(extern, name)
|
| 433 |
+
|
| 434 |
+
/* Parameters used by ASN1_STRING_print_ex() */
|
| 435 |
+
|
| 436 |
+
/*
|
| 437 |
+
* These determine which characters to escape: RFC2253 special characters,
|
| 438 |
+
* control characters and MSB set characters
|
| 439 |
+
*/
|
| 440 |
+
|
| 441 |
+
# define ASN1_STRFLGS_ESC_2253 1
|
| 442 |
+
# define ASN1_STRFLGS_ESC_CTRL 2
|
| 443 |
+
# define ASN1_STRFLGS_ESC_MSB 4
|
| 444 |
+
|
| 445 |
+
/* Lower 8 bits are reserved as an output type specifier */
|
| 446 |
+
# define ASN1_DTFLGS_TYPE_MASK 0x0FUL
|
| 447 |
+
# define ASN1_DTFLGS_RFC822 0x00UL
|
| 448 |
+
# define ASN1_DTFLGS_ISO8601 0x01UL
|
| 449 |
+
|
| 450 |
+
/*
|
| 451 |
+
* This flag determines how we do escaping: normally RC2253 backslash only,
|
| 452 |
+
* set this to use backslash and quote.
|
| 453 |
+
*/
|
| 454 |
+
|
| 455 |
+
# define ASN1_STRFLGS_ESC_QUOTE 8
|
| 456 |
+
|
| 457 |
+
/* These three flags are internal use only. */
|
| 458 |
+
|
| 459 |
+
/* Character is a valid PrintableString character */
|
| 460 |
+
# define CHARTYPE_PRINTABLESTRING 0x10
|
| 461 |
+
/* Character needs escaping if it is the first character */
|
| 462 |
+
# define CHARTYPE_FIRST_ESC_2253 0x20
|
| 463 |
+
/* Character needs escaping if it is the last character */
|
| 464 |
+
# define CHARTYPE_LAST_ESC_2253 0x40
|
| 465 |
+
|
| 466 |
+
/*
|
| 467 |
+
* NB the internal flags are safely reused below by flags handled at the top
|
| 468 |
+
* level.
|
| 469 |
+
*/
|
| 470 |
+
|
| 471 |
+
/*
|
| 472 |
+
* If this is set we convert all character strings to UTF8 first
|
| 473 |
+
*/
|
| 474 |
+
|
| 475 |
+
# define ASN1_STRFLGS_UTF8_CONVERT 0x10
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* If this is set we don't attempt to interpret content: just assume all
|
| 479 |
+
* strings are 1 byte per character. This will produce some pretty odd
|
| 480 |
+
* looking output!
|
| 481 |
+
*/
|
| 482 |
+
|
| 483 |
+
# define ASN1_STRFLGS_IGNORE_TYPE 0x20
|
| 484 |
+
|
| 485 |
+
/* If this is set we include the string type in the output */
|
| 486 |
+
# define ASN1_STRFLGS_SHOW_TYPE 0x40
|
| 487 |
+
|
| 488 |
+
/*
|
| 489 |
+
* This determines which strings to display and which to 'dump' (hex dump of
|
| 490 |
+
* content octets or DER encoding). We can only dump non character strings or
|
| 491 |
+
* everything. If we don't dump 'unknown' they are interpreted as character
|
| 492 |
+
* strings with 1 octet per character and are subject to the usual escaping
|
| 493 |
+
* options.
|
| 494 |
+
*/
|
| 495 |
+
|
| 496 |
+
# define ASN1_STRFLGS_DUMP_ALL 0x80
|
| 497 |
+
# define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
|
| 498 |
+
|
| 499 |
+
/*
|
| 500 |
+
* These determine what 'dumping' does, we can dump the content octets or the
|
| 501 |
+
* DER encoding: both use the RFC2253 #XXXXX notation.
|
| 502 |
+
*/
|
| 503 |
+
|
| 504 |
+
# define ASN1_STRFLGS_DUMP_DER 0x200
|
| 505 |
+
|
| 506 |
+
/*
|
| 507 |
+
* This flag specifies that RC2254 escaping shall be performed.
|
| 508 |
+
*/
|
| 509 |
+
#define ASN1_STRFLGS_ESC_2254 0x400
|
| 510 |
+
|
| 511 |
+
/*
|
| 512 |
+
* All the string flags consistent with RFC2253, escaping control characters
|
| 513 |
+
* isn't essential in RFC2253 but it is advisable anyway.
|
| 514 |
+
*/
|
| 515 |
+
|
| 516 |
+
# define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \
|
| 517 |
+
ASN1_STRFLGS_ESC_CTRL | \
|
| 518 |
+
ASN1_STRFLGS_ESC_MSB | \
|
| 519 |
+
ASN1_STRFLGS_UTF8_CONVERT | \
|
| 520 |
+
ASN1_STRFLGS_DUMP_UNKNOWN | \
|
| 521 |
+
ASN1_STRFLGS_DUMP_DER)
|
| 522 |
+
|
| 523 |
+
|
| 524 |
+
struct asn1_type_st {
|
| 525 |
+
int type;
|
| 526 |
+
union {
|
| 527 |
+
char *ptr;
|
| 528 |
+
ASN1_BOOLEAN boolean;
|
| 529 |
+
ASN1_STRING *asn1_string;
|
| 530 |
+
ASN1_OBJECT *object;
|
| 531 |
+
ASN1_INTEGER *integer;
|
| 532 |
+
ASN1_ENUMERATED *enumerated;
|
| 533 |
+
ASN1_BIT_STRING *bit_string;
|
| 534 |
+
ASN1_OCTET_STRING *octet_string;
|
| 535 |
+
ASN1_PRINTABLESTRING *printablestring;
|
| 536 |
+
ASN1_T61STRING *t61string;
|
| 537 |
+
ASN1_IA5STRING *ia5string;
|
| 538 |
+
ASN1_GENERALSTRING *generalstring;
|
| 539 |
+
ASN1_BMPSTRING *bmpstring;
|
| 540 |
+
ASN1_UNIVERSALSTRING *universalstring;
|
| 541 |
+
ASN1_UTCTIME *utctime;
|
| 542 |
+
ASN1_GENERALIZEDTIME *generalizedtime;
|
| 543 |
+
ASN1_VISIBLESTRING *visiblestring;
|
| 544 |
+
ASN1_UTF8STRING *utf8string;
|
| 545 |
+
/*
|
| 546 |
+
* set and sequence are left complete and still contain the set or
|
| 547 |
+
* sequence bytes
|
| 548 |
+
*/
|
| 549 |
+
ASN1_STRING *set;
|
| 550 |
+
ASN1_STRING *sequence;
|
| 551 |
+
ASN1_VALUE *asn1_value;
|
| 552 |
+
} value;
|
| 553 |
+
};
|
| 554 |
+
|
| 555 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_TYPE, ASN1_TYPE, ASN1_TYPE)
|
| 556 |
+
#define sk_ASN1_TYPE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 557 |
+
#define sk_ASN1_TYPE_value(sk, idx) ((ASN1_TYPE *)OPENSSL_sk_value(ossl_check_const_ASN1_TYPE_sk_type(sk), (idx)))
|
| 558 |
+
#define sk_ASN1_TYPE_new(cmp) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new(ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 559 |
+
#define sk_ASN1_TYPE_new_null() ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_null())
|
| 560 |
+
#define sk_ASN1_TYPE_new_reserve(cmp, n) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_TYPE_compfunc_type(cmp), (n)))
|
| 561 |
+
#define sk_ASN1_TYPE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_TYPE_sk_type(sk), (n))
|
| 562 |
+
#define sk_ASN1_TYPE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 563 |
+
#define sk_ASN1_TYPE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 564 |
+
#define sk_ASN1_TYPE_delete(sk, i) ((ASN1_TYPE *)OPENSSL_sk_delete(ossl_check_ASN1_TYPE_sk_type(sk), (i)))
|
| 565 |
+
#define sk_ASN1_TYPE_delete_ptr(sk, ptr) ((ASN1_TYPE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr)))
|
| 566 |
+
#define sk_ASN1_TYPE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 567 |
+
#define sk_ASN1_TYPE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 568 |
+
#define sk_ASN1_TYPE_pop(sk) ((ASN1_TYPE *)OPENSSL_sk_pop(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 569 |
+
#define sk_ASN1_TYPE_shift(sk) ((ASN1_TYPE *)OPENSSL_sk_shift(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 570 |
+
#define sk_ASN1_TYPE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_TYPE_sk_type(sk),ossl_check_ASN1_TYPE_freefunc_type(freefunc))
|
| 571 |
+
#define sk_ASN1_TYPE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), (idx))
|
| 572 |
+
#define sk_ASN1_TYPE_set(sk, idx, ptr) ((ASN1_TYPE *)OPENSSL_sk_set(ossl_check_ASN1_TYPE_sk_type(sk), (idx), ossl_check_ASN1_TYPE_type(ptr)))
|
| 573 |
+
#define sk_ASN1_TYPE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 574 |
+
#define sk_ASN1_TYPE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 575 |
+
#define sk_ASN1_TYPE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), pnum)
|
| 576 |
+
#define sk_ASN1_TYPE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 577 |
+
#define sk_ASN1_TYPE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 578 |
+
#define sk_ASN1_TYPE_dup(sk) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_TYPE_sk_type(sk)))
|
| 579 |
+
#define sk_ASN1_TYPE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_copyfunc_type(copyfunc), ossl_check_ASN1_TYPE_freefunc_type(freefunc)))
|
| 580 |
+
#define sk_ASN1_TYPE_set_cmp_func(sk, cmp) ((sk_ASN1_TYPE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
|
| 584 |
+
|
| 585 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
|
| 586 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
|
| 587 |
+
|
| 588 |
+
/* This is used to contain a list of bit names */
|
| 589 |
+
typedef struct BIT_STRING_BITNAME_st {
|
| 590 |
+
int bitnum;
|
| 591 |
+
const char *lname;
|
| 592 |
+
const char *sname;
|
| 593 |
+
} BIT_STRING_BITNAME;
|
| 594 |
+
|
| 595 |
+
# define B_ASN1_TIME \
|
| 596 |
+
B_ASN1_UTCTIME | \
|
| 597 |
+
B_ASN1_GENERALIZEDTIME
|
| 598 |
+
|
| 599 |
+
# define B_ASN1_PRINTABLE \
|
| 600 |
+
B_ASN1_NUMERICSTRING| \
|
| 601 |
+
B_ASN1_PRINTABLESTRING| \
|
| 602 |
+
B_ASN1_T61STRING| \
|
| 603 |
+
B_ASN1_IA5STRING| \
|
| 604 |
+
B_ASN1_BIT_STRING| \
|
| 605 |
+
B_ASN1_UNIVERSALSTRING|\
|
| 606 |
+
B_ASN1_BMPSTRING|\
|
| 607 |
+
B_ASN1_UTF8STRING|\
|
| 608 |
+
B_ASN1_SEQUENCE|\
|
| 609 |
+
B_ASN1_UNKNOWN
|
| 610 |
+
|
| 611 |
+
# define B_ASN1_DIRECTORYSTRING \
|
| 612 |
+
B_ASN1_PRINTABLESTRING| \
|
| 613 |
+
B_ASN1_TELETEXSTRING|\
|
| 614 |
+
B_ASN1_BMPSTRING|\
|
| 615 |
+
B_ASN1_UNIVERSALSTRING|\
|
| 616 |
+
B_ASN1_UTF8STRING
|
| 617 |
+
|
| 618 |
+
# define B_ASN1_DISPLAYTEXT \
|
| 619 |
+
B_ASN1_IA5STRING| \
|
| 620 |
+
B_ASN1_VISIBLESTRING| \
|
| 621 |
+
B_ASN1_BMPSTRING|\
|
| 622 |
+
B_ASN1_UTF8STRING
|
| 623 |
+
|
| 624 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(ASN1_TYPE, ASN1_TYPE)
|
| 625 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
| 626 |
+
|
| 627 |
+
int ASN1_TYPE_get(const ASN1_TYPE *a);
|
| 628 |
+
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
| 629 |
+
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
| 630 |
+
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
|
| 631 |
+
|
| 632 |
+
ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
|
| 633 |
+
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
|
| 634 |
+
|
| 635 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_OBJECT, ASN1_OBJECT, ASN1_OBJECT)
|
| 636 |
+
#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 637 |
+
#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
|
| 638 |
+
#define sk_ASN1_OBJECT_new(cmp) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new(ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 639 |
+
#define sk_ASN1_OBJECT_new_null() ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_null())
|
| 640 |
+
#define sk_ASN1_OBJECT_new_reserve(cmp, n) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_OBJECT_compfunc_type(cmp), (n)))
|
| 641 |
+
#define sk_ASN1_OBJECT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_OBJECT_sk_type(sk), (n))
|
| 642 |
+
#define sk_ASN1_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 643 |
+
#define sk_ASN1_OBJECT_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 644 |
+
#define sk_ASN1_OBJECT_delete(sk, i) ((ASN1_OBJECT *)OPENSSL_sk_delete(ossl_check_ASN1_OBJECT_sk_type(sk), (i)))
|
| 645 |
+
#define sk_ASN1_OBJECT_delete_ptr(sk, ptr) ((ASN1_OBJECT *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 646 |
+
#define sk_ASN1_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 647 |
+
#define sk_ASN1_OBJECT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 648 |
+
#define sk_ASN1_OBJECT_pop(sk) ((ASN1_OBJECT *)OPENSSL_sk_pop(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 649 |
+
#define sk_ASN1_OBJECT_shift(sk) ((ASN1_OBJECT *)OPENSSL_sk_shift(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 650 |
+
#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk),ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
|
| 651 |
+
#define sk_ASN1_OBJECT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), (idx))
|
| 652 |
+
#define sk_ASN1_OBJECT_set(sk, idx, ptr) ((ASN1_OBJECT *)OPENSSL_sk_set(ossl_check_ASN1_OBJECT_sk_type(sk), (idx), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 653 |
+
#define sk_ASN1_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 654 |
+
#define sk_ASN1_OBJECT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 655 |
+
#define sk_ASN1_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), pnum)
|
| 656 |
+
#define sk_ASN1_OBJECT_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 657 |
+
#define sk_ASN1_OBJECT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 658 |
+
#define sk_ASN1_OBJECT_dup(sk) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_dup(ossl_check_const_ASN1_OBJECT_sk_type(sk)))
|
| 659 |
+
#define sk_ASN1_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_copyfunc_type(copyfunc), ossl_check_ASN1_OBJECT_freefunc_type(freefunc)))
|
| 660 |
+
#define sk_ASN1_OBJECT_set_cmp_func(sk, cmp) ((sk_ASN1_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 661 |
+
|
| 662 |
+
|
| 663 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
|
| 664 |
+
|
| 665 |
+
ASN1_STRING *ASN1_STRING_new(void);
|
| 666 |
+
void ASN1_STRING_free(ASN1_STRING *a);
|
| 667 |
+
void ASN1_STRING_clear_free(ASN1_STRING *a);
|
| 668 |
+
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
|
| 669 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_STRING)
|
| 670 |
+
ASN1_STRING *ASN1_STRING_type_new(int type);
|
| 671 |
+
int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
|
| 672 |
+
/*
|
| 673 |
+
* Since this is used to store all sorts of things, via macros, for now,
|
| 674 |
+
* make its data void *
|
| 675 |
+
*/
|
| 676 |
+
int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
|
| 677 |
+
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
|
| 678 |
+
int ASN1_STRING_length(const ASN1_STRING *x);
|
| 679 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 680 |
+
OSSL_DEPRECATEDIN_3_0 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
|
| 681 |
+
# endif
|
| 682 |
+
int ASN1_STRING_type(const ASN1_STRING *x);
|
| 683 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 684 |
+
OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
|
| 685 |
+
# endif
|
| 686 |
+
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
|
| 687 |
+
|
| 688 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
|
| 689 |
+
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
|
| 690 |
+
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
|
| 691 |
+
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
|
| 692 |
+
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
|
| 693 |
+
const unsigned char *flags, int flags_len);
|
| 694 |
+
|
| 695 |
+
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
|
| 696 |
+
BIT_STRING_BITNAME *tbl, int indent);
|
| 697 |
+
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
|
| 698 |
+
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
|
| 699 |
+
BIT_STRING_BITNAME *tbl);
|
| 700 |
+
|
| 701 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_INTEGER, ASN1_INTEGER, ASN1_INTEGER)
|
| 702 |
+
#define sk_ASN1_INTEGER_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 703 |
+
#define sk_ASN1_INTEGER_value(sk, idx) ((ASN1_INTEGER *)OPENSSL_sk_value(ossl_check_const_ASN1_INTEGER_sk_type(sk), (idx)))
|
| 704 |
+
#define sk_ASN1_INTEGER_new(cmp) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new(ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 705 |
+
#define sk_ASN1_INTEGER_new_null() ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_null())
|
| 706 |
+
#define sk_ASN1_INTEGER_new_reserve(cmp, n) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_INTEGER_compfunc_type(cmp), (n)))
|
| 707 |
+
#define sk_ASN1_INTEGER_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_INTEGER_sk_type(sk), (n))
|
| 708 |
+
#define sk_ASN1_INTEGER_free(sk) OPENSSL_sk_free(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 709 |
+
#define sk_ASN1_INTEGER_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 710 |
+
#define sk_ASN1_INTEGER_delete(sk, i) ((ASN1_INTEGER *)OPENSSL_sk_delete(ossl_check_ASN1_INTEGER_sk_type(sk), (i)))
|
| 711 |
+
#define sk_ASN1_INTEGER_delete_ptr(sk, ptr) ((ASN1_INTEGER *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 712 |
+
#define sk_ASN1_INTEGER_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 713 |
+
#define sk_ASN1_INTEGER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 714 |
+
#define sk_ASN1_INTEGER_pop(sk) ((ASN1_INTEGER *)OPENSSL_sk_pop(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 715 |
+
#define sk_ASN1_INTEGER_shift(sk) ((ASN1_INTEGER *)OPENSSL_sk_shift(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 716 |
+
#define sk_ASN1_INTEGER_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_INTEGER_sk_type(sk),ossl_check_ASN1_INTEGER_freefunc_type(freefunc))
|
| 717 |
+
#define sk_ASN1_INTEGER_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), (idx))
|
| 718 |
+
#define sk_ASN1_INTEGER_set(sk, idx, ptr) ((ASN1_INTEGER *)OPENSSL_sk_set(ossl_check_ASN1_INTEGER_sk_type(sk), (idx), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 719 |
+
#define sk_ASN1_INTEGER_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 720 |
+
#define sk_ASN1_INTEGER_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 721 |
+
#define sk_ASN1_INTEGER_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), pnum)
|
| 722 |
+
#define sk_ASN1_INTEGER_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 723 |
+
#define sk_ASN1_INTEGER_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 724 |
+
#define sk_ASN1_INTEGER_dup(sk) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_dup(ossl_check_const_ASN1_INTEGER_sk_type(sk)))
|
| 725 |
+
#define sk_ASN1_INTEGER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_copyfunc_type(copyfunc), ossl_check_ASN1_INTEGER_freefunc_type(freefunc)))
|
| 726 |
+
#define sk_ASN1_INTEGER_set_cmp_func(sk, cmp) ((sk_ASN1_INTEGER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 727 |
+
|
| 728 |
+
|
| 729 |
+
|
| 730 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
|
| 731 |
+
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
| 732 |
+
long length);
|
| 733 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_INTEGER)
|
| 734 |
+
int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
|
| 735 |
+
|
| 736 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
| 737 |
+
|
| 738 |
+
int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
|
| 739 |
+
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
|
| 740 |
+
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
| 741 |
+
int offset_day, long offset_sec);
|
| 742 |
+
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
|
| 743 |
+
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
| 744 |
+
|
| 745 |
+
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
|
| 746 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
| 747 |
+
time_t t);
|
| 748 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
|
| 749 |
+
time_t t, int offset_day,
|
| 750 |
+
long offset_sec);
|
| 751 |
+
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
|
| 752 |
+
|
| 753 |
+
int ASN1_TIME_diff(int *pday, int *psec,
|
| 754 |
+
const ASN1_TIME *from, const ASN1_TIME *to);
|
| 755 |
+
|
| 756 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
|
| 757 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_OCTET_STRING)
|
| 758 |
+
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
|
| 759 |
+
const ASN1_OCTET_STRING *b);
|
| 760 |
+
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
|
| 761 |
+
int len);
|
| 762 |
+
|
| 763 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_UTF8STRING, ASN1_UTF8STRING, ASN1_UTF8STRING)
|
| 764 |
+
#define sk_ASN1_UTF8STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 765 |
+
#define sk_ASN1_UTF8STRING_value(sk, idx) ((ASN1_UTF8STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), (idx)))
|
| 766 |
+
#define sk_ASN1_UTF8STRING_new(cmp) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 767 |
+
#define sk_ASN1_UTF8STRING_new_null() ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_null())
|
| 768 |
+
#define sk_ASN1_UTF8STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp), (n)))
|
| 769 |
+
#define sk_ASN1_UTF8STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_UTF8STRING_sk_type(sk), (n))
|
| 770 |
+
#define sk_ASN1_UTF8STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 771 |
+
#define sk_ASN1_UTF8STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 772 |
+
#define sk_ASN1_UTF8STRING_delete(sk, i) ((ASN1_UTF8STRING *)OPENSSL_sk_delete(ossl_check_ASN1_UTF8STRING_sk_type(sk), (i)))
|
| 773 |
+
#define sk_ASN1_UTF8STRING_delete_ptr(sk, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 774 |
+
#define sk_ASN1_UTF8STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 775 |
+
#define sk_ASN1_UTF8STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 776 |
+
#define sk_ASN1_UTF8STRING_pop(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_pop(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 777 |
+
#define sk_ASN1_UTF8STRING_shift(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_shift(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 778 |
+
#define sk_ASN1_UTF8STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_UTF8STRING_sk_type(sk),ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc))
|
| 779 |
+
#define sk_ASN1_UTF8STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), (idx))
|
| 780 |
+
#define sk_ASN1_UTF8STRING_set(sk, idx, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_set(ossl_check_ASN1_UTF8STRING_sk_type(sk), (idx), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 781 |
+
#define sk_ASN1_UTF8STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 782 |
+
#define sk_ASN1_UTF8STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 783 |
+
#define sk_ASN1_UTF8STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), pnum)
|
| 784 |
+
#define sk_ASN1_UTF8STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 785 |
+
#define sk_ASN1_UTF8STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 786 |
+
#define sk_ASN1_UTF8STRING_dup(sk) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_UTF8STRING_sk_type(sk)))
|
| 787 |
+
#define sk_ASN1_UTF8STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_copyfunc_type(copyfunc), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc)))
|
| 788 |
+
#define sk_ASN1_UTF8STRING_set_cmp_func(sk, cmp) ((sk_ASN1_UTF8STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
| 792 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
|
| 793 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
| 794 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
| 795 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
| 796 |
+
|
| 797 |
+
int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
|
| 798 |
+
int UTF8_putc(unsigned char *str, int len, unsigned long value);
|
| 799 |
+
|
| 800 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_GENERALSTRING, ASN1_GENERALSTRING, ASN1_GENERALSTRING)
|
| 801 |
+
#define sk_ASN1_GENERALSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 802 |
+
#define sk_ASN1_GENERALSTRING_value(sk, idx) ((ASN1_GENERALSTRING *)OPENSSL_sk_value(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), (idx)))
|
| 803 |
+
#define sk_ASN1_GENERALSTRING_new(cmp) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 804 |
+
#define sk_ASN1_GENERALSTRING_new_null() ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_null())
|
| 805 |
+
#define sk_ASN1_GENERALSTRING_new_reserve(cmp, n) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp), (n)))
|
| 806 |
+
#define sk_ASN1_GENERALSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (n))
|
| 807 |
+
#define sk_ASN1_GENERALSTRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 808 |
+
#define sk_ASN1_GENERALSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 809 |
+
#define sk_ASN1_GENERALSTRING_delete(sk, i) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (i)))
|
| 810 |
+
#define sk_ASN1_GENERALSTRING_delete_ptr(sk, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 811 |
+
#define sk_ASN1_GENERALSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 812 |
+
#define sk_ASN1_GENERALSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 813 |
+
#define sk_ASN1_GENERALSTRING_pop(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_pop(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 814 |
+
#define sk_ASN1_GENERALSTRING_shift(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_shift(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 815 |
+
#define sk_ASN1_GENERALSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk),ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc))
|
| 816 |
+
#define sk_ASN1_GENERALSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), (idx))
|
| 817 |
+
#define sk_ASN1_GENERALSTRING_set(sk, idx, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_set(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (idx), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 818 |
+
#define sk_ASN1_GENERALSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 819 |
+
#define sk_ASN1_GENERALSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 820 |
+
#define sk_ASN1_GENERALSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), pnum)
|
| 821 |
+
#define sk_ASN1_GENERALSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 822 |
+
#define sk_ASN1_GENERALSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 823 |
+
#define sk_ASN1_GENERALSTRING_dup(sk) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk)))
|
| 824 |
+
#define sk_ASN1_GENERALSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_copyfunc_type(copyfunc), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc)))
|
| 825 |
+
#define sk_ASN1_GENERALSTRING_set_cmp_func(sk, cmp) ((sk_ASN1_GENERALSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 826 |
+
|
| 827 |
+
|
| 828 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
|
| 829 |
+
|
| 830 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
|
| 831 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
|
| 832 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
|
| 833 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
|
| 834 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
|
| 835 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
|
| 836 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
|
| 837 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
| 838 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
| 839 |
+
|
| 840 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
|
| 841 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
|
| 842 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
|
| 843 |
+
|
| 844 |
+
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
|
| 845 |
+
|
| 846 |
+
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
| 847 |
+
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
|
| 848 |
+
int offset_day, long offset_sec);
|
| 849 |
+
int ASN1_TIME_check(const ASN1_TIME *t);
|
| 850 |
+
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
|
| 851 |
+
ASN1_GENERALIZEDTIME **out);
|
| 852 |
+
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
| 853 |
+
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
|
| 854 |
+
int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
|
| 855 |
+
int ASN1_TIME_normalize(ASN1_TIME *s);
|
| 856 |
+
int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
|
| 857 |
+
int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
|
| 858 |
+
|
| 859 |
+
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
|
| 860 |
+
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
|
| 861 |
+
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
|
| 862 |
+
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
|
| 863 |
+
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
|
| 864 |
+
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
|
| 865 |
+
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
|
| 866 |
+
int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
|
| 867 |
+
|
| 868 |
+
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
|
| 869 |
+
ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
|
| 870 |
+
const char *sn, const char *ln);
|
| 871 |
+
|
| 872 |
+
int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
|
| 873 |
+
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
|
| 874 |
+
int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
|
| 875 |
+
int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
|
| 876 |
+
|
| 877 |
+
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
|
| 878 |
+
long ASN1_INTEGER_get(const ASN1_INTEGER *a);
|
| 879 |
+
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
|
| 880 |
+
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
|
| 881 |
+
|
| 882 |
+
int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
|
| 883 |
+
int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
|
| 884 |
+
|
| 885 |
+
|
| 886 |
+
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
|
| 887 |
+
long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
|
| 888 |
+
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
|
| 889 |
+
BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
|
| 890 |
+
|
| 891 |
+
/* General */
|
| 892 |
+
/* given a string, return the correct type, max is the maximum length */
|
| 893 |
+
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
| 894 |
+
|
| 895 |
+
unsigned long ASN1_tag2bit(int tag);
|
| 896 |
+
|
| 897 |
+
/* SPECIALS */
|
| 898 |
+
int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
| 899 |
+
int *pclass, long omax);
|
| 900 |
+
int ASN1_check_infinite_end(unsigned char **p, long len);
|
| 901 |
+
int ASN1_const_check_infinite_end(const unsigned char **p, long len);
|
| 902 |
+
void ASN1_put_object(unsigned char **pp, int constructed, int length,
|
| 903 |
+
int tag, int xclass);
|
| 904 |
+
int ASN1_put_eoc(unsigned char **pp);
|
| 905 |
+
int ASN1_object_size(int constructed, int length, int tag);
|
| 906 |
+
|
| 907 |
+
/* Used to implement other functions */
|
| 908 |
+
void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
|
| 909 |
+
|
| 910 |
+
# define ASN1_dup_of(type,i2d,d2i,x) \
|
| 911 |
+
((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
| 912 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 913 |
+
CHECKED_PTR_OF(const type, x)))
|
| 914 |
+
|
| 915 |
+
void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
|
| 916 |
+
int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
|
| 917 |
+
X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
|
| 918 |
+
const void *data, const ASN1_OCTET_STRING *id,
|
| 919 |
+
EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
|
| 920 |
+
const char *propq);
|
| 921 |
+
int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 922 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 923 |
+
const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
|
| 924 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 925 |
+
|
| 926 |
+
/* ASN1 alloc/free macros for when a type is only used internally */
|
| 927 |
+
|
| 928 |
+
# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
|
| 929 |
+
# define M_ASN1_free_of(x, type) \
|
| 930 |
+
ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
|
| 931 |
+
|
| 932 |
+
# ifndef OPENSSL_NO_STDIO
|
| 933 |
+
void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
|
| 934 |
+
|
| 935 |
+
# define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \
|
| 936 |
+
((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
|
| 937 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 938 |
+
in, \
|
| 939 |
+
CHECKED_PPTR_OF(type, x)))
|
| 940 |
+
|
| 941 |
+
void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
|
| 942 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 943 |
+
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
|
| 944 |
+
int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
|
| 945 |
+
|
| 946 |
+
# define ASN1_i2d_fp_of(type,i2d,out,x) \
|
| 947 |
+
(ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
|
| 948 |
+
out, \
|
| 949 |
+
CHECKED_PTR_OF(const type, x)))
|
| 950 |
+
|
| 951 |
+
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
|
| 952 |
+
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
|
| 953 |
+
# endif
|
| 954 |
+
|
| 955 |
+
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
|
| 956 |
+
|
| 957 |
+
void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
|
| 958 |
+
|
| 959 |
+
# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
|
| 960 |
+
((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \
|
| 961 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 962 |
+
in, \
|
| 963 |
+
CHECKED_PPTR_OF(type, x)))
|
| 964 |
+
|
| 965 |
+
void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
|
| 966 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 967 |
+
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
|
| 968 |
+
int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
|
| 969 |
+
|
| 970 |
+
# define ASN1_i2d_bio_of(type,i2d,out,x) \
|
| 971 |
+
(ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
|
| 972 |
+
out, \
|
| 973 |
+
CHECKED_PTR_OF(const type, x)))
|
| 974 |
+
|
| 975 |
+
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
|
| 976 |
+
BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
|
| 977 |
+
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
|
| 978 |
+
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
|
| 979 |
+
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
|
| 980 |
+
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
|
| 981 |
+
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
|
| 982 |
+
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
|
| 983 |
+
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
|
| 984 |
+
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
|
| 985 |
+
unsigned char *buf, int off);
|
| 986 |
+
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
|
| 987 |
+
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
|
| 988 |
+
int dump);
|
| 989 |
+
const char *ASN1_tag2str(int tag);
|
| 990 |
+
|
| 991 |
+
/* Used to load and write Netscape format cert */
|
| 992 |
+
|
| 993 |
+
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
|
| 994 |
+
|
| 995 |
+
int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
|
| 996 |
+
int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
|
| 997 |
+
int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
|
| 998 |
+
unsigned char *data, int len);
|
| 999 |
+
int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
|
| 1000 |
+
unsigned char *data, int max_len);
|
| 1001 |
+
|
| 1002 |
+
void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
|
| 1003 |
+
void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
|
| 1004 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1005 |
+
|
| 1006 |
+
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
|
| 1007 |
+
ASN1_OCTET_STRING **oct);
|
| 1008 |
+
|
| 1009 |
+
void ASN1_STRING_set_default_mask(unsigned long mask);
|
| 1010 |
+
int ASN1_STRING_set_default_mask_asc(const char *p);
|
| 1011 |
+
unsigned long ASN1_STRING_get_default_mask(void);
|
| 1012 |
+
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1013 |
+
int inform, unsigned long mask);
|
| 1014 |
+
int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1015 |
+
int inform, unsigned long mask,
|
| 1016 |
+
long minsize, long maxsize);
|
| 1017 |
+
|
| 1018 |
+
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
|
| 1019 |
+
const unsigned char *in, int inlen,
|
| 1020 |
+
int inform, int nid);
|
| 1021 |
+
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
|
| 1022 |
+
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
|
| 1023 |
+
void ASN1_STRING_TABLE_cleanup(void);
|
| 1024 |
+
|
| 1025 |
+
/* ASN1 template functions */
|
| 1026 |
+
|
| 1027 |
+
/* Old API compatible functions */
|
| 1028 |
+
ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
|
| 1029 |
+
ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
|
| 1030 |
+
const char *propq);
|
| 1031 |
+
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1032 |
+
ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
|
| 1033 |
+
long len, const ASN1_ITEM *it,
|
| 1034 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1035 |
+
ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
|
| 1036 |
+
long len, const ASN1_ITEM *it);
|
| 1037 |
+
int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
|
| 1038 |
+
int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
|
| 1039 |
+
const ASN1_ITEM *it);
|
| 1040 |
+
|
| 1041 |
+
void ASN1_add_oid_module(void);
|
| 1042 |
+
void ASN1_add_stable_module(void);
|
| 1043 |
+
|
| 1044 |
+
ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
| 1045 |
+
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
| 1046 |
+
int ASN1_str2mask(const char *str, unsigned long *pmask);
|
| 1047 |
+
|
| 1048 |
+
/* ASN1 Print flags */
|
| 1049 |
+
|
| 1050 |
+
/* Indicate missing OPTIONAL fields */
|
| 1051 |
+
# define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001
|
| 1052 |
+
/* Mark start and end of SEQUENCE */
|
| 1053 |
+
# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002
|
| 1054 |
+
/* Mark start and end of SEQUENCE/SET OF */
|
| 1055 |
+
# define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004
|
| 1056 |
+
/* Show the ASN1 type of primitives */
|
| 1057 |
+
# define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008
|
| 1058 |
+
/* Don't show ASN1 type of ANY */
|
| 1059 |
+
# define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010
|
| 1060 |
+
/* Don't show ASN1 type of MSTRINGs */
|
| 1061 |
+
# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020
|
| 1062 |
+
/* Don't show field names in SEQUENCE */
|
| 1063 |
+
# define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040
|
| 1064 |
+
/* Show structure names of each SEQUENCE field */
|
| 1065 |
+
# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080
|
| 1066 |
+
/* Don't show structure name even at top level */
|
| 1067 |
+
# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
|
| 1068 |
+
|
| 1069 |
+
int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
|
| 1070 |
+
const ASN1_ITEM *it, const ASN1_PCTX *pctx);
|
| 1071 |
+
ASN1_PCTX *ASN1_PCTX_new(void);
|
| 1072 |
+
void ASN1_PCTX_free(ASN1_PCTX *p);
|
| 1073 |
+
unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
|
| 1074 |
+
void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1075 |
+
unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
|
| 1076 |
+
void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1077 |
+
unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
|
| 1078 |
+
void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1079 |
+
unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
|
| 1080 |
+
void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1081 |
+
unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
|
| 1082 |
+
void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1083 |
+
|
| 1084 |
+
ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx));
|
| 1085 |
+
void ASN1_SCTX_free(ASN1_SCTX *p);
|
| 1086 |
+
const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
|
| 1087 |
+
const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
|
| 1088 |
+
unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
|
| 1089 |
+
void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
|
| 1090 |
+
void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
|
| 1091 |
+
|
| 1092 |
+
const BIO_METHOD *BIO_f_asn1(void);
|
| 1093 |
+
|
| 1094 |
+
/* cannot constify val because of CMS_stream() */
|
| 1095 |
+
BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1096 |
+
|
| 1097 |
+
int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1098 |
+
const ASN1_ITEM *it);
|
| 1099 |
+
int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1100 |
+
const char *hdr, const ASN1_ITEM *it);
|
| 1101 |
+
/* cannot constify val because of CMS_dataFinal() */
|
| 1102 |
+
int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1103 |
+
int ctype_nid, int econt_nid,
|
| 1104 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it);
|
| 1105 |
+
int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1106 |
+
int ctype_nid, int econt_nid,
|
| 1107 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it,
|
| 1108 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1109 |
+
ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
|
| 1110 |
+
ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
|
| 1111 |
+
const ASN1_ITEM *it, ASN1_VALUE **x,
|
| 1112 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1113 |
+
int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
|
| 1114 |
+
int SMIME_text(BIO *in, BIO *out);
|
| 1115 |
+
|
| 1116 |
+
const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
|
| 1117 |
+
const ASN1_ITEM *ASN1_ITEM_get(size_t i);
|
| 1118 |
+
|
| 1119 |
+
/* Legacy compatibility */
|
| 1120 |
+
# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
|
| 1121 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 1122 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
|
| 1123 |
+
# define DECLARE_ASN1_FUNCTIONS_const(type) DECLARE_ASN1_FUNCTIONS(type)
|
| 1124 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
|
| 1125 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, name)
|
| 1126 |
+
# define I2D_OF_const(type) I2D_OF(type)
|
| 1127 |
+
# define ASN1_dup_of_const(type,i2d,d2i,x) ASN1_dup_of(type,i2d,d2i,x)
|
| 1128 |
+
# define ASN1_i2d_fp_of_const(type,i2d,out,x) ASN1_i2d_fp_of(type,i2d,out,x)
|
| 1129 |
+
# define ASN1_i2d_bio_of_const(type,i2d,out,x) ASN1_i2d_bio_of(type,i2d,out,x)
|
| 1130 |
+
|
| 1131 |
+
# ifdef __cplusplus
|
| 1132 |
+
}
|
| 1133 |
+
# endif
|
| 1134 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/asn1t.h
ADDED
|
@@ -0,0 +1,946 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1t.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ASN1T_H
|
| 16 |
+
# define OPENSSL_ASN1T_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_ASN1T_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <stddef.h>
|
| 25 |
+
# include <openssl/e_os2.h>
|
| 26 |
+
# include <openssl/asn1.h>
|
| 27 |
+
|
| 28 |
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 29 |
+
# undef OPENSSL_EXTERN
|
| 30 |
+
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 31 |
+
# endif
|
| 32 |
+
|
| 33 |
+
/* ASN1 template defines, structures and functions */
|
| 34 |
+
|
| 35 |
+
#ifdef __cplusplus
|
| 36 |
+
extern "C" {
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
/*-
|
| 40 |
+
* These are the possible values for the itype field of the
|
| 41 |
+
* ASN1_ITEM structure and determine how it is interpreted.
|
| 42 |
+
*
|
| 43 |
+
* For PRIMITIVE types the underlying type
|
| 44 |
+
* determines the behaviour if items is NULL.
|
| 45 |
+
*
|
| 46 |
+
* Otherwise templates must contain a single
|
| 47 |
+
* template and the type is treated in the
|
| 48 |
+
* same way as the type specified in the template.
|
| 49 |
+
*
|
| 50 |
+
* For SEQUENCE types the templates field points
|
| 51 |
+
* to the members, the size field is the
|
| 52 |
+
* structure size.
|
| 53 |
+
*
|
| 54 |
+
* For CHOICE types the templates field points
|
| 55 |
+
* to each possible member (typically a union)
|
| 56 |
+
* and the 'size' field is the offset of the
|
| 57 |
+
* selector.
|
| 58 |
+
*
|
| 59 |
+
* The 'funcs' field is used for application-specific
|
| 60 |
+
* data and functions.
|
| 61 |
+
*
|
| 62 |
+
* The EXTERN type uses a new style d2i/i2d.
|
| 63 |
+
* The new style should be used where possible
|
| 64 |
+
* because it avoids things like the d2i IMPLICIT
|
| 65 |
+
* hack.
|
| 66 |
+
*
|
| 67 |
+
* MSTRING is a multiple string type, it is used
|
| 68 |
+
* for a CHOICE of character strings where the
|
| 69 |
+
* actual strings all occupy an ASN1_STRING
|
| 70 |
+
* structure. In this case the 'utype' field
|
| 71 |
+
* has a special meaning, it is used as a mask
|
| 72 |
+
* of acceptable types using the B_ASN1 constants.
|
| 73 |
+
*
|
| 74 |
+
* NDEF_SEQUENCE is the same as SEQUENCE except
|
| 75 |
+
* that it will use indefinite length constructed
|
| 76 |
+
* encoding if requested.
|
| 77 |
+
*
|
| 78 |
+
*/
|
| 79 |
+
|
| 80 |
+
# define ASN1_ITYPE_PRIMITIVE 0x0
|
| 81 |
+
# define ASN1_ITYPE_SEQUENCE 0x1
|
| 82 |
+
# define ASN1_ITYPE_CHOICE 0x2
|
| 83 |
+
/* unused value 0x3 */
|
| 84 |
+
# define ASN1_ITYPE_EXTERN 0x4
|
| 85 |
+
# define ASN1_ITYPE_MSTRING 0x5
|
| 86 |
+
# define ASN1_ITYPE_NDEF_SEQUENCE 0x6
|
| 87 |
+
|
| 88 |
+
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
|
| 89 |
+
# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
|
| 90 |
+
|
| 91 |
+
/* Macros for start and end of ASN1_ITEM definition */
|
| 92 |
+
|
| 93 |
+
# define ASN1_ITEM_start(itname) \
|
| 94 |
+
const ASN1_ITEM * itname##_it(void) \
|
| 95 |
+
{ \
|
| 96 |
+
static const ASN1_ITEM local_it = {
|
| 97 |
+
|
| 98 |
+
# define static_ASN1_ITEM_start(itname) \
|
| 99 |
+
static ASN1_ITEM_start(itname)
|
| 100 |
+
|
| 101 |
+
# define ASN1_ITEM_end(itname) \
|
| 102 |
+
}; \
|
| 103 |
+
return &local_it; \
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/* Macros to aid ASN1 template writing */
|
| 107 |
+
|
| 108 |
+
# define ASN1_ITEM_TEMPLATE(tname) \
|
| 109 |
+
static const ASN1_TEMPLATE tname##_item_tt
|
| 110 |
+
|
| 111 |
+
# define ASN1_ITEM_TEMPLATE_END(tname) \
|
| 112 |
+
;\
|
| 113 |
+
ASN1_ITEM_start(tname) \
|
| 114 |
+
ASN1_ITYPE_PRIMITIVE,\
|
| 115 |
+
-1,\
|
| 116 |
+
&tname##_item_tt,\
|
| 117 |
+
0,\
|
| 118 |
+
NULL,\
|
| 119 |
+
0,\
|
| 120 |
+
#tname \
|
| 121 |
+
ASN1_ITEM_end(tname)
|
| 122 |
+
# define static_ASN1_ITEM_TEMPLATE_END(tname) \
|
| 123 |
+
;\
|
| 124 |
+
static_ASN1_ITEM_start(tname) \
|
| 125 |
+
ASN1_ITYPE_PRIMITIVE,\
|
| 126 |
+
-1,\
|
| 127 |
+
&tname##_item_tt,\
|
| 128 |
+
0,\
|
| 129 |
+
NULL,\
|
| 130 |
+
0,\
|
| 131 |
+
#tname \
|
| 132 |
+
ASN1_ITEM_end(tname)
|
| 133 |
+
|
| 134 |
+
/* This is a ASN1 type which just embeds a template */
|
| 135 |
+
|
| 136 |
+
/*-
|
| 137 |
+
* This pair helps declare a SEQUENCE. We can do:
|
| 138 |
+
*
|
| 139 |
+
* ASN1_SEQUENCE(stname) = {
|
| 140 |
+
* ... SEQUENCE components ...
|
| 141 |
+
* } ASN1_SEQUENCE_END(stname)
|
| 142 |
+
*
|
| 143 |
+
* This will produce an ASN1_ITEM called stname_it
|
| 144 |
+
* for a structure called stname.
|
| 145 |
+
*
|
| 146 |
+
* If you want the same structure but a different
|
| 147 |
+
* name then use:
|
| 148 |
+
*
|
| 149 |
+
* ASN1_SEQUENCE(itname) = {
|
| 150 |
+
* ... SEQUENCE components ...
|
| 151 |
+
* } ASN1_SEQUENCE_END_name(stname, itname)
|
| 152 |
+
*
|
| 153 |
+
* This will create an item called itname_it using
|
| 154 |
+
* a structure called stname.
|
| 155 |
+
*/
|
| 156 |
+
|
| 157 |
+
# define ASN1_SEQUENCE(tname) \
|
| 158 |
+
static const ASN1_TEMPLATE tname##_seq_tt[]
|
| 159 |
+
|
| 160 |
+
# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
|
| 161 |
+
|
| 162 |
+
# define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname)
|
| 163 |
+
|
| 164 |
+
# define ASN1_SEQUENCE_END_name(stname, tname) \
|
| 165 |
+
;\
|
| 166 |
+
ASN1_ITEM_start(tname) \
|
| 167 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 168 |
+
V_ASN1_SEQUENCE,\
|
| 169 |
+
tname##_seq_tt,\
|
| 170 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 171 |
+
NULL,\
|
| 172 |
+
sizeof(stname),\
|
| 173 |
+
#tname \
|
| 174 |
+
ASN1_ITEM_end(tname)
|
| 175 |
+
|
| 176 |
+
# define static_ASN1_SEQUENCE_END_name(stname, tname) \
|
| 177 |
+
;\
|
| 178 |
+
static_ASN1_ITEM_start(tname) \
|
| 179 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 180 |
+
V_ASN1_SEQUENCE,\
|
| 181 |
+
tname##_seq_tt,\
|
| 182 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 183 |
+
NULL,\
|
| 184 |
+
sizeof(stname),\
|
| 185 |
+
#stname \
|
| 186 |
+
ASN1_ITEM_end(tname)
|
| 187 |
+
|
| 188 |
+
# define ASN1_NDEF_SEQUENCE(tname) \
|
| 189 |
+
ASN1_SEQUENCE(tname)
|
| 190 |
+
|
| 191 |
+
# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \
|
| 192 |
+
ASN1_SEQUENCE_cb(tname, cb)
|
| 193 |
+
|
| 194 |
+
# define ASN1_SEQUENCE_cb(tname, cb) \
|
| 195 |
+
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0, NULL}; \
|
| 196 |
+
ASN1_SEQUENCE(tname)
|
| 197 |
+
|
| 198 |
+
# define ASN1_SEQUENCE_const_cb(tname, const_cb) \
|
| 199 |
+
static const ASN1_AUX tname##_aux = \
|
| 200 |
+
{NULL, ASN1_AFLG_CONST_CB, 0, 0, NULL, 0, const_cb}; \
|
| 201 |
+
ASN1_SEQUENCE(tname)
|
| 202 |
+
|
| 203 |
+
# define ASN1_SEQUENCE_cb_const_cb(tname, cb, const_cb) \
|
| 204 |
+
static const ASN1_AUX tname##_aux = \
|
| 205 |
+
{NULL, ASN1_AFLG_CONST_CB, 0, 0, cb, 0, const_cb}; \
|
| 206 |
+
ASN1_SEQUENCE(tname)
|
| 207 |
+
|
| 208 |
+
# define ASN1_SEQUENCE_ref(tname, cb) \
|
| 209 |
+
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0, NULL}; \
|
| 210 |
+
ASN1_SEQUENCE(tname)
|
| 211 |
+
|
| 212 |
+
# define ASN1_SEQUENCE_enc(tname, enc, cb) \
|
| 213 |
+
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc), NULL}; \
|
| 214 |
+
ASN1_SEQUENCE(tname)
|
| 215 |
+
|
| 216 |
+
# define ASN1_NDEF_SEQUENCE_END(tname) \
|
| 217 |
+
;\
|
| 218 |
+
ASN1_ITEM_start(tname) \
|
| 219 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 220 |
+
V_ASN1_SEQUENCE,\
|
| 221 |
+
tname##_seq_tt,\
|
| 222 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 223 |
+
NULL,\
|
| 224 |
+
sizeof(tname),\
|
| 225 |
+
#tname \
|
| 226 |
+
ASN1_ITEM_end(tname)
|
| 227 |
+
# define static_ASN1_NDEF_SEQUENCE_END(tname) \
|
| 228 |
+
;\
|
| 229 |
+
static_ASN1_ITEM_start(tname) \
|
| 230 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 231 |
+
V_ASN1_SEQUENCE,\
|
| 232 |
+
tname##_seq_tt,\
|
| 233 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 234 |
+
NULL,\
|
| 235 |
+
sizeof(tname),\
|
| 236 |
+
#tname \
|
| 237 |
+
ASN1_ITEM_end(tname)
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 241 |
+
|
| 242 |
+
# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 243 |
+
# define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname)
|
| 244 |
+
|
| 245 |
+
# define ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 246 |
+
;\
|
| 247 |
+
ASN1_ITEM_start(tname) \
|
| 248 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 249 |
+
V_ASN1_SEQUENCE,\
|
| 250 |
+
tname##_seq_tt,\
|
| 251 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 252 |
+
&tname##_aux,\
|
| 253 |
+
sizeof(stname),\
|
| 254 |
+
#tname \
|
| 255 |
+
ASN1_ITEM_end(tname)
|
| 256 |
+
# define static_ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 257 |
+
;\
|
| 258 |
+
static_ASN1_ITEM_start(tname) \
|
| 259 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 260 |
+
V_ASN1_SEQUENCE,\
|
| 261 |
+
tname##_seq_tt,\
|
| 262 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 263 |
+
&tname##_aux,\
|
| 264 |
+
sizeof(stname),\
|
| 265 |
+
#stname \
|
| 266 |
+
ASN1_ITEM_end(tname)
|
| 267 |
+
|
| 268 |
+
# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \
|
| 269 |
+
;\
|
| 270 |
+
ASN1_ITEM_start(tname) \
|
| 271 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 272 |
+
V_ASN1_SEQUENCE,\
|
| 273 |
+
tname##_seq_tt,\
|
| 274 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 275 |
+
&tname##_aux,\
|
| 276 |
+
sizeof(stname),\
|
| 277 |
+
#stname \
|
| 278 |
+
ASN1_ITEM_end(tname)
|
| 279 |
+
|
| 280 |
+
/*-
|
| 281 |
+
* This pair helps declare a CHOICE type. We can do:
|
| 282 |
+
*
|
| 283 |
+
* ASN1_CHOICE(chname) = {
|
| 284 |
+
* ... CHOICE options ...
|
| 285 |
+
* ASN1_CHOICE_END(chname)
|
| 286 |
+
*
|
| 287 |
+
* This will produce an ASN1_ITEM called chname_it
|
| 288 |
+
* for a structure called chname. The structure
|
| 289 |
+
* definition must look like this:
|
| 290 |
+
* typedef struct {
|
| 291 |
+
* int type;
|
| 292 |
+
* union {
|
| 293 |
+
* ASN1_SOMETHING *opt1;
|
| 294 |
+
* ASN1_SOMEOTHER *opt2;
|
| 295 |
+
* } value;
|
| 296 |
+
* } chname;
|
| 297 |
+
*
|
| 298 |
+
* the name of the selector must be 'type'.
|
| 299 |
+
* to use an alternative selector name use the
|
| 300 |
+
* ASN1_CHOICE_END_selector() version.
|
| 301 |
+
*/
|
| 302 |
+
|
| 303 |
+
# define ASN1_CHOICE(tname) \
|
| 304 |
+
static const ASN1_TEMPLATE tname##_ch_tt[]
|
| 305 |
+
|
| 306 |
+
# define ASN1_CHOICE_cb(tname, cb) \
|
| 307 |
+
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0, NULL}; \
|
| 308 |
+
ASN1_CHOICE(tname)
|
| 309 |
+
|
| 310 |
+
# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
|
| 311 |
+
|
| 312 |
+
# define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname)
|
| 313 |
+
|
| 314 |
+
# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)
|
| 315 |
+
|
| 316 |
+
# define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type)
|
| 317 |
+
|
| 318 |
+
# define ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 319 |
+
;\
|
| 320 |
+
ASN1_ITEM_start(tname) \
|
| 321 |
+
ASN1_ITYPE_CHOICE,\
|
| 322 |
+
offsetof(stname,selname) ,\
|
| 323 |
+
tname##_ch_tt,\
|
| 324 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 325 |
+
NULL,\
|
| 326 |
+
sizeof(stname),\
|
| 327 |
+
#stname \
|
| 328 |
+
ASN1_ITEM_end(tname)
|
| 329 |
+
|
| 330 |
+
# define static_ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 331 |
+
;\
|
| 332 |
+
static_ASN1_ITEM_start(tname) \
|
| 333 |
+
ASN1_ITYPE_CHOICE,\
|
| 334 |
+
offsetof(stname,selname) ,\
|
| 335 |
+
tname##_ch_tt,\
|
| 336 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 337 |
+
NULL,\
|
| 338 |
+
sizeof(stname),\
|
| 339 |
+
#stname \
|
| 340 |
+
ASN1_ITEM_end(tname)
|
| 341 |
+
|
| 342 |
+
# define ASN1_CHOICE_END_cb(stname, tname, selname) \
|
| 343 |
+
;\
|
| 344 |
+
ASN1_ITEM_start(tname) \
|
| 345 |
+
ASN1_ITYPE_CHOICE,\
|
| 346 |
+
offsetof(stname,selname) ,\
|
| 347 |
+
tname##_ch_tt,\
|
| 348 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 349 |
+
&tname##_aux,\
|
| 350 |
+
sizeof(stname),\
|
| 351 |
+
#stname \
|
| 352 |
+
ASN1_ITEM_end(tname)
|
| 353 |
+
|
| 354 |
+
/* This helps with the template wrapper form of ASN1_ITEM */
|
| 355 |
+
|
| 356 |
+
# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \
|
| 357 |
+
(flags), (tag), 0,\
|
| 358 |
+
#name, ASN1_ITEM_ref(type) }
|
| 359 |
+
|
| 360 |
+
/* These help with SEQUENCE or CHOICE components */
|
| 361 |
+
|
| 362 |
+
/* used to declare other types */
|
| 363 |
+
|
| 364 |
+
# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
|
| 365 |
+
(flags), (tag), offsetof(stname, field),\
|
| 366 |
+
#field, ASN1_ITEM_ref(type) }
|
| 367 |
+
|
| 368 |
+
/* implicit and explicit helper macros */
|
| 369 |
+
|
| 370 |
+
# define ASN1_IMP_EX(stname, field, type, tag, ex) \
|
| 371 |
+
ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type)
|
| 372 |
+
|
| 373 |
+
# define ASN1_EXP_EX(stname, field, type, tag, ex) \
|
| 374 |
+
ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type)
|
| 375 |
+
|
| 376 |
+
/* Any defined by macros: the field used is in the table itself */
|
| 377 |
+
|
| 378 |
+
# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
|
| 379 |
+
# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
|
| 380 |
+
|
| 381 |
+
/* Plain simple type */
|
| 382 |
+
# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type)
|
| 383 |
+
/* Embedded simple type */
|
| 384 |
+
# define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED,0, stname, field, type)
|
| 385 |
+
|
| 386 |
+
/* OPTIONAL simple type */
|
| 387 |
+
# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 388 |
+
# define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 389 |
+
|
| 390 |
+
/* IMPLICIT tagged simple type */
|
| 391 |
+
# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)
|
| 392 |
+
# define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 393 |
+
|
| 394 |
+
/* IMPLICIT tagged OPTIONAL simple type */
|
| 395 |
+
# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 396 |
+
# define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED)
|
| 397 |
+
|
| 398 |
+
/* Same as above but EXPLICIT */
|
| 399 |
+
|
| 400 |
+
# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)
|
| 401 |
+
# define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 402 |
+
# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 403 |
+
# define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED)
|
| 404 |
+
|
| 405 |
+
/* SEQUENCE OF type */
|
| 406 |
+
# define ASN1_SEQUENCE_OF(stname, field, type) \
|
| 407 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
|
| 408 |
+
|
| 409 |
+
/* OPTIONAL SEQUENCE OF */
|
| 410 |
+
# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \
|
| 411 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 412 |
+
|
| 413 |
+
/* Same as above but for SET OF */
|
| 414 |
+
|
| 415 |
+
# define ASN1_SET_OF(stname, field, type) \
|
| 416 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
|
| 417 |
+
|
| 418 |
+
# define ASN1_SET_OF_OPT(stname, field, type) \
|
| 419 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 420 |
+
|
| 421 |
+
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
|
| 422 |
+
|
| 423 |
+
# define ASN1_IMP_SET_OF(stname, field, type, tag) \
|
| 424 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 425 |
+
|
| 426 |
+
# define ASN1_EXP_SET_OF(stname, field, type, tag) \
|
| 427 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 428 |
+
|
| 429 |
+
# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
|
| 430 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
|
| 431 |
+
|
| 432 |
+
# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
|
| 433 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
|
| 434 |
+
|
| 435 |
+
# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
|
| 436 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 437 |
+
|
| 438 |
+
# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 439 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
|
| 440 |
+
|
| 441 |
+
# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
|
| 442 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 443 |
+
|
| 444 |
+
# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 445 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
|
| 446 |
+
|
| 447 |
+
/* EXPLICIT using indefinite length constructed form */
|
| 448 |
+
# define ASN1_NDEF_EXP(stname, field, type, tag) \
|
| 449 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)
|
| 450 |
+
|
| 451 |
+
/* EXPLICIT OPTIONAL using indefinite length constructed form */
|
| 452 |
+
# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \
|
| 453 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)
|
| 454 |
+
|
| 455 |
+
/* Macros for the ASN1_ADB structure */
|
| 456 |
+
|
| 457 |
+
# define ASN1_ADB(name) \
|
| 458 |
+
static const ASN1_ADB_TABLE name##_adbtbl[]
|
| 459 |
+
|
| 460 |
+
# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \
|
| 461 |
+
;\
|
| 462 |
+
static const ASN1_ITEM *name##_adb(void) \
|
| 463 |
+
{ \
|
| 464 |
+
static const ASN1_ADB internal_adb = \
|
| 465 |
+
{\
|
| 466 |
+
flags,\
|
| 467 |
+
offsetof(name, field),\
|
| 468 |
+
adb_cb,\
|
| 469 |
+
name##_adbtbl,\
|
| 470 |
+
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
|
| 471 |
+
def,\
|
| 472 |
+
none\
|
| 473 |
+
}; \
|
| 474 |
+
return (const ASN1_ITEM *) &internal_adb; \
|
| 475 |
+
} \
|
| 476 |
+
void dummy_function(void)
|
| 477 |
+
|
| 478 |
+
# define ADB_ENTRY(val, template) {val, template}
|
| 479 |
+
|
| 480 |
+
# define ASN1_ADB_TEMPLATE(name) \
|
| 481 |
+
static const ASN1_TEMPLATE name##_tt
|
| 482 |
+
|
| 483 |
+
/*
|
| 484 |
+
* This is the ASN1 template structure that defines a wrapper round the
|
| 485 |
+
* actual type. It determines the actual position of the field in the value
|
| 486 |
+
* structure, various flags such as OPTIONAL and the field name.
|
| 487 |
+
*/
|
| 488 |
+
|
| 489 |
+
struct ASN1_TEMPLATE_st {
|
| 490 |
+
unsigned long flags; /* Various flags */
|
| 491 |
+
long tag; /* tag, not used if no tagging */
|
| 492 |
+
unsigned long offset; /* Offset of this field in structure */
|
| 493 |
+
const char *field_name; /* Field name */
|
| 494 |
+
ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */
|
| 495 |
+
};
|
| 496 |
+
|
| 497 |
+
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
|
| 498 |
+
|
| 499 |
+
# define ASN1_TEMPLATE_item(t) (t->item_ptr)
|
| 500 |
+
# define ASN1_TEMPLATE_adb(t) (t->item_ptr)
|
| 501 |
+
|
| 502 |
+
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
|
| 503 |
+
typedef struct ASN1_ADB_st ASN1_ADB;
|
| 504 |
+
|
| 505 |
+
struct ASN1_ADB_st {
|
| 506 |
+
unsigned long flags; /* Various flags */
|
| 507 |
+
unsigned long offset; /* Offset of selector field */
|
| 508 |
+
int (*adb_cb)(long *psel); /* Application callback */
|
| 509 |
+
const ASN1_ADB_TABLE *tbl; /* Table of possible types */
|
| 510 |
+
long tblcount; /* Number of entries in tbl */
|
| 511 |
+
const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
|
| 512 |
+
const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */
|
| 513 |
+
};
|
| 514 |
+
|
| 515 |
+
struct ASN1_ADB_TABLE_st {
|
| 516 |
+
long value; /* NID for an object or value for an int */
|
| 517 |
+
const ASN1_TEMPLATE tt; /* item for this value */
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
/* template flags */
|
| 521 |
+
|
| 522 |
+
/* Field is optional */
|
| 523 |
+
# define ASN1_TFLG_OPTIONAL (0x1)
|
| 524 |
+
|
| 525 |
+
/* Field is a SET OF */
|
| 526 |
+
# define ASN1_TFLG_SET_OF (0x1 << 1)
|
| 527 |
+
|
| 528 |
+
/* Field is a SEQUENCE OF */
|
| 529 |
+
# define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
|
| 530 |
+
|
| 531 |
+
/*
|
| 532 |
+
* Special case: this refers to a SET OF that will be sorted into DER order
|
| 533 |
+
* when encoded *and* the corresponding STACK will be modified to match the
|
| 534 |
+
* new order.
|
| 535 |
+
*/
|
| 536 |
+
# define ASN1_TFLG_SET_ORDER (0x3 << 1)
|
| 537 |
+
|
| 538 |
+
/* Mask for SET OF or SEQUENCE OF */
|
| 539 |
+
# define ASN1_TFLG_SK_MASK (0x3 << 1)
|
| 540 |
+
|
| 541 |
+
/*
|
| 542 |
+
* These flags mean the tag should be taken from the tag field. If EXPLICIT
|
| 543 |
+
* then the underlying type is used for the inner tag.
|
| 544 |
+
*/
|
| 545 |
+
|
| 546 |
+
/* IMPLICIT tagging */
|
| 547 |
+
# define ASN1_TFLG_IMPTAG (0x1 << 3)
|
| 548 |
+
|
| 549 |
+
/* EXPLICIT tagging, inner tag from underlying type */
|
| 550 |
+
# define ASN1_TFLG_EXPTAG (0x2 << 3)
|
| 551 |
+
|
| 552 |
+
# define ASN1_TFLG_TAG_MASK (0x3 << 3)
|
| 553 |
+
|
| 554 |
+
/* context specific IMPLICIT */
|
| 555 |
+
# define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT)
|
| 556 |
+
|
| 557 |
+
/* context specific EXPLICIT */
|
| 558 |
+
# define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT)
|
| 559 |
+
|
| 560 |
+
/*
|
| 561 |
+
* If tagging is in force these determine the type of tag to use. Otherwise
|
| 562 |
+
* the tag is determined by the underlying type. These values reflect the
|
| 563 |
+
* actual octet format.
|
| 564 |
+
*/
|
| 565 |
+
|
| 566 |
+
/* Universal tag */
|
| 567 |
+
# define ASN1_TFLG_UNIVERSAL (0x0<<6)
|
| 568 |
+
/* Application tag */
|
| 569 |
+
# define ASN1_TFLG_APPLICATION (0x1<<6)
|
| 570 |
+
/* Context specific tag */
|
| 571 |
+
# define ASN1_TFLG_CONTEXT (0x2<<6)
|
| 572 |
+
/* Private tag */
|
| 573 |
+
# define ASN1_TFLG_PRIVATE (0x3<<6)
|
| 574 |
+
|
| 575 |
+
# define ASN1_TFLG_TAG_CLASS (0x3<<6)
|
| 576 |
+
|
| 577 |
+
/*
|
| 578 |
+
* These are for ANY DEFINED BY type. In this case the 'item' field points to
|
| 579 |
+
* an ASN1_ADB structure which contains a table of values to decode the
|
| 580 |
+
* relevant type
|
| 581 |
+
*/
|
| 582 |
+
|
| 583 |
+
# define ASN1_TFLG_ADB_MASK (0x3<<8)
|
| 584 |
+
|
| 585 |
+
# define ASN1_TFLG_ADB_OID (0x1<<8)
|
| 586 |
+
|
| 587 |
+
# define ASN1_TFLG_ADB_INT (0x1<<9)
|
| 588 |
+
|
| 589 |
+
/*
|
| 590 |
+
* This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes
|
| 591 |
+
* indefinite length constructed encoding to be used if required.
|
| 592 |
+
*/
|
| 593 |
+
|
| 594 |
+
# define ASN1_TFLG_NDEF (0x1<<11)
|
| 595 |
+
|
| 596 |
+
/* Field is embedded and not a pointer */
|
| 597 |
+
# define ASN1_TFLG_EMBED (0x1 << 12)
|
| 598 |
+
|
| 599 |
+
/* This is the actual ASN1 item itself */
|
| 600 |
+
|
| 601 |
+
struct ASN1_ITEM_st {
|
| 602 |
+
char itype; /* The item type, primitive, SEQUENCE, CHOICE
|
| 603 |
+
* or extern */
|
| 604 |
+
long utype; /* underlying type */
|
| 605 |
+
const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains
|
| 606 |
+
* the contents */
|
| 607 |
+
long tcount; /* Number of templates if SEQUENCE or CHOICE */
|
| 608 |
+
const void *funcs; /* further data and type-specific functions */
|
| 609 |
+
/* funcs can be ASN1_PRIMITIVE_FUNCS*, ASN1_EXTERN_FUNCS*, or ASN1_AUX* */
|
| 610 |
+
long size; /* Structure size (usually) */
|
| 611 |
+
const char *sname; /* Structure name */
|
| 612 |
+
};
|
| 613 |
+
|
| 614 |
+
/*
|
| 615 |
+
* Cache for ASN1 tag and length, so we don't keep re-reading it for things
|
| 616 |
+
* like CHOICE
|
| 617 |
+
*/
|
| 618 |
+
|
| 619 |
+
struct ASN1_TLC_st {
|
| 620 |
+
char valid; /* Values below are valid */
|
| 621 |
+
int ret; /* return value */
|
| 622 |
+
long plen; /* length */
|
| 623 |
+
int ptag; /* class value */
|
| 624 |
+
int pclass; /* class value */
|
| 625 |
+
int hdrlen; /* header length */
|
| 626 |
+
};
|
| 627 |
+
|
| 628 |
+
/* Typedefs for ASN1 function pointers */
|
| 629 |
+
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 630 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 631 |
+
ASN1_TLC *ctx);
|
| 632 |
+
|
| 633 |
+
typedef int ASN1_ex_d2i_ex(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 634 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 635 |
+
ASN1_TLC *ctx, OSSL_LIB_CTX *libctx,
|
| 636 |
+
const char *propq);
|
| 637 |
+
typedef int ASN1_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 638 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 639 |
+
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 640 |
+
typedef int ASN1_ex_new_ex_func(ASN1_VALUE **pval, const ASN1_ITEM *it,
|
| 641 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 642 |
+
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 643 |
+
|
| 644 |
+
typedef int ASN1_ex_print_func(BIO *out, const ASN1_VALUE **pval,
|
| 645 |
+
int indent, const char *fname,
|
| 646 |
+
const ASN1_PCTX *pctx);
|
| 647 |
+
|
| 648 |
+
typedef int ASN1_primitive_i2c(const ASN1_VALUE **pval, unsigned char *cont,
|
| 649 |
+
int *putype, const ASN1_ITEM *it);
|
| 650 |
+
typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,
|
| 651 |
+
int len, int utype, char *free_cont,
|
| 652 |
+
const ASN1_ITEM *it);
|
| 653 |
+
typedef int ASN1_primitive_print(BIO *out, const ASN1_VALUE **pval,
|
| 654 |
+
const ASN1_ITEM *it, int indent,
|
| 655 |
+
const ASN1_PCTX *pctx);
|
| 656 |
+
|
| 657 |
+
typedef struct ASN1_EXTERN_FUNCS_st {
|
| 658 |
+
void *app_data;
|
| 659 |
+
ASN1_ex_new_func *asn1_ex_new;
|
| 660 |
+
ASN1_ex_free_func *asn1_ex_free;
|
| 661 |
+
ASN1_ex_free_func *asn1_ex_clear;
|
| 662 |
+
ASN1_ex_d2i *asn1_ex_d2i;
|
| 663 |
+
ASN1_ex_i2d *asn1_ex_i2d;
|
| 664 |
+
ASN1_ex_print_func *asn1_ex_print;
|
| 665 |
+
ASN1_ex_new_ex_func *asn1_ex_new_ex;
|
| 666 |
+
ASN1_ex_d2i_ex *asn1_ex_d2i_ex;
|
| 667 |
+
} ASN1_EXTERN_FUNCS;
|
| 668 |
+
|
| 669 |
+
typedef struct ASN1_PRIMITIVE_FUNCS_st {
|
| 670 |
+
void *app_data;
|
| 671 |
+
unsigned long flags;
|
| 672 |
+
ASN1_ex_new_func *prim_new;
|
| 673 |
+
ASN1_ex_free_func *prim_free;
|
| 674 |
+
ASN1_ex_free_func *prim_clear;
|
| 675 |
+
ASN1_primitive_c2i *prim_c2i;
|
| 676 |
+
ASN1_primitive_i2c *prim_i2c;
|
| 677 |
+
ASN1_primitive_print *prim_print;
|
| 678 |
+
} ASN1_PRIMITIVE_FUNCS;
|
| 679 |
+
|
| 680 |
+
/*
|
| 681 |
+
* This is the ASN1_AUX structure: it handles various miscellaneous
|
| 682 |
+
* requirements. For example the use of reference counts and an informational
|
| 683 |
+
* callback. The "informational callback" is called at various points during
|
| 684 |
+
* the ASN1 encoding and decoding. It can be used to provide minor
|
| 685 |
+
* customisation of the structures used. This is most useful where the
|
| 686 |
+
* supplied routines *almost* do the right thing but need some extra help at
|
| 687 |
+
* a few points. If the callback returns zero then it is assumed a fatal
|
| 688 |
+
* error has occurred and the main operation should be abandoned. If major
|
| 689 |
+
* changes in the default behaviour are required then an external type is
|
| 690 |
+
* more appropriate.
|
| 691 |
+
* For the operations ASN1_OP_I2D_PRE, ASN1_OP_I2D_POST, ASN1_OP_PRINT_PRE, and
|
| 692 |
+
* ASN1_OP_PRINT_POST, meanwhile a variant of the callback with const parameter
|
| 693 |
+
* 'in' is provided to make clear statically that its input is not modified. If
|
| 694 |
+
* and only if this variant is in use the flag ASN1_AFLG_CONST_CB must be set.
|
| 695 |
+
*/
|
| 696 |
+
|
| 697 |
+
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
|
| 698 |
+
void *exarg);
|
| 699 |
+
typedef int ASN1_aux_const_cb(int operation, const ASN1_VALUE **in,
|
| 700 |
+
const ASN1_ITEM *it, void *exarg);
|
| 701 |
+
|
| 702 |
+
typedef struct ASN1_AUX_st {
|
| 703 |
+
void *app_data;
|
| 704 |
+
int flags;
|
| 705 |
+
int ref_offset; /* Offset of reference value */
|
| 706 |
+
int ref_lock; /* Offset of lock value */
|
| 707 |
+
ASN1_aux_cb *asn1_cb;
|
| 708 |
+
int enc_offset; /* Offset of ASN1_ENCODING structure */
|
| 709 |
+
ASN1_aux_const_cb *asn1_const_cb; /* for ASN1_OP_I2D_ and ASN1_OP_PRINT_ */
|
| 710 |
+
} ASN1_AUX;
|
| 711 |
+
|
| 712 |
+
/* For print related callbacks exarg points to this structure */
|
| 713 |
+
typedef struct ASN1_PRINT_ARG_st {
|
| 714 |
+
BIO *out;
|
| 715 |
+
int indent;
|
| 716 |
+
const ASN1_PCTX *pctx;
|
| 717 |
+
} ASN1_PRINT_ARG;
|
| 718 |
+
|
| 719 |
+
/* For streaming related callbacks exarg points to this structure */
|
| 720 |
+
typedef struct ASN1_STREAM_ARG_st {
|
| 721 |
+
/* BIO to stream through */
|
| 722 |
+
BIO *out;
|
| 723 |
+
/* BIO with filters appended */
|
| 724 |
+
BIO *ndef_bio;
|
| 725 |
+
/* Streaming I/O boundary */
|
| 726 |
+
unsigned char **boundary;
|
| 727 |
+
} ASN1_STREAM_ARG;
|
| 728 |
+
|
| 729 |
+
/* Flags in ASN1_AUX */
|
| 730 |
+
|
| 731 |
+
/* Use a reference count */
|
| 732 |
+
# define ASN1_AFLG_REFCOUNT 1
|
| 733 |
+
/* Save the encoding of structure (useful for signatures) */
|
| 734 |
+
# define ASN1_AFLG_ENCODING 2
|
| 735 |
+
/* The Sequence length is invalid */
|
| 736 |
+
# define ASN1_AFLG_BROKEN 4
|
| 737 |
+
/* Use the new asn1_const_cb */
|
| 738 |
+
# define ASN1_AFLG_CONST_CB 8
|
| 739 |
+
|
| 740 |
+
/* operation values for asn1_cb */
|
| 741 |
+
|
| 742 |
+
# define ASN1_OP_NEW_PRE 0
|
| 743 |
+
# define ASN1_OP_NEW_POST 1
|
| 744 |
+
# define ASN1_OP_FREE_PRE 2
|
| 745 |
+
# define ASN1_OP_FREE_POST 3
|
| 746 |
+
# define ASN1_OP_D2I_PRE 4
|
| 747 |
+
# define ASN1_OP_D2I_POST 5
|
| 748 |
+
# define ASN1_OP_I2D_PRE 6
|
| 749 |
+
# define ASN1_OP_I2D_POST 7
|
| 750 |
+
# define ASN1_OP_PRINT_PRE 8
|
| 751 |
+
# define ASN1_OP_PRINT_POST 9
|
| 752 |
+
# define ASN1_OP_STREAM_PRE 10
|
| 753 |
+
# define ASN1_OP_STREAM_POST 11
|
| 754 |
+
# define ASN1_OP_DETACHED_PRE 12
|
| 755 |
+
# define ASN1_OP_DETACHED_POST 13
|
| 756 |
+
# define ASN1_OP_DUP_PRE 14
|
| 757 |
+
# define ASN1_OP_DUP_POST 15
|
| 758 |
+
# define ASN1_OP_GET0_LIBCTX 16
|
| 759 |
+
# define ASN1_OP_GET0_PROPQ 17
|
| 760 |
+
|
| 761 |
+
/* Macro to implement a primitive type */
|
| 762 |
+
# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
|
| 763 |
+
# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \
|
| 764 |
+
ASN1_ITEM_start(itname) \
|
| 765 |
+
ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \
|
| 766 |
+
ASN1_ITEM_end(itname)
|
| 767 |
+
|
| 768 |
+
/* Macro to implement a multi string type */
|
| 769 |
+
# define IMPLEMENT_ASN1_MSTRING(itname, mask) \
|
| 770 |
+
ASN1_ITEM_start(itname) \
|
| 771 |
+
ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \
|
| 772 |
+
ASN1_ITEM_end(itname)
|
| 773 |
+
|
| 774 |
+
# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \
|
| 775 |
+
ASN1_ITEM_start(sname) \
|
| 776 |
+
ASN1_ITYPE_EXTERN, \
|
| 777 |
+
tag, \
|
| 778 |
+
NULL, \
|
| 779 |
+
0, \
|
| 780 |
+
&fptrs, \
|
| 781 |
+
0, \
|
| 782 |
+
#sname \
|
| 783 |
+
ASN1_ITEM_end(sname)
|
| 784 |
+
|
| 785 |
+
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
|
| 786 |
+
|
| 787 |
+
# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
|
| 788 |
+
|
| 789 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
|
| 790 |
+
|
| 791 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
|
| 792 |
+
IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
|
| 793 |
+
|
| 794 |
+
# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 795 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
|
| 796 |
+
|
| 797 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 798 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
|
| 799 |
+
|
| 800 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
|
| 801 |
+
pre stname *fname##_new(void) \
|
| 802 |
+
{ \
|
| 803 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 804 |
+
} \
|
| 805 |
+
pre void fname##_free(stname *a) \
|
| 806 |
+
{ \
|
| 807 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
|
| 811 |
+
stname *fname##_new(void) \
|
| 812 |
+
{ \
|
| 813 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 814 |
+
} \
|
| 815 |
+
void fname##_free(stname *a) \
|
| 816 |
+
{ \
|
| 817 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \
|
| 821 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 822 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
|
| 823 |
+
|
| 824 |
+
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 825 |
+
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
|
| 826 |
+
{ \
|
| 827 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
|
| 828 |
+
} \
|
| 829 |
+
int i2d_##fname(const stname *a, unsigned char **out) \
|
| 830 |
+
{ \
|
| 831 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \
|
| 835 |
+
int i2d_##stname##_NDEF(const stname *a, unsigned char **out) \
|
| 836 |
+
{ \
|
| 837 |
+
return ASN1_item_ndef_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
# define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \
|
| 841 |
+
static stname *d2i_##stname(stname **a, \
|
| 842 |
+
const unsigned char **in, long len) \
|
| 843 |
+
{ \
|
| 844 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \
|
| 845 |
+
ASN1_ITEM_rptr(stname)); \
|
| 846 |
+
} \
|
| 847 |
+
static int i2d_##stname(const stname *a, unsigned char **out) \
|
| 848 |
+
{ \
|
| 849 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, \
|
| 850 |
+
ASN1_ITEM_rptr(stname)); \
|
| 851 |
+
}
|
| 852 |
+
|
| 853 |
+
# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \
|
| 854 |
+
stname * stname##_dup(const stname *x) \
|
| 855 |
+
{ \
|
| 856 |
+
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
|
| 860 |
+
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
|
| 861 |
+
|
| 862 |
+
# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
|
| 863 |
+
int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 864 |
+
const ASN1_PCTX *pctx) \
|
| 865 |
+
{ \
|
| 866 |
+
return ASN1_item_print(out, (const ASN1_VALUE *)x, indent, \
|
| 867 |
+
ASN1_ITEM_rptr(itname), pctx); \
|
| 868 |
+
}
|
| 869 |
+
|
| 870 |
+
/* external definitions for primitive types */
|
| 871 |
+
|
| 872 |
+
DECLARE_ASN1_ITEM(ASN1_BOOLEAN)
|
| 873 |
+
DECLARE_ASN1_ITEM(ASN1_TBOOLEAN)
|
| 874 |
+
DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
|
| 875 |
+
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
|
| 876 |
+
DECLARE_ASN1_ITEM(CBIGNUM)
|
| 877 |
+
DECLARE_ASN1_ITEM(BIGNUM)
|
| 878 |
+
DECLARE_ASN1_ITEM(INT32)
|
| 879 |
+
DECLARE_ASN1_ITEM(ZINT32)
|
| 880 |
+
DECLARE_ASN1_ITEM(UINT32)
|
| 881 |
+
DECLARE_ASN1_ITEM(ZUINT32)
|
| 882 |
+
DECLARE_ASN1_ITEM(INT64)
|
| 883 |
+
DECLARE_ASN1_ITEM(ZINT64)
|
| 884 |
+
DECLARE_ASN1_ITEM(UINT64)
|
| 885 |
+
DECLARE_ASN1_ITEM(ZUINT64)
|
| 886 |
+
|
| 887 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 888 |
+
/*
|
| 889 |
+
* LONG and ZLONG are strongly discouraged for use as stored data, as the
|
| 890 |
+
* underlying C type (long) differs in size depending on the architecture.
|
| 891 |
+
* They are designed with 32-bit longs in mind.
|
| 892 |
+
*/
|
| 893 |
+
DECLARE_ASN1_ITEM(LONG)
|
| 894 |
+
DECLARE_ASN1_ITEM(ZLONG)
|
| 895 |
+
# endif
|
| 896 |
+
|
| 897 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_VALUE, ASN1_VALUE, ASN1_VALUE)
|
| 898 |
+
#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 899 |
+
#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
|
| 900 |
+
#define sk_ASN1_VALUE_new(cmp) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new(ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 901 |
+
#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
|
| 902 |
+
#define sk_ASN1_VALUE_new_reserve(cmp, n) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_VALUE_compfunc_type(cmp), (n)))
|
| 903 |
+
#define sk_ASN1_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_VALUE_sk_type(sk), (n))
|
| 904 |
+
#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 905 |
+
#define sk_ASN1_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 906 |
+
#define sk_ASN1_VALUE_delete(sk, i) ((ASN1_VALUE *)OPENSSL_sk_delete(ossl_check_ASN1_VALUE_sk_type(sk), (i)))
|
| 907 |
+
#define sk_ASN1_VALUE_delete_ptr(sk, ptr) ((ASN1_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr)))
|
| 908 |
+
#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 909 |
+
#define sk_ASN1_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 910 |
+
#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 911 |
+
#define sk_ASN1_VALUE_shift(sk) ((ASN1_VALUE *)OPENSSL_sk_shift(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 912 |
+
#define sk_ASN1_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_VALUE_sk_type(sk),ossl_check_ASN1_VALUE_freefunc_type(freefunc))
|
| 913 |
+
#define sk_ASN1_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), (idx))
|
| 914 |
+
#define sk_ASN1_VALUE_set(sk, idx, ptr) ((ASN1_VALUE *)OPENSSL_sk_set(ossl_check_ASN1_VALUE_sk_type(sk), (idx), ossl_check_ASN1_VALUE_type(ptr)))
|
| 915 |
+
#define sk_ASN1_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 916 |
+
#define sk_ASN1_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 917 |
+
#define sk_ASN1_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), pnum)
|
| 918 |
+
#define sk_ASN1_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 919 |
+
#define sk_ASN1_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 920 |
+
#define sk_ASN1_VALUE_dup(sk) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_VALUE_sk_type(sk)))
|
| 921 |
+
#define sk_ASN1_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_copyfunc_type(copyfunc), ossl_check_ASN1_VALUE_freefunc_type(freefunc)))
|
| 922 |
+
#define sk_ASN1_VALUE_set_cmp_func(sk, cmp) ((sk_ASN1_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 923 |
+
|
| 924 |
+
|
| 925 |
+
|
| 926 |
+
/* Functions used internally by the ASN1 code */
|
| 927 |
+
|
| 928 |
+
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 929 |
+
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 930 |
+
|
| 931 |
+
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 932 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 933 |
+
ASN1_TLC *ctx);
|
| 934 |
+
|
| 935 |
+
int ASN1_item_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 936 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 937 |
+
|
| 938 |
+
/* Legacy compatibility */
|
| 939 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_const(name) IMPLEMENT_ASN1_FUNCTIONS(name)
|
| 940 |
+
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
|
| 941 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)
|
| 942 |
+
|
| 943 |
+
#ifdef __cplusplus
|
| 944 |
+
}
|
| 945 |
+
#endif
|
| 946 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/bio.h
ADDED
|
@@ -0,0 +1,1022 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/bio.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_BIO_H
|
| 15 |
+
# define OPENSSL_BIO_H
|
| 16 |
+
# pragma once
|
| 17 |
+
|
| 18 |
+
# include <openssl/macros.h>
|
| 19 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 20 |
+
# define HEADER_BIO_H
|
| 21 |
+
# endif
|
| 22 |
+
|
| 23 |
+
# include <openssl/e_os2.h>
|
| 24 |
+
|
| 25 |
+
# ifndef OPENSSL_NO_STDIO
|
| 26 |
+
# include <stdio.h>
|
| 27 |
+
# endif
|
| 28 |
+
# include <stdarg.h>
|
| 29 |
+
|
| 30 |
+
# include <openssl/crypto.h>
|
| 31 |
+
# include <openssl/bioerr.h>
|
| 32 |
+
# include <openssl/core.h>
|
| 33 |
+
|
| 34 |
+
#ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
#endif
|
| 37 |
+
|
| 38 |
+
/* There are the classes of BIOs */
|
| 39 |
+
# define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
|
| 40 |
+
# define BIO_TYPE_FILTER 0x0200
|
| 41 |
+
# define BIO_TYPE_SOURCE_SINK 0x0400
|
| 42 |
+
|
| 43 |
+
/* These are the 'types' of BIOs */
|
| 44 |
+
# define BIO_TYPE_NONE 0
|
| 45 |
+
# define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK)
|
| 46 |
+
# define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK)
|
| 47 |
+
|
| 48 |
+
# define BIO_TYPE_FD ( 4|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 49 |
+
# define BIO_TYPE_SOCKET ( 5|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 50 |
+
# define BIO_TYPE_NULL ( 6|BIO_TYPE_SOURCE_SINK)
|
| 51 |
+
# define BIO_TYPE_SSL ( 7|BIO_TYPE_FILTER)
|
| 52 |
+
# define BIO_TYPE_MD ( 8|BIO_TYPE_FILTER)
|
| 53 |
+
# define BIO_TYPE_BUFFER ( 9|BIO_TYPE_FILTER)
|
| 54 |
+
# define BIO_TYPE_CIPHER (10|BIO_TYPE_FILTER)
|
| 55 |
+
# define BIO_TYPE_BASE64 (11|BIO_TYPE_FILTER)
|
| 56 |
+
# define BIO_TYPE_CONNECT (12|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 57 |
+
# define BIO_TYPE_ACCEPT (13|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 58 |
+
|
| 59 |
+
# define BIO_TYPE_NBIO_TEST (16|BIO_TYPE_FILTER)/* server proxy BIO */
|
| 60 |
+
# define BIO_TYPE_NULL_FILTER (17|BIO_TYPE_FILTER)
|
| 61 |
+
# define BIO_TYPE_BIO (19|BIO_TYPE_SOURCE_SINK)/* half a BIO pair */
|
| 62 |
+
# define BIO_TYPE_LINEBUFFER (20|BIO_TYPE_FILTER)
|
| 63 |
+
# define BIO_TYPE_DGRAM (21|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 64 |
+
# define BIO_TYPE_ASN1 (22|BIO_TYPE_FILTER)
|
| 65 |
+
# define BIO_TYPE_COMP (23|BIO_TYPE_FILTER)
|
| 66 |
+
# ifndef OPENSSL_NO_SCTP
|
| 67 |
+
# define BIO_TYPE_DGRAM_SCTP (24|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 68 |
+
# endif
|
| 69 |
+
# define BIO_TYPE_CORE_TO_PROV (25|BIO_TYPE_SOURCE_SINK)
|
| 70 |
+
# define BIO_TYPE_DGRAM_PAIR (26|BIO_TYPE_SOURCE_SINK)
|
| 71 |
+
# define BIO_TYPE_DGRAM_MEM (27|BIO_TYPE_SOURCE_SINK)
|
| 72 |
+
|
| 73 |
+
/* Custom type starting index returned by BIO_get_new_index() */
|
| 74 |
+
#define BIO_TYPE_START 128
|
| 75 |
+
/* Custom type maximum index that can be returned by BIO_get_new_index() */
|
| 76 |
+
#define BIO_TYPE_MASK 0xFF
|
| 77 |
+
|
| 78 |
+
/*
|
| 79 |
+
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
|
| 80 |
+
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
| 81 |
+
*/
|
| 82 |
+
# define BIO_NOCLOSE 0x00
|
| 83 |
+
# define BIO_CLOSE 0x01
|
| 84 |
+
|
| 85 |
+
/*
|
| 86 |
+
* These are used in the following macros and are passed to BIO_ctrl()
|
| 87 |
+
*/
|
| 88 |
+
# define BIO_CTRL_RESET 1/* opt - rewind/zero etc */
|
| 89 |
+
# define BIO_CTRL_EOF 2/* opt - are we at the eof */
|
| 90 |
+
# define BIO_CTRL_INFO 3/* opt - extra tit-bits */
|
| 91 |
+
# define BIO_CTRL_SET 4/* man - set the 'IO' type */
|
| 92 |
+
# define BIO_CTRL_GET 5/* man - get the 'IO' type */
|
| 93 |
+
# define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */
|
| 94 |
+
# define BIO_CTRL_POP 7/* opt - internal, used to signify change */
|
| 95 |
+
# define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */
|
| 96 |
+
# define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */
|
| 97 |
+
# define BIO_CTRL_PENDING 10/* opt - is their more data buffered */
|
| 98 |
+
# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */
|
| 99 |
+
# define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */
|
| 100 |
+
# define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */
|
| 101 |
+
# define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */
|
| 102 |
+
# define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */
|
| 103 |
+
|
| 104 |
+
# define BIO_CTRL_PEEK 29/* BIO_f_buffer special */
|
| 105 |
+
# define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */
|
| 106 |
+
|
| 107 |
+
/* dgram BIO stuff */
|
| 108 |
+
# define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */
|
| 109 |
+
# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected
|
| 110 |
+
* socket to be passed in */
|
| 111 |
+
# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */
|
| 112 |
+
# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */
|
| 113 |
+
# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */
|
| 114 |
+
# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */
|
| 115 |
+
|
| 116 |
+
# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */
|
| 117 |
+
# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation timed out */
|
| 118 |
+
|
| 119 |
+
/* #ifdef IP_MTU_DISCOVER */
|
| 120 |
+
# define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */
|
| 121 |
+
/* #endif */
|
| 122 |
+
|
| 123 |
+
# define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */
|
| 124 |
+
# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
| 125 |
+
# define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */
|
| 126 |
+
# define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU.
|
| 127 |
+
* want to use this if asking
|
| 128 |
+
* the kernel fails */
|
| 129 |
+
|
| 130 |
+
# define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was
|
| 131 |
+
* exceed in the previous write
|
| 132 |
+
* operation */
|
| 133 |
+
|
| 134 |
+
# define BIO_CTRL_DGRAM_GET_PEER 46
|
| 135 |
+
# define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */
|
| 136 |
+
|
| 137 |
+
# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout
|
| 138 |
+
* to adjust socket timeouts */
|
| 139 |
+
# define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
|
| 140 |
+
|
| 141 |
+
# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
| 142 |
+
|
| 143 |
+
/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */
|
| 144 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
| 145 |
+
# ifndef OPENSSL_NO_SCTP
|
| 146 |
+
/* SCTP stuff */
|
| 147 |
+
# define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
| 148 |
+
# define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
| 149 |
+
# define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
| 150 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
| 151 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
| 152 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
| 153 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
| 154 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
| 155 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
| 156 |
+
# define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
| 157 |
+
# endif
|
| 158 |
+
|
| 159 |
+
# define BIO_CTRL_DGRAM_SET_PEEK_MODE 71
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* internal BIO:
|
| 163 |
+
* # define BIO_CTRL_SET_KTLS_SEND 72
|
| 164 |
+
* # define BIO_CTRL_SET_KTLS_SEND_CTRL_MSG 74
|
| 165 |
+
* # define BIO_CTRL_CLEAR_KTLS_CTRL_MSG 75
|
| 166 |
+
*/
|
| 167 |
+
|
| 168 |
+
# define BIO_CTRL_GET_KTLS_SEND 73
|
| 169 |
+
# define BIO_CTRL_GET_KTLS_RECV 76
|
| 170 |
+
|
| 171 |
+
# define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
| 172 |
+
# define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
| 173 |
+
|
| 174 |
+
/* BIO_f_prefix controls */
|
| 175 |
+
# define BIO_CTRL_SET_PREFIX 79
|
| 176 |
+
# define BIO_CTRL_SET_INDENT 80
|
| 177 |
+
# define BIO_CTRL_GET_INDENT 81
|
| 178 |
+
|
| 179 |
+
# define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP 82
|
| 180 |
+
# define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE 83
|
| 181 |
+
# define BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE 84
|
| 182 |
+
# define BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS 85
|
| 183 |
+
# define BIO_CTRL_DGRAM_GET_CAPS 86
|
| 184 |
+
# define BIO_CTRL_DGRAM_SET_CAPS 87
|
| 185 |
+
# define BIO_CTRL_DGRAM_GET_NO_TRUNC 88
|
| 186 |
+
# define BIO_CTRL_DGRAM_SET_NO_TRUNC 89
|
| 187 |
+
|
| 188 |
+
/*
|
| 189 |
+
* internal BIO:
|
| 190 |
+
* # define BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE 90
|
| 191 |
+
*/
|
| 192 |
+
|
| 193 |
+
# define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
|
| 194 |
+
# define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
|
| 195 |
+
# define BIO_CTRL_DGRAM_DETECT_PEER_ADDR 93
|
| 196 |
+
# define BIO_CTRL_DGRAM_SET0_LOCAL_ADDR 94
|
| 197 |
+
|
| 198 |
+
# define BIO_DGRAM_CAP_NONE 0U
|
| 199 |
+
# define BIO_DGRAM_CAP_HANDLES_SRC_ADDR (1U << 0)
|
| 200 |
+
# define BIO_DGRAM_CAP_HANDLES_DST_ADDR (1U << 1)
|
| 201 |
+
# define BIO_DGRAM_CAP_PROVIDES_SRC_ADDR (1U << 2)
|
| 202 |
+
# define BIO_DGRAM_CAP_PROVIDES_DST_ADDR (1U << 3)
|
| 203 |
+
|
| 204 |
+
# ifndef OPENSSL_NO_KTLS
|
| 205 |
+
# define BIO_get_ktls_send(b) \
|
| 206 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
|
| 207 |
+
# define BIO_get_ktls_recv(b) \
|
| 208 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)
|
| 209 |
+
# else
|
| 210 |
+
# define BIO_get_ktls_send(b) (0)
|
| 211 |
+
# define BIO_get_ktls_recv(b) (0)
|
| 212 |
+
# endif
|
| 213 |
+
|
| 214 |
+
/* modifiers */
|
| 215 |
+
# define BIO_FP_READ 0x02
|
| 216 |
+
# define BIO_FP_WRITE 0x04
|
| 217 |
+
# define BIO_FP_APPEND 0x08
|
| 218 |
+
# define BIO_FP_TEXT 0x10
|
| 219 |
+
|
| 220 |
+
# define BIO_FLAGS_READ 0x01
|
| 221 |
+
# define BIO_FLAGS_WRITE 0x02
|
| 222 |
+
# define BIO_FLAGS_IO_SPECIAL 0x04
|
| 223 |
+
# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
|
| 224 |
+
# define BIO_FLAGS_SHOULD_RETRY 0x08
|
| 225 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 226 |
+
/* This #define was replaced by an internal constant and should not be used. */
|
| 227 |
+
# define BIO_FLAGS_UPLINK 0
|
| 228 |
+
# endif
|
| 229 |
+
|
| 230 |
+
# define BIO_FLAGS_BASE64_NO_NL 0x100
|
| 231 |
+
|
| 232 |
+
/*
|
| 233 |
+
* This is used with memory BIOs:
|
| 234 |
+
* BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way;
|
| 235 |
+
* BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset.
|
| 236 |
+
*/
|
| 237 |
+
# define BIO_FLAGS_MEM_RDONLY 0x200
|
| 238 |
+
# define BIO_FLAGS_NONCLEAR_RST 0x400
|
| 239 |
+
# define BIO_FLAGS_IN_EOF 0x800
|
| 240 |
+
|
| 241 |
+
/* the BIO FLAGS values 0x1000 to 0x8000 are reserved for internal KTLS flags */
|
| 242 |
+
|
| 243 |
+
typedef union bio_addr_st BIO_ADDR;
|
| 244 |
+
typedef struct bio_addrinfo_st BIO_ADDRINFO;
|
| 245 |
+
|
| 246 |
+
int BIO_get_new_index(void);
|
| 247 |
+
void BIO_set_flags(BIO *b, int flags);
|
| 248 |
+
int BIO_test_flags(const BIO *b, int flags);
|
| 249 |
+
void BIO_clear_flags(BIO *b, int flags);
|
| 250 |
+
|
| 251 |
+
# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
|
| 252 |
+
# define BIO_set_retry_special(b) \
|
| 253 |
+
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
|
| 254 |
+
# define BIO_set_retry_read(b) \
|
| 255 |
+
BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
|
| 256 |
+
# define BIO_set_retry_write(b) \
|
| 257 |
+
BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
|
| 258 |
+
|
| 259 |
+
/* These are normally used internally in BIOs */
|
| 260 |
+
# define BIO_clear_retry_flags(b) \
|
| 261 |
+
BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
|
| 262 |
+
# define BIO_get_retry_flags(b) \
|
| 263 |
+
BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
|
| 264 |
+
|
| 265 |
+
/* These should be used by the application to tell why we should retry */
|
| 266 |
+
# define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
|
| 267 |
+
# define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
|
| 268 |
+
# define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
|
| 269 |
+
# define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
|
| 270 |
+
# define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
|
| 271 |
+
|
| 272 |
+
/*
|
| 273 |
+
* The next three are used in conjunction with the BIO_should_io_special()
|
| 274 |
+
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
|
| 275 |
+
* *reason); will walk the BIO stack and return the 'reason' for the special
|
| 276 |
+
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
|
| 277 |
+
* the code.
|
| 278 |
+
*/
|
| 279 |
+
/*
|
| 280 |
+
* Returned from the SSL bio when the certificate retrieval code had an error
|
| 281 |
+
*/
|
| 282 |
+
# define BIO_RR_SSL_X509_LOOKUP 0x01
|
| 283 |
+
/* Returned from the connect BIO when a connect would have blocked */
|
| 284 |
+
# define BIO_RR_CONNECT 0x02
|
| 285 |
+
/* Returned from the accept BIO when an accept would have blocked */
|
| 286 |
+
# define BIO_RR_ACCEPT 0x03
|
| 287 |
+
|
| 288 |
+
/* These are passed by the BIO callback */
|
| 289 |
+
# define BIO_CB_FREE 0x01
|
| 290 |
+
# define BIO_CB_READ 0x02
|
| 291 |
+
# define BIO_CB_WRITE 0x03
|
| 292 |
+
# define BIO_CB_PUTS 0x04
|
| 293 |
+
# define BIO_CB_GETS 0x05
|
| 294 |
+
# define BIO_CB_CTRL 0x06
|
| 295 |
+
# define BIO_CB_RECVMMSG 0x07
|
| 296 |
+
# define BIO_CB_SENDMMSG 0x08
|
| 297 |
+
|
| 298 |
+
/*
|
| 299 |
+
* The callback is called before and after the underling operation, The
|
| 300 |
+
* BIO_CB_RETURN flag indicates if it is after the call
|
| 301 |
+
*/
|
| 302 |
+
# define BIO_CB_RETURN 0x80
|
| 303 |
+
# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)
|
| 304 |
+
# define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN))
|
| 305 |
+
# define BIO_cb_post(a) ((a)&BIO_CB_RETURN)
|
| 306 |
+
|
| 307 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 308 |
+
typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
|
| 309 |
+
long argl, long ret);
|
| 310 |
+
OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b);
|
| 311 |
+
OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd,
|
| 313 |
+
const char *argp, int argi,
|
| 314 |
+
long argl, long ret);
|
| 315 |
+
# endif
|
| 316 |
+
|
| 317 |
+
typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
|
| 318 |
+
size_t len, int argi,
|
| 319 |
+
long argl, int ret, size_t *processed);
|
| 320 |
+
BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
|
| 321 |
+
void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
|
| 322 |
+
long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
|
| 323 |
+
int argi, long argl, int ret, size_t *processed);
|
| 324 |
+
|
| 325 |
+
char *BIO_get_callback_arg(const BIO *b);
|
| 326 |
+
void BIO_set_callback_arg(BIO *b, char *arg);
|
| 327 |
+
|
| 328 |
+
typedef struct bio_method_st BIO_METHOD;
|
| 329 |
+
|
| 330 |
+
const char *BIO_method_name(const BIO *b);
|
| 331 |
+
int BIO_method_type(const BIO *b);
|
| 332 |
+
|
| 333 |
+
typedef int BIO_info_cb(BIO *, int, int);
|
| 334 |
+
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
|
| 335 |
+
|
| 336 |
+
SKM_DEFINE_STACK_OF_INTERNAL(BIO, BIO, BIO)
|
| 337 |
+
#define sk_BIO_num(sk) OPENSSL_sk_num(ossl_check_const_BIO_sk_type(sk))
|
| 338 |
+
#define sk_BIO_value(sk, idx) ((BIO *)OPENSSL_sk_value(ossl_check_const_BIO_sk_type(sk), (idx)))
|
| 339 |
+
#define sk_BIO_new(cmp) ((STACK_OF(BIO) *)OPENSSL_sk_new(ossl_check_BIO_compfunc_type(cmp)))
|
| 340 |
+
#define sk_BIO_new_null() ((STACK_OF(BIO) *)OPENSSL_sk_new_null())
|
| 341 |
+
#define sk_BIO_new_reserve(cmp, n) ((STACK_OF(BIO) *)OPENSSL_sk_new_reserve(ossl_check_BIO_compfunc_type(cmp), (n)))
|
| 342 |
+
#define sk_BIO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_BIO_sk_type(sk), (n))
|
| 343 |
+
#define sk_BIO_free(sk) OPENSSL_sk_free(ossl_check_BIO_sk_type(sk))
|
| 344 |
+
#define sk_BIO_zero(sk) OPENSSL_sk_zero(ossl_check_BIO_sk_type(sk))
|
| 345 |
+
#define sk_BIO_delete(sk, i) ((BIO *)OPENSSL_sk_delete(ossl_check_BIO_sk_type(sk), (i)))
|
| 346 |
+
#define sk_BIO_delete_ptr(sk, ptr) ((BIO *)OPENSSL_sk_delete_ptr(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr)))
|
| 347 |
+
#define sk_BIO_push(sk, ptr) OPENSSL_sk_push(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 348 |
+
#define sk_BIO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 349 |
+
#define sk_BIO_pop(sk) ((BIO *)OPENSSL_sk_pop(ossl_check_BIO_sk_type(sk)))
|
| 350 |
+
#define sk_BIO_shift(sk) ((BIO *)OPENSSL_sk_shift(ossl_check_BIO_sk_type(sk)))
|
| 351 |
+
#define sk_BIO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_BIO_sk_type(sk),ossl_check_BIO_freefunc_type(freefunc))
|
| 352 |
+
#define sk_BIO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), (idx))
|
| 353 |
+
#define sk_BIO_set(sk, idx, ptr) ((BIO *)OPENSSL_sk_set(ossl_check_BIO_sk_type(sk), (idx), ossl_check_BIO_type(ptr)))
|
| 354 |
+
#define sk_BIO_find(sk, ptr) OPENSSL_sk_find(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 355 |
+
#define sk_BIO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 356 |
+
#define sk_BIO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), pnum)
|
| 357 |
+
#define sk_BIO_sort(sk) OPENSSL_sk_sort(ossl_check_BIO_sk_type(sk))
|
| 358 |
+
#define sk_BIO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_BIO_sk_type(sk))
|
| 359 |
+
#define sk_BIO_dup(sk) ((STACK_OF(BIO) *)OPENSSL_sk_dup(ossl_check_const_BIO_sk_type(sk)))
|
| 360 |
+
#define sk_BIO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(BIO) *)OPENSSL_sk_deep_copy(ossl_check_const_BIO_sk_type(sk), ossl_check_BIO_copyfunc_type(copyfunc), ossl_check_BIO_freefunc_type(freefunc)))
|
| 361 |
+
#define sk_BIO_set_cmp_func(sk, cmp) ((sk_BIO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_BIO_sk_type(sk), ossl_check_BIO_compfunc_type(cmp)))
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
/* Prefix and suffix callback in ASN1 BIO */
|
| 366 |
+
typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
|
| 367 |
+
void *parg);
|
| 368 |
+
|
| 369 |
+
typedef void (*BIO_dgram_sctp_notification_handler_fn) (BIO *b,
|
| 370 |
+
void *context,
|
| 371 |
+
void *buf);
|
| 372 |
+
# ifndef OPENSSL_NO_SCTP
|
| 373 |
+
/* SCTP parameter structs */
|
| 374 |
+
struct bio_dgram_sctp_sndinfo {
|
| 375 |
+
uint16_t snd_sid;
|
| 376 |
+
uint16_t snd_flags;
|
| 377 |
+
uint32_t snd_ppid;
|
| 378 |
+
uint32_t snd_context;
|
| 379 |
+
};
|
| 380 |
+
|
| 381 |
+
struct bio_dgram_sctp_rcvinfo {
|
| 382 |
+
uint16_t rcv_sid;
|
| 383 |
+
uint16_t rcv_ssn;
|
| 384 |
+
uint16_t rcv_flags;
|
| 385 |
+
uint32_t rcv_ppid;
|
| 386 |
+
uint32_t rcv_tsn;
|
| 387 |
+
uint32_t rcv_cumtsn;
|
| 388 |
+
uint32_t rcv_context;
|
| 389 |
+
};
|
| 390 |
+
|
| 391 |
+
struct bio_dgram_sctp_prinfo {
|
| 392 |
+
uint16_t pr_policy;
|
| 393 |
+
uint32_t pr_value;
|
| 394 |
+
};
|
| 395 |
+
# endif
|
| 396 |
+
|
| 397 |
+
/* BIO_sendmmsg/BIO_recvmmsg-related definitions */
|
| 398 |
+
typedef struct bio_msg_st {
|
| 399 |
+
void *data;
|
| 400 |
+
size_t data_len;
|
| 401 |
+
BIO_ADDR *peer, *local;
|
| 402 |
+
uint64_t flags;
|
| 403 |
+
} BIO_MSG;
|
| 404 |
+
|
| 405 |
+
typedef struct bio_mmsg_cb_args_st {
|
| 406 |
+
BIO_MSG *msg;
|
| 407 |
+
size_t stride, num_msg;
|
| 408 |
+
uint64_t flags;
|
| 409 |
+
size_t *msgs_processed;
|
| 410 |
+
} BIO_MMSG_CB_ARGS;
|
| 411 |
+
|
| 412 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
|
| 413 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
|
| 414 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SSL 2
|
| 415 |
+
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
|
| 416 |
+
|
| 417 |
+
typedef struct bio_poll_descriptor_st {
|
| 418 |
+
uint32_t type;
|
| 419 |
+
union {
|
| 420 |
+
int fd;
|
| 421 |
+
void *custom;
|
| 422 |
+
uintptr_t custom_ui;
|
| 423 |
+
SSL *ssl;
|
| 424 |
+
} value;
|
| 425 |
+
} BIO_POLL_DESCRIPTOR;
|
| 426 |
+
|
| 427 |
+
/*
|
| 428 |
+
* #define BIO_CONN_get_param_hostname BIO_ctrl
|
| 429 |
+
*/
|
| 430 |
+
|
| 431 |
+
# define BIO_C_SET_CONNECT 100
|
| 432 |
+
# define BIO_C_DO_STATE_MACHINE 101
|
| 433 |
+
# define BIO_C_SET_NBIO 102
|
| 434 |
+
/* # define BIO_C_SET_PROXY_PARAM 103 */
|
| 435 |
+
# define BIO_C_SET_FD 104
|
| 436 |
+
# define BIO_C_GET_FD 105
|
| 437 |
+
# define BIO_C_SET_FILE_PTR 106
|
| 438 |
+
# define BIO_C_GET_FILE_PTR 107
|
| 439 |
+
# define BIO_C_SET_FILENAME 108
|
| 440 |
+
# define BIO_C_SET_SSL 109
|
| 441 |
+
# define BIO_C_GET_SSL 110
|
| 442 |
+
# define BIO_C_SET_MD 111
|
| 443 |
+
# define BIO_C_GET_MD 112
|
| 444 |
+
# define BIO_C_GET_CIPHER_STATUS 113
|
| 445 |
+
# define BIO_C_SET_BUF_MEM 114
|
| 446 |
+
# define BIO_C_GET_BUF_MEM_PTR 115
|
| 447 |
+
# define BIO_C_GET_BUFF_NUM_LINES 116
|
| 448 |
+
# define BIO_C_SET_BUFF_SIZE 117
|
| 449 |
+
# define BIO_C_SET_ACCEPT 118
|
| 450 |
+
# define BIO_C_SSL_MODE 119
|
| 451 |
+
# define BIO_C_GET_MD_CTX 120
|
| 452 |
+
/* # define BIO_C_GET_PROXY_PARAM 121 */
|
| 453 |
+
# define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */
|
| 454 |
+
# define BIO_C_GET_CONNECT 123
|
| 455 |
+
# define BIO_C_GET_ACCEPT 124
|
| 456 |
+
# define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
|
| 457 |
+
# define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
|
| 458 |
+
# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
|
| 459 |
+
# define BIO_C_FILE_SEEK 128
|
| 460 |
+
# define BIO_C_GET_CIPHER_CTX 129
|
| 461 |
+
# define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input
|
| 462 |
+
* value */
|
| 463 |
+
# define BIO_C_SET_BIND_MODE 131
|
| 464 |
+
# define BIO_C_GET_BIND_MODE 132
|
| 465 |
+
# define BIO_C_FILE_TELL 133
|
| 466 |
+
# define BIO_C_GET_SOCKS 134
|
| 467 |
+
# define BIO_C_SET_SOCKS 135
|
| 468 |
+
|
| 469 |
+
# define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */
|
| 470 |
+
# define BIO_C_GET_WRITE_BUF_SIZE 137
|
| 471 |
+
# define BIO_C_MAKE_BIO_PAIR 138
|
| 472 |
+
# define BIO_C_DESTROY_BIO_PAIR 139
|
| 473 |
+
# define BIO_C_GET_WRITE_GUARANTEE 140
|
| 474 |
+
# define BIO_C_GET_READ_REQUEST 141
|
| 475 |
+
# define BIO_C_SHUTDOWN_WR 142
|
| 476 |
+
# define BIO_C_NREAD0 143
|
| 477 |
+
# define BIO_C_NREAD 144
|
| 478 |
+
# define BIO_C_NWRITE0 145
|
| 479 |
+
# define BIO_C_NWRITE 146
|
| 480 |
+
# define BIO_C_RESET_READ_REQUEST 147
|
| 481 |
+
# define BIO_C_SET_MD_CTX 148
|
| 482 |
+
|
| 483 |
+
# define BIO_C_SET_PREFIX 149
|
| 484 |
+
# define BIO_C_GET_PREFIX 150
|
| 485 |
+
# define BIO_C_SET_SUFFIX 151
|
| 486 |
+
# define BIO_C_GET_SUFFIX 152
|
| 487 |
+
|
| 488 |
+
# define BIO_C_SET_EX_ARG 153
|
| 489 |
+
# define BIO_C_GET_EX_ARG 154
|
| 490 |
+
|
| 491 |
+
# define BIO_C_SET_CONNECT_MODE 155
|
| 492 |
+
|
| 493 |
+
# define BIO_C_SET_TFO 156 /* like BIO_C_SET_NBIO */
|
| 494 |
+
|
| 495 |
+
# define BIO_C_SET_SOCK_TYPE 157
|
| 496 |
+
# define BIO_C_GET_SOCK_TYPE 158
|
| 497 |
+
# define BIO_C_GET_DGRAM_BIO 159
|
| 498 |
+
|
| 499 |
+
# define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg)
|
| 500 |
+
# define BIO_get_app_data(s) BIO_get_ex_data(s,0)
|
| 501 |
+
|
| 502 |
+
# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
| 503 |
+
# define BIO_set_tfo(b,n) BIO_ctrl(b,BIO_C_SET_TFO,(n),NULL)
|
| 504 |
+
|
| 505 |
+
# ifndef OPENSSL_NO_SOCK
|
| 506 |
+
/* IP families we support, for BIO_s_connect() and BIO_s_accept() */
|
| 507 |
+
/* Note: the underlying operating system may not support some of them */
|
| 508 |
+
# define BIO_FAMILY_IPV4 4
|
| 509 |
+
# define BIO_FAMILY_IPV6 6
|
| 510 |
+
# define BIO_FAMILY_IPANY 256
|
| 511 |
+
|
| 512 |
+
/* BIO_s_connect() */
|
| 513 |
+
# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0, \
|
| 514 |
+
(char *)(name))
|
| 515 |
+
# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1, \
|
| 516 |
+
(char *)(port))
|
| 517 |
+
# define BIO_set_conn_address(b,addr) BIO_ctrl(b,BIO_C_SET_CONNECT,2, \
|
| 518 |
+
(char *)(addr))
|
| 519 |
+
# define BIO_set_conn_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,f)
|
| 520 |
+
# define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0))
|
| 521 |
+
# define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1))
|
| 522 |
+
# define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2))
|
| 523 |
+
# define BIO_get_conn_ip_family(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL)
|
| 524 |
+
# define BIO_get_conn_mode(b) BIO_ctrl(b,BIO_C_GET_CONNECT,4,NULL)
|
| 525 |
+
# define BIO_set_conn_mode(b,n) BIO_ctrl(b,BIO_C_SET_CONNECT_MODE,(n),NULL)
|
| 526 |
+
# define BIO_set_sock_type(b,t) BIO_ctrl(b,BIO_C_SET_SOCK_TYPE,(t),NULL)
|
| 527 |
+
# define BIO_get_sock_type(b) BIO_ctrl(b,BIO_C_GET_SOCK_TYPE,0,NULL)
|
| 528 |
+
# define BIO_get0_dgram_bio(b, p) BIO_ctrl(b,BIO_C_GET_DGRAM_BIO,0,(void *)(BIO **)(p))
|
| 529 |
+
|
| 530 |
+
/* BIO_s_accept() */
|
| 531 |
+
# define BIO_set_accept_name(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0, \
|
| 532 |
+
(char *)(name))
|
| 533 |
+
# define BIO_set_accept_port(b,port) BIO_ctrl(b,BIO_C_SET_ACCEPT,1, \
|
| 534 |
+
(char *)(port))
|
| 535 |
+
# define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0))
|
| 536 |
+
# define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,1))
|
| 537 |
+
# define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,2))
|
| 538 |
+
# define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,3))
|
| 539 |
+
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
| 540 |
+
# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(n)?(void *)"a":NULL)
|
| 541 |
+
# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,3, \
|
| 542 |
+
(char *)(bio))
|
| 543 |
+
# define BIO_set_accept_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_ACCEPT,4,f)
|
| 544 |
+
# define BIO_get_accept_ip_family(b) BIO_ctrl(b,BIO_C_GET_ACCEPT,4,NULL)
|
| 545 |
+
# define BIO_set_tfo_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,5,(n)?(void *)"a":NULL)
|
| 546 |
+
|
| 547 |
+
/* Aliases kept for backward compatibility */
|
| 548 |
+
# define BIO_BIND_NORMAL 0
|
| 549 |
+
# define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR
|
| 550 |
+
# define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR
|
| 551 |
+
# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)
|
| 552 |
+
# define BIO_get_bind_mode(b) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)
|
| 553 |
+
# endif /* OPENSSL_NO_SOCK */
|
| 554 |
+
|
| 555 |
+
# define BIO_do_connect(b) BIO_do_handshake(b)
|
| 556 |
+
# define BIO_do_accept(b) BIO_do_handshake(b)
|
| 557 |
+
|
| 558 |
+
# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
|
| 559 |
+
|
| 560 |
+
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
|
| 561 |
+
# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
|
| 562 |
+
# define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)(c))
|
| 563 |
+
|
| 564 |
+
/* BIO_s_file() */
|
| 565 |
+
# define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)(fp))
|
| 566 |
+
# define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)(fpp))
|
| 567 |
+
|
| 568 |
+
/* BIO_s_fd() and BIO_s_file() */
|
| 569 |
+
# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL)
|
| 570 |
+
# define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)
|
| 571 |
+
|
| 572 |
+
/*
|
| 573 |
+
* name is cast to lose const, but might be better to route through a
|
| 574 |
+
* function so we can do it safely
|
| 575 |
+
*/
|
| 576 |
+
# ifdef CONST_STRICT
|
| 577 |
+
/*
|
| 578 |
+
* If you are wondering why this isn't defined, its because CONST_STRICT is
|
| 579 |
+
* purely a compile-time kludge to allow const to be checked.
|
| 580 |
+
*/
|
| 581 |
+
int BIO_read_filename(BIO *b, const char *name);
|
| 582 |
+
# else
|
| 583 |
+
# define BIO_read_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 584 |
+
BIO_CLOSE|BIO_FP_READ,(char *)(name))
|
| 585 |
+
# endif
|
| 586 |
+
# define BIO_write_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 587 |
+
BIO_CLOSE|BIO_FP_WRITE,name)
|
| 588 |
+
# define BIO_append_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 589 |
+
BIO_CLOSE|BIO_FP_APPEND,name)
|
| 590 |
+
# define BIO_rw_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 591 |
+
BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name)
|
| 592 |
+
|
| 593 |
+
/*
|
| 594 |
+
* WARNING WARNING, this ups the reference count on the read bio of the SSL
|
| 595 |
+
* structure. This is because the ssl read BIO is now pointed to by the
|
| 596 |
+
* next_bio field in the bio. So when you free the BIO, make sure you are
|
| 597 |
+
* doing a BIO_free_all() to catch the underlying BIO.
|
| 598 |
+
*/
|
| 599 |
+
# define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)(ssl))
|
| 600 |
+
# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)(sslp))
|
| 601 |
+
# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
|
| 602 |
+
# define BIO_set_ssl_renegotiate_bytes(b,num) \
|
| 603 |
+
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL)
|
| 604 |
+
# define BIO_get_num_renegotiates(b) \
|
| 605 |
+
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL)
|
| 606 |
+
# define BIO_set_ssl_renegotiate_timeout(b,seconds) \
|
| 607 |
+
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL)
|
| 608 |
+
|
| 609 |
+
/* defined in evp.h */
|
| 610 |
+
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */
|
| 611 |
+
|
| 612 |
+
# define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)(pp))
|
| 613 |
+
# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)(bm))
|
| 614 |
+
# define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0, \
|
| 615 |
+
(char *)(pp))
|
| 616 |
+
# define BIO_set_mem_eof_return(b,v) \
|
| 617 |
+
BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL)
|
| 618 |
+
|
| 619 |
+
/* For the BIO_f_buffer() type */
|
| 620 |
+
# define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL)
|
| 621 |
+
# define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL)
|
| 622 |
+
# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0)
|
| 623 |
+
# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1)
|
| 624 |
+
# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf)
|
| 625 |
+
|
| 626 |
+
/* Don't use the next one unless you know what you are doing :-) */
|
| 627 |
+
# define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret))
|
| 628 |
+
|
| 629 |
+
# define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
|
| 630 |
+
# define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL)
|
| 631 |
+
# define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)
|
| 632 |
+
# define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL)
|
| 633 |
+
# define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
|
| 634 |
+
# define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL)
|
| 635 |
+
/* ...pending macros have inappropriate return type */
|
| 636 |
+
size_t BIO_ctrl_pending(BIO *b);
|
| 637 |
+
size_t BIO_ctrl_wpending(BIO *b);
|
| 638 |
+
# define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
|
| 639 |
+
# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
|
| 640 |
+
cbp)
|
| 641 |
+
# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)
|
| 642 |
+
|
| 643 |
+
/* For the BIO_f_buffer() type */
|
| 644 |
+
# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
|
| 645 |
+
# define BIO_buffer_peek(b,s,l) BIO_ctrl(b,BIO_CTRL_PEEK,(l),(s))
|
| 646 |
+
|
| 647 |
+
/* For BIO_s_bio() */
|
| 648 |
+
# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)
|
| 649 |
+
# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
|
| 650 |
+
# define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
|
| 651 |
+
# define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
|
| 652 |
+
# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
| 653 |
+
/* macros with inappropriate type -- but ...pending macros use int too: */
|
| 654 |
+
# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
|
| 655 |
+
# define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
|
| 656 |
+
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
| 657 |
+
size_t BIO_ctrl_get_read_request(BIO *b);
|
| 658 |
+
int BIO_ctrl_reset_read_request(BIO *b);
|
| 659 |
+
|
| 660 |
+
/* ctrl macros for dgram */
|
| 661 |
+
# define BIO_ctrl_dgram_connect(b,peer) \
|
| 662 |
+
(int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)(peer))
|
| 663 |
+
# define BIO_ctrl_set_connected(b,peer) \
|
| 664 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer))
|
| 665 |
+
# define BIO_dgram_recv_timedout(b) \
|
| 666 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
| 667 |
+
# define BIO_dgram_send_timedout(b) \
|
| 668 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
| 669 |
+
# define BIO_dgram_get_peer(b,peer) \
|
| 670 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer))
|
| 671 |
+
# define BIO_dgram_set_peer(b,peer) \
|
| 672 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer))
|
| 673 |
+
# define BIO_dgram_detect_peer_addr(b,peer) \
|
| 674 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_DETECT_PEER_ADDR, 0, (char *)(peer))
|
| 675 |
+
# define BIO_dgram_get_mtu_overhead(b) \
|
| 676 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
| 677 |
+
# define BIO_dgram_get_local_addr_cap(b) \
|
| 678 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP, 0, NULL)
|
| 679 |
+
# define BIO_dgram_get_local_addr_enable(b, penable) \
|
| 680 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE, 0, (char *)(penable))
|
| 681 |
+
# define BIO_dgram_set_local_addr_enable(b, enable) \
|
| 682 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
|
| 683 |
+
# define BIO_dgram_get_effective_caps(b) \
|
| 684 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
|
| 685 |
+
# define BIO_dgram_get_caps(b) \
|
| 686 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
|
| 687 |
+
# define BIO_dgram_set_caps(b, caps) \
|
| 688 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
|
| 689 |
+
# define BIO_dgram_get_no_trunc(b) \
|
| 690 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_NO_TRUNC, 0, NULL)
|
| 691 |
+
# define BIO_dgram_set_no_trunc(b, enable) \
|
| 692 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_NO_TRUNC, (enable), NULL)
|
| 693 |
+
# define BIO_dgram_get_mtu(b) \
|
| 694 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU, 0, NULL)
|
| 695 |
+
# define BIO_dgram_set_mtu(b, mtu) \
|
| 696 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_MTU, (mtu), NULL)
|
| 697 |
+
# define BIO_dgram_set0_local_addr(b, addr) \
|
| 698 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET0_LOCAL_ADDR, 0, (addr))
|
| 699 |
+
|
| 700 |
+
/* ctrl macros for BIO_f_prefix */
|
| 701 |
+
# define BIO_set_prefix(b,p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
| 702 |
+
# define BIO_set_indent(b,i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
| 703 |
+
# define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
| 704 |
+
|
| 705 |
+
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 706 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
| 707 |
+
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
| 708 |
+
void *BIO_get_ex_data(const BIO *bio, int idx);
|
| 709 |
+
uint64_t BIO_number_read(BIO *bio);
|
| 710 |
+
uint64_t BIO_number_written(BIO *bio);
|
| 711 |
+
|
| 712 |
+
/* For BIO_f_asn1() */
|
| 713 |
+
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
|
| 714 |
+
asn1_ps_func *prefix_free);
|
| 715 |
+
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
|
| 716 |
+
asn1_ps_func **pprefix_free);
|
| 717 |
+
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
|
| 718 |
+
asn1_ps_func *suffix_free);
|
| 719 |
+
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
|
| 720 |
+
asn1_ps_func **psuffix_free);
|
| 721 |
+
|
| 722 |
+
const BIO_METHOD *BIO_s_file(void);
|
| 723 |
+
BIO *BIO_new_file(const char *filename, const char *mode);
|
| 724 |
+
BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
| 725 |
+
# ifndef OPENSSL_NO_STDIO
|
| 726 |
+
BIO *BIO_new_fp(FILE *stream, int close_flag);
|
| 727 |
+
# endif
|
| 728 |
+
BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
|
| 729 |
+
BIO *BIO_new(const BIO_METHOD *type);
|
| 730 |
+
int BIO_free(BIO *a);
|
| 731 |
+
void BIO_set_data(BIO *a, void *ptr);
|
| 732 |
+
void *BIO_get_data(BIO *a);
|
| 733 |
+
void BIO_set_init(BIO *a, int init);
|
| 734 |
+
int BIO_get_init(BIO *a);
|
| 735 |
+
void BIO_set_shutdown(BIO *a, int shut);
|
| 736 |
+
int BIO_get_shutdown(BIO *a);
|
| 737 |
+
void BIO_vfree(BIO *a);
|
| 738 |
+
int BIO_up_ref(BIO *a);
|
| 739 |
+
int BIO_read(BIO *b, void *data, int dlen);
|
| 740 |
+
int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
|
| 741 |
+
__owur int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
| 742 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 743 |
+
size_t *msgs_processed);
|
| 744 |
+
int BIO_gets(BIO *bp, char *buf, int size);
|
| 745 |
+
int BIO_get_line(BIO *bio, char *buf, int size);
|
| 746 |
+
int BIO_write(BIO *b, const void *data, int dlen);
|
| 747 |
+
int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
|
| 748 |
+
__owur int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
| 749 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 750 |
+
size_t *msgs_processed);
|
| 751 |
+
__owur int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 752 |
+
__owur int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 753 |
+
int BIO_puts(BIO *bp, const char *buf);
|
| 754 |
+
int BIO_indent(BIO *b, int indent, int max);
|
| 755 |
+
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
| 756 |
+
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
|
| 757 |
+
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
|
| 758 |
+
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
|
| 759 |
+
BIO *BIO_push(BIO *b, BIO *append);
|
| 760 |
+
BIO *BIO_pop(BIO *b);
|
| 761 |
+
void BIO_free_all(BIO *a);
|
| 762 |
+
BIO *BIO_find_type(BIO *b, int bio_type);
|
| 763 |
+
BIO *BIO_next(BIO *b);
|
| 764 |
+
void BIO_set_next(BIO *b, BIO *next);
|
| 765 |
+
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
|
| 766 |
+
int BIO_get_retry_reason(BIO *bio);
|
| 767 |
+
void BIO_set_retry_reason(BIO *bio, int reason);
|
| 768 |
+
BIO *BIO_dup_chain(BIO *in);
|
| 769 |
+
|
| 770 |
+
int BIO_nread0(BIO *bio, char **buf);
|
| 771 |
+
int BIO_nread(BIO *bio, char **buf, int num);
|
| 772 |
+
int BIO_nwrite0(BIO *bio, char **buf);
|
| 773 |
+
int BIO_nwrite(BIO *bio, char **buf, int num);
|
| 774 |
+
|
| 775 |
+
const BIO_METHOD *BIO_s_mem(void);
|
| 776 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 777 |
+
const BIO_METHOD *BIO_s_dgram_mem(void);
|
| 778 |
+
# endif
|
| 779 |
+
const BIO_METHOD *BIO_s_secmem(void);
|
| 780 |
+
BIO *BIO_new_mem_buf(const void *buf, int len);
|
| 781 |
+
# ifndef OPENSSL_NO_SOCK
|
| 782 |
+
const BIO_METHOD *BIO_s_socket(void);
|
| 783 |
+
const BIO_METHOD *BIO_s_connect(void);
|
| 784 |
+
const BIO_METHOD *BIO_s_accept(void);
|
| 785 |
+
# endif
|
| 786 |
+
const BIO_METHOD *BIO_s_fd(void);
|
| 787 |
+
const BIO_METHOD *BIO_s_log(void);
|
| 788 |
+
const BIO_METHOD *BIO_s_bio(void);
|
| 789 |
+
const BIO_METHOD *BIO_s_null(void);
|
| 790 |
+
const BIO_METHOD *BIO_f_null(void);
|
| 791 |
+
const BIO_METHOD *BIO_f_buffer(void);
|
| 792 |
+
const BIO_METHOD *BIO_f_readbuffer(void);
|
| 793 |
+
const BIO_METHOD *BIO_f_linebuffer(void);
|
| 794 |
+
const BIO_METHOD *BIO_f_nbio_test(void);
|
| 795 |
+
const BIO_METHOD *BIO_f_prefix(void);
|
| 796 |
+
const BIO_METHOD *BIO_s_core(void);
|
| 797 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 798 |
+
const BIO_METHOD *BIO_s_dgram_pair(void);
|
| 799 |
+
const BIO_METHOD *BIO_s_datagram(void);
|
| 800 |
+
int BIO_dgram_non_fatal_error(int error);
|
| 801 |
+
BIO *BIO_new_dgram(int fd, int close_flag);
|
| 802 |
+
# ifndef OPENSSL_NO_SCTP
|
| 803 |
+
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
| 804 |
+
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
| 805 |
+
int BIO_dgram_is_sctp(BIO *bio);
|
| 806 |
+
int BIO_dgram_sctp_notification_cb(BIO *b,
|
| 807 |
+
BIO_dgram_sctp_notification_handler_fn handle_notifications,
|
| 808 |
+
void *context);
|
| 809 |
+
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
| 810 |
+
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
| 811 |
+
# endif
|
| 812 |
+
# endif
|
| 813 |
+
|
| 814 |
+
# ifndef OPENSSL_NO_SOCK
|
| 815 |
+
int BIO_sock_should_retry(int i);
|
| 816 |
+
int BIO_sock_non_fatal_error(int error);
|
| 817 |
+
int BIO_err_is_non_fatal(unsigned int errcode);
|
| 818 |
+
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
| 819 |
+
# endif
|
| 820 |
+
int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
| 821 |
+
int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
| 822 |
+
|
| 823 |
+
int BIO_fd_should_retry(int i);
|
| 824 |
+
int BIO_fd_non_fatal_error(int error);
|
| 825 |
+
int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
|
| 826 |
+
void *u, const void *s, int len);
|
| 827 |
+
int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
|
| 828 |
+
void *u, const void *s, int len, int indent);
|
| 829 |
+
int BIO_dump(BIO *b, const void *bytes, int len);
|
| 830 |
+
int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
|
| 831 |
+
# ifndef OPENSSL_NO_STDIO
|
| 832 |
+
int BIO_dump_fp(FILE *fp, const void *s, int len);
|
| 833 |
+
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
|
| 834 |
+
# endif
|
| 835 |
+
int BIO_hex_string(BIO *out, int indent, int width, const void *data,
|
| 836 |
+
int datalen);
|
| 837 |
+
|
| 838 |
+
# ifndef OPENSSL_NO_SOCK
|
| 839 |
+
BIO_ADDR *BIO_ADDR_new(void);
|
| 840 |
+
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
|
| 841 |
+
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
|
| 842 |
+
int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
|
| 843 |
+
const void *where, size_t wherelen, unsigned short port);
|
| 844 |
+
void BIO_ADDR_free(BIO_ADDR *);
|
| 845 |
+
void BIO_ADDR_clear(BIO_ADDR *ap);
|
| 846 |
+
int BIO_ADDR_family(const BIO_ADDR *ap);
|
| 847 |
+
int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
|
| 848 |
+
unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
|
| 849 |
+
char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
|
| 850 |
+
char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
| 851 |
+
char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
| 852 |
+
|
| 853 |
+
const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
|
| 854 |
+
int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
|
| 855 |
+
int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
|
| 856 |
+
int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
|
| 857 |
+
const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
| 858 |
+
void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
| 859 |
+
|
| 860 |
+
enum BIO_hostserv_priorities {
|
| 861 |
+
BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV
|
| 862 |
+
};
|
| 863 |
+
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
| 864 |
+
enum BIO_hostserv_priorities hostserv_prio);
|
| 865 |
+
enum BIO_lookup_type {
|
| 866 |
+
BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER
|
| 867 |
+
};
|
| 868 |
+
int BIO_lookup(const char *host, const char *service,
|
| 869 |
+
enum BIO_lookup_type lookup_type,
|
| 870 |
+
int family, int socktype, BIO_ADDRINFO **res);
|
| 871 |
+
int BIO_lookup_ex(const char *host, const char *service,
|
| 872 |
+
int lookup_type, int family, int socktype, int protocol,
|
| 873 |
+
BIO_ADDRINFO **res);
|
| 874 |
+
int BIO_sock_error(int sock);
|
| 875 |
+
int BIO_socket_ioctl(int fd, long type, void *arg);
|
| 876 |
+
int BIO_socket_nbio(int fd, int mode);
|
| 877 |
+
int BIO_sock_init(void);
|
| 878 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 879 |
+
# define BIO_sock_cleanup() while(0) continue
|
| 880 |
+
# endif
|
| 881 |
+
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
| 882 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 883 |
+
OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name);
|
| 884 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr);
|
| 885 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip);
|
| 886 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode);
|
| 887 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port);
|
| 888 |
+
# endif
|
| 889 |
+
|
| 890 |
+
union BIO_sock_info_u {
|
| 891 |
+
BIO_ADDR *addr;
|
| 892 |
+
};
|
| 893 |
+
enum BIO_sock_info_type {
|
| 894 |
+
BIO_SOCK_INFO_ADDRESS
|
| 895 |
+
};
|
| 896 |
+
int BIO_sock_info(int sock,
|
| 897 |
+
enum BIO_sock_info_type type, union BIO_sock_info_u *info);
|
| 898 |
+
|
| 899 |
+
# define BIO_SOCK_REUSEADDR 0x01
|
| 900 |
+
# define BIO_SOCK_V6_ONLY 0x02
|
| 901 |
+
# define BIO_SOCK_KEEPALIVE 0x04
|
| 902 |
+
# define BIO_SOCK_NONBLOCK 0x08
|
| 903 |
+
# define BIO_SOCK_NODELAY 0x10
|
| 904 |
+
# define BIO_SOCK_TFO 0x20
|
| 905 |
+
|
| 906 |
+
int BIO_socket(int domain, int socktype, int protocol, int options);
|
| 907 |
+
int BIO_connect(int sock, const BIO_ADDR *addr, int options);
|
| 908 |
+
int BIO_bind(int sock, const BIO_ADDR *addr, int options);
|
| 909 |
+
int BIO_listen(int sock, const BIO_ADDR *addr, int options);
|
| 910 |
+
int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
|
| 911 |
+
int BIO_closesocket(int sock);
|
| 912 |
+
|
| 913 |
+
BIO *BIO_new_socket(int sock, int close_flag);
|
| 914 |
+
BIO *BIO_new_connect(const char *host_port);
|
| 915 |
+
BIO *BIO_new_accept(const char *host_port);
|
| 916 |
+
# endif /* OPENSSL_NO_SOCK*/
|
| 917 |
+
|
| 918 |
+
BIO *BIO_new_fd(int fd, int close_flag);
|
| 919 |
+
|
| 920 |
+
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
|
| 921 |
+
BIO **bio2, size_t writebuf2);
|
| 922 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 923 |
+
int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
|
| 924 |
+
BIO **bio2, size_t writebuf2);
|
| 925 |
+
# endif
|
| 926 |
+
|
| 927 |
+
/*
|
| 928 |
+
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
|
| 929 |
+
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
|
| 930 |
+
* value.
|
| 931 |
+
*/
|
| 932 |
+
|
| 933 |
+
void BIO_copy_next_retry(BIO *b);
|
| 934 |
+
|
| 935 |
+
/*
|
| 936 |
+
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
|
| 937 |
+
*/
|
| 938 |
+
|
| 939 |
+
# define ossl_bio__attr__(x)
|
| 940 |
+
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
|
| 941 |
+
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
|
| 942 |
+
&& !defined(__APPLE__)
|
| 943 |
+
/*
|
| 944 |
+
* Because we support the 'z' modifier, which made its appearance in C99,
|
| 945 |
+
* we can't use __attribute__ with pre C99 dialects.
|
| 946 |
+
*/
|
| 947 |
+
# if __STDC_VERSION__ >= 199901L
|
| 948 |
+
# undef ossl_bio__attr__
|
| 949 |
+
# define ossl_bio__attr__ __attribute__
|
| 950 |
+
# if __GNUC__*10 + __GNUC_MINOR__ >= 44
|
| 951 |
+
# define ossl_bio__printf__ __gnu_printf__
|
| 952 |
+
# else
|
| 953 |
+
# define ossl_bio__printf__ __printf__
|
| 954 |
+
# endif
|
| 955 |
+
# endif
|
| 956 |
+
# endif
|
| 957 |
+
int BIO_printf(BIO *bio, const char *format, ...)
|
| 958 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
|
| 959 |
+
int BIO_vprintf(BIO *bio, const char *format, va_list args)
|
| 960 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
|
| 961 |
+
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
|
| 962 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
|
| 963 |
+
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
| 964 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
|
| 965 |
+
# undef ossl_bio__attr__
|
| 966 |
+
# undef ossl_bio__printf__
|
| 967 |
+
|
| 968 |
+
|
| 969 |
+
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
| 970 |
+
void BIO_meth_free(BIO_METHOD *biom);
|
| 971 |
+
int BIO_meth_set_write(BIO_METHOD *biom,
|
| 972 |
+
int (*write) (BIO *, const char *, int));
|
| 973 |
+
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
| 974 |
+
int (*bwrite) (BIO *, const char *, size_t, size_t *));
|
| 975 |
+
int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
|
| 976 |
+
int (*f) (BIO *, BIO_MSG *, size_t, size_t,
|
| 977 |
+
uint64_t, size_t *));
|
| 978 |
+
int BIO_meth_set_read(BIO_METHOD *biom,
|
| 979 |
+
int (*read) (BIO *, char *, int));
|
| 980 |
+
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
| 981 |
+
int (*bread) (BIO *, char *, size_t, size_t *));
|
| 982 |
+
int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
|
| 983 |
+
int (*f) (BIO *, BIO_MSG *, size_t, size_t,
|
| 984 |
+
uint64_t, size_t *));
|
| 985 |
+
int BIO_meth_set_puts(BIO_METHOD *biom,
|
| 986 |
+
int (*puts) (BIO *, const char *));
|
| 987 |
+
int BIO_meth_set_gets(BIO_METHOD *biom,
|
| 988 |
+
int (*ossl_gets) (BIO *, char *, int));
|
| 989 |
+
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
| 990 |
+
long (*ctrl) (BIO *, int, long, void *));
|
| 991 |
+
int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *));
|
| 992 |
+
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *));
|
| 993 |
+
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
| 994 |
+
long (*callback_ctrl) (BIO *, int,
|
| 995 |
+
BIO_info_cb *));
|
| 996 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_5
|
| 997 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *,
|
| 998 |
+
int);
|
| 999 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *,
|
| 1000 |
+
size_t, size_t *);
|
| 1001 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1002 |
+
size_t, size_t,
|
| 1003 |
+
uint64_t, size_t *);
|
| 1004 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int);
|
| 1005 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *,
|
| 1006 |
+
size_t, size_t *);
|
| 1007 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1008 |
+
size_t, size_t,
|
| 1009 |
+
uint64_t, size_t *);
|
| 1010 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *);
|
| 1011 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int);
|
| 1012 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int,
|
| 1013 |
+
long, void *);
|
| 1014 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
|
| 1015 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
|
| 1016 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom)) (BIO *, int,
|
| 1017 |
+
BIO_info_cb *);
|
| 1018 |
+
# endif
|
| 1019 |
+
# ifdef __cplusplus
|
| 1020 |
+
}
|
| 1021 |
+
# endif
|
| 1022 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/cmp.h
ADDED
|
@@ -0,0 +1,727 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cmp.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2007-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright Nokia 2007-2019
|
| 7 |
+
* Copyright Siemens AG 2015-2019
|
| 8 |
+
*
|
| 9 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 10 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 11 |
+
* in the file LICENSE in the source distribution or at
|
| 12 |
+
* https://www.openssl.org/source/license.html
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CMP_H
|
| 18 |
+
# define OPENSSL_CMP_H
|
| 19 |
+
|
| 20 |
+
# include <openssl/opensslconf.h>
|
| 21 |
+
# ifndef OPENSSL_NO_CMP
|
| 22 |
+
|
| 23 |
+
# include <openssl/crmf.h>
|
| 24 |
+
# include <openssl/cmperr.h>
|
| 25 |
+
# include <openssl/cmp_util.h>
|
| 26 |
+
# include <openssl/http.h>
|
| 27 |
+
|
| 28 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 29 |
+
# include <openssl/types.h>
|
| 30 |
+
# include <openssl/safestack.h>
|
| 31 |
+
# include <openssl/x509.h>
|
| 32 |
+
# include <openssl/x509v3.h>
|
| 33 |
+
|
| 34 |
+
# ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
# endif
|
| 37 |
+
|
| 38 |
+
# define OSSL_CMP_PVNO_2 2
|
| 39 |
+
# define OSSL_CMP_PVNO_3 3
|
| 40 |
+
# define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
| 41 |
+
|
| 42 |
+
/*-
|
| 43 |
+
* PKIFailureInfo ::= BIT STRING {
|
| 44 |
+
* -- since we can fail in more than one way!
|
| 45 |
+
* -- More codes may be added in the future if/when required.
|
| 46 |
+
* badAlg (0),
|
| 47 |
+
* -- unrecognized or unsupported Algorithm Identifier
|
| 48 |
+
* badMessageCheck (1),
|
| 49 |
+
* -- integrity check failed (e.g., signature did not verify)
|
| 50 |
+
* badRequest (2),
|
| 51 |
+
* -- transaction not permitted or supported
|
| 52 |
+
* badTime (3),
|
| 53 |
+
* -- messageTime was not sufficiently close to the system time,
|
| 54 |
+
* -- as defined by local policy
|
| 55 |
+
* badCertId (4),
|
| 56 |
+
* -- no certificate could be found matching the provided criteria
|
| 57 |
+
* badDataFormat (5),
|
| 58 |
+
* -- the data submitted has the wrong format
|
| 59 |
+
* wrongAuthority (6),
|
| 60 |
+
* -- the authority indicated in the request is different from the
|
| 61 |
+
* -- one creating the response token
|
| 62 |
+
* incorrectData (7),
|
| 63 |
+
* -- the requester's data is incorrect (for notary services)
|
| 64 |
+
* missingTimeStamp (8),
|
| 65 |
+
* -- when the timestamp is missing but should be there
|
| 66 |
+
* -- (by policy)
|
| 67 |
+
* badPOP (9),
|
| 68 |
+
* -- the proof-of-possession failed
|
| 69 |
+
* certRevoked (10),
|
| 70 |
+
* -- the certificate has already been revoked
|
| 71 |
+
* certConfirmed (11),
|
| 72 |
+
* -- the certificate has already been confirmed
|
| 73 |
+
* wrongIntegrity (12),
|
| 74 |
+
* -- invalid integrity, password based instead of signature or
|
| 75 |
+
* -- vice versa
|
| 76 |
+
* badRecipientNonce (13),
|
| 77 |
+
* -- invalid recipient nonce, either missing or wrong value
|
| 78 |
+
* timeNotAvailable (14),
|
| 79 |
+
* -- the TSA's time source is not available
|
| 80 |
+
* unacceptedPolicy (15),
|
| 81 |
+
* -- the requested TSA policy is not supported by the TSA.
|
| 82 |
+
* unacceptedExtension (16),
|
| 83 |
+
* -- the requested extension is not supported by the TSA.
|
| 84 |
+
* addInfoNotAvailable (17),
|
| 85 |
+
* -- the additional information requested could not be
|
| 86 |
+
* -- understood or is not available
|
| 87 |
+
* badSenderNonce (18),
|
| 88 |
+
* -- invalid sender nonce, either missing or wrong size
|
| 89 |
+
* badCertTemplate (19),
|
| 90 |
+
* -- invalid cert. template or missing mandatory information
|
| 91 |
+
* signerNotTrusted (20),
|
| 92 |
+
* -- signer of the message unknown or not trusted
|
| 93 |
+
* transactionIdInUse (21),
|
| 94 |
+
* -- the transaction identifier is already in use
|
| 95 |
+
* unsupportedVersion (22),
|
| 96 |
+
* -- the version of the message is not supported
|
| 97 |
+
* notAuthorized (23),
|
| 98 |
+
* -- the sender was not authorized to make the preceding
|
| 99 |
+
* -- request or perform the preceding action
|
| 100 |
+
* systemUnavail (24),
|
| 101 |
+
* -- the request cannot be handled due to system unavailability
|
| 102 |
+
* systemFailure (25),
|
| 103 |
+
* -- the request cannot be handled due to system failure
|
| 104 |
+
* duplicateCertReq (26)
|
| 105 |
+
* -- certificate cannot be issued because a duplicate
|
| 106 |
+
* -- certificate already exists
|
| 107 |
+
* }
|
| 108 |
+
*/
|
| 109 |
+
# define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
| 110 |
+
# define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
| 111 |
+
# define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
| 112 |
+
# define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
| 113 |
+
# define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
| 114 |
+
# define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
| 115 |
+
# define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
| 116 |
+
# define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
| 117 |
+
# define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
| 118 |
+
# define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
| 119 |
+
# define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
| 120 |
+
# define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
| 121 |
+
# define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
| 122 |
+
# define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
| 123 |
+
# define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
| 124 |
+
# define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
| 125 |
+
# define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
| 126 |
+
# define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
| 127 |
+
# define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
| 128 |
+
# define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
| 129 |
+
# define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
| 130 |
+
# define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
| 131 |
+
# define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
| 132 |
+
# define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
| 133 |
+
# define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
| 134 |
+
# define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
| 135 |
+
# define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
| 136 |
+
# define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
| 137 |
+
# define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
| 138 |
+
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
| 139 |
+
# if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
| 140 |
+
# error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
| 141 |
+
# endif
|
| 142 |
+
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
| 143 |
+
|
| 144 |
+
# define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
| 145 |
+
# define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
| 146 |
+
# define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
| 147 |
+
# define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
| 148 |
+
# define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
| 149 |
+
# define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
| 150 |
+
# define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
| 151 |
+
# define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
| 152 |
+
# define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
| 153 |
+
# define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
| 154 |
+
# define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
| 155 |
+
# define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
| 156 |
+
# define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
| 157 |
+
# define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
| 158 |
+
# define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
| 159 |
+
# define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
| 160 |
+
# define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
| 161 |
+
# define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
| 162 |
+
# define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
| 163 |
+
# define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
| 164 |
+
# define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
| 165 |
+
# define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
| 166 |
+
# define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
| 167 |
+
# define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
| 168 |
+
# define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
| 169 |
+
# define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
| 170 |
+
# define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
| 171 |
+
|
| 172 |
+
/*-
|
| 173 |
+
* PKIStatus ::= INTEGER {
|
| 174 |
+
* accepted (0),
|
| 175 |
+
* -- you got exactly what you asked for
|
| 176 |
+
* grantedWithMods (1),
|
| 177 |
+
* -- you got something like what you asked for; the
|
| 178 |
+
* -- requester is responsible for ascertaining the differences
|
| 179 |
+
* rejection (2),
|
| 180 |
+
* -- you don't get it, more information elsewhere in the message
|
| 181 |
+
* waiting (3),
|
| 182 |
+
* -- the request body part has not yet been processed; expect to
|
| 183 |
+
* -- hear more later (note: proper handling of this status
|
| 184 |
+
* -- response MAY use the polling req/rep PKIMessages specified
|
| 185 |
+
* -- in Section 5.3.22; alternatively, polling in the underlying
|
| 186 |
+
* -- transport layer MAY have some utility in this regard)
|
| 187 |
+
* revocationWarning (4),
|
| 188 |
+
* -- this message contains a warning that a revocation is
|
| 189 |
+
* -- imminent
|
| 190 |
+
* revocationNotification (5),
|
| 191 |
+
* -- notification that a revocation has occurred
|
| 192 |
+
* keyUpdateWarning (6)
|
| 193 |
+
* -- update already done for the oldCertId specified in
|
| 194 |
+
* -- CertReqMsg
|
| 195 |
+
* }
|
| 196 |
+
*/
|
| 197 |
+
# define OSSL_CMP_PKISTATUS_request -3
|
| 198 |
+
# define OSSL_CMP_PKISTATUS_trans -2
|
| 199 |
+
# define OSSL_CMP_PKISTATUS_unspecified -1
|
| 200 |
+
# define OSSL_CMP_PKISTATUS_accepted 0
|
| 201 |
+
# define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
| 202 |
+
# define OSSL_CMP_PKISTATUS_rejection 2
|
| 203 |
+
# define OSSL_CMP_PKISTATUS_waiting 3
|
| 204 |
+
# define OSSL_CMP_PKISTATUS_revocationWarning 4
|
| 205 |
+
# define OSSL_CMP_PKISTATUS_revocationNotification 5
|
| 206 |
+
# define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
| 207 |
+
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
| 208 |
+
|
| 209 |
+
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
| 210 |
+
|
| 211 |
+
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
| 212 |
+
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
| 213 |
+
|
| 214 |
+
/* data type declarations */
|
| 215 |
+
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
| 216 |
+
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
|
| 217 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
|
| 218 |
+
typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
| 219 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
| 220 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
| 221 |
+
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
| 222 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
| 223 |
+
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 224 |
+
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
| 225 |
+
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 226 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_null())
|
| 227 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp), (n)))
|
| 228 |
+
#define sk_OSSL_CMP_CERTSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (n))
|
| 229 |
+
#define sk_OSSL_CMP_CERTSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 230 |
+
#define sk_OSSL_CMP_CERTSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 231 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete(sk, i) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (i)))
|
| 232 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 233 |
+
#define sk_OSSL_CMP_CERTSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 234 |
+
#define sk_OSSL_CMP_CERTSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 235 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 236 |
+
#define sk_OSSL_CMP_CERTSTATUS_shift(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 237 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc))
|
| 238 |
+
#define sk_OSSL_CMP_CERTSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), (idx))
|
| 239 |
+
#define sk_OSSL_CMP_CERTSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 240 |
+
#define sk_OSSL_CMP_CERTSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 241 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 242 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), pnum)
|
| 243 |
+
#define sk_OSSL_CMP_CERTSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 244 |
+
#define sk_OSSL_CMP_CERTSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 245 |
+
#define sk_OSSL_CMP_CERTSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 246 |
+
#define sk_OSSL_CMP_CERTSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc)))
|
| 247 |
+
#define sk_OSSL_CMP_CERTSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 248 |
+
|
| 249 |
+
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
| 250 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
| 251 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
| 252 |
+
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 253 |
+
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
| 254 |
+
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 255 |
+
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_null())
|
| 256 |
+
#define sk_OSSL_CMP_ITAV_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp), (n)))
|
| 257 |
+
#define sk_OSSL_CMP_ITAV_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (n))
|
| 258 |
+
#define sk_OSSL_CMP_ITAV_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 259 |
+
#define sk_OSSL_CMP_ITAV_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 260 |
+
#define sk_OSSL_CMP_ITAV_delete(sk, i) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (i)))
|
| 261 |
+
#define sk_OSSL_CMP_ITAV_delete_ptr(sk, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 262 |
+
#define sk_OSSL_CMP_ITAV_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 263 |
+
#define sk_OSSL_CMP_ITAV_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 264 |
+
#define sk_OSSL_CMP_ITAV_pop(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 265 |
+
#define sk_OSSL_CMP_ITAV_shift(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 266 |
+
#define sk_OSSL_CMP_ITAV_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk),ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc))
|
| 267 |
+
#define sk_OSSL_CMP_ITAV_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), (idx))
|
| 268 |
+
#define sk_OSSL_CMP_ITAV_set(sk, idx, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_set(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (idx), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 269 |
+
#define sk_OSSL_CMP_ITAV_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 270 |
+
#define sk_OSSL_CMP_ITAV_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 271 |
+
#define sk_OSSL_CMP_ITAV_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), pnum)
|
| 272 |
+
#define sk_OSSL_CMP_ITAV_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 273 |
+
#define sk_OSSL_CMP_ITAV_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 274 |
+
#define sk_OSSL_CMP_ITAV_dup(sk) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk)))
|
| 275 |
+
#define sk_OSSL_CMP_ITAV_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc)))
|
| 276 |
+
#define sk_OSSL_CMP_ITAV_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_ITAV_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
typedef struct ossl_cmp_crlstatus_st OSSL_CMP_CRLSTATUS;
|
| 280 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS)
|
| 281 |
+
#define sk_OSSL_CMP_CRLSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 282 |
+
#define sk_OSSL_CMP_CRLSTATUS_value(sk, idx) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx)))
|
| 283 |
+
#define sk_OSSL_CMP_CRLSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 284 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_null() ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_null())
|
| 285 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp), (n)))
|
| 286 |
+
#define sk_OSSL_CMP_CRLSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (n))
|
| 287 |
+
#define sk_OSSL_CMP_CRLSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 288 |
+
#define sk_OSSL_CMP_CRLSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 289 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete(sk, i) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (i)))
|
| 290 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 291 |
+
#define sk_OSSL_CMP_CRLSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 292 |
+
#define sk_OSSL_CMP_CRLSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 293 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 294 |
+
#define sk_OSSL_CMP_CRLSTATUS_shift(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 295 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc))
|
| 296 |
+
#define sk_OSSL_CMP_CRLSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), (idx))
|
| 297 |
+
#define sk_OSSL_CMP_CRLSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 298 |
+
#define sk_OSSL_CMP_CRLSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 299 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 300 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), pnum)
|
| 301 |
+
#define sk_OSSL_CMP_CRLSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 302 |
+
#define sk_OSSL_CMP_CRLSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 303 |
+
#define sk_OSSL_CMP_CRLSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 304 |
+
#define sk_OSSL_CMP_CRLSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc)))
|
| 305 |
+
#define sk_OSSL_CMP_CRLSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CRLSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
typedef OSSL_CRMF_ATTRIBUTETYPEANDVALUE OSSL_CMP_ATAV;
|
| 309 |
+
# define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
| 310 |
+
typedef STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) OSSL_CMP_ATAVS;
|
| 311 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ATAVS)
|
| 312 |
+
# define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
| 313 |
+
# define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
| 314 |
+
# define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
| 315 |
+
# define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
| 316 |
+
# define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
| 317 |
+
|
| 318 |
+
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
| 319 |
+
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
| 320 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
| 321 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
| 322 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
| 323 |
+
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 324 |
+
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
| 325 |
+
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 326 |
+
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_null())
|
| 327 |
+
#define sk_OSSL_CMP_PKISI_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp), (n)))
|
| 328 |
+
#define sk_OSSL_CMP_PKISI_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (n))
|
| 329 |
+
#define sk_OSSL_CMP_PKISI_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 330 |
+
#define sk_OSSL_CMP_PKISI_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 331 |
+
#define sk_OSSL_CMP_PKISI_delete(sk, i) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (i)))
|
| 332 |
+
#define sk_OSSL_CMP_PKISI_delete_ptr(sk, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 333 |
+
#define sk_OSSL_CMP_PKISI_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 334 |
+
#define sk_OSSL_CMP_PKISI_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 335 |
+
#define sk_OSSL_CMP_PKISI_pop(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 336 |
+
#define sk_OSSL_CMP_PKISI_shift(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 337 |
+
#define sk_OSSL_CMP_PKISI_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk),ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc))
|
| 338 |
+
#define sk_OSSL_CMP_PKISI_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), (idx))
|
| 339 |
+
#define sk_OSSL_CMP_PKISI_set(sk, idx, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_set(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (idx), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 340 |
+
#define sk_OSSL_CMP_PKISI_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 341 |
+
#define sk_OSSL_CMP_PKISI_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 342 |
+
#define sk_OSSL_CMP_PKISI_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), pnum)
|
| 343 |
+
#define sk_OSSL_CMP_PKISI_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 344 |
+
#define sk_OSSL_CMP_PKISI_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 345 |
+
#define sk_OSSL_CMP_PKISI_dup(sk) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk)))
|
| 346 |
+
#define sk_OSSL_CMP_PKISI_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc)))
|
| 347 |
+
#define sk_OSSL_CMP_PKISI_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_PKISI_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 348 |
+
|
| 349 |
+
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
| 350 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
| 351 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 352 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
| 353 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 354 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_null())
|
| 355 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp), (n)))
|
| 356 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (n))
|
| 357 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 358 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 359 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete(sk, i) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (i)))
|
| 360 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 361 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 362 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 363 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 364 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_shift(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 365 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk),ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc))
|
| 366 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), (idx))
|
| 367 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set(sk, idx, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 368 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 369 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 370 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), pnum)
|
| 371 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 372 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 373 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_dup(sk) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 374 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc)))
|
| 375 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTREPMESSAGE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 376 |
+
|
| 377 |
+
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
| 378 |
+
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
| 379 |
+
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
| 380 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
| 381 |
+
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 382 |
+
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
| 383 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 384 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_null())
|
| 385 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp), (n)))
|
| 386 |
+
#define sk_OSSL_CMP_CERTRESPONSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (n))
|
| 387 |
+
#define sk_OSSL_CMP_CERTRESPONSE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 388 |
+
#define sk_OSSL_CMP_CERTRESPONSE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 389 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete(sk, i) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (i)))
|
| 390 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 391 |
+
#define sk_OSSL_CMP_CERTRESPONSE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 392 |
+
#define sk_OSSL_CMP_CERTRESPONSE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 393 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 394 |
+
#define sk_OSSL_CMP_CERTRESPONSE_shift(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 395 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk),ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc))
|
| 396 |
+
#define sk_OSSL_CMP_CERTRESPONSE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), (idx))
|
| 397 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set(sk, idx, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 398 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 399 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 400 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), pnum)
|
| 401 |
+
#define sk_OSSL_CMP_CERTRESPONSE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 402 |
+
#define sk_OSSL_CMP_CERTRESPONSE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 403 |
+
#define sk_OSSL_CMP_CERTRESPONSE_dup(sk) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 404 |
+
#define sk_OSSL_CMP_CERTRESPONSE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc)))
|
| 405 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTRESPONSE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 406 |
+
|
| 407 |
+
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
| 408 |
+
|
| 409 |
+
/*
|
| 410 |
+
* function DECLARATIONS
|
| 411 |
+
*/
|
| 412 |
+
|
| 413 |
+
/* from cmp_asn.c */
|
| 414 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 415 |
+
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
| 416 |
+
ASN1_TYPE *value);
|
| 417 |
+
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
| 418 |
+
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
| 419 |
+
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **sk_p,
|
| 420 |
+
OSSL_CMP_ITAV *itav);
|
| 421 |
+
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
| 422 |
+
|
| 423 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new0_certProfile(STACK_OF(ASN1_UTF8STRING)
|
| 424 |
+
*certProfile);
|
| 425 |
+
int OSSL_CMP_ITAV_get0_certProfile(const OSSL_CMP_ITAV *itav,
|
| 426 |
+
STACK_OF(ASN1_UTF8STRING) **out);
|
| 427 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
|
| 428 |
+
int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
|
| 429 |
+
|
| 430 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
|
| 431 |
+
int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
|
| 432 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
|
| 433 |
+
const X509 *newWithOld,
|
| 434 |
+
const X509 *oldWithNew);
|
| 435 |
+
int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
|
| 436 |
+
X509 **newWithNew,
|
| 437 |
+
X509 **newWithOld,
|
| 438 |
+
X509 **oldWithNew);
|
| 439 |
+
|
| 440 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
|
| 441 |
+
const X509 *cert, int only_DN);
|
| 442 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
|
| 443 |
+
const GENERAL_NAMES *issuer,
|
| 444 |
+
const ASN1_TIME *thisUpdate);
|
| 445 |
+
int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
|
| 446 |
+
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
| 447 |
+
ASN1_TIME **thisUpdate);
|
| 448 |
+
void OSSL_CMP_CRLSTATUS_free(OSSL_CMP_CRLSTATUS *crlstatus);
|
| 449 |
+
OSSL_CMP_ITAV
|
| 450 |
+
*OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
|
| 451 |
+
int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
|
| 452 |
+
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
| 453 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crls);
|
| 454 |
+
int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *it, STACK_OF(X509_CRL) **out);
|
| 455 |
+
OSSL_CMP_ITAV
|
| 456 |
+
*OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
|
| 457 |
+
OSSL_CMP_ATAVS *keySpec);
|
| 458 |
+
int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
|
| 459 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 460 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 461 |
+
|
| 462 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 463 |
+
void OSSL_CMP_ATAV_set0(OSSL_CMP_ATAV *itav, ASN1_OBJECT *type,
|
| 464 |
+
ASN1_TYPE *value);
|
| 465 |
+
ASN1_OBJECT *OSSL_CMP_ATAV_get0_type(const OSSL_CMP_ATAV *itav);
|
| 466 |
+
ASN1_TYPE *OSSL_CMP_ATAV_get0_value(const OSSL_CMP_ATAV *itav);
|
| 467 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_algId(const X509_ALGOR *alg);
|
| 468 |
+
X509_ALGOR *OSSL_CMP_ATAV_get0_algId(const OSSL_CMP_ATAV *atav);
|
| 469 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_rsaKeyLen(int len);
|
| 470 |
+
int OSSL_CMP_ATAV_get_rsaKeyLen(const OSSL_CMP_ATAV *atav);
|
| 471 |
+
int OSSL_CMP_ATAV_push1(OSSL_CMP_ATAVS **sk_p, const OSSL_CMP_ATAV *atav);
|
| 472 |
+
|
| 473 |
+
void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
|
| 474 |
+
|
| 475 |
+
/* from cmp_ctx.c */
|
| 476 |
+
OSSL_CMP_CTX *OSSL_CMP_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 477 |
+
void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
| 478 |
+
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
| 479 |
+
OSSL_LIB_CTX *OSSL_CMP_CTX_get0_libctx(const OSSL_CMP_CTX *ctx);
|
| 480 |
+
const char *OSSL_CMP_CTX_get0_propq(const OSSL_CMP_CTX *ctx);
|
| 481 |
+
/* CMP general options: */
|
| 482 |
+
# define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
| 483 |
+
/* CMP transfer options: */
|
| 484 |
+
# define OSSL_CMP_OPT_KEEP_ALIVE 10
|
| 485 |
+
# define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
| 486 |
+
# define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
| 487 |
+
# define OSSL_CMP_OPT_USE_TLS 13
|
| 488 |
+
/* CMP request options: */
|
| 489 |
+
# define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
| 490 |
+
# define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
| 491 |
+
# define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
| 492 |
+
# define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
| 493 |
+
# define OSSL_CMP_OPT_POPO_METHOD 24
|
| 494 |
+
# define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
| 495 |
+
# define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
| 496 |
+
# define OSSL_CMP_OPT_REVOCATION_REASON 27
|
| 497 |
+
/* CMP protection options: */
|
| 498 |
+
# define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
| 499 |
+
# define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
| 500 |
+
# define OSSL_CMP_OPT_OWF_ALGNID 32
|
| 501 |
+
# define OSSL_CMP_OPT_MAC_ALGNID 33
|
| 502 |
+
# define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
| 503 |
+
# define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
| 504 |
+
# define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
| 505 |
+
# define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
| 506 |
+
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
| 507 |
+
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
| 508 |
+
/* CMP-specific callback for logging and outputting the error queue: */
|
| 509 |
+
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
| 510 |
+
# define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
| 511 |
+
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
| 512 |
+
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
| 513 |
+
/* message transfer: */
|
| 514 |
+
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
|
| 515 |
+
int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
| 516 |
+
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
| 517 |
+
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
| 518 |
+
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
| 519 |
+
# ifndef OPENSSL_NO_HTTP
|
| 520 |
+
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
| 521 |
+
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 522 |
+
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 523 |
+
# endif
|
| 524 |
+
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
| 525 |
+
const OSSL_CMP_MSG *req);
|
| 526 |
+
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
| 527 |
+
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 528 |
+
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 529 |
+
/* server authentication: */
|
| 530 |
+
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 531 |
+
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 532 |
+
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
| 533 |
+
# define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
| 534 |
+
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
| 535 |
+
# define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
| 536 |
+
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
| 537 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
| 538 |
+
/* client authentication: */
|
| 539 |
+
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 540 |
+
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
| 541 |
+
STACK_OF(X509) *candidates);
|
| 542 |
+
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
| 543 |
+
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
| 544 |
+
const unsigned char *ref, int len);
|
| 545 |
+
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
| 546 |
+
const unsigned char *sec, int len);
|
| 547 |
+
/* CMP message header and extra certificates: */
|
| 548 |
+
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 549 |
+
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 550 |
+
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
| 551 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 552 |
+
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
| 553 |
+
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
| 554 |
+
STACK_OF(X509) *extraCertsOut);
|
| 555 |
+
/* certificate template: */
|
| 556 |
+
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
| 557 |
+
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
| 558 |
+
int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 559 |
+
int OSSL_CMP_CTX_set1_serialNumber(OSSL_CMP_CTX *ctx, const ASN1_INTEGER *sn);
|
| 560 |
+
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 561 |
+
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
| 562 |
+
const GENERAL_NAME *name);
|
| 563 |
+
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
| 564 |
+
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
| 565 |
+
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
| 566 |
+
int OSSL_CMP_CTX_set1_oldCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 567 |
+
int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
| 568 |
+
/* misc body contents: */
|
| 569 |
+
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 570 |
+
/* certificate confirmation: */
|
| 571 |
+
typedef int (*OSSL_CMP_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
| 572 |
+
int fail_info, const char **txt);
|
| 573 |
+
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
| 574 |
+
const char **text);
|
| 575 |
+
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
| 576 |
+
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 577 |
+
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 578 |
+
/* result fetching: */
|
| 579 |
+
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
| 580 |
+
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
| 581 |
+
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
| 582 |
+
# define OSSL_CMP_PKISI_BUFLEN 1024
|
| 583 |
+
X509 *OSSL_CMP_CTX_get0_validatedSrvCert(const OSSL_CMP_CTX *ctx);
|
| 584 |
+
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
| 585 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
| 586 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
| 587 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
| 588 |
+
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
| 589 |
+
const ASN1_OCTET_STRING *id);
|
| 590 |
+
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
| 591 |
+
const ASN1_OCTET_STRING *nonce);
|
| 592 |
+
|
| 593 |
+
/* from cmp_status.c */
|
| 594 |
+
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
| 595 |
+
size_t bufsize);
|
| 596 |
+
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
| 597 |
+
char *buf, size_t bufsize);
|
| 598 |
+
OSSL_CMP_PKISI *
|
| 599 |
+
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
| 600 |
+
|
| 601 |
+
/* from cmp_hdr.c */
|
| 602 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const
|
| 603 |
+
OSSL_CMP_PKIHEADER *hdr);
|
| 604 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
| 605 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 606 |
+
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
| 607 |
+
|
| 608 |
+
/* from cmp_msg.c */
|
| 609 |
+
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
| 610 |
+
int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg);
|
| 611 |
+
X509_PUBKEY *OSSL_CMP_MSG_get0_certreq_publickey(const OSSL_CMP_MSG *msg);
|
| 612 |
+
int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 613 |
+
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 614 |
+
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
| 615 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
| 616 |
+
const char *propq);
|
| 617 |
+
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
| 618 |
+
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
| 619 |
+
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
| 620 |
+
|
| 621 |
+
/* from cmp_vfy.c */
|
| 622 |
+
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
| 623 |
+
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
| 624 |
+
X509_STORE *trusted_store, X509 *cert);
|
| 625 |
+
|
| 626 |
+
/* from cmp_http.c */
|
| 627 |
+
# ifndef OPENSSL_NO_HTTP
|
| 628 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
| 629 |
+
const OSSL_CMP_MSG *req);
|
| 630 |
+
# endif
|
| 631 |
+
|
| 632 |
+
/* from cmp_server.c */
|
| 633 |
+
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
| 634 |
+
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 635 |
+
const OSSL_CMP_MSG *req);
|
| 636 |
+
OSSL_CMP_MSG * OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
| 637 |
+
const OSSL_CMP_MSG *req);
|
| 638 |
+
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 639 |
+
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
| 640 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)
|
| 641 |
+
(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
| 642 |
+
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
| 643 |
+
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
| 644 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 645 |
+
const OSSL_CMP_MSG *req,
|
| 646 |
+
const X509_NAME *issuer,
|
| 647 |
+
const ASN1_INTEGER *serial);
|
| 648 |
+
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 649 |
+
const OSSL_CMP_MSG *req,
|
| 650 |
+
const STACK_OF(OSSL_CMP_ITAV) *in,
|
| 651 |
+
STACK_OF(OSSL_CMP_ITAV) **out);
|
| 652 |
+
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 653 |
+
const OSSL_CMP_MSG *req,
|
| 654 |
+
const OSSL_CMP_PKISI *statusInfo,
|
| 655 |
+
const ASN1_INTEGER *errorCode,
|
| 656 |
+
const OSSL_CMP_PKIFREETEXT *errDetails);
|
| 657 |
+
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 658 |
+
const OSSL_CMP_MSG *req,
|
| 659 |
+
int certReqId,
|
| 660 |
+
const ASN1_OCTET_STRING *certHash,
|
| 661 |
+
const OSSL_CMP_PKISI *si);
|
| 662 |
+
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 663 |
+
const OSSL_CMP_MSG *req, int certReqId,
|
| 664 |
+
OSSL_CMP_MSG **certReq,
|
| 665 |
+
int64_t *check_after);
|
| 666 |
+
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
| 667 |
+
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
| 668 |
+
OSSL_CMP_SRV_rr_cb_t process_rr,
|
| 669 |
+
OSSL_CMP_SRV_genm_cb_t process_genm,
|
| 670 |
+
OSSL_CMP_SRV_error_cb_t process_error,
|
| 671 |
+
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
| 672 |
+
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
| 673 |
+
typedef int (*OSSL_CMP_SRV_delayed_delivery_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 674 |
+
const OSSL_CMP_MSG *req);
|
| 675 |
+
typedef int (*OSSL_CMP_SRV_clean_transaction_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 676 |
+
const ASN1_OCTET_STRING *id);
|
| 677 |
+
int OSSL_CMP_SRV_CTX_init_trans(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 678 |
+
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
| 679 |
+
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
| 680 |
+
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 681 |
+
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 682 |
+
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 683 |
+
int val);
|
| 684 |
+
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 685 |
+
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 686 |
+
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 687 |
+
int val);
|
| 688 |
+
|
| 689 |
+
/* from cmp_client.c */
|
| 690 |
+
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 691 |
+
const OSSL_CRMF_MSG *crm);
|
| 692 |
+
# define OSSL_CMP_IR 0
|
| 693 |
+
# define OSSL_CMP_CR 2
|
| 694 |
+
# define OSSL_CMP_P10CR 4
|
| 695 |
+
# define OSSL_CMP_KUR 7
|
| 696 |
+
# define OSSL_CMP_GENM 21
|
| 697 |
+
# define OSSL_CMP_ERROR 23
|
| 698 |
+
# define OSSL_CMP_exec_IR_ses(ctx) \
|
| 699 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
| 700 |
+
# define OSSL_CMP_exec_CR_ses(ctx) \
|
| 701 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
| 702 |
+
# define OSSL_CMP_exec_P10CR_ses(ctx) \
|
| 703 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
| 704 |
+
# define OSSL_CMP_exec_KUR_ses(ctx) \
|
| 705 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
| 706 |
+
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 707 |
+
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
| 708 |
+
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
| 709 |
+
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
| 710 |
+
|
| 711 |
+
/* from cmp_genm.c */
|
| 712 |
+
int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out);
|
| 713 |
+
int OSSL_CMP_get1_rootCaKeyUpdate(OSSL_CMP_CTX *ctx,
|
| 714 |
+
const X509 *oldWithOld, X509 **newWithNew,
|
| 715 |
+
X509 **newWithOld, X509 **oldWithNew);
|
| 716 |
+
int OSSL_CMP_get1_crlUpdate(OSSL_CMP_CTX *ctx, const X509 *crlcert,
|
| 717 |
+
const X509_CRL *last_crl,
|
| 718 |
+
X509_CRL **crl);
|
| 719 |
+
int OSSL_CMP_get1_certReqTemplate(OSSL_CMP_CTX *ctx,
|
| 720 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 721 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 722 |
+
|
| 723 |
+
# ifdef __cplusplus
|
| 724 |
+
}
|
| 725 |
+
# endif
|
| 726 |
+
# endif /* !defined(OPENSSL_NO_CMP) */
|
| 727 |
+
#endif /* !defined(OPENSSL_CMP_H) */
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/cms.h
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cms.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_CMS_H
|
| 16 |
+
# define OPENSSL_CMS_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_CMS_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
|
| 26 |
+
# ifndef OPENSSL_NO_CMS
|
| 27 |
+
# include <openssl/x509.h>
|
| 28 |
+
# include <openssl/x509v3.h>
|
| 29 |
+
# include <openssl/cmserr.h>
|
| 30 |
+
# ifdef __cplusplus
|
| 31 |
+
extern "C" {
|
| 32 |
+
# endif
|
| 33 |
+
|
| 34 |
+
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
| 35 |
+
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
| 36 |
+
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
|
| 37 |
+
typedef struct CMS_SignedData_st CMS_SignedData;
|
| 38 |
+
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
|
| 39 |
+
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
|
| 40 |
+
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
|
| 41 |
+
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
|
| 42 |
+
typedef struct CMS_Receipt_st CMS_Receipt;
|
| 43 |
+
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
| 44 |
+
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
| 45 |
+
|
| 46 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
| 47 |
+
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 48 |
+
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
| 49 |
+
#define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 50 |
+
#define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_null())
|
| 51 |
+
#define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)))
|
| 52 |
+
#define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
|
| 53 |
+
#define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 54 |
+
#define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 55 |
+
#define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
|
| 56 |
+
#define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 57 |
+
#define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 58 |
+
#define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 59 |
+
#define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 60 |
+
#define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 61 |
+
#define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk),ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
|
| 62 |
+
#define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
|
| 63 |
+
#define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 64 |
+
#define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 65 |
+
#define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 66 |
+
#define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
|
| 67 |
+
#define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 68 |
+
#define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 69 |
+
#define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
|
| 70 |
+
#define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
|
| 71 |
+
#define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 72 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
|
| 73 |
+
#define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 74 |
+
#define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
|
| 75 |
+
#define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 76 |
+
#define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_null())
|
| 77 |
+
#define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)))
|
| 78 |
+
#define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
|
| 79 |
+
#define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 80 |
+
#define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 81 |
+
#define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
|
| 82 |
+
#define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 83 |
+
#define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 84 |
+
#define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 85 |
+
#define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 86 |
+
#define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 87 |
+
#define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk),ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
|
| 88 |
+
#define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
|
| 89 |
+
#define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 90 |
+
#define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 91 |
+
#define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 92 |
+
#define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
|
| 93 |
+
#define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 94 |
+
#define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 95 |
+
#define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 96 |
+
#define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
|
| 97 |
+
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 98 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
|
| 99 |
+
#define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 100 |
+
#define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
|
| 101 |
+
#define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 102 |
+
#define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_null())
|
| 103 |
+
#define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)))
|
| 104 |
+
#define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
|
| 105 |
+
#define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 106 |
+
#define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 107 |
+
#define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
|
| 108 |
+
#define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 109 |
+
#define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 110 |
+
#define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 111 |
+
#define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 112 |
+
#define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 113 |
+
#define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk),ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
|
| 114 |
+
#define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
|
| 115 |
+
#define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 116 |
+
#define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 117 |
+
#define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 118 |
+
#define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
|
| 119 |
+
#define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 120 |
+
#define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 121 |
+
#define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
|
| 122 |
+
#define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
|
| 123 |
+
#define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 124 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
|
| 125 |
+
#define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 126 |
+
#define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
|
| 127 |
+
#define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 128 |
+
#define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_null())
|
| 129 |
+
#define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)))
|
| 130 |
+
#define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
|
| 131 |
+
#define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 132 |
+
#define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 133 |
+
#define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
|
| 134 |
+
#define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 135 |
+
#define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 136 |
+
#define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 137 |
+
#define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 138 |
+
#define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 139 |
+
#define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk),ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
|
| 140 |
+
#define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
|
| 141 |
+
#define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 142 |
+
#define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 143 |
+
#define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 144 |
+
#define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
|
| 145 |
+
#define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 146 |
+
#define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 147 |
+
#define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 148 |
+
#define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
|
| 149 |
+
#define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
| 153 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
| 154 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
|
| 155 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
|
| 156 |
+
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
|
| 157 |
+
|
| 158 |
+
DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
| 159 |
+
|
| 160 |
+
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 161 |
+
|
| 162 |
+
# define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
| 163 |
+
# define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
| 164 |
+
|
| 165 |
+
# define CMS_RECIPINFO_NONE -1
|
| 166 |
+
# define CMS_RECIPINFO_TRANS 0
|
| 167 |
+
# define CMS_RECIPINFO_AGREE 1
|
| 168 |
+
# define CMS_RECIPINFO_KEK 2
|
| 169 |
+
# define CMS_RECIPINFO_PASS 3
|
| 170 |
+
# define CMS_RECIPINFO_OTHER 4
|
| 171 |
+
|
| 172 |
+
/* S/MIME related flags */
|
| 173 |
+
|
| 174 |
+
# define CMS_TEXT 0x1
|
| 175 |
+
# define CMS_NOCERTS 0x2
|
| 176 |
+
# define CMS_NO_CONTENT_VERIFY 0x4
|
| 177 |
+
# define CMS_NO_ATTR_VERIFY 0x8
|
| 178 |
+
# define CMS_NOSIGS \
|
| 179 |
+
(CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
|
| 180 |
+
# define CMS_NOINTERN 0x10
|
| 181 |
+
# define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
| 182 |
+
# define CMS_NOVERIFY 0x20
|
| 183 |
+
# define CMS_DETACHED 0x40
|
| 184 |
+
# define CMS_BINARY 0x80
|
| 185 |
+
# define CMS_NOATTR 0x100
|
| 186 |
+
# define CMS_NOSMIMECAP 0x200
|
| 187 |
+
# define CMS_NOOLDMIMETYPE 0x400
|
| 188 |
+
# define CMS_CRLFEOL 0x800
|
| 189 |
+
# define CMS_STREAM 0x1000
|
| 190 |
+
# define CMS_NOCRL 0x2000
|
| 191 |
+
# define CMS_PARTIAL 0x4000
|
| 192 |
+
# define CMS_REUSE_DIGEST 0x8000
|
| 193 |
+
# define CMS_USE_KEYID 0x10000
|
| 194 |
+
# define CMS_DEBUG_DECRYPT 0x20000
|
| 195 |
+
# define CMS_KEY_PARAM 0x40000
|
| 196 |
+
# define CMS_ASCIICRLF 0x80000
|
| 197 |
+
# define CMS_CADES 0x100000
|
| 198 |
+
# define CMS_USE_ORIGINATOR_KEYID 0x200000
|
| 199 |
+
# define CMS_NO_SIGNING_TIME 0x400000
|
| 200 |
+
|
| 201 |
+
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
| 202 |
+
|
| 203 |
+
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
|
| 204 |
+
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
|
| 205 |
+
|
| 206 |
+
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
| 207 |
+
int CMS_is_detached(CMS_ContentInfo *cms);
|
| 208 |
+
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
| 209 |
+
|
| 210 |
+
# ifdef OPENSSL_PEM_H
|
| 211 |
+
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
| 212 |
+
# endif
|
| 213 |
+
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
| 214 |
+
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
| 215 |
+
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
| 216 |
+
|
| 217 |
+
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
| 218 |
+
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
| 219 |
+
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
| 220 |
+
int flags);
|
| 221 |
+
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
| 222 |
+
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
| 223 |
+
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
| 224 |
+
|
| 225 |
+
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
| 226 |
+
unsigned int flags);
|
| 227 |
+
int CMS_final_digest(CMS_ContentInfo *cms,
|
| 228 |
+
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
| 229 |
+
unsigned int flags);
|
| 230 |
+
|
| 231 |
+
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
| 232 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 233 |
+
unsigned int flags);
|
| 234 |
+
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
| 235 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 236 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 237 |
+
const char *propq);
|
| 238 |
+
|
| 239 |
+
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
| 240 |
+
X509 *signcert, EVP_PKEY *pkey,
|
| 241 |
+
STACK_OF(X509) *certs, unsigned int flags);
|
| 242 |
+
|
| 243 |
+
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
| 244 |
+
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
| 245 |
+
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
| 246 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 247 |
+
|
| 248 |
+
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 249 |
+
unsigned int flags);
|
| 250 |
+
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
| 251 |
+
unsigned int flags);
|
| 252 |
+
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
| 253 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 254 |
+
const char *propq);
|
| 255 |
+
|
| 256 |
+
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
| 257 |
+
const unsigned char *key, size_t keylen,
|
| 258 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 259 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
| 260 |
+
const unsigned char *key,
|
| 261 |
+
size_t keylen, unsigned int flags);
|
| 262 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
| 263 |
+
const unsigned char *key,
|
| 264 |
+
size_t keylen, unsigned int flags,
|
| 265 |
+
OSSL_LIB_CTX *libctx,
|
| 266 |
+
const char *propq);
|
| 267 |
+
|
| 268 |
+
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
| 269 |
+
const unsigned char *key, size_t keylen);
|
| 270 |
+
|
| 271 |
+
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 272 |
+
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
| 273 |
+
|
| 274 |
+
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
| 275 |
+
STACK_OF(X509) *certs,
|
| 276 |
+
X509_STORE *store, unsigned int flags);
|
| 277 |
+
|
| 278 |
+
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
| 279 |
+
|
| 280 |
+
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
| 281 |
+
const EVP_CIPHER *cipher, unsigned int flags);
|
| 282 |
+
CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
| 283 |
+
const EVP_CIPHER *cipher, unsigned int flags,
|
| 284 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 285 |
+
|
| 286 |
+
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
| 287 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 288 |
+
|
| 289 |
+
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
| 290 |
+
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
| 291 |
+
X509 *cert, X509 *peer);
|
| 292 |
+
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
| 293 |
+
unsigned char *key, size_t keylen,
|
| 294 |
+
const unsigned char *id, size_t idlen);
|
| 295 |
+
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
| 296 |
+
unsigned char *pass, ossl_ssize_t passlen);
|
| 297 |
+
|
| 298 |
+
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
| 299 |
+
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
| 300 |
+
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
| 301 |
+
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
| 302 |
+
CMS_ContentInfo *
|
| 303 |
+
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
| 304 |
+
const char *propq);
|
| 305 |
+
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
| 306 |
+
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
| 307 |
+
OSSL_LIB_CTX *libctx,
|
| 308 |
+
const char *propq);
|
| 309 |
+
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
| 310 |
+
EVP_PKEY *pkey, X509 *cert,
|
| 311 |
+
ASN1_OCTET_STRING *secret, unsigned int flags,
|
| 312 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 313 |
+
|
| 314 |
+
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
| 315 |
+
X509 *recip, unsigned int flags);
|
| 316 |
+
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
| 317 |
+
EVP_PKEY *originatorPrivKey, X509 * originator, unsigned int flags);
|
| 318 |
+
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
| 319 |
+
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 320 |
+
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
| 321 |
+
EVP_PKEY **pk, X509 **recip,
|
| 322 |
+
X509_ALGOR **palg);
|
| 323 |
+
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
| 324 |
+
ASN1_OCTET_STRING **keyid,
|
| 325 |
+
X509_NAME **issuer,
|
| 326 |
+
ASN1_INTEGER **sno);
|
| 327 |
+
|
| 328 |
+
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
| 329 |
+
unsigned char *key, size_t keylen,
|
| 330 |
+
unsigned char *id, size_t idlen,
|
| 331 |
+
ASN1_GENERALIZEDTIME *date,
|
| 332 |
+
ASN1_OBJECT *otherTypeId,
|
| 333 |
+
ASN1_TYPE *otherType);
|
| 334 |
+
|
| 335 |
+
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
| 336 |
+
X509_ALGOR **palg,
|
| 337 |
+
ASN1_OCTET_STRING **pid,
|
| 338 |
+
ASN1_GENERALIZEDTIME **pdate,
|
| 339 |
+
ASN1_OBJECT **potherid,
|
| 340 |
+
ASN1_TYPE **pothertype);
|
| 341 |
+
|
| 342 |
+
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
| 343 |
+
unsigned char *key, size_t keylen);
|
| 344 |
+
|
| 345 |
+
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
| 346 |
+
const unsigned char *id, size_t idlen);
|
| 347 |
+
|
| 348 |
+
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
| 349 |
+
unsigned char *pass,
|
| 350 |
+
ossl_ssize_t passlen);
|
| 351 |
+
|
| 352 |
+
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
| 353 |
+
int iter, int wrap_nid,
|
| 354 |
+
int pbe_nid,
|
| 355 |
+
unsigned char *pass,
|
| 356 |
+
ossl_ssize_t passlen,
|
| 357 |
+
const EVP_CIPHER *kekciph);
|
| 358 |
+
|
| 359 |
+
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 360 |
+
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 361 |
+
|
| 362 |
+
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 363 |
+
unsigned int flags);
|
| 364 |
+
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
| 365 |
+
|
| 366 |
+
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
| 367 |
+
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
|
| 368 |
+
|
| 369 |
+
CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
|
| 370 |
+
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 371 |
+
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 372 |
+
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
|
| 373 |
+
|
| 374 |
+
CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
|
| 375 |
+
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 376 |
+
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 377 |
+
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
| 378 |
+
|
| 379 |
+
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
| 380 |
+
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
| 381 |
+
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
| 382 |
+
unsigned int flags);
|
| 383 |
+
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
| 384 |
+
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
| 385 |
+
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
| 386 |
+
|
| 387 |
+
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
| 388 |
+
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
| 389 |
+
ASN1_OCTET_STRING **keyid,
|
| 390 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 391 |
+
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
| 392 |
+
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 393 |
+
unsigned int flags);
|
| 394 |
+
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
| 395 |
+
X509 **signer, X509_ALGOR **pdig,
|
| 396 |
+
X509_ALGOR **psig);
|
| 397 |
+
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
| 398 |
+
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
| 399 |
+
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
| 400 |
+
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
| 401 |
+
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
| 402 |
+
STACK_OF(X509) *scerts, X509_STORE *store,
|
| 403 |
+
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
| 404 |
+
unsigned int flags,
|
| 405 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 406 |
+
|
| 407 |
+
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
| 408 |
+
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
| 409 |
+
int algnid, int keysize);
|
| 410 |
+
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
| 411 |
+
|
| 412 |
+
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
| 413 |
+
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 414 |
+
int lastpos);
|
| 415 |
+
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
| 416 |
+
int lastpos);
|
| 417 |
+
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
| 418 |
+
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
| 419 |
+
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 420 |
+
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 421 |
+
const ASN1_OBJECT *obj, int type,
|
| 422 |
+
const void *bytes, int len);
|
| 423 |
+
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 424 |
+
int nid, int type,
|
| 425 |
+
const void *bytes, int len);
|
| 426 |
+
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 427 |
+
const char *attrname, int type,
|
| 428 |
+
const void *bytes, int len);
|
| 429 |
+
void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
| 430 |
+
const ASN1_OBJECT *oid,
|
| 431 |
+
int lastpos, int type);
|
| 432 |
+
|
| 433 |
+
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
| 434 |
+
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 435 |
+
int lastpos);
|
| 436 |
+
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
| 437 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 438 |
+
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
| 439 |
+
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
| 440 |
+
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 441 |
+
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 442 |
+
const ASN1_OBJECT *obj, int type,
|
| 443 |
+
const void *bytes, int len);
|
| 444 |
+
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 445 |
+
int nid, int type,
|
| 446 |
+
const void *bytes, int len);
|
| 447 |
+
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 448 |
+
const char *attrname, int type,
|
| 449 |
+
const void *bytes, int len);
|
| 450 |
+
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
| 451 |
+
int lastpos, int type);
|
| 452 |
+
|
| 453 |
+
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
| 454 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
| 455 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 456 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 457 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
| 458 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
| 459 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 460 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 461 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo,
|
| 462 |
+
OSSL_LIB_CTX *libctx);
|
| 463 |
+
|
| 464 |
+
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
| 465 |
+
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
| 466 |
+
ASN1_STRING **pcid,
|
| 467 |
+
int *pallorfirst,
|
| 468 |
+
STACK_OF(GENERAL_NAMES) **plist,
|
| 469 |
+
STACK_OF(GENERAL_NAMES) **prto);
|
| 470 |
+
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
| 471 |
+
X509_ALGOR **palg,
|
| 472 |
+
ASN1_OCTET_STRING **pukm);
|
| 473 |
+
STACK_OF(CMS_RecipientEncryptedKey)
|
| 474 |
+
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
| 475 |
+
|
| 476 |
+
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
| 477 |
+
X509_ALGOR **pubalg,
|
| 478 |
+
ASN1_BIT_STRING **pubkey,
|
| 479 |
+
ASN1_OCTET_STRING **keyid,
|
| 480 |
+
X509_NAME **issuer,
|
| 481 |
+
ASN1_INTEGER **sno);
|
| 482 |
+
|
| 483 |
+
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 484 |
+
|
| 485 |
+
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
| 486 |
+
ASN1_OCTET_STRING **keyid,
|
| 487 |
+
ASN1_GENERALIZEDTIME **tm,
|
| 488 |
+
CMS_OtherKeyAttribute **other,
|
| 489 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 490 |
+
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
| 491 |
+
X509 *cert);
|
| 492 |
+
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 493 |
+
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
| 494 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
| 495 |
+
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
| 496 |
+
CMS_RecipientInfo *ri,
|
| 497 |
+
CMS_RecipientEncryptedKey *rek);
|
| 498 |
+
|
| 499 |
+
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
| 500 |
+
ASN1_OCTET_STRING *ukm, int keylen);
|
| 501 |
+
|
| 502 |
+
/* Backward compatibility for spelling errors. */
|
| 503 |
+
# define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
| 504 |
+
# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
| 505 |
+
CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
|
| 506 |
+
|
| 507 |
+
# ifdef __cplusplus
|
| 508 |
+
}
|
| 509 |
+
# endif
|
| 510 |
+
# endif
|
| 511 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/comp.h
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_COMP_H
|
| 13 |
+
# define OPENSSL_COMP_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# include <openssl/macros.h>
|
| 17 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
# define HEADER_COMP_H
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
# include <openssl/opensslconf.h>
|
| 22 |
+
|
| 23 |
+
# include <openssl/crypto.h>
|
| 24 |
+
# include <openssl/comperr.h>
|
| 25 |
+
# ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
# endif
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# ifndef OPENSSL_NO_COMP
|
| 32 |
+
|
| 33 |
+
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
| 34 |
+
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
| 35 |
+
int COMP_CTX_get_type(const COMP_CTX* comp);
|
| 36 |
+
int COMP_get_type(const COMP_METHOD *meth);
|
| 37 |
+
const char *COMP_get_name(const COMP_METHOD *meth);
|
| 38 |
+
void COMP_CTX_free(COMP_CTX *ctx);
|
| 39 |
+
|
| 40 |
+
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 41 |
+
unsigned char *in, int ilen);
|
| 42 |
+
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 43 |
+
unsigned char *in, int ilen);
|
| 44 |
+
|
| 45 |
+
COMP_METHOD *COMP_zlib(void);
|
| 46 |
+
COMP_METHOD *COMP_zlib_oneshot(void);
|
| 47 |
+
COMP_METHOD *COMP_brotli(void);
|
| 48 |
+
COMP_METHOD *COMP_brotli_oneshot(void);
|
| 49 |
+
COMP_METHOD *COMP_zstd(void);
|
| 50 |
+
COMP_METHOD *COMP_zstd_oneshot(void);
|
| 51 |
+
|
| 52 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 53 |
+
# define COMP_zlib_cleanup() while(0) continue
|
| 54 |
+
# endif
|
| 55 |
+
|
| 56 |
+
# ifdef OPENSSL_BIO_H
|
| 57 |
+
const BIO_METHOD *BIO_f_zlib(void);
|
| 58 |
+
const BIO_METHOD *BIO_f_brotli(void);
|
| 59 |
+
const BIO_METHOD *BIO_f_zstd(void);
|
| 60 |
+
# endif
|
| 61 |
+
|
| 62 |
+
# endif
|
| 63 |
+
|
| 64 |
+
typedef struct ssl_comp_st SSL_COMP;
|
| 65 |
+
|
| 66 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
| 67 |
+
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 68 |
+
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
| 69 |
+
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 70 |
+
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
|
| 71 |
+
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
|
| 72 |
+
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
| 73 |
+
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
| 74 |
+
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
| 75 |
+
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
| 76 |
+
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
| 77 |
+
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 78 |
+
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 79 |
+
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
| 80 |
+
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
| 81 |
+
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc))
|
| 82 |
+
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
| 83 |
+
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
| 84 |
+
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 85 |
+
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 86 |
+
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
| 87 |
+
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
| 88 |
+
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 89 |
+
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
| 90 |
+
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
| 91 |
+
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
# ifdef __cplusplus
|
| 96 |
+
}
|
| 97 |
+
# endif
|
| 98 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/conf.h
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/conf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_CONF_H
|
| 16 |
+
# define OPENSSL_CONF_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_CONF_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/bio.h>
|
| 25 |
+
# include <openssl/lhash.h>
|
| 26 |
+
# include <openssl/safestack.h>
|
| 27 |
+
# include <openssl/e_os2.h>
|
| 28 |
+
# include <openssl/types.h>
|
| 29 |
+
# include <openssl/conferr.h>
|
| 30 |
+
# ifndef OPENSSL_NO_STDIO
|
| 31 |
+
# include <stdio.h>
|
| 32 |
+
# endif
|
| 33 |
+
|
| 34 |
+
#ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
#endif
|
| 37 |
+
|
| 38 |
+
typedef struct {
|
| 39 |
+
char *section;
|
| 40 |
+
char *name;
|
| 41 |
+
char *value;
|
| 42 |
+
} CONF_VALUE;
|
| 43 |
+
|
| 44 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
| 45 |
+
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 46 |
+
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
| 47 |
+
#define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 48 |
+
#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null())
|
| 49 |
+
#define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)))
|
| 50 |
+
#define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
| 51 |
+
#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
| 52 |
+
#define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
| 53 |
+
#define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
| 54 |
+
#define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
| 55 |
+
#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 56 |
+
#define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 57 |
+
#define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 58 |
+
#define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 59 |
+
#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk),ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
| 60 |
+
#define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
| 61 |
+
#define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
| 62 |
+
#define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 63 |
+
#define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 64 |
+
#define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
| 65 |
+
#define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
| 66 |
+
#define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 67 |
+
#define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
| 68 |
+
#define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
| 69 |
+
#define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 70 |
+
DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
| 71 |
+
#define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk))
|
| 72 |
+
#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
| 73 |
+
#define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
| 74 |
+
#define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
| 75 |
+
#define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 76 |
+
#define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 77 |
+
#define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
| 78 |
+
#define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
| 79 |
+
#define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 80 |
+
#define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 81 |
+
#define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 82 |
+
#define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
| 83 |
+
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
| 84 |
+
#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
struct conf_st;
|
| 88 |
+
struct conf_method_st;
|
| 89 |
+
typedef struct conf_method_st CONF_METHOD;
|
| 90 |
+
|
| 91 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 92 |
+
# include <openssl/conftypes.h>
|
| 93 |
+
# endif
|
| 94 |
+
|
| 95 |
+
/* Module definitions */
|
| 96 |
+
typedef struct conf_imodule_st CONF_IMODULE;
|
| 97 |
+
typedef struct conf_module_st CONF_MODULE;
|
| 98 |
+
|
| 99 |
+
STACK_OF(CONF_MODULE);
|
| 100 |
+
STACK_OF(CONF_IMODULE);
|
| 101 |
+
|
| 102 |
+
/* DSO module function typedefs */
|
| 103 |
+
typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
|
| 104 |
+
typedef void conf_finish_func (CONF_IMODULE *md);
|
| 105 |
+
|
| 106 |
+
# define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
| 107 |
+
# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
| 108 |
+
# define CONF_MFLAGS_SILENT 0x4
|
| 109 |
+
# define CONF_MFLAGS_NO_DSO 0x8
|
| 110 |
+
# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
| 111 |
+
# define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
| 112 |
+
|
| 113 |
+
int CONF_set_default_method(CONF_METHOD *meth);
|
| 114 |
+
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
| 115 |
+
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
| 116 |
+
long *eline);
|
| 117 |
+
# ifndef OPENSSL_NO_STDIO
|
| 118 |
+
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
| 119 |
+
long *eline);
|
| 120 |
+
# endif
|
| 121 |
+
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
| 122 |
+
long *eline);
|
| 123 |
+
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
| 124 |
+
const char *section);
|
| 125 |
+
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 126 |
+
const char *name);
|
| 127 |
+
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 128 |
+
const char *name);
|
| 129 |
+
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
| 130 |
+
#ifndef OPENSSL_NO_STDIO
|
| 131 |
+
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
| 132 |
+
#endif
|
| 133 |
+
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
| 134 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 135 |
+
OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
| 136 |
+
#endif
|
| 137 |
+
|
| 138 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 139 |
+
# define OPENSSL_no_config() \
|
| 140 |
+
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
| 141 |
+
#endif
|
| 142 |
+
|
| 143 |
+
/*
|
| 144 |
+
* New conf code. The semantics are different from the functions above. If
|
| 145 |
+
* that wasn't the case, the above functions would have been replaced
|
| 146 |
+
*/
|
| 147 |
+
|
| 148 |
+
CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
| 149 |
+
OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
| 150 |
+
CONF *NCONF_new(CONF_METHOD *meth);
|
| 151 |
+
CONF_METHOD *NCONF_default(void);
|
| 152 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 153 |
+
OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
| 154 |
+
#endif
|
| 155 |
+
void NCONF_free(CONF *conf);
|
| 156 |
+
void NCONF_free_data(CONF *conf);
|
| 157 |
+
|
| 158 |
+
int NCONF_load(CONF *conf, const char *file, long *eline);
|
| 159 |
+
# ifndef OPENSSL_NO_STDIO
|
| 160 |
+
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
| 161 |
+
# endif
|
| 162 |
+
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
| 163 |
+
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
| 164 |
+
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
| 165 |
+
const char *section);
|
| 166 |
+
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
| 167 |
+
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
| 168 |
+
long *result);
|
| 169 |
+
#ifndef OPENSSL_NO_STDIO
|
| 170 |
+
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
| 171 |
+
#endif
|
| 172 |
+
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
| 173 |
+
|
| 174 |
+
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
|
| 175 |
+
|
| 176 |
+
/* Module functions */
|
| 177 |
+
|
| 178 |
+
int CONF_modules_load(const CONF *cnf, const char *appname,
|
| 179 |
+
unsigned long flags);
|
| 180 |
+
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
| 181 |
+
const char *appname, unsigned long flags);
|
| 182 |
+
int CONF_modules_load_file(const char *filename, const char *appname,
|
| 183 |
+
unsigned long flags);
|
| 184 |
+
void CONF_modules_unload(int all);
|
| 185 |
+
void CONF_modules_finish(void);
|
| 186 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 187 |
+
# define CONF_modules_free() while(0) continue
|
| 188 |
+
#endif
|
| 189 |
+
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
| 190 |
+
conf_finish_func *ffunc);
|
| 191 |
+
|
| 192 |
+
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
| 193 |
+
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
| 194 |
+
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
|
| 195 |
+
void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
|
| 196 |
+
CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
|
| 197 |
+
unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
|
| 198 |
+
void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
|
| 199 |
+
void *CONF_module_get_usr_data(CONF_MODULE *pmod);
|
| 200 |
+
void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
| 201 |
+
|
| 202 |
+
char *CONF_get1_default_config_file(void);
|
| 203 |
+
|
| 204 |
+
int CONF_parse_list(const char *list, int sep, int nospc,
|
| 205 |
+
int (*list_cb) (const char *elem, int len, void *usr),
|
| 206 |
+
void *arg);
|
| 207 |
+
|
| 208 |
+
void OPENSSL_load_builtin_modules(void);
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
# ifdef __cplusplus
|
| 212 |
+
}
|
| 213 |
+
# endif
|
| 214 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/configuration.h
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by configdata.pm from Configurations/common0.tmpl, Configurations/unix-Makefile.tmpl
|
| 4 |
+
* via Makefile.in
|
| 5 |
+
*
|
| 6 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CONFIGURATION_H
|
| 15 |
+
# define OPENSSL_CONFIGURATION_H
|
| 16 |
+
# pragma once
|
| 17 |
+
|
| 18 |
+
# ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
# endif
|
| 21 |
+
|
| 22 |
+
# ifdef OPENSSL_ALGORITHM_DEFINES
|
| 23 |
+
# error OPENSSL_ALGORITHM_DEFINES no longer supported
|
| 24 |
+
# endif
|
| 25 |
+
|
| 26 |
+
/*
|
| 27 |
+
* OpenSSL was configured with the following options:
|
| 28 |
+
*/
|
| 29 |
+
|
| 30 |
+
# define OPENSSL_CONFIGURED_API 30500
|
| 31 |
+
# ifndef OPENSSL_RAND_SEED_OS
|
| 32 |
+
# define OPENSSL_RAND_SEED_OS
|
| 33 |
+
# endif
|
| 34 |
+
# ifndef OPENSSL_THREADS
|
| 35 |
+
# define OPENSSL_THREADS
|
| 36 |
+
# endif
|
| 37 |
+
# ifndef OPENSSL_NO_AFALGENG
|
| 38 |
+
# define OPENSSL_NO_AFALGENG
|
| 39 |
+
# endif
|
| 40 |
+
# ifndef OPENSSL_NO_ASAN
|
| 41 |
+
# define OPENSSL_NO_ASAN
|
| 42 |
+
# endif
|
| 43 |
+
# ifndef OPENSSL_NO_BROTLI
|
| 44 |
+
# define OPENSSL_NO_BROTLI
|
| 45 |
+
# endif
|
| 46 |
+
# ifndef OPENSSL_NO_BROTLI_DYNAMIC
|
| 47 |
+
# define OPENSSL_NO_BROTLI_DYNAMIC
|
| 48 |
+
# endif
|
| 49 |
+
# ifndef OPENSSL_NO_COMP
|
| 50 |
+
# define OPENSSL_NO_COMP
|
| 51 |
+
# endif
|
| 52 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
| 53 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG
|
| 54 |
+
# endif
|
| 55 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 56 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 57 |
+
# endif
|
| 58 |
+
# ifndef OPENSSL_NO_DEMOS
|
| 59 |
+
# define OPENSSL_NO_DEMOS
|
| 60 |
+
# endif
|
| 61 |
+
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 62 |
+
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 63 |
+
# endif
|
| 64 |
+
# ifndef OPENSSL_NO_EGD
|
| 65 |
+
# define OPENSSL_NO_EGD
|
| 66 |
+
# endif
|
| 67 |
+
# ifndef OPENSSL_NO_EXTERNAL_TESTS
|
| 68 |
+
# define OPENSSL_NO_EXTERNAL_TESTS
|
| 69 |
+
# endif
|
| 70 |
+
# ifndef OPENSSL_NO_FIPS_JITTER
|
| 71 |
+
# define OPENSSL_NO_FIPS_JITTER
|
| 72 |
+
# endif
|
| 73 |
+
# ifndef OPENSSL_NO_FUZZ_AFL
|
| 74 |
+
# define OPENSSL_NO_FUZZ_AFL
|
| 75 |
+
# endif
|
| 76 |
+
# ifndef OPENSSL_NO_FUZZ_LIBFUZZER
|
| 77 |
+
# define OPENSSL_NO_FUZZ_LIBFUZZER
|
| 78 |
+
# endif
|
| 79 |
+
# ifndef OPENSSL_NO_H3DEMO
|
| 80 |
+
# define OPENSSL_NO_H3DEMO
|
| 81 |
+
# endif
|
| 82 |
+
# ifndef OPENSSL_NO_HQINTEROP
|
| 83 |
+
# define OPENSSL_NO_HQINTEROP
|
| 84 |
+
# endif
|
| 85 |
+
# ifndef OPENSSL_NO_JITTER
|
| 86 |
+
# define OPENSSL_NO_JITTER
|
| 87 |
+
# endif
|
| 88 |
+
# ifndef OPENSSL_NO_KTLS
|
| 89 |
+
# define OPENSSL_NO_KTLS
|
| 90 |
+
# endif
|
| 91 |
+
# ifndef OPENSSL_NO_LOADERENG
|
| 92 |
+
# define OPENSSL_NO_LOADERENG
|
| 93 |
+
# endif
|
| 94 |
+
# ifndef OPENSSL_NO_MD2
|
| 95 |
+
# define OPENSSL_NO_MD2
|
| 96 |
+
# endif
|
| 97 |
+
# ifndef OPENSSL_NO_MSAN
|
| 98 |
+
# define OPENSSL_NO_MSAN
|
| 99 |
+
# endif
|
| 100 |
+
# ifndef OPENSSL_NO_PIE
|
| 101 |
+
# define OPENSSL_NO_PIE
|
| 102 |
+
# endif
|
| 103 |
+
# ifndef OPENSSL_NO_RC5
|
| 104 |
+
# define OPENSSL_NO_RC5
|
| 105 |
+
# endif
|
| 106 |
+
# ifndef OPENSSL_NO_SCTP
|
| 107 |
+
# define OPENSSL_NO_SCTP
|
| 108 |
+
# endif
|
| 109 |
+
# ifndef OPENSSL_NO_SSL3
|
| 110 |
+
# define OPENSSL_NO_SSL3
|
| 111 |
+
# endif
|
| 112 |
+
# ifndef OPENSSL_NO_SSL3_METHOD
|
| 113 |
+
# define OPENSSL_NO_SSL3_METHOD
|
| 114 |
+
# endif
|
| 115 |
+
# ifndef OPENSSL_NO_SSLKEYLOG
|
| 116 |
+
# define OPENSSL_NO_SSLKEYLOG
|
| 117 |
+
# endif
|
| 118 |
+
# ifndef OPENSSL_NO_TFO
|
| 119 |
+
# define OPENSSL_NO_TFO
|
| 120 |
+
# endif
|
| 121 |
+
# ifndef OPENSSL_NO_TRACE
|
| 122 |
+
# define OPENSSL_NO_TRACE
|
| 123 |
+
# endif
|
| 124 |
+
# ifndef OPENSSL_NO_UBSAN
|
| 125 |
+
# define OPENSSL_NO_UBSAN
|
| 126 |
+
# endif
|
| 127 |
+
# ifndef OPENSSL_NO_UNIT_TEST
|
| 128 |
+
# define OPENSSL_NO_UNIT_TEST
|
| 129 |
+
# endif
|
| 130 |
+
# ifndef OPENSSL_NO_UPLINK
|
| 131 |
+
# define OPENSSL_NO_UPLINK
|
| 132 |
+
# endif
|
| 133 |
+
# ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 134 |
+
# define OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 135 |
+
# endif
|
| 136 |
+
# ifndef OPENSSL_NO_WINSTORE
|
| 137 |
+
# define OPENSSL_NO_WINSTORE
|
| 138 |
+
# endif
|
| 139 |
+
# ifndef OPENSSL_NO_ZLIB
|
| 140 |
+
# define OPENSSL_NO_ZLIB
|
| 141 |
+
# endif
|
| 142 |
+
# ifndef OPENSSL_NO_ZLIB_DYNAMIC
|
| 143 |
+
# define OPENSSL_NO_ZLIB_DYNAMIC
|
| 144 |
+
# endif
|
| 145 |
+
# ifndef OPENSSL_NO_ZSTD
|
| 146 |
+
# define OPENSSL_NO_ZSTD
|
| 147 |
+
# endif
|
| 148 |
+
# ifndef OPENSSL_NO_ZSTD_DYNAMIC
|
| 149 |
+
# define OPENSSL_NO_ZSTD_DYNAMIC
|
| 150 |
+
# endif
|
| 151 |
+
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
| 152 |
+
# define OPENSSL_NO_DYNAMIC_ENGINE
|
| 153 |
+
# endif
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
/* Generate 80386 code? */
|
| 157 |
+
# undef I386_ONLY
|
| 158 |
+
|
| 159 |
+
/*
|
| 160 |
+
* The following are cipher-specific, but are part of the public API.
|
| 161 |
+
*/
|
| 162 |
+
# if !defined(OPENSSL_SYS_UEFI)
|
| 163 |
+
# define BN_LLONG
|
| 164 |
+
/* Only one for the following should be defined */
|
| 165 |
+
# undef SIXTY_FOUR_BIT_LONG
|
| 166 |
+
# undef SIXTY_FOUR_BIT
|
| 167 |
+
# define THIRTY_TWO_BIT
|
| 168 |
+
# endif
|
| 169 |
+
|
| 170 |
+
# define RC4_INT unsigned int
|
| 171 |
+
|
| 172 |
+
# if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
| 173 |
+
# define OPENSSL_NO_COMP_ALG
|
| 174 |
+
# else
|
| 175 |
+
# undef OPENSSL_NO_COMP_ALG
|
| 176 |
+
# endif
|
| 177 |
+
|
| 178 |
+
# ifdef __cplusplus
|
| 179 |
+
}
|
| 180 |
+
# endif
|
| 181 |
+
|
| 182 |
+
#endif /* OPENSSL_CONFIGURATION_H */
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/core_names.h
ADDED
|
@@ -0,0 +1,575 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/core_names.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CORE_NAMES_H
|
| 15 |
+
# define OPENSSL_CORE_NAMES_H
|
| 16 |
+
# pragma once
|
| 17 |
+
|
| 18 |
+
# ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
# endif
|
| 21 |
+
|
| 22 |
+
/* OSSL_CIPHER_PARAM_CTS_MODE Values */
|
| 23 |
+
# define OSSL_CIPHER_CTS_MODE_CS1 "CS1"
|
| 24 |
+
# define OSSL_CIPHER_CTS_MODE_CS2 "CS2"
|
| 25 |
+
# define OSSL_CIPHER_CTS_MODE_CS3 "CS3"
|
| 26 |
+
|
| 27 |
+
/* Known CIPHER names (not a complete list) */
|
| 28 |
+
# define OSSL_CIPHER_NAME_AES_128_GCM_SIV "AES-128-GCM-SIV"
|
| 29 |
+
# define OSSL_CIPHER_NAME_AES_192_GCM_SIV "AES-192-GCM-SIV"
|
| 30 |
+
# define OSSL_CIPHER_NAME_AES_256_GCM_SIV "AES-256-GCM-SIV"
|
| 31 |
+
|
| 32 |
+
/* Known DIGEST names (not a complete list) */
|
| 33 |
+
# define OSSL_DIGEST_NAME_MD5 "MD5"
|
| 34 |
+
# define OSSL_DIGEST_NAME_MD5_SHA1 "MD5-SHA1"
|
| 35 |
+
# define OSSL_DIGEST_NAME_SHA1 "SHA1"
|
| 36 |
+
# define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
|
| 37 |
+
# define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
|
| 38 |
+
# define OSSL_DIGEST_NAME_SHA2_256_192 "SHA2-256/192"
|
| 39 |
+
# define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
|
| 40 |
+
# define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
|
| 41 |
+
# define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
|
| 42 |
+
# define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
|
| 43 |
+
# define OSSL_DIGEST_NAME_MD2 "MD2"
|
| 44 |
+
# define OSSL_DIGEST_NAME_MD4 "MD4"
|
| 45 |
+
# define OSSL_DIGEST_NAME_MDC2 "MDC2"
|
| 46 |
+
# define OSSL_DIGEST_NAME_RIPEMD160 "RIPEMD160"
|
| 47 |
+
# define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
|
| 48 |
+
# define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
|
| 49 |
+
# define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
|
| 50 |
+
# define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
|
| 51 |
+
# define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
| 52 |
+
# define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
| 53 |
+
# define OSSL_DIGEST_NAME_SM3 "SM3"
|
| 54 |
+
|
| 55 |
+
/* Known MAC names */
|
| 56 |
+
# define OSSL_MAC_NAME_BLAKE2BMAC "BLAKE2BMAC"
|
| 57 |
+
# define OSSL_MAC_NAME_BLAKE2SMAC "BLAKE2SMAC"
|
| 58 |
+
# define OSSL_MAC_NAME_CMAC "CMAC"
|
| 59 |
+
# define OSSL_MAC_NAME_GMAC "GMAC"
|
| 60 |
+
# define OSSL_MAC_NAME_HMAC "HMAC"
|
| 61 |
+
# define OSSL_MAC_NAME_KMAC128 "KMAC128"
|
| 62 |
+
# define OSSL_MAC_NAME_KMAC256 "KMAC256"
|
| 63 |
+
# define OSSL_MAC_NAME_POLY1305 "POLY1305"
|
| 64 |
+
# define OSSL_MAC_NAME_SIPHASH "SIPHASH"
|
| 65 |
+
|
| 66 |
+
/* Known KDF names */
|
| 67 |
+
# define OSSL_KDF_NAME_HKDF "HKDF"
|
| 68 |
+
# define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
|
| 69 |
+
# define OSSL_KDF_NAME_PBKDF1 "PBKDF1"
|
| 70 |
+
# define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
| 71 |
+
# define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
| 72 |
+
# define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
| 73 |
+
# define OSSL_KDF_NAME_SSKDF "SSKDF"
|
| 74 |
+
# define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
| 75 |
+
# define OSSL_KDF_NAME_X942KDF_ASN1 "X942KDF-ASN1"
|
| 76 |
+
# define OSSL_KDF_NAME_X942KDF_CONCAT "X942KDF-CONCAT"
|
| 77 |
+
# define OSSL_KDF_NAME_X963KDF "X963KDF"
|
| 78 |
+
# define OSSL_KDF_NAME_KBKDF "KBKDF"
|
| 79 |
+
# define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
| 80 |
+
# define OSSL_KDF_NAME_HMACDRBGKDF "HMAC-DRBG-KDF"
|
| 81 |
+
|
| 82 |
+
/* RSA padding modes */
|
| 83 |
+
# define OSSL_PKEY_RSA_PAD_MODE_NONE "none"
|
| 84 |
+
# define OSSL_PKEY_RSA_PAD_MODE_PKCSV15 "pkcs1"
|
| 85 |
+
# define OSSL_PKEY_RSA_PAD_MODE_OAEP "oaep"
|
| 86 |
+
# define OSSL_PKEY_RSA_PAD_MODE_X931 "x931"
|
| 87 |
+
# define OSSL_PKEY_RSA_PAD_MODE_PSS "pss"
|
| 88 |
+
|
| 89 |
+
/* RSA pss padding salt length */
|
| 90 |
+
# define OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST "digest"
|
| 91 |
+
# define OSSL_PKEY_RSA_PSS_SALT_LEN_MAX "max"
|
| 92 |
+
# define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO "auto"
|
| 93 |
+
# define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX "auto-digestmax"
|
| 94 |
+
|
| 95 |
+
/* OSSL_PKEY_PARAM_EC_ENCODING values */
|
| 96 |
+
# define OSSL_PKEY_EC_ENCODING_EXPLICIT "explicit"
|
| 97 |
+
# define OSSL_PKEY_EC_ENCODING_GROUP "named_curve"
|
| 98 |
+
|
| 99 |
+
# define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_UNCOMPRESSED "uncompressed"
|
| 100 |
+
# define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_COMPRESSED "compressed"
|
| 101 |
+
# define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_HYBRID "hybrid"
|
| 102 |
+
|
| 103 |
+
# define OSSL_PKEY_EC_GROUP_CHECK_DEFAULT "default"
|
| 104 |
+
# define OSSL_PKEY_EC_GROUP_CHECK_NAMED "named"
|
| 105 |
+
# define OSSL_PKEY_EC_GROUP_CHECK_NAMED_NIST "named-nist"
|
| 106 |
+
|
| 107 |
+
/* PROV_SKEY well known key types */
|
| 108 |
+
# define OSSL_SKEY_TYPE_GENERIC "GENERIC-SECRET"
|
| 109 |
+
# define OSSL_SKEY_TYPE_AES "AES"
|
| 110 |
+
|
| 111 |
+
/* OSSL_KEM_PARAM_OPERATION values */
|
| 112 |
+
#define OSSL_KEM_PARAM_OPERATION_RSASVE "RSASVE"
|
| 113 |
+
#define OSSL_KEM_PARAM_OPERATION_DHKEM "DHKEM"
|
| 114 |
+
|
| 115 |
+
/* Provider configuration variables */
|
| 116 |
+
#define OSSL_PKEY_RETAIN_SEED "pkey_retain_seed"
|
| 117 |
+
|
| 118 |
+
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
| 119 |
+
# define OSSL_ALG_PARAM_ALGORITHM_ID "algorithm-id"
|
| 120 |
+
# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
|
| 121 |
+
# define OSSL_ALG_PARAM_CIPHER "cipher"
|
| 122 |
+
# define OSSL_ALG_PARAM_DIGEST "digest"
|
| 123 |
+
# define OSSL_ALG_PARAM_ENGINE "engine"
|
| 124 |
+
# define OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR "fips-indicator"
|
| 125 |
+
# define OSSL_ALG_PARAM_MAC "mac"
|
| 126 |
+
# define OSSL_ALG_PARAM_PROPERTIES "properties"
|
| 127 |
+
# define OSSL_ASYM_CIPHER_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 128 |
+
# define OSSL_ASYM_CIPHER_PARAM_ENGINE OSSL_PKEY_PARAM_ENGINE
|
| 129 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 130 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 131 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED
|
| 132 |
+
# define OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
| 133 |
+
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 134 |
+
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
| 135 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 136 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS "digest-props"
|
| 137 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
| 138 |
+
# define OSSL_ASYM_CIPHER_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
| 139 |
+
# define OSSL_ASYM_CIPHER_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
| 140 |
+
# define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
| 141 |
+
# define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
| 142 |
+
# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
|
| 143 |
+
# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
|
| 144 |
+
# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
|
| 145 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
|
| 146 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
|
| 147 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
|
| 148 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
|
| 149 |
+
# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
|
| 150 |
+
# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
|
| 151 |
+
# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
|
| 152 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
|
| 153 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
|
| 154 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
|
| 155 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
|
| 156 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
|
| 157 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
|
| 158 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
|
| 159 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
|
| 160 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
|
| 161 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
|
| 162 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
|
| 163 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
|
| 164 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
|
| 165 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
|
| 166 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
|
| 167 |
+
# define OSSL_CIPHER_PARAM_AEAD "aead"
|
| 168 |
+
# define OSSL_CIPHER_PARAM_AEAD_IVLEN OSSL_CIPHER_PARAM_IVLEN
|
| 169 |
+
# define OSSL_CIPHER_PARAM_AEAD_IV_GENERATED "iv-generated"
|
| 170 |
+
# define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey"
|
| 171 |
+
# define OSSL_CIPHER_PARAM_AEAD_TAG "tag"
|
| 172 |
+
# define OSSL_CIPHER_PARAM_AEAD_TAGLEN "taglen"
|
| 173 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad"
|
| 174 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad"
|
| 175 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen"
|
| 176 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed"
|
| 177 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv"
|
| 178 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
| 179 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 180 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD "alg_id_param"
|
| 181 |
+
# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
|
| 182 |
+
# define OSSL_CIPHER_PARAM_CTS "cts"
|
| 183 |
+
# define OSSL_CIPHER_PARAM_CTS_MODE "cts_mode"
|
| 184 |
+
# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
|
| 185 |
+
# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
|
| 186 |
+
# define OSSL_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 187 |
+
# define OSSL_CIPHER_PARAM_FIPS_ENCRYPT_CHECK "encrypt-check"
|
| 188 |
+
# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
|
| 189 |
+
# define OSSL_CIPHER_PARAM_IV "iv"
|
| 190 |
+
# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
|
| 191 |
+
# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
|
| 192 |
+
# define OSSL_CIPHER_PARAM_MODE "mode"
|
| 193 |
+
# define OSSL_CIPHER_PARAM_NUM "num"
|
| 194 |
+
# define OSSL_CIPHER_PARAM_PADDING "padding"
|
| 195 |
+
# define OSSL_CIPHER_PARAM_PIPELINE_AEAD_TAG "pipeline-tag"
|
| 196 |
+
# define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey"
|
| 197 |
+
# define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits"
|
| 198 |
+
# define OSSL_CIPHER_PARAM_ROUNDS "rounds"
|
| 199 |
+
# define OSSL_CIPHER_PARAM_SPEED "speed"
|
| 200 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
|
| 201 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD "tls1multi_aad"
|
| 202 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN "tls1multi_aadpacklen"
|
| 203 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC "tls1multi_enc"
|
| 204 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN "tls1multi_encin"
|
| 205 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN "tls1multi_enclen"
|
| 206 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
|
| 207 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE "tls1multi_maxbufsz"
|
| 208 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT "tls1multi_maxsndfrag"
|
| 209 |
+
# define OSSL_CIPHER_PARAM_TLS_MAC "tls-mac"
|
| 210 |
+
# define OSSL_CIPHER_PARAM_TLS_MAC_SIZE "tls-mac-size"
|
| 211 |
+
# define OSSL_CIPHER_PARAM_TLS_VERSION "tls-version"
|
| 212 |
+
# define OSSL_CIPHER_PARAM_UPDATED_IV "updated-iv"
|
| 213 |
+
# define OSSL_CIPHER_PARAM_USE_BITS "use-bits"
|
| 214 |
+
# define OSSL_CIPHER_PARAM_XTS_STANDARD "xts_standard"
|
| 215 |
+
# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 216 |
+
# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
|
| 217 |
+
# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
|
| 218 |
+
# define OSSL_DIGEST_PARAM_MICALG "micalg"
|
| 219 |
+
# define OSSL_DIGEST_PARAM_PAD_TYPE "pad-type"
|
| 220 |
+
# define OSSL_DIGEST_PARAM_SIZE "size"
|
| 221 |
+
# define OSSL_DIGEST_PARAM_SSL3_MS "ssl3-ms"
|
| 222 |
+
# define OSSL_DIGEST_PARAM_XOF "xof"
|
| 223 |
+
# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
|
| 224 |
+
# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 225 |
+
# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 226 |
+
# define OSSL_DRBG_PARAM_ENTROPY_REQUIRED "entropy_required"
|
| 227 |
+
# define OSSL_DRBG_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 228 |
+
# define OSSL_DRBG_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 229 |
+
# define OSSL_DRBG_PARAM_MAC OSSL_ALG_PARAM_MAC
|
| 230 |
+
# define OSSL_DRBG_PARAM_MAX_ADINLEN "max_adinlen"
|
| 231 |
+
# define OSSL_DRBG_PARAM_MAX_ENTROPYLEN "max_entropylen"
|
| 232 |
+
# define OSSL_DRBG_PARAM_MAX_LENGTH "maxium_length"
|
| 233 |
+
# define OSSL_DRBG_PARAM_MAX_NONCELEN "max_noncelen"
|
| 234 |
+
# define OSSL_DRBG_PARAM_MAX_PERSLEN "max_perslen"
|
| 235 |
+
# define OSSL_DRBG_PARAM_MIN_ENTROPYLEN "min_entropylen"
|
| 236 |
+
# define OSSL_DRBG_PARAM_MIN_LENGTH "minium_length"
|
| 237 |
+
# define OSSL_DRBG_PARAM_MIN_NONCELEN "min_noncelen"
|
| 238 |
+
# define OSSL_DRBG_PARAM_PREDICTION_RESISTANCE "prediction_resistance"
|
| 239 |
+
# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 240 |
+
# define OSSL_DRBG_PARAM_RANDOM_DATA "random_data"
|
| 241 |
+
# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
|
| 242 |
+
# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
|
| 243 |
+
# define OSSL_DRBG_PARAM_RESEED_TIME "reseed_time"
|
| 244 |
+
# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
|
| 245 |
+
# define OSSL_DRBG_PARAM_SIZE "size"
|
| 246 |
+
# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
|
| 247 |
+
# define OSSL_ENCODER_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 248 |
+
# define OSSL_ENCODER_PARAM_ENCRYPT_LEVEL "encrypt-level"
|
| 249 |
+
# define OSSL_ENCODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 250 |
+
# define OSSL_ENCODER_PARAM_SAVE_PARAMETERS "save-parameters"
|
| 251 |
+
# define OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE "ecdh-cofactor-mode"
|
| 252 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 253 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 254 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK
|
| 255 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 256 |
+
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST "kdf-digest"
|
| 257 |
+
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS "kdf-digest-props"
|
| 258 |
+
# define OSSL_EXCHANGE_PARAM_KDF_OUTLEN "kdf-outlen"
|
| 259 |
+
# define OSSL_EXCHANGE_PARAM_KDF_TYPE "kdf-type"
|
| 260 |
+
# define OSSL_EXCHANGE_PARAM_KDF_UKM "kdf-ukm"
|
| 261 |
+
# define OSSL_EXCHANGE_PARAM_PAD "pad"
|
| 262 |
+
# define OSSL_GEN_PARAM_ITERATION "iteration"
|
| 263 |
+
# define OSSL_GEN_PARAM_POTENTIAL "potential"
|
| 264 |
+
# define OSSL_KDF_PARAM_ARGON2_AD "ad"
|
| 265 |
+
# define OSSL_KDF_PARAM_ARGON2_LANES "lanes"
|
| 266 |
+
# define OSSL_KDF_PARAM_ARGON2_MEMCOST "memcost"
|
| 267 |
+
# define OSSL_KDF_PARAM_ARGON2_VERSION "version"
|
| 268 |
+
# define OSSL_KDF_PARAM_CEK_ALG "cekalg"
|
| 269 |
+
# define OSSL_KDF_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 270 |
+
# define OSSL_KDF_PARAM_CONSTANT "constant"
|
| 271 |
+
# define OSSL_KDF_PARAM_DATA "data"
|
| 272 |
+
# define OSSL_KDF_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 273 |
+
# define OSSL_KDF_PARAM_EARLY_CLEAN "early_clean"
|
| 274 |
+
# define OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 275 |
+
# define OSSL_KDF_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 276 |
+
# define OSSL_KDF_PARAM_FIPS_EMS_CHECK "ems_check"
|
| 277 |
+
# define OSSL_KDF_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 278 |
+
# define OSSL_KDF_PARAM_HMACDRBG_ENTROPY "entropy"
|
| 279 |
+
# define OSSL_KDF_PARAM_HMACDRBG_NONCE "nonce"
|
| 280 |
+
# define OSSL_KDF_PARAM_INFO "info"
|
| 281 |
+
# define OSSL_KDF_PARAM_ITER "iter"
|
| 282 |
+
# define OSSL_KDF_PARAM_KBKDF_R "r"
|
| 283 |
+
# define OSSL_KDF_PARAM_KBKDF_USE_L "use-l"
|
| 284 |
+
# define OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR "use-separator"
|
| 285 |
+
# define OSSL_KDF_PARAM_KEY "key"
|
| 286 |
+
# define OSSL_KDF_PARAM_LABEL "label"
|
| 287 |
+
# define OSSL_KDF_PARAM_MAC OSSL_ALG_PARAM_MAC
|
| 288 |
+
# define OSSL_KDF_PARAM_MAC_SIZE "maclen"
|
| 289 |
+
# define OSSL_KDF_PARAM_MODE "mode"
|
| 290 |
+
# define OSSL_KDF_PARAM_PASSWORD "pass"
|
| 291 |
+
# define OSSL_KDF_PARAM_PKCS12_ID "id"
|
| 292 |
+
# define OSSL_KDF_PARAM_PKCS5 "pkcs5"
|
| 293 |
+
# define OSSL_KDF_PARAM_PREFIX "prefix"
|
| 294 |
+
# define OSSL_KDF_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 295 |
+
# define OSSL_KDF_PARAM_SALT "salt"
|
| 296 |
+
# define OSSL_KDF_PARAM_SCRYPT_MAXMEM "maxmem_bytes"
|
| 297 |
+
# define OSSL_KDF_PARAM_SCRYPT_N "n"
|
| 298 |
+
# define OSSL_KDF_PARAM_SCRYPT_P "p"
|
| 299 |
+
# define OSSL_KDF_PARAM_SCRYPT_R "r"
|
| 300 |
+
# define OSSL_KDF_PARAM_SECRET "secret"
|
| 301 |
+
# define OSSL_KDF_PARAM_SEED "seed"
|
| 302 |
+
# define OSSL_KDF_PARAM_SIZE "size"
|
| 303 |
+
# define OSSL_KDF_PARAM_SSHKDF_SESSION_ID "session_id"
|
| 304 |
+
# define OSSL_KDF_PARAM_SSHKDF_TYPE "type"
|
| 305 |
+
# define OSSL_KDF_PARAM_SSHKDF_XCGHASH "xcghash"
|
| 306 |
+
# define OSSL_KDF_PARAM_THREADS "threads"
|
| 307 |
+
# define OSSL_KDF_PARAM_UKM "ukm"
|
| 308 |
+
# define OSSL_KDF_PARAM_X942_ACVPINFO "acvp-info"
|
| 309 |
+
# define OSSL_KDF_PARAM_X942_PARTYUINFO "partyu-info"
|
| 310 |
+
# define OSSL_KDF_PARAM_X942_PARTYVINFO "partyv-info"
|
| 311 |
+
# define OSSL_KDF_PARAM_X942_SUPP_PRIVINFO "supp-privinfo"
|
| 312 |
+
# define OSSL_KDF_PARAM_X942_SUPP_PUBINFO "supp-pubinfo"
|
| 313 |
+
# define OSSL_KDF_PARAM_X942_USE_KEYBITS "use-keybits"
|
| 314 |
+
# define OSSL_KEM_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 315 |
+
# define OSSL_KEM_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 316 |
+
# define OSSL_KEM_PARAM_IKME "ikme"
|
| 317 |
+
# define OSSL_KEM_PARAM_OPERATION "operation"
|
| 318 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
|
| 319 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
|
| 320 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
|
| 321 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
|
| 322 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
|
| 323 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
|
| 324 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
|
| 325 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
|
| 326 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
|
| 327 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
|
| 328 |
+
# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
|
| 329 |
+
# define OSSL_MAC_PARAM_BLOCK_SIZE "block-size"
|
| 330 |
+
# define OSSL_MAC_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 331 |
+
# define OSSL_MAC_PARAM_CUSTOM "custom"
|
| 332 |
+
# define OSSL_MAC_PARAM_C_ROUNDS "c-rounds"
|
| 333 |
+
# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 334 |
+
# define OSSL_MAC_PARAM_DIGEST_NOINIT "digest-noinit"
|
| 335 |
+
# define OSSL_MAC_PARAM_DIGEST_ONESHOT "digest-oneshot"
|
| 336 |
+
# define OSSL_MAC_PARAM_D_ROUNDS "d-rounds"
|
| 337 |
+
# define OSSL_MAC_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 338 |
+
# define OSSL_MAC_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 339 |
+
# define OSSL_MAC_PARAM_FIPS_NO_SHORT_MAC OSSL_PROV_PARAM_NO_SHORT_MAC
|
| 340 |
+
# define OSSL_MAC_PARAM_IV "iv"
|
| 341 |
+
# define OSSL_MAC_PARAM_KEY "key"
|
| 342 |
+
# define OSSL_MAC_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 343 |
+
# define OSSL_MAC_PARAM_SALT "salt"
|
| 344 |
+
# define OSSL_MAC_PARAM_SIZE "size"
|
| 345 |
+
# define OSSL_MAC_PARAM_TLS_DATA_SIZE "tls-data-size"
|
| 346 |
+
# define OSSL_MAC_PARAM_XOF "xof"
|
| 347 |
+
# define OSSL_OBJECT_PARAM_DATA "data"
|
| 348 |
+
# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
|
| 349 |
+
# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
|
| 350 |
+
# define OSSL_OBJECT_PARAM_DESC "desc"
|
| 351 |
+
# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
|
| 352 |
+
# define OSSL_OBJECT_PARAM_REFERENCE "reference"
|
| 353 |
+
# define OSSL_OBJECT_PARAM_TYPE "type"
|
| 354 |
+
# define OSSL_PASSPHRASE_PARAM_INFO "info"
|
| 355 |
+
# define OSSL_PKEY_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
| 356 |
+
# define OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 357 |
+
# define OSSL_PKEY_PARAM_BITS "bits"
|
| 358 |
+
# define OSSL_PKEY_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 359 |
+
# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
|
| 360 |
+
# define OSSL_PKEY_PARAM_DHKEM_IKM "dhkem-ikm"
|
| 361 |
+
# define OSSL_PKEY_PARAM_DH_GENERATOR "safeprime-generator"
|
| 362 |
+
# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
|
| 363 |
+
# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 364 |
+
# define OSSL_PKEY_PARAM_DIGEST_SIZE "digest-size"
|
| 365 |
+
# define OSSL_PKEY_PARAM_DIST_ID "distid"
|
| 366 |
+
# define OSSL_PKEY_PARAM_EC_A "a"
|
| 367 |
+
# define OSSL_PKEY_PARAM_EC_B "b"
|
| 368 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
|
| 369 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
|
| 370 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
|
| 371 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
|
| 372 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
|
| 373 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
|
| 374 |
+
# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
|
| 375 |
+
# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
|
| 376 |
+
# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
|
| 377 |
+
# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
|
| 378 |
+
# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
|
| 379 |
+
# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
|
| 380 |
+
# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
|
| 381 |
+
# define OSSL_PKEY_PARAM_EC_ORDER "order"
|
| 382 |
+
# define OSSL_PKEY_PARAM_EC_P "p"
|
| 383 |
+
# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
|
| 384 |
+
# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
|
| 385 |
+
# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
|
| 386 |
+
# define OSSL_PKEY_PARAM_EC_SEED "seed"
|
| 387 |
+
# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
|
| 388 |
+
# define OSSL_PKEY_PARAM_ENGINE OSSL_ALG_PARAM_ENGINE
|
| 389 |
+
# define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
|
| 390 |
+
# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 391 |
+
# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
| 392 |
+
# define OSSL_PKEY_PARAM_FFC_G "g"
|
| 393 |
+
# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
|
| 394 |
+
# define OSSL_PKEY_PARAM_FFC_H "hindex"
|
| 395 |
+
# define OSSL_PKEY_PARAM_FFC_P "p"
|
| 396 |
+
# define OSSL_PKEY_PARAM_FFC_PBITS "pbits"
|
| 397 |
+
# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
|
| 398 |
+
# define OSSL_PKEY_PARAM_FFC_Q "q"
|
| 399 |
+
# define OSSL_PKEY_PARAM_FFC_QBITS "qbits"
|
| 400 |
+
# define OSSL_PKEY_PARAM_FFC_SEED "seed"
|
| 401 |
+
# define OSSL_PKEY_PARAM_FFC_TYPE "type"
|
| 402 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_G "validate-g"
|
| 403 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY "validate-legacy"
|
| 404 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_PQ "validate-pq"
|
| 405 |
+
# define OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 406 |
+
# define OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK "digest-check"
|
| 407 |
+
# define OSSL_PKEY_PARAM_FIPS_KEY_CHECK "key-check"
|
| 408 |
+
# define OSSL_PKEY_PARAM_FIPS_SIGN_CHECK "sign-check"
|
| 409 |
+
# define OSSL_PKEY_PARAM_GROUP_NAME "group"
|
| 410 |
+
# define OSSL_PKEY_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
| 411 |
+
# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
|
| 412 |
+
# define OSSL_PKEY_PARAM_MASKGENFUNC "mgf"
|
| 413 |
+
# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
|
| 414 |
+
# define OSSL_PKEY_PARAM_MGF1_DIGEST "mgf1-digest"
|
| 415 |
+
# define OSSL_PKEY_PARAM_MGF1_PROPERTIES "mgf1-properties"
|
| 416 |
+
# define OSSL_PKEY_PARAM_ML_DSA_INPUT_FORMATS "ml-dsa.input_formats"
|
| 417 |
+
# define OSSL_PKEY_PARAM_ML_DSA_OUTPUT_FORMATS "ml-dsa.output_formats"
|
| 418 |
+
# define OSSL_PKEY_PARAM_ML_DSA_PREFER_SEED "ml-dsa.prefer_seed"
|
| 419 |
+
# define OSSL_PKEY_PARAM_ML_DSA_RETAIN_SEED "ml-dsa.retain_seed"
|
| 420 |
+
# define OSSL_PKEY_PARAM_ML_DSA_SEED "seed"
|
| 421 |
+
# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
|
| 422 |
+
# define OSSL_PKEY_PARAM_ML_KEM_INPUT_FORMATS "ml-kem.input_formats"
|
| 423 |
+
# define OSSL_PKEY_PARAM_ML_KEM_OUTPUT_FORMATS "ml-kem.output_formats"
|
| 424 |
+
# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
|
| 425 |
+
# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
|
| 426 |
+
# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
|
| 427 |
+
# define OSSL_PKEY_PARAM_PAD_MODE "pad-mode"
|
| 428 |
+
# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
|
| 429 |
+
# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 430 |
+
# define OSSL_PKEY_PARAM_PUB_KEY "pub"
|
| 431 |
+
# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
|
| 432 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
|
| 433 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT1 "rsa-coefficient1"
|
| 434 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT2 "rsa-coefficient2"
|
| 435 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT3 "rsa-coefficient3"
|
| 436 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT4 "rsa-coefficient4"
|
| 437 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT5 "rsa-coefficient5"
|
| 438 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT6 "rsa-coefficient6"
|
| 439 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT7 "rsa-coefficient7"
|
| 440 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT8 "rsa-coefficient8"
|
| 441 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT9 "rsa-coefficient9"
|
| 442 |
+
# define OSSL_PKEY_PARAM_RSA_D "d"
|
| 443 |
+
# define OSSL_PKEY_PARAM_RSA_DERIVE_FROM_PQ "rsa-derive-from-pq"
|
| 444 |
+
# define OSSL_PKEY_PARAM_RSA_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 445 |
+
# define OSSL_PKEY_PARAM_RSA_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
| 446 |
+
# define OSSL_PKEY_PARAM_RSA_E "e"
|
| 447 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
|
| 448 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT1 "rsa-exponent1"
|
| 449 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT10 "rsa-exponent10"
|
| 450 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT2 "rsa-exponent2"
|
| 451 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT3 "rsa-exponent3"
|
| 452 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT4 "rsa-exponent4"
|
| 453 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT5 "rsa-exponent5"
|
| 454 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT6 "rsa-exponent6"
|
| 455 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT7 "rsa-exponent7"
|
| 456 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT8 "rsa-exponent8"
|
| 457 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT9 "rsa-exponent9"
|
| 458 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
|
| 459 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR1 "rsa-factor1"
|
| 460 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR10 "rsa-factor10"
|
| 461 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR2 "rsa-factor2"
|
| 462 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR3 "rsa-factor3"
|
| 463 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR4 "rsa-factor4"
|
| 464 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR5 "rsa-factor5"
|
| 465 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR6 "rsa-factor6"
|
| 466 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR7 "rsa-factor7"
|
| 467 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR8 "rsa-factor8"
|
| 468 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR9 "rsa-factor9"
|
| 469 |
+
# define OSSL_PKEY_PARAM_RSA_MASKGENFUNC OSSL_PKEY_PARAM_MASKGENFUNC
|
| 470 |
+
# define OSSL_PKEY_PARAM_RSA_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 471 |
+
# define OSSL_PKEY_PARAM_RSA_N "n"
|
| 472 |
+
# define OSSL_PKEY_PARAM_RSA_PRIMES "primes"
|
| 473 |
+
# define OSSL_PKEY_PARAM_RSA_PSS_SALTLEN "saltlen"
|
| 474 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_P1 "p1"
|
| 475 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_P2 "p2"
|
| 476 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_Q1 "q1"
|
| 477 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_Q2 "q2"
|
| 478 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP "xp"
|
| 479 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP1 "xp1"
|
| 480 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP2 "xp2"
|
| 481 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ "xq"
|
| 482 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ1 "xq1"
|
| 483 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ2 "xq2"
|
| 484 |
+
# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
|
| 485 |
+
# define OSSL_PKEY_PARAM_SLH_DSA_SEED "seed"
|
| 486 |
+
# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
|
| 487 |
+
# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
|
| 488 |
+
# define OSSL_PROV_PARAM_BUILDINFO "buildinfo"
|
| 489 |
+
# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
|
| 490 |
+
# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
|
| 491 |
+
# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
|
| 492 |
+
# define OSSL_PROV_PARAM_DRBG_TRUNC_DIGEST "drbg-no-trunc-md"
|
| 493 |
+
# define OSSL_PROV_PARAM_DSA_SIGN_DISABLED "dsa-sign-disabled"
|
| 494 |
+
# define OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK "ecdh-cofactor-check"
|
| 495 |
+
# define OSSL_PROV_PARAM_HKDF_DIGEST_CHECK "hkdf-digest-check"
|
| 496 |
+
# define OSSL_PROV_PARAM_HKDF_KEY_CHECK "hkdf-key-check"
|
| 497 |
+
# define OSSL_PROV_PARAM_HMAC_KEY_CHECK "hmac-key-check"
|
| 498 |
+
# define OSSL_PROV_PARAM_KBKDF_KEY_CHECK "kbkdf-key-check"
|
| 499 |
+
# define OSSL_PROV_PARAM_KMAC_KEY_CHECK "kmac-key-check"
|
| 500 |
+
# define OSSL_PROV_PARAM_NAME "name"
|
| 501 |
+
# define OSSL_PROV_PARAM_NO_SHORT_MAC "no-short-mac"
|
| 502 |
+
# define OSSL_PROV_PARAM_PBKDF2_LOWER_BOUND_CHECK "pbkdf2-lower-bound-check"
|
| 503 |
+
# define OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED "rsa-pkcs15-pad-disabled"
|
| 504 |
+
# define OSSL_PROV_PARAM_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
| 505 |
+
# define OSSL_PROV_PARAM_RSA_SIGN_X931_PAD_DISABLED "rsa-sign-x931-pad-disabled"
|
| 506 |
+
# define OSSL_PROV_PARAM_SECURITY_CHECKS "security-checks"
|
| 507 |
+
# define OSSL_PROV_PARAM_SELF_TEST_DESC "st-desc"
|
| 508 |
+
# define OSSL_PROV_PARAM_SELF_TEST_PHASE "st-phase"
|
| 509 |
+
# define OSSL_PROV_PARAM_SELF_TEST_TYPE "st-type"
|
| 510 |
+
# define OSSL_PROV_PARAM_SIGNATURE_DIGEST_CHECK "signature-digest-check"
|
| 511 |
+
# define OSSL_PROV_PARAM_SSHKDF_DIGEST_CHECK "sshkdf-digest-check"
|
| 512 |
+
# define OSSL_PROV_PARAM_SSHKDF_KEY_CHECK "sshkdf-key-check"
|
| 513 |
+
# define OSSL_PROV_PARAM_SSKDF_DIGEST_CHECK "sskdf-digest-check"
|
| 514 |
+
# define OSSL_PROV_PARAM_SSKDF_KEY_CHECK "sskdf-key-check"
|
| 515 |
+
# define OSSL_PROV_PARAM_STATUS "status"
|
| 516 |
+
# define OSSL_PROV_PARAM_TDES_ENCRYPT_DISABLED "tdes-encrypt-disabled"
|
| 517 |
+
# define OSSL_PROV_PARAM_TLS13_KDF_DIGEST_CHECK "tls13-kdf-digest-check"
|
| 518 |
+
# define OSSL_PROV_PARAM_TLS13_KDF_KEY_CHECK "tls13-kdf-key-check"
|
| 519 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_DIGEST_CHECK "tls1-prf-digest-check"
|
| 520 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_EMS_CHECK "tls1-prf-ems-check"
|
| 521 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_KEY_CHECK "tls1-prf-key-check"
|
| 522 |
+
# define OSSL_PROV_PARAM_VERSION "version"
|
| 523 |
+
# define OSSL_PROV_PARAM_X942KDF_KEY_CHECK "x942kdf-key-check"
|
| 524 |
+
# define OSSL_PROV_PARAM_X963KDF_DIGEST_CHECK "x963kdf-digest-check"
|
| 525 |
+
# define OSSL_PROV_PARAM_X963KDF_KEY_CHECK "x963kdf-key-check"
|
| 526 |
+
# define OSSL_RAND_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 527 |
+
# define OSSL_RAND_PARAM_GENERATE "generate"
|
| 528 |
+
# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
|
| 529 |
+
# define OSSL_RAND_PARAM_STATE "state"
|
| 530 |
+
# define OSSL_RAND_PARAM_STRENGTH "strength"
|
| 531 |
+
# define OSSL_RAND_PARAM_TEST_ENTROPY "test_entropy"
|
| 532 |
+
# define OSSL_RAND_PARAM_TEST_NONCE "test_nonce"
|
| 533 |
+
# define OSSL_SIGNATURE_PARAM_ADD_RANDOM "additional-random"
|
| 534 |
+
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID OSSL_PKEY_PARAM_ALGORITHM_ID
|
| 535 |
+
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID_PARAMS OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS
|
| 536 |
+
# define OSSL_SIGNATURE_PARAM_CONTEXT_STRING "context-string"
|
| 537 |
+
# define OSSL_SIGNATURE_PARAM_DETERMINISTIC "deterministic"
|
| 538 |
+
# define OSSL_SIGNATURE_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 539 |
+
# define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE
|
| 540 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 541 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 542 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 543 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
| 544 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_CHECK OSSL_PKEY_PARAM_FIPS_SIGN_CHECK
|
| 545 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_X931_PAD_CHECK "sign-x931-pad-check"
|
| 546 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE "verify-message"
|
| 547 |
+
# define OSSL_SIGNATURE_PARAM_INSTANCE "instance"
|
| 548 |
+
# define OSSL_SIGNATURE_PARAM_KAT "kat"
|
| 549 |
+
# define OSSL_SIGNATURE_PARAM_MESSAGE_ENCODING "message-encoding"
|
| 550 |
+
# define OSSL_SIGNATURE_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 551 |
+
# define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
| 552 |
+
# define OSSL_SIGNATURE_PARAM_MU "mu"
|
| 553 |
+
# define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce-type"
|
| 554 |
+
# define OSSL_SIGNATURE_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
| 555 |
+
# define OSSL_SIGNATURE_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
| 556 |
+
# define OSSL_SIGNATURE_PARAM_PSS_SALTLEN "saltlen"
|
| 557 |
+
# define OSSL_SIGNATURE_PARAM_SIGNATURE "signature"
|
| 558 |
+
# define OSSL_SIGNATURE_PARAM_TEST_ENTROPY "test-entropy"
|
| 559 |
+
# define OSSL_SKEY_PARAM_KEY_LENGTH "key-length"
|
| 560 |
+
# define OSSL_SKEY_PARAM_RAW_BYTES "raw-bytes"
|
| 561 |
+
# define OSSL_STORE_PARAM_ALIAS "alias"
|
| 562 |
+
# define OSSL_STORE_PARAM_DIGEST "digest"
|
| 563 |
+
# define OSSL_STORE_PARAM_EXPECT "expect"
|
| 564 |
+
# define OSSL_STORE_PARAM_FINGERPRINT "fingerprint"
|
| 565 |
+
# define OSSL_STORE_PARAM_INPUT_TYPE "input-type"
|
| 566 |
+
# define OSSL_STORE_PARAM_ISSUER "name"
|
| 567 |
+
# define OSSL_STORE_PARAM_PROPERTIES "properties"
|
| 568 |
+
# define OSSL_STORE_PARAM_SERIAL "serial"
|
| 569 |
+
# define OSSL_STORE_PARAM_SUBJECT "subject"
|
| 570 |
+
|
| 571 |
+
# ifdef __cplusplus
|
| 572 |
+
}
|
| 573 |
+
# endif
|
| 574 |
+
|
| 575 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/crmf.h
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*-
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/crmf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2007-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright Nokia 2007-2019
|
| 7 |
+
* Copyright Siemens AG 2015-2019
|
| 8 |
+
*
|
| 9 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 10 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 11 |
+
* in the file LICENSE in the source distribution or at
|
| 12 |
+
* https://www.openssl.org/source/license.html
|
| 13 |
+
*
|
| 14 |
+
* CRMF (RFC 4211) implementation by M. Peylo, M. Viljanen, and D. von Oheimb.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_CRMF_H
|
| 20 |
+
# define OPENSSL_CRMF_H
|
| 21 |
+
|
| 22 |
+
# include <openssl/opensslconf.h>
|
| 23 |
+
|
| 24 |
+
# ifndef OPENSSL_NO_CRMF
|
| 25 |
+
# include <openssl/opensslv.h>
|
| 26 |
+
# include <openssl/safestack.h>
|
| 27 |
+
# include <openssl/crmferr.h>
|
| 28 |
+
# include <openssl/x509v3.h> /* for GENERAL_NAME etc. */
|
| 29 |
+
# include <openssl/cms.h>
|
| 30 |
+
|
| 31 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 32 |
+
# include <openssl/types.h>
|
| 33 |
+
# include <openssl/x509.h>
|
| 34 |
+
|
| 35 |
+
# ifdef __cplusplus
|
| 36 |
+
extern "C" {
|
| 37 |
+
# endif
|
| 38 |
+
|
| 39 |
+
# define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
|
| 40 |
+
# define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
|
| 41 |
+
# define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
|
| 42 |
+
# define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3
|
| 43 |
+
# define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4
|
| 44 |
+
|
| 45 |
+
# define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0
|
| 46 |
+
# define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1
|
| 47 |
+
typedef struct ossl_crmf_encryptedvalue_st OSSL_CRMF_ENCRYPTEDVALUE;
|
| 48 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE)
|
| 49 |
+
|
| 50 |
+
typedef struct ossl_crmf_encryptedkey_st OSSL_CRMF_ENCRYPTEDKEY;
|
| 51 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDKEY)
|
| 52 |
+
|
| 53 |
+
typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG;
|
| 54 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG)
|
| 55 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG)
|
| 56 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
| 57 |
+
#define sk_OSSL_CRMF_MSG_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))
|
| 58 |
+
#define sk_OSSL_CRMF_MSG_value(sk, idx) ((OSSL_CRMF_MSG *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), (idx)))
|
| 59 |
+
#define sk_OSSL_CRMF_MSG_new(cmp) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)))
|
| 60 |
+
#define sk_OSSL_CRMF_MSG_new_null() ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_null())
|
| 61 |
+
#define sk_OSSL_CRMF_MSG_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp), (n)))
|
| 62 |
+
#define sk_OSSL_CRMF_MSG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (n))
|
| 63 |
+
#define sk_OSSL_CRMF_MSG_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
| 64 |
+
#define sk_OSSL_CRMF_MSG_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
| 65 |
+
#define sk_OSSL_CRMF_MSG_delete(sk, i) ((OSSL_CRMF_MSG *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (i)))
|
| 66 |
+
#define sk_OSSL_CRMF_MSG_delete_ptr(sk, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr)))
|
| 67 |
+
#define sk_OSSL_CRMF_MSG_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 68 |
+
#define sk_OSSL_CRMF_MSG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 69 |
+
#define sk_OSSL_CRMF_MSG_pop(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_MSG_sk_type(sk)))
|
| 70 |
+
#define sk_OSSL_CRMF_MSG_shift(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_MSG_sk_type(sk)))
|
| 71 |
+
#define sk_OSSL_CRMF_MSG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk),ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc))
|
| 72 |
+
#define sk_OSSL_CRMF_MSG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), (idx))
|
| 73 |
+
#define sk_OSSL_CRMF_MSG_set(sk, idx, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (idx), ossl_check_OSSL_CRMF_MSG_type(ptr)))
|
| 74 |
+
#define sk_OSSL_CRMF_MSG_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 75 |
+
#define sk_OSSL_CRMF_MSG_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 76 |
+
#define sk_OSSL_CRMF_MSG_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), pnum)
|
| 77 |
+
#define sk_OSSL_CRMF_MSG_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
| 78 |
+
#define sk_OSSL_CRMF_MSG_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))
|
| 79 |
+
#define sk_OSSL_CRMF_MSG_dup(sk) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk)))
|
| 80 |
+
#define sk_OSSL_CRMF_MSG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc)))
|
| 81 |
+
#define sk_OSSL_CRMF_MSG_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_MSG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)))
|
| 82 |
+
|
| 83 |
+
typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE;
|
| 84 |
+
void OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(OSSL_CRMF_ATTRIBUTETYPEANDVALUE *v);
|
| 85 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
| 86 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
| 87 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 88 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value(sk, idx) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx)))
|
| 89 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new(cmp) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp)))
|
| 90 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new_null() ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_new_null())
|
| 91 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp), (n)))
|
| 92 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (n))
|
| 93 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 94 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 95 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_delete(sk, i) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (i)))
|
| 96 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_delete_ptr(sk, ptr) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr)))
|
| 97 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 98 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 99 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop(sk) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
| 100 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_shift(sk) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
| 101 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk),ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_type(freefunc))
|
| 102 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr), (idx))
|
| 103 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_set(sk, idx, ptr) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr)))
|
| 104 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 105 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 106 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr), pnum)
|
| 107 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 108 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 109 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_dup(sk) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
| 110 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_type(freefunc)))
|
| 111 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp)))
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER;
|
| 115 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER)
|
| 116 |
+
typedef struct ossl_crmf_poposigningkey_st OSSL_CRMF_POPOSIGNINGKEY;
|
| 117 |
+
typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST;
|
| 118 |
+
typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID;
|
| 119 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID)
|
| 120 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID)
|
| 121 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTID)
|
| 122 |
+
#define sk_OSSL_CRMF_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))
|
| 123 |
+
#define sk_OSSL_CRMF_CERTID_value(sk, idx) ((OSSL_CRMF_CERTID *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), (idx)))
|
| 124 |
+
#define sk_OSSL_CRMF_CERTID_new(cmp) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)))
|
| 125 |
+
#define sk_OSSL_CRMF_CERTID_new_null() ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_null())
|
| 126 |
+
#define sk_OSSL_CRMF_CERTID_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp), (n)))
|
| 127 |
+
#define sk_OSSL_CRMF_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (n))
|
| 128 |
+
#define sk_OSSL_CRMF_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
| 129 |
+
#define sk_OSSL_CRMF_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
| 130 |
+
#define sk_OSSL_CRMF_CERTID_delete(sk, i) ((OSSL_CRMF_CERTID *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (i)))
|
| 131 |
+
#define sk_OSSL_CRMF_CERTID_delete_ptr(sk, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr)))
|
| 132 |
+
#define sk_OSSL_CRMF_CERTID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 133 |
+
#define sk_OSSL_CRMF_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 134 |
+
#define sk_OSSL_CRMF_CERTID_pop(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)))
|
| 135 |
+
#define sk_OSSL_CRMF_CERTID_shift(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)))
|
| 136 |
+
#define sk_OSSL_CRMF_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk),ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc))
|
| 137 |
+
#define sk_OSSL_CRMF_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), (idx))
|
| 138 |
+
#define sk_OSSL_CRMF_CERTID_set(sk, idx, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (idx), ossl_check_OSSL_CRMF_CERTID_type(ptr)))
|
| 139 |
+
#define sk_OSSL_CRMF_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 140 |
+
#define sk_OSSL_CRMF_CERTID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 141 |
+
#define sk_OSSL_CRMF_CERTID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), pnum)
|
| 142 |
+
#define sk_OSSL_CRMF_CERTID_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
| 143 |
+
#define sk_OSSL_CRMF_CERTID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))
|
| 144 |
+
#define sk_OSSL_CRMF_CERTID_dup(sk) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk)))
|
| 145 |
+
#define sk_OSSL_CRMF_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc)))
|
| 146 |
+
#define sk_OSSL_CRMF_CERTID_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)))
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO;
|
| 150 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO)
|
| 151 |
+
typedef struct ossl_crmf_singlepubinfo_st OSSL_CRMF_SINGLEPUBINFO;
|
| 152 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_SINGLEPUBINFO)
|
| 153 |
+
typedef struct ossl_crmf_certtemplate_st OSSL_CRMF_CERTTEMPLATE;
|
| 154 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTTEMPLATE)
|
| 155 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTTEMPLATE)
|
| 156 |
+
typedef STACK_OF(OSSL_CRMF_MSG) OSSL_CRMF_MSGS;
|
| 157 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSGS)
|
| 158 |
+
|
| 159 |
+
typedef struct ossl_crmf_optionalvalidity_st OSSL_CRMF_OPTIONALVALIDITY;
|
| 160 |
+
|
| 161 |
+
/* crmf_pbm.c */
|
| 162 |
+
OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(OSSL_LIB_CTX *libctx, size_t slen,
|
| 163 |
+
int owfnid, size_t itercnt,
|
| 164 |
+
int macnid);
|
| 165 |
+
int OSSL_CRMF_pbm_new(OSSL_LIB_CTX *libctx, const char *propq,
|
| 166 |
+
const OSSL_CRMF_PBMPARAMETER *pbmp,
|
| 167 |
+
const unsigned char *msg, size_t msglen,
|
| 168 |
+
const unsigned char *sec, size_t seclen,
|
| 169 |
+
unsigned char **mac, size_t *maclen);
|
| 170 |
+
|
| 171 |
+
/* crmf_lib.c */
|
| 172 |
+
int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
|
| 173 |
+
const ASN1_UTF8STRING *tok);
|
| 174 |
+
ASN1_UTF8STRING
|
| 175 |
+
*OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg);
|
| 176 |
+
int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
|
| 177 |
+
const ASN1_UTF8STRING *auth);
|
| 178 |
+
ASN1_UTF8STRING
|
| 179 |
+
*OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg);
|
| 180 |
+
int
|
| 181 |
+
OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
| 182 |
+
OSSL_CRMF_SINGLEPUBINFO *spi);
|
| 183 |
+
# define OSSL_CRMF_PUB_METHOD_DONTCARE 0
|
| 184 |
+
# define OSSL_CRMF_PUB_METHOD_X500 1
|
| 185 |
+
# define OSSL_CRMF_PUB_METHOD_WEB 2
|
| 186 |
+
# define OSSL_CRMF_PUB_METHOD_LDAP 3
|
| 187 |
+
int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
|
| 188 |
+
int method, GENERAL_NAME *nm);
|
| 189 |
+
# define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
|
| 190 |
+
# define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
|
| 191 |
+
int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
| 192 |
+
int action);
|
| 193 |
+
int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
|
| 194 |
+
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
|
| 195 |
+
OSSL_CRMF_PKIPUBLICATIONINFO
|
| 196 |
+
*OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg);
|
| 197 |
+
int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
|
| 198 |
+
const X509_PUBKEY *pubkey);
|
| 199 |
+
X509_PUBKEY
|
| 200 |
+
*OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg);
|
| 201 |
+
int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
|
| 202 |
+
const OSSL_CRMF_CERTID *cid);
|
| 203 |
+
OSSL_CRMF_CERTID
|
| 204 |
+
*OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg);
|
| 205 |
+
OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
|
| 206 |
+
const ASN1_INTEGER *serial);
|
| 207 |
+
|
| 208 |
+
int OSSL_CRMF_MSG_set1_regInfo_utf8Pairs(OSSL_CRMF_MSG *msg,
|
| 209 |
+
const ASN1_UTF8STRING *utf8pairs);
|
| 210 |
+
ASN1_UTF8STRING
|
| 211 |
+
*OSSL_CRMF_MSG_get0_regInfo_utf8Pairs(const OSSL_CRMF_MSG *msg);
|
| 212 |
+
int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg,
|
| 213 |
+
const OSSL_CRMF_CERTREQUEST *cr);
|
| 214 |
+
OSSL_CRMF_CERTREQUEST
|
| 215 |
+
*OSSL_CRMF_MSG_get0_regInfo_certReq(const OSSL_CRMF_MSG *msg);
|
| 216 |
+
|
| 217 |
+
int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm,
|
| 218 |
+
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
|
| 219 |
+
int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
|
| 220 |
+
int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
|
| 221 |
+
int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
|
| 222 |
+
|
| 223 |
+
int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
|
| 224 |
+
# define OSSL_CRMF_POPO_NONE -1
|
| 225 |
+
# define OSSL_CRMF_POPO_RAVERIFIED 0
|
| 226 |
+
# define OSSL_CRMF_POPO_SIGNATURE 1
|
| 227 |
+
# define OSSL_CRMF_POPO_KEYENC 2
|
| 228 |
+
# define OSSL_CRMF_POPO_KEYAGREE 3
|
| 229 |
+
int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm,
|
| 230 |
+
EVP_PKEY *pkey, const EVP_MD *digest,
|
| 231 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 232 |
+
int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
|
| 233 |
+
int rid, int acceptRAVerified,
|
| 234 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 235 |
+
OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
|
| 236 |
+
X509_PUBKEY
|
| 237 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 238 |
+
const X509_NAME
|
| 239 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 240 |
+
const X509_NAME
|
| 241 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 242 |
+
const ASN1_INTEGER
|
| 243 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 244 |
+
X509_EXTENSIONS
|
| 245 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 246 |
+
const X509_NAME
|
| 247 |
+
*OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
| 248 |
+
const ASN1_INTEGER
|
| 249 |
+
*OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
| 250 |
+
int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
|
| 251 |
+
EVP_PKEY *pubkey,
|
| 252 |
+
const X509_NAME *subject,
|
| 253 |
+
const X509_NAME *issuer,
|
| 254 |
+
const ASN1_INTEGER *serial);
|
| 255 |
+
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
| 256 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 257 |
+
EVP_PKEY *pkey);
|
| 258 |
+
X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
|
| 259 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 260 |
+
EVP_PKEY *pkey, unsigned int flags);
|
| 261 |
+
unsigned char
|
| 262 |
+
*OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
|
| 263 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 264 |
+
EVP_PKEY *pkey, int *outlen);
|
| 265 |
+
EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encryptedKey,
|
| 266 |
+
X509_STORE *ts, STACK_OF(X509) *extra, EVP_PKEY *pkey,
|
| 267 |
+
X509 *cert, ASN1_OCTET_STRING *secret,
|
| 268 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 269 |
+
int OSSL_CRMF_MSG_centralkeygen_requested(const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr);
|
| 270 |
+
# ifndef OPENSSL_NO_CMS
|
| 271 |
+
OSSL_CRMF_ENCRYPTEDKEY *OSSL_CRMF_ENCRYPTEDKEY_init_envdata(CMS_EnvelopedData *envdata);
|
| 272 |
+
# endif
|
| 273 |
+
|
| 274 |
+
# ifdef __cplusplus
|
| 275 |
+
}
|
| 276 |
+
# endif
|
| 277 |
+
# endif /* !defined(OPENSSL_NO_CRMF) */
|
| 278 |
+
#endif /* !defined(OPENSSL_CRMF_H) */
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ct.h
ADDED
|
@@ -0,0 +1,573 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ct.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_CT_H
|
| 16 |
+
# define OPENSSL_CT_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_CT_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
|
| 26 |
+
# ifndef OPENSSL_NO_CT
|
| 27 |
+
# include <openssl/types.h>
|
| 28 |
+
# include <openssl/safestack.h>
|
| 29 |
+
# include <openssl/x509.h>
|
| 30 |
+
# include <openssl/cterr.h>
|
| 31 |
+
# ifdef __cplusplus
|
| 32 |
+
extern "C" {
|
| 33 |
+
# endif
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
/* Minimum RSA key size, from RFC6962 */
|
| 37 |
+
# define SCT_MIN_RSA_BITS 2048
|
| 38 |
+
|
| 39 |
+
/* All hashes are SHA256 in v1 of Certificate Transparency */
|
| 40 |
+
# define CT_V1_HASHLEN SHA256_DIGEST_LENGTH
|
| 41 |
+
|
| 42 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SCT, SCT, SCT)
|
| 43 |
+
#define sk_SCT_num(sk) OPENSSL_sk_num(ossl_check_const_SCT_sk_type(sk))
|
| 44 |
+
#define sk_SCT_value(sk, idx) ((SCT *)OPENSSL_sk_value(ossl_check_const_SCT_sk_type(sk), (idx)))
|
| 45 |
+
#define sk_SCT_new(cmp) ((STACK_OF(SCT) *)OPENSSL_sk_new(ossl_check_SCT_compfunc_type(cmp)))
|
| 46 |
+
#define sk_SCT_new_null() ((STACK_OF(SCT) *)OPENSSL_sk_new_null())
|
| 47 |
+
#define sk_SCT_new_reserve(cmp, n) ((STACK_OF(SCT) *)OPENSSL_sk_new_reserve(ossl_check_SCT_compfunc_type(cmp), (n)))
|
| 48 |
+
#define sk_SCT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SCT_sk_type(sk), (n))
|
| 49 |
+
#define sk_SCT_free(sk) OPENSSL_sk_free(ossl_check_SCT_sk_type(sk))
|
| 50 |
+
#define sk_SCT_zero(sk) OPENSSL_sk_zero(ossl_check_SCT_sk_type(sk))
|
| 51 |
+
#define sk_SCT_delete(sk, i) ((SCT *)OPENSSL_sk_delete(ossl_check_SCT_sk_type(sk), (i)))
|
| 52 |
+
#define sk_SCT_delete_ptr(sk, ptr) ((SCT *)OPENSSL_sk_delete_ptr(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr)))
|
| 53 |
+
#define sk_SCT_push(sk, ptr) OPENSSL_sk_push(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 54 |
+
#define sk_SCT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 55 |
+
#define sk_SCT_pop(sk) ((SCT *)OPENSSL_sk_pop(ossl_check_SCT_sk_type(sk)))
|
| 56 |
+
#define sk_SCT_shift(sk) ((SCT *)OPENSSL_sk_shift(ossl_check_SCT_sk_type(sk)))
|
| 57 |
+
#define sk_SCT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SCT_sk_type(sk),ossl_check_SCT_freefunc_type(freefunc))
|
| 58 |
+
#define sk_SCT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr), (idx))
|
| 59 |
+
#define sk_SCT_set(sk, idx, ptr) ((SCT *)OPENSSL_sk_set(ossl_check_SCT_sk_type(sk), (idx), ossl_check_SCT_type(ptr)))
|
| 60 |
+
#define sk_SCT_find(sk, ptr) OPENSSL_sk_find(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 61 |
+
#define sk_SCT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 62 |
+
#define sk_SCT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr), pnum)
|
| 63 |
+
#define sk_SCT_sort(sk) OPENSSL_sk_sort(ossl_check_SCT_sk_type(sk))
|
| 64 |
+
#define sk_SCT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SCT_sk_type(sk))
|
| 65 |
+
#define sk_SCT_dup(sk) ((STACK_OF(SCT) *)OPENSSL_sk_dup(ossl_check_const_SCT_sk_type(sk)))
|
| 66 |
+
#define sk_SCT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SCT) *)OPENSSL_sk_deep_copy(ossl_check_const_SCT_sk_type(sk), ossl_check_SCT_copyfunc_type(copyfunc), ossl_check_SCT_freefunc_type(freefunc)))
|
| 67 |
+
#define sk_SCT_set_cmp_func(sk, cmp) ((sk_SCT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SCT_sk_type(sk), ossl_check_SCT_compfunc_type(cmp)))
|
| 68 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CTLOG, CTLOG, CTLOG)
|
| 69 |
+
#define sk_CTLOG_num(sk) OPENSSL_sk_num(ossl_check_const_CTLOG_sk_type(sk))
|
| 70 |
+
#define sk_CTLOG_value(sk, idx) ((CTLOG *)OPENSSL_sk_value(ossl_check_const_CTLOG_sk_type(sk), (idx)))
|
| 71 |
+
#define sk_CTLOG_new(cmp) ((STACK_OF(CTLOG) *)OPENSSL_sk_new(ossl_check_CTLOG_compfunc_type(cmp)))
|
| 72 |
+
#define sk_CTLOG_new_null() ((STACK_OF(CTLOG) *)OPENSSL_sk_new_null())
|
| 73 |
+
#define sk_CTLOG_new_reserve(cmp, n) ((STACK_OF(CTLOG) *)OPENSSL_sk_new_reserve(ossl_check_CTLOG_compfunc_type(cmp), (n)))
|
| 74 |
+
#define sk_CTLOG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CTLOG_sk_type(sk), (n))
|
| 75 |
+
#define sk_CTLOG_free(sk) OPENSSL_sk_free(ossl_check_CTLOG_sk_type(sk))
|
| 76 |
+
#define sk_CTLOG_zero(sk) OPENSSL_sk_zero(ossl_check_CTLOG_sk_type(sk))
|
| 77 |
+
#define sk_CTLOG_delete(sk, i) ((CTLOG *)OPENSSL_sk_delete(ossl_check_CTLOG_sk_type(sk), (i)))
|
| 78 |
+
#define sk_CTLOG_delete_ptr(sk, ptr) ((CTLOG *)OPENSSL_sk_delete_ptr(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr)))
|
| 79 |
+
#define sk_CTLOG_push(sk, ptr) OPENSSL_sk_push(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 80 |
+
#define sk_CTLOG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 81 |
+
#define sk_CTLOG_pop(sk) ((CTLOG *)OPENSSL_sk_pop(ossl_check_CTLOG_sk_type(sk)))
|
| 82 |
+
#define sk_CTLOG_shift(sk) ((CTLOG *)OPENSSL_sk_shift(ossl_check_CTLOG_sk_type(sk)))
|
| 83 |
+
#define sk_CTLOG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CTLOG_sk_type(sk),ossl_check_CTLOG_freefunc_type(freefunc))
|
| 84 |
+
#define sk_CTLOG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr), (idx))
|
| 85 |
+
#define sk_CTLOG_set(sk, idx, ptr) ((CTLOG *)OPENSSL_sk_set(ossl_check_CTLOG_sk_type(sk), (idx), ossl_check_CTLOG_type(ptr)))
|
| 86 |
+
#define sk_CTLOG_find(sk, ptr) OPENSSL_sk_find(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 87 |
+
#define sk_CTLOG_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 88 |
+
#define sk_CTLOG_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr), pnum)
|
| 89 |
+
#define sk_CTLOG_sort(sk) OPENSSL_sk_sort(ossl_check_CTLOG_sk_type(sk))
|
| 90 |
+
#define sk_CTLOG_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CTLOG_sk_type(sk))
|
| 91 |
+
#define sk_CTLOG_dup(sk) ((STACK_OF(CTLOG) *)OPENSSL_sk_dup(ossl_check_const_CTLOG_sk_type(sk)))
|
| 92 |
+
#define sk_CTLOG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CTLOG) *)OPENSSL_sk_deep_copy(ossl_check_const_CTLOG_sk_type(sk), ossl_check_CTLOG_copyfunc_type(copyfunc), ossl_check_CTLOG_freefunc_type(freefunc)))
|
| 93 |
+
#define sk_CTLOG_set_cmp_func(sk, cmp) ((sk_CTLOG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_compfunc_type(cmp)))
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
typedef enum {
|
| 98 |
+
CT_LOG_ENTRY_TYPE_NOT_SET = -1,
|
| 99 |
+
CT_LOG_ENTRY_TYPE_X509 = 0,
|
| 100 |
+
CT_LOG_ENTRY_TYPE_PRECERT = 1
|
| 101 |
+
} ct_log_entry_type_t;
|
| 102 |
+
|
| 103 |
+
typedef enum {
|
| 104 |
+
SCT_VERSION_NOT_SET = -1,
|
| 105 |
+
SCT_VERSION_V1 = 0
|
| 106 |
+
} sct_version_t;
|
| 107 |
+
|
| 108 |
+
typedef enum {
|
| 109 |
+
SCT_SOURCE_UNKNOWN,
|
| 110 |
+
SCT_SOURCE_TLS_EXTENSION,
|
| 111 |
+
SCT_SOURCE_X509V3_EXTENSION,
|
| 112 |
+
SCT_SOURCE_OCSP_STAPLED_RESPONSE
|
| 113 |
+
} sct_source_t;
|
| 114 |
+
|
| 115 |
+
typedef enum {
|
| 116 |
+
SCT_VALIDATION_STATUS_NOT_SET,
|
| 117 |
+
SCT_VALIDATION_STATUS_UNKNOWN_LOG,
|
| 118 |
+
SCT_VALIDATION_STATUS_VALID,
|
| 119 |
+
SCT_VALIDATION_STATUS_INVALID,
|
| 120 |
+
SCT_VALIDATION_STATUS_UNVERIFIED,
|
| 121 |
+
SCT_VALIDATION_STATUS_UNKNOWN_VERSION
|
| 122 |
+
} sct_validation_status_t;
|
| 123 |
+
|
| 124 |
+
/******************************************
|
| 125 |
+
* CT policy evaluation context functions *
|
| 126 |
+
******************************************/
|
| 127 |
+
|
| 128 |
+
/*
|
| 129 |
+
* Creates a new, empty policy evaluation context associated with the given
|
| 130 |
+
* library context and property query string.
|
| 131 |
+
* The caller is responsible for calling CT_POLICY_EVAL_CTX_free when finished
|
| 132 |
+
* with the CT_POLICY_EVAL_CTX.
|
| 133 |
+
*/
|
| 134 |
+
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_ex(OSSL_LIB_CTX *libctx,
|
| 135 |
+
const char *propq);
|
| 136 |
+
|
| 137 |
+
/*
|
| 138 |
+
* The same as CT_POLICY_EVAL_CTX_new_ex() but the default library
|
| 139 |
+
* context and property query string is used.
|
| 140 |
+
*/
|
| 141 |
+
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
|
| 142 |
+
|
| 143 |
+
/* Deletes a policy evaluation context and anything it owns. */
|
| 144 |
+
void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
|
| 145 |
+
|
| 146 |
+
/* Gets the peer certificate that the SCTs are for */
|
| 147 |
+
X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
|
| 148 |
+
|
| 149 |
+
/*
|
| 150 |
+
* Sets the certificate associated with the received SCTs.
|
| 151 |
+
* Increments the reference count of cert.
|
| 152 |
+
* Returns 1 on success, 0 otherwise.
|
| 153 |
+
*/
|
| 154 |
+
int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
|
| 155 |
+
|
| 156 |
+
/* Gets the issuer of the aforementioned certificate */
|
| 157 |
+
X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
|
| 158 |
+
|
| 159 |
+
/*
|
| 160 |
+
* Sets the issuer of the certificate associated with the received SCTs.
|
| 161 |
+
* Increments the reference count of issuer.
|
| 162 |
+
* Returns 1 on success, 0 otherwise.
|
| 163 |
+
*/
|
| 164 |
+
int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
|
| 165 |
+
|
| 166 |
+
/* Gets the CT logs that are trusted sources of SCTs */
|
| 167 |
+
const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
|
| 168 |
+
|
| 169 |
+
/* Sets the log store that is in use. It must outlive the CT_POLICY_EVAL_CTX. */
|
| 170 |
+
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
|
| 171 |
+
CTLOG_STORE *log_store);
|
| 172 |
+
|
| 173 |
+
/*
|
| 174 |
+
* Gets the time, in milliseconds since the Unix epoch, that will be used as the
|
| 175 |
+
* current time when checking whether an SCT was issued in the future.
|
| 176 |
+
* Such SCTs will fail validation, as required by RFC6962.
|
| 177 |
+
*/
|
| 178 |
+
uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx);
|
| 179 |
+
|
| 180 |
+
/*
|
| 181 |
+
* Sets the time to evaluate SCTs against, in milliseconds since the Unix epoch.
|
| 182 |
+
* If an SCT's timestamp is after this time, it will be interpreted as having
|
| 183 |
+
* been issued in the future. RFC6962 states that "TLS clients MUST reject SCTs
|
| 184 |
+
* whose timestamp is in the future", so an SCT will not validate in this case.
|
| 185 |
+
*/
|
| 186 |
+
void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms);
|
| 187 |
+
|
| 188 |
+
/*****************
|
| 189 |
+
* SCT functions *
|
| 190 |
+
*****************/
|
| 191 |
+
|
| 192 |
+
/*
|
| 193 |
+
* Creates a new, blank SCT.
|
| 194 |
+
* The caller is responsible for calling SCT_free when finished with the SCT.
|
| 195 |
+
*/
|
| 196 |
+
SCT *SCT_new(void);
|
| 197 |
+
|
| 198 |
+
/*
|
| 199 |
+
* Creates a new SCT from some base64-encoded strings.
|
| 200 |
+
* The caller is responsible for calling SCT_free when finished with the SCT.
|
| 201 |
+
*/
|
| 202 |
+
SCT *SCT_new_from_base64(unsigned char version,
|
| 203 |
+
const char *logid_base64,
|
| 204 |
+
ct_log_entry_type_t entry_type,
|
| 205 |
+
uint64_t timestamp,
|
| 206 |
+
const char *extensions_base64,
|
| 207 |
+
const char *signature_base64);
|
| 208 |
+
|
| 209 |
+
/*
|
| 210 |
+
* Frees the SCT and the underlying data structures.
|
| 211 |
+
*/
|
| 212 |
+
void SCT_free(SCT *sct);
|
| 213 |
+
|
| 214 |
+
/*
|
| 215 |
+
* Free a stack of SCTs, and the underlying SCTs themselves.
|
| 216 |
+
* Intended to be compatible with X509V3_EXT_FREE.
|
| 217 |
+
*/
|
| 218 |
+
void SCT_LIST_free(STACK_OF(SCT) *a);
|
| 219 |
+
|
| 220 |
+
/*
|
| 221 |
+
* Returns the version of the SCT.
|
| 222 |
+
*/
|
| 223 |
+
sct_version_t SCT_get_version(const SCT *sct);
|
| 224 |
+
|
| 225 |
+
/*
|
| 226 |
+
* Set the version of an SCT.
|
| 227 |
+
* Returns 1 on success, 0 if the version is unrecognized.
|
| 228 |
+
*/
|
| 229 |
+
__owur int SCT_set_version(SCT *sct, sct_version_t version);
|
| 230 |
+
|
| 231 |
+
/*
|
| 232 |
+
* Returns the log entry type of the SCT.
|
| 233 |
+
*/
|
| 234 |
+
ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct);
|
| 235 |
+
|
| 236 |
+
/*
|
| 237 |
+
* Set the log entry type of an SCT.
|
| 238 |
+
* Returns 1 on success, 0 otherwise.
|
| 239 |
+
*/
|
| 240 |
+
__owur int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type);
|
| 241 |
+
|
| 242 |
+
/*
|
| 243 |
+
* Gets the ID of the log that an SCT came from.
|
| 244 |
+
* Ownership of the log ID remains with the SCT.
|
| 245 |
+
* Returns the length of the log ID.
|
| 246 |
+
*/
|
| 247 |
+
size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id);
|
| 248 |
+
|
| 249 |
+
/*
|
| 250 |
+
* Set the log ID of an SCT to point directly to the *log_id specified.
|
| 251 |
+
* The SCT takes ownership of the specified pointer.
|
| 252 |
+
* Returns 1 on success, 0 otherwise.
|
| 253 |
+
*/
|
| 254 |
+
__owur int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len);
|
| 255 |
+
|
| 256 |
+
/*
|
| 257 |
+
* Set the log ID of an SCT.
|
| 258 |
+
* This makes a copy of the log_id.
|
| 259 |
+
* Returns 1 on success, 0 otherwise.
|
| 260 |
+
*/
|
| 261 |
+
__owur int SCT_set1_log_id(SCT *sct, const unsigned char *log_id,
|
| 262 |
+
size_t log_id_len);
|
| 263 |
+
|
| 264 |
+
/*
|
| 265 |
+
* Returns the timestamp for the SCT (epoch time in milliseconds).
|
| 266 |
+
*/
|
| 267 |
+
uint64_t SCT_get_timestamp(const SCT *sct);
|
| 268 |
+
|
| 269 |
+
/*
|
| 270 |
+
* Set the timestamp of an SCT (epoch time in milliseconds).
|
| 271 |
+
*/
|
| 272 |
+
void SCT_set_timestamp(SCT *sct, uint64_t timestamp);
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* Return the NID for the signature used by the SCT.
|
| 276 |
+
* For CT v1, this will be either NID_sha256WithRSAEncryption or
|
| 277 |
+
* NID_ecdsa_with_SHA256 (or NID_undef if incorrect/unset).
|
| 278 |
+
*/
|
| 279 |
+
int SCT_get_signature_nid(const SCT *sct);
|
| 280 |
+
|
| 281 |
+
/*
|
| 282 |
+
* Set the signature type of an SCT
|
| 283 |
+
* For CT v1, this should be either NID_sha256WithRSAEncryption or
|
| 284 |
+
* NID_ecdsa_with_SHA256.
|
| 285 |
+
* Returns 1 on success, 0 otherwise.
|
| 286 |
+
*/
|
| 287 |
+
__owur int SCT_set_signature_nid(SCT *sct, int nid);
|
| 288 |
+
|
| 289 |
+
/*
|
| 290 |
+
* Set *ext to point to the extension data for the SCT. ext must not be NULL.
|
| 291 |
+
* The SCT retains ownership of this pointer.
|
| 292 |
+
* Returns length of the data pointed to.
|
| 293 |
+
*/
|
| 294 |
+
size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext);
|
| 295 |
+
|
| 296 |
+
/*
|
| 297 |
+
* Set the extensions of an SCT to point directly to the *ext specified.
|
| 298 |
+
* The SCT takes ownership of the specified pointer.
|
| 299 |
+
*/
|
| 300 |
+
void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len);
|
| 301 |
+
|
| 302 |
+
/*
|
| 303 |
+
* Set the extensions of an SCT.
|
| 304 |
+
* This takes a copy of the ext.
|
| 305 |
+
* Returns 1 on success, 0 otherwise.
|
| 306 |
+
*/
|
| 307 |
+
__owur int SCT_set1_extensions(SCT *sct, const unsigned char *ext,
|
| 308 |
+
size_t ext_len);
|
| 309 |
+
|
| 310 |
+
/*
|
| 311 |
+
* Set *sig to point to the signature for the SCT. sig must not be NULL.
|
| 312 |
+
* The SCT retains ownership of this pointer.
|
| 313 |
+
* Returns length of the data pointed to.
|
| 314 |
+
*/
|
| 315 |
+
size_t SCT_get0_signature(const SCT *sct, unsigned char **sig);
|
| 316 |
+
|
| 317 |
+
/*
|
| 318 |
+
* Set the signature of an SCT to point directly to the *sig specified.
|
| 319 |
+
* The SCT takes ownership of the specified pointer.
|
| 320 |
+
*/
|
| 321 |
+
void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len);
|
| 322 |
+
|
| 323 |
+
/*
|
| 324 |
+
* Set the signature of an SCT to be a copy of the *sig specified.
|
| 325 |
+
* Returns 1 on success, 0 otherwise.
|
| 326 |
+
*/
|
| 327 |
+
__owur int SCT_set1_signature(SCT *sct, const unsigned char *sig,
|
| 328 |
+
size_t sig_len);
|
| 329 |
+
|
| 330 |
+
/*
|
| 331 |
+
* The origin of this SCT, e.g. TLS extension, OCSP response, etc.
|
| 332 |
+
*/
|
| 333 |
+
sct_source_t SCT_get_source(const SCT *sct);
|
| 334 |
+
|
| 335 |
+
/*
|
| 336 |
+
* Set the origin of this SCT, e.g. TLS extension, OCSP response, etc.
|
| 337 |
+
* Returns 1 on success, 0 otherwise.
|
| 338 |
+
*/
|
| 339 |
+
__owur int SCT_set_source(SCT *sct, sct_source_t source);
|
| 340 |
+
|
| 341 |
+
/*
|
| 342 |
+
* Returns a text string describing the validation status of |sct|.
|
| 343 |
+
*/
|
| 344 |
+
const char *SCT_validation_status_string(const SCT *sct);
|
| 345 |
+
|
| 346 |
+
/*
|
| 347 |
+
* Pretty-prints an |sct| to |out|.
|
| 348 |
+
* It will be indented by the number of spaces specified by |indent|.
|
| 349 |
+
* If |logs| is not NULL, it will be used to lookup the CT log that the SCT came
|
| 350 |
+
* from, so that the log name can be printed.
|
| 351 |
+
*/
|
| 352 |
+
void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs);
|
| 353 |
+
|
| 354 |
+
/*
|
| 355 |
+
* Pretty-prints an |sct_list| to |out|.
|
| 356 |
+
* It will be indented by the number of spaces specified by |indent|.
|
| 357 |
+
* SCTs will be delimited by |separator|.
|
| 358 |
+
* If |logs| is not NULL, it will be used to lookup the CT log that each SCT
|
| 359 |
+
* came from, so that the log names can be printed.
|
| 360 |
+
*/
|
| 361 |
+
void SCT_LIST_print(const STACK_OF(SCT) *sct_list, BIO *out, int indent,
|
| 362 |
+
const char *separator, const CTLOG_STORE *logs);
|
| 363 |
+
|
| 364 |
+
/*
|
| 365 |
+
* Gets the last result of validating this SCT.
|
| 366 |
+
* If it has not been validated yet, returns SCT_VALIDATION_STATUS_NOT_SET.
|
| 367 |
+
*/
|
| 368 |
+
sct_validation_status_t SCT_get_validation_status(const SCT *sct);
|
| 369 |
+
|
| 370 |
+
/*
|
| 371 |
+
* Validates the given SCT with the provided context.
|
| 372 |
+
* Sets the "validation_status" field of the SCT.
|
| 373 |
+
* Returns 1 if the SCT is valid and the signature verifies.
|
| 374 |
+
* Returns 0 if the SCT is invalid or could not be verified.
|
| 375 |
+
* Returns -1 if an error occurs.
|
| 376 |
+
*/
|
| 377 |
+
__owur int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
|
| 378 |
+
|
| 379 |
+
/*
|
| 380 |
+
* Validates the given list of SCTs with the provided context.
|
| 381 |
+
* Sets the "validation_status" field of each SCT.
|
| 382 |
+
* Returns 1 if there are no invalid SCTs and all signatures verify.
|
| 383 |
+
* Returns 0 if at least one SCT is invalid or could not be verified.
|
| 384 |
+
* Returns a negative integer if an error occurs.
|
| 385 |
+
*/
|
| 386 |
+
__owur int SCT_LIST_validate(const STACK_OF(SCT) *scts,
|
| 387 |
+
CT_POLICY_EVAL_CTX *ctx);
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
/*********************************
|
| 391 |
+
* SCT parsing and serialization *
|
| 392 |
+
*********************************/
|
| 393 |
+
|
| 394 |
+
/*
|
| 395 |
+
* Serialize (to TLS format) a stack of SCTs and return the length.
|
| 396 |
+
* "a" must not be NULL.
|
| 397 |
+
* If "pp" is NULL, just return the length of what would have been serialized.
|
| 398 |
+
* If "pp" is not NULL and "*pp" is null, function will allocate a new pointer
|
| 399 |
+
* for data that caller is responsible for freeing (only if function returns
|
| 400 |
+
* successfully).
|
| 401 |
+
* If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring
|
| 402 |
+
* that "*pp" is large enough to accept all of the serialized data.
|
| 403 |
+
* Returns < 0 on error, >= 0 indicating bytes written (or would have been)
|
| 404 |
+
* on success.
|
| 405 |
+
*/
|
| 406 |
+
__owur int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
|
| 407 |
+
|
| 408 |
+
/*
|
| 409 |
+
* Convert TLS format SCT list to a stack of SCTs.
|
| 410 |
+
* If "a" or "*a" is NULL, a new stack will be created that the caller is
|
| 411 |
+
* responsible for freeing (by calling SCT_LIST_free).
|
| 412 |
+
* "**pp" and "*pp" must not be NULL.
|
| 413 |
+
* Upon success, "*pp" will point to after the last bytes read, and a stack
|
| 414 |
+
* will be returned.
|
| 415 |
+
* Upon failure, a NULL pointer will be returned, and the position of "*pp" is
|
| 416 |
+
* not defined.
|
| 417 |
+
*/
|
| 418 |
+
STACK_OF(SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp,
|
| 419 |
+
size_t len);
|
| 420 |
+
|
| 421 |
+
/*
|
| 422 |
+
* Serialize (to DER format) a stack of SCTs and return the length.
|
| 423 |
+
* "a" must not be NULL.
|
| 424 |
+
* If "pp" is NULL, just returns the length of what would have been serialized.
|
| 425 |
+
* If "pp" is not NULL and "*pp" is null, function will allocate a new pointer
|
| 426 |
+
* for data that caller is responsible for freeing (only if function returns
|
| 427 |
+
* successfully).
|
| 428 |
+
* If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring
|
| 429 |
+
* that "*pp" is large enough to accept all of the serialized data.
|
| 430 |
+
* Returns < 0 on error, >= 0 indicating bytes written (or would have been)
|
| 431 |
+
* on success.
|
| 432 |
+
*/
|
| 433 |
+
__owur int i2d_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
|
| 434 |
+
|
| 435 |
+
/*
|
| 436 |
+
* Parses an SCT list in DER format and returns it.
|
| 437 |
+
* If "a" or "*a" is NULL, a new stack will be created that the caller is
|
| 438 |
+
* responsible for freeing (by calling SCT_LIST_free).
|
| 439 |
+
* "**pp" and "*pp" must not be NULL.
|
| 440 |
+
* Upon success, "*pp" will point to after the last bytes read, and a stack
|
| 441 |
+
* will be returned.
|
| 442 |
+
* Upon failure, a NULL pointer will be returned, and the position of "*pp" is
|
| 443 |
+
* not defined.
|
| 444 |
+
*/
|
| 445 |
+
STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp,
|
| 446 |
+
long len);
|
| 447 |
+
|
| 448 |
+
/*
|
| 449 |
+
* Serialize (to TLS format) an |sct| and write it to |out|.
|
| 450 |
+
* If |out| is null, no SCT will be output but the length will still be returned.
|
| 451 |
+
* If |out| points to a null pointer, a string will be allocated to hold the
|
| 452 |
+
* TLS-format SCT. It is the responsibility of the caller to free it.
|
| 453 |
+
* If |out| points to an allocated string, the TLS-format SCT will be written
|
| 454 |
+
* to it.
|
| 455 |
+
* The length of the SCT in TLS format will be returned.
|
| 456 |
+
*/
|
| 457 |
+
__owur int i2o_SCT(const SCT *sct, unsigned char **out);
|
| 458 |
+
|
| 459 |
+
/*
|
| 460 |
+
* Parses an SCT in TLS format and returns it.
|
| 461 |
+
* If |psct| is not null, it will end up pointing to the parsed SCT. If it
|
| 462 |
+
* already points to a non-null pointer, the pointer will be free'd.
|
| 463 |
+
* |in| should be a pointer to a string containing the TLS-format SCT.
|
| 464 |
+
* |in| will be advanced to the end of the SCT if parsing succeeds.
|
| 465 |
+
* |len| should be the length of the SCT in |in|.
|
| 466 |
+
* Returns NULL if an error occurs.
|
| 467 |
+
* If the SCT is an unsupported version, only the SCT's 'sct' and 'sct_len'
|
| 468 |
+
* fields will be populated (with |in| and |len| respectively).
|
| 469 |
+
*/
|
| 470 |
+
SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
|
| 471 |
+
|
| 472 |
+
/********************
|
| 473 |
+
* CT log functions *
|
| 474 |
+
********************/
|
| 475 |
+
|
| 476 |
+
/*
|
| 477 |
+
* Creates a new CT log instance with the given |public_key| and |name| and
|
| 478 |
+
* associates it with the give library context |libctx| and property query
|
| 479 |
+
* string |propq|.
|
| 480 |
+
* Takes ownership of |public_key| but copies |name|.
|
| 481 |
+
* Returns NULL if malloc fails or if |public_key| cannot be converted to DER.
|
| 482 |
+
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
| 483 |
+
*/
|
| 484 |
+
CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name, OSSL_LIB_CTX *libctx,
|
| 485 |
+
const char *propq);
|
| 486 |
+
|
| 487 |
+
/*
|
| 488 |
+
* The same as CTLOG_new_ex except that the default library context and
|
| 489 |
+
* property query string are used.
|
| 490 |
+
*/
|
| 491 |
+
CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
|
| 492 |
+
|
| 493 |
+
/*
|
| 494 |
+
* Creates a new CTLOG instance with the base64-encoded SubjectPublicKeyInfo DER
|
| 495 |
+
* in |pkey_base64| and associated with the given library context |libctx| and
|
| 496 |
+
* property query string |propq|. The |name| is a string to help users identify
|
| 497 |
+
* this log.
|
| 498 |
+
* Returns 1 on success, 0 on failure.
|
| 499 |
+
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
| 500 |
+
*/
|
| 501 |
+
int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64,
|
| 502 |
+
const char *name, OSSL_LIB_CTX *libctx,
|
| 503 |
+
const char *propq);
|
| 504 |
+
|
| 505 |
+
/*
|
| 506 |
+
* The same as CTLOG_new_from_base64_ex() except that the default
|
| 507 |
+
* library context and property query string are used.
|
| 508 |
+
* Returns 1 on success, 0 on failure.
|
| 509 |
+
*/
|
| 510 |
+
int CTLOG_new_from_base64(CTLOG ** ct_log,
|
| 511 |
+
const char *pkey_base64, const char *name);
|
| 512 |
+
|
| 513 |
+
/*
|
| 514 |
+
* Deletes a CT log instance and its fields.
|
| 515 |
+
*/
|
| 516 |
+
void CTLOG_free(CTLOG *log);
|
| 517 |
+
|
| 518 |
+
/* Gets the name of the CT log */
|
| 519 |
+
const char *CTLOG_get0_name(const CTLOG *log);
|
| 520 |
+
/* Gets the ID of the CT log */
|
| 521 |
+
void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
|
| 522 |
+
size_t *log_id_len);
|
| 523 |
+
/* Gets the public key of the CT log */
|
| 524 |
+
EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
|
| 525 |
+
|
| 526 |
+
/**************************
|
| 527 |
+
* CT log store functions *
|
| 528 |
+
**************************/
|
| 529 |
+
|
| 530 |
+
/*
|
| 531 |
+
* Creates a new CT log store and associates it with the given libctx and
|
| 532 |
+
* property query string.
|
| 533 |
+
* Should be deleted by the caller using CTLOG_STORE_free when no longer needed.
|
| 534 |
+
*/
|
| 535 |
+
CTLOG_STORE *CTLOG_STORE_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 536 |
+
|
| 537 |
+
/*
|
| 538 |
+
* Same as CTLOG_STORE_new_ex except that the default libctx and
|
| 539 |
+
* property query string are used.
|
| 540 |
+
* Should be deleted by the caller using CTLOG_STORE_free when no longer needed.
|
| 541 |
+
*/
|
| 542 |
+
CTLOG_STORE *CTLOG_STORE_new(void);
|
| 543 |
+
|
| 544 |
+
/*
|
| 545 |
+
* Deletes a CT log store and all of the CT log instances held within.
|
| 546 |
+
*/
|
| 547 |
+
void CTLOG_STORE_free(CTLOG_STORE *store);
|
| 548 |
+
|
| 549 |
+
/*
|
| 550 |
+
* Finds a CT log in the store based on its log ID.
|
| 551 |
+
* Returns the CT log, or NULL if no match is found.
|
| 552 |
+
*/
|
| 553 |
+
const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
|
| 554 |
+
const uint8_t *log_id,
|
| 555 |
+
size_t log_id_len);
|
| 556 |
+
|
| 557 |
+
/*
|
| 558 |
+
* Loads a CT log list into a |store| from a |file|.
|
| 559 |
+
* Returns 1 if loading is successful, or 0 otherwise.
|
| 560 |
+
*/
|
| 561 |
+
__owur int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
|
| 562 |
+
|
| 563 |
+
/*
|
| 564 |
+
* Loads the default CT log list into a |store|.
|
| 565 |
+
* Returns 1 if loading is successful, or 0 otherwise.
|
| 566 |
+
*/
|
| 567 |
+
__owur int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
|
| 568 |
+
|
| 569 |
+
# ifdef __cplusplus
|
| 570 |
+
}
|
| 571 |
+
# endif
|
| 572 |
+
# endif
|
| 573 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/err.h
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_ERR_H
|
| 13 |
+
# define OPENSSL_ERR_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# include <openssl/macros.h>
|
| 17 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
# define HEADER_ERR_H
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
# include <openssl/e_os2.h>
|
| 22 |
+
|
| 23 |
+
# ifndef OPENSSL_NO_STDIO
|
| 24 |
+
# include <stdio.h>
|
| 25 |
+
# include <stdlib.h>
|
| 26 |
+
# endif
|
| 27 |
+
|
| 28 |
+
# include <openssl/types.h>
|
| 29 |
+
# include <openssl/bio.h>
|
| 30 |
+
# include <openssl/lhash.h>
|
| 31 |
+
# include <openssl/cryptoerr_legacy.h>
|
| 32 |
+
|
| 33 |
+
#ifdef __cplusplus
|
| 34 |
+
extern "C" {
|
| 35 |
+
#endif
|
| 36 |
+
|
| 37 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 38 |
+
# ifndef OPENSSL_NO_FILENAMES
|
| 39 |
+
# define ERR_PUT_error(l,f,r,fn,ln) ERR_put_error(l,f,r,fn,ln)
|
| 40 |
+
# else
|
| 41 |
+
# define ERR_PUT_error(l,f,r,fn,ln) ERR_put_error(l,f,r,NULL,0)
|
| 42 |
+
# endif
|
| 43 |
+
# endif
|
| 44 |
+
|
| 45 |
+
# include <limits.h>
|
| 46 |
+
# include <errno.h>
|
| 47 |
+
|
| 48 |
+
# define ERR_TXT_MALLOCED 0x01
|
| 49 |
+
# define ERR_TXT_STRING 0x02
|
| 50 |
+
|
| 51 |
+
# if !defined(OPENSSL_NO_DEPRECATED_3_0) || defined(OSSL_FORCE_ERR_STATE)
|
| 52 |
+
# define ERR_FLAG_MARK 0x01
|
| 53 |
+
# define ERR_FLAG_CLEAR 0x02
|
| 54 |
+
|
| 55 |
+
# define ERR_NUM_ERRORS 16
|
| 56 |
+
struct err_state_st {
|
| 57 |
+
int err_flags[ERR_NUM_ERRORS];
|
| 58 |
+
int err_marks[ERR_NUM_ERRORS];
|
| 59 |
+
unsigned long err_buffer[ERR_NUM_ERRORS];
|
| 60 |
+
char *err_data[ERR_NUM_ERRORS];
|
| 61 |
+
size_t err_data_size[ERR_NUM_ERRORS];
|
| 62 |
+
int err_data_flags[ERR_NUM_ERRORS];
|
| 63 |
+
char *err_file[ERR_NUM_ERRORS];
|
| 64 |
+
int err_line[ERR_NUM_ERRORS];
|
| 65 |
+
char *err_func[ERR_NUM_ERRORS];
|
| 66 |
+
int top, bottom;
|
| 67 |
+
};
|
| 68 |
+
# endif
|
| 69 |
+
|
| 70 |
+
/* library */
|
| 71 |
+
# define ERR_LIB_NONE 1
|
| 72 |
+
# define ERR_LIB_SYS 2
|
| 73 |
+
# define ERR_LIB_BN 3
|
| 74 |
+
# define ERR_LIB_RSA 4
|
| 75 |
+
# define ERR_LIB_DH 5
|
| 76 |
+
# define ERR_LIB_EVP 6
|
| 77 |
+
# define ERR_LIB_BUF 7
|
| 78 |
+
# define ERR_LIB_OBJ 8
|
| 79 |
+
# define ERR_LIB_PEM 9
|
| 80 |
+
# define ERR_LIB_DSA 10
|
| 81 |
+
# define ERR_LIB_X509 11
|
| 82 |
+
/* #define ERR_LIB_METH 12 */
|
| 83 |
+
# define ERR_LIB_ASN1 13
|
| 84 |
+
# define ERR_LIB_CONF 14
|
| 85 |
+
# define ERR_LIB_CRYPTO 15
|
| 86 |
+
# define ERR_LIB_EC 16
|
| 87 |
+
# define ERR_LIB_SSL 20
|
| 88 |
+
/* #define ERR_LIB_SSL23 21 */
|
| 89 |
+
/* #define ERR_LIB_SSL2 22 */
|
| 90 |
+
/* #define ERR_LIB_SSL3 23 */
|
| 91 |
+
/* #define ERR_LIB_RSAREF 30 */
|
| 92 |
+
/* #define ERR_LIB_PROXY 31 */
|
| 93 |
+
# define ERR_LIB_BIO 32
|
| 94 |
+
# define ERR_LIB_PKCS7 33
|
| 95 |
+
# define ERR_LIB_X509V3 34
|
| 96 |
+
# define ERR_LIB_PKCS12 35
|
| 97 |
+
# define ERR_LIB_RAND 36
|
| 98 |
+
# define ERR_LIB_DSO 37
|
| 99 |
+
# define ERR_LIB_ENGINE 38
|
| 100 |
+
# define ERR_LIB_OCSP 39
|
| 101 |
+
# define ERR_LIB_UI 40
|
| 102 |
+
# define ERR_LIB_COMP 41
|
| 103 |
+
# define ERR_LIB_ECDSA 42
|
| 104 |
+
# define ERR_LIB_ECDH 43
|
| 105 |
+
# define ERR_LIB_OSSL_STORE 44
|
| 106 |
+
# define ERR_LIB_FIPS 45
|
| 107 |
+
# define ERR_LIB_CMS 46
|
| 108 |
+
# define ERR_LIB_TS 47
|
| 109 |
+
# define ERR_LIB_HMAC 48
|
| 110 |
+
/* # define ERR_LIB_JPAKE 49 */
|
| 111 |
+
# define ERR_LIB_CT 50
|
| 112 |
+
# define ERR_LIB_ASYNC 51
|
| 113 |
+
# define ERR_LIB_KDF 52
|
| 114 |
+
# define ERR_LIB_SM2 53
|
| 115 |
+
# define ERR_LIB_ESS 54
|
| 116 |
+
# define ERR_LIB_PROP 55
|
| 117 |
+
# define ERR_LIB_CRMF 56
|
| 118 |
+
# define ERR_LIB_PROV 57
|
| 119 |
+
# define ERR_LIB_CMP 58
|
| 120 |
+
# define ERR_LIB_OSSL_ENCODER 59
|
| 121 |
+
# define ERR_LIB_OSSL_DECODER 60
|
| 122 |
+
# define ERR_LIB_HTTP 61
|
| 123 |
+
|
| 124 |
+
# define ERR_LIB_USER 128
|
| 125 |
+
|
| 126 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 127 |
+
# define ASN1err(f, r) ERR_raise_data(ERR_LIB_ASN1, (r), NULL)
|
| 128 |
+
# define ASYNCerr(f, r) ERR_raise_data(ERR_LIB_ASYNC, (r), NULL)
|
| 129 |
+
# define BIOerr(f, r) ERR_raise_data(ERR_LIB_BIO, (r), NULL)
|
| 130 |
+
# define BNerr(f, r) ERR_raise_data(ERR_LIB_BN, (r), NULL)
|
| 131 |
+
# define BUFerr(f, r) ERR_raise_data(ERR_LIB_BUF, (r), NULL)
|
| 132 |
+
# define CMPerr(f, r) ERR_raise_data(ERR_LIB_CMP, (r), NULL)
|
| 133 |
+
# define CMSerr(f, r) ERR_raise_data(ERR_LIB_CMS, (r), NULL)
|
| 134 |
+
# define COMPerr(f, r) ERR_raise_data(ERR_LIB_COMP, (r), NULL)
|
| 135 |
+
# define CONFerr(f, r) ERR_raise_data(ERR_LIB_CONF, (r), NULL)
|
| 136 |
+
# define CRMFerr(f, r) ERR_raise_data(ERR_LIB_CRMF, (r), NULL)
|
| 137 |
+
# define CRYPTOerr(f, r) ERR_raise_data(ERR_LIB_CRYPTO, (r), NULL)
|
| 138 |
+
# define CTerr(f, r) ERR_raise_data(ERR_LIB_CT, (r), NULL)
|
| 139 |
+
# define DHerr(f, r) ERR_raise_data(ERR_LIB_DH, (r), NULL)
|
| 140 |
+
# define DSAerr(f, r) ERR_raise_data(ERR_LIB_DSA, (r), NULL)
|
| 141 |
+
# define DSOerr(f, r) ERR_raise_data(ERR_LIB_DSO, (r), NULL)
|
| 142 |
+
# define ECDHerr(f, r) ERR_raise_data(ERR_LIB_ECDH, (r), NULL)
|
| 143 |
+
# define ECDSAerr(f, r) ERR_raise_data(ERR_LIB_ECDSA, (r), NULL)
|
| 144 |
+
# define ECerr(f, r) ERR_raise_data(ERR_LIB_EC, (r), NULL)
|
| 145 |
+
# define ENGINEerr(f, r) ERR_raise_data(ERR_LIB_ENGINE, (r), NULL)
|
| 146 |
+
# define ESSerr(f, r) ERR_raise_data(ERR_LIB_ESS, (r), NULL)
|
| 147 |
+
# define EVPerr(f, r) ERR_raise_data(ERR_LIB_EVP, (r), NULL)
|
| 148 |
+
# define FIPSerr(f, r) ERR_raise_data(ERR_LIB_FIPS, (r), NULL)
|
| 149 |
+
# define HMACerr(f, r) ERR_raise_data(ERR_LIB_HMAC, (r), NULL)
|
| 150 |
+
# define HTTPerr(f, r) ERR_raise_data(ERR_LIB_HTTP, (r), NULL)
|
| 151 |
+
# define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
| 152 |
+
# define OBJerr(f, r) ERR_raise_data(ERR_LIB_OBJ, (r), NULL)
|
| 153 |
+
# define OCSPerr(f, r) ERR_raise_data(ERR_LIB_OCSP, (r), NULL)
|
| 154 |
+
# define OSSL_STOREerr(f, r) ERR_raise_data(ERR_LIB_OSSL_STORE, (r), NULL)
|
| 155 |
+
# define PEMerr(f, r) ERR_raise_data(ERR_LIB_PEM, (r), NULL)
|
| 156 |
+
# define PKCS12err(f, r) ERR_raise_data(ERR_LIB_PKCS12, (r), NULL)
|
| 157 |
+
# define PKCS7err(f, r) ERR_raise_data(ERR_LIB_PKCS7, (r), NULL)
|
| 158 |
+
# define PROPerr(f, r) ERR_raise_data(ERR_LIB_PROP, (r), NULL)
|
| 159 |
+
# define PROVerr(f, r) ERR_raise_data(ERR_LIB_PROV, (r), NULL)
|
| 160 |
+
# define RANDerr(f, r) ERR_raise_data(ERR_LIB_RAND, (r), NULL)
|
| 161 |
+
# define RSAerr(f, r) ERR_raise_data(ERR_LIB_RSA, (r), NULL)
|
| 162 |
+
# define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
| 163 |
+
# define SM2err(f, r) ERR_raise_data(ERR_LIB_SM2, (r), NULL)
|
| 164 |
+
# define SSLerr(f, r) ERR_raise_data(ERR_LIB_SSL, (r), NULL)
|
| 165 |
+
# define SYSerr(f, r) ERR_raise_data(ERR_LIB_SYS, (r), NULL)
|
| 166 |
+
# define TSerr(f, r) ERR_raise_data(ERR_LIB_TS, (r), NULL)
|
| 167 |
+
# define UIerr(f, r) ERR_raise_data(ERR_LIB_UI, (r), NULL)
|
| 168 |
+
# define X509V3err(f, r) ERR_raise_data(ERR_LIB_X509V3, (r), NULL)
|
| 169 |
+
# define X509err(f, r) ERR_raise_data(ERR_LIB_X509, (r), NULL)
|
| 170 |
+
# endif
|
| 171 |
+
|
| 172 |
+
/*-
|
| 173 |
+
* The error code packs differently depending on if it records a system
|
| 174 |
+
* error or an OpenSSL error.
|
| 175 |
+
*
|
| 176 |
+
* A system error packs like this (we follow POSIX and only allow positive
|
| 177 |
+
* numbers that fit in an |int|):
|
| 178 |
+
*
|
| 179 |
+
* +-+-------------------------------------------------------------+
|
| 180 |
+
* |1| system error number |
|
| 181 |
+
* +-+-------------------------------------------------------------+
|
| 182 |
+
*
|
| 183 |
+
* An OpenSSL error packs like this:
|
| 184 |
+
*
|
| 185 |
+
* <---------------------------- 32 bits -------------------------->
|
| 186 |
+
* <--- 8 bits ---><------------------ 23 bits ----------------->
|
| 187 |
+
* +-+---------------+---------------------------------------------+
|
| 188 |
+
* |0| library | reason |
|
| 189 |
+
* +-+---------------+---------------------------------------------+
|
| 190 |
+
*
|
| 191 |
+
* A few of the reason bits are reserved as flags with special meaning:
|
| 192 |
+
*
|
| 193 |
+
* <5 bits-<>--------- 19 bits ----------------->
|
| 194 |
+
* +-------+-+-----------------------------------+
|
| 195 |
+
* | rflags| | reason |
|
| 196 |
+
* +-------+-+-----------------------------------+
|
| 197 |
+
* ^
|
| 198 |
+
* |
|
| 199 |
+
* ERR_RFLAG_FATAL = ERR_R_FATAL
|
| 200 |
+
*
|
| 201 |
+
* The reason flags are part of the overall reason code for practical
|
| 202 |
+
* reasons, as they provide an easy way to place different types of
|
| 203 |
+
* reason codes in different numeric ranges.
|
| 204 |
+
*
|
| 205 |
+
* The currently known reason flags are:
|
| 206 |
+
*
|
| 207 |
+
* ERR_RFLAG_FATAL Flags that the reason code is considered fatal.
|
| 208 |
+
* For backward compatibility reasons, this flag
|
| 209 |
+
* is also the code for ERR_R_FATAL (that reason
|
| 210 |
+
* code served the dual purpose of flag and reason
|
| 211 |
+
* code in one in pre-3.0 OpenSSL).
|
| 212 |
+
* ERR_RFLAG_COMMON Flags that the reason code is common to all
|
| 213 |
+
* libraries. All ERR_R_ macros must use this flag,
|
| 214 |
+
* and no other _R_ macro is allowed to use it.
|
| 215 |
+
*/
|
| 216 |
+
|
| 217 |
+
/* Macros to help decode recorded system errors */
|
| 218 |
+
# define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
|
| 219 |
+
# define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
|
| 220 |
+
|
| 221 |
+
/*
|
| 222 |
+
* Macros to help decode recorded OpenSSL errors
|
| 223 |
+
* As expressed above, RFLAGS and REASON overlap by one bit to allow
|
| 224 |
+
* ERR_R_FATAL to use ERR_RFLAG_FATAL as its reason code.
|
| 225 |
+
*/
|
| 226 |
+
# define ERR_LIB_OFFSET 23L
|
| 227 |
+
# define ERR_LIB_MASK 0xFF
|
| 228 |
+
# define ERR_RFLAGS_OFFSET 18L
|
| 229 |
+
# define ERR_RFLAGS_MASK 0x1F
|
| 230 |
+
# define ERR_REASON_MASK 0X7FFFFF
|
| 231 |
+
|
| 232 |
+
/*
|
| 233 |
+
* Reason flags are defined pre-shifted to easily combine with the reason
|
| 234 |
+
* number.
|
| 235 |
+
*/
|
| 236 |
+
# define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
|
| 237 |
+
# define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
|
| 238 |
+
|
| 239 |
+
# define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
|
| 240 |
+
|
| 241 |
+
static ossl_unused ossl_inline int ERR_GET_LIB(unsigned long errcode)
|
| 242 |
+
{
|
| 243 |
+
if (ERR_SYSTEM_ERROR(errcode))
|
| 244 |
+
return ERR_LIB_SYS;
|
| 245 |
+
return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
static ossl_unused ossl_inline int ERR_GET_RFLAGS(unsigned long errcode)
|
| 249 |
+
{
|
| 250 |
+
if (ERR_SYSTEM_ERROR(errcode))
|
| 251 |
+
return 0;
|
| 252 |
+
return errcode & (ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET);
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
static ossl_unused ossl_inline int ERR_GET_REASON(unsigned long errcode)
|
| 256 |
+
{
|
| 257 |
+
if (ERR_SYSTEM_ERROR(errcode))
|
| 258 |
+
return errcode & ERR_SYSTEM_MASK;
|
| 259 |
+
return errcode & ERR_REASON_MASK;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
static ossl_unused ossl_inline int ERR_FATAL_ERROR(unsigned long errcode)
|
| 263 |
+
{
|
| 264 |
+
return (ERR_GET_RFLAGS(errcode) & ERR_RFLAG_FATAL) != 0;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
static ossl_unused ossl_inline int ERR_COMMON_ERROR(unsigned long errcode)
|
| 268 |
+
{
|
| 269 |
+
return (ERR_GET_RFLAGS(errcode) & ERR_RFLAG_COMMON) != 0;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
/*
|
| 273 |
+
* ERR_PACK is a helper macro to properly pack OpenSSL error codes and may
|
| 274 |
+
* only be used for that purpose. System errors are packed internally.
|
| 275 |
+
* ERR_PACK takes reason flags and reason code combined in |reason|.
|
| 276 |
+
* ERR_PACK ignores |func|, that parameter is just legacy from pre-3.0 OpenSSL.
|
| 277 |
+
*/
|
| 278 |
+
# define ERR_PACK(lib,func,reason) \
|
| 279 |
+
( (((unsigned long)(lib) & ERR_LIB_MASK ) << ERR_LIB_OFFSET) | \
|
| 280 |
+
(((unsigned long)(reason) & ERR_REASON_MASK)) )
|
| 281 |
+
|
| 282 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 283 |
+
# define SYS_F_FOPEN 0
|
| 284 |
+
# define SYS_F_CONNECT 0
|
| 285 |
+
# define SYS_F_GETSERVBYNAME 0
|
| 286 |
+
# define SYS_F_SOCKET 0
|
| 287 |
+
# define SYS_F_IOCTLSOCKET 0
|
| 288 |
+
# define SYS_F_BIND 0
|
| 289 |
+
# define SYS_F_LISTEN 0
|
| 290 |
+
# define SYS_F_ACCEPT 0
|
| 291 |
+
# define SYS_F_WSASTARTUP 0
|
| 292 |
+
# define SYS_F_OPENDIR 0
|
| 293 |
+
# define SYS_F_FREAD 0
|
| 294 |
+
# define SYS_F_GETADDRINFO 0
|
| 295 |
+
# define SYS_F_GETNAMEINFO 0
|
| 296 |
+
# define SYS_F_SETSOCKOPT 0
|
| 297 |
+
# define SYS_F_GETSOCKOPT 0
|
| 298 |
+
# define SYS_F_GETSOCKNAME 0
|
| 299 |
+
# define SYS_F_GETHOSTBYNAME 0
|
| 300 |
+
# define SYS_F_FFLUSH 0
|
| 301 |
+
# define SYS_F_OPEN 0
|
| 302 |
+
# define SYS_F_CLOSE 0
|
| 303 |
+
# define SYS_F_IOCTL 0
|
| 304 |
+
# define SYS_F_STAT 0
|
| 305 |
+
# define SYS_F_FCNTL 0
|
| 306 |
+
# define SYS_F_FSTAT 0
|
| 307 |
+
# define SYS_F_SENDFILE 0
|
| 308 |
+
# endif
|
| 309 |
+
|
| 310 |
+
/*
|
| 311 |
+
* All ERR_R_ codes must be combined with ERR_RFLAG_COMMON.
|
| 312 |
+
*/
|
| 313 |
+
|
| 314 |
+
/* "we came from here" global reason codes, range 1..255 */
|
| 315 |
+
# define ERR_R_SYS_LIB (ERR_LIB_SYS/* 2 */ | ERR_RFLAG_COMMON)
|
| 316 |
+
# define ERR_R_BN_LIB (ERR_LIB_BN/* 3 */ | ERR_RFLAG_COMMON)
|
| 317 |
+
# define ERR_R_RSA_LIB (ERR_LIB_RSA/* 4 */ | ERR_RFLAG_COMMON)
|
| 318 |
+
# define ERR_R_DH_LIB (ERR_LIB_DH/* 5 */ | ERR_RFLAG_COMMON)
|
| 319 |
+
# define ERR_R_EVP_LIB (ERR_LIB_EVP/* 6 */ | ERR_RFLAG_COMMON)
|
| 320 |
+
# define ERR_R_BUF_LIB (ERR_LIB_BUF/* 7 */ | ERR_RFLAG_COMMON)
|
| 321 |
+
# define ERR_R_OBJ_LIB (ERR_LIB_OBJ/* 8 */ | ERR_RFLAG_COMMON)
|
| 322 |
+
# define ERR_R_PEM_LIB (ERR_LIB_PEM/* 9 */ | ERR_RFLAG_COMMON)
|
| 323 |
+
# define ERR_R_DSA_LIB (ERR_LIB_DSA/* 10 */ | ERR_RFLAG_COMMON)
|
| 324 |
+
# define ERR_R_X509_LIB (ERR_LIB_X509/* 11 */ | ERR_RFLAG_COMMON)
|
| 325 |
+
# define ERR_R_ASN1_LIB (ERR_LIB_ASN1/* 13 */ | ERR_RFLAG_COMMON)
|
| 326 |
+
# define ERR_R_CONF_LIB (ERR_LIB_CONF/* 14 */ | ERR_RFLAG_COMMON)
|
| 327 |
+
# define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO/* 15 */ | ERR_RFLAG_COMMON)
|
| 328 |
+
# define ERR_R_EC_LIB (ERR_LIB_EC/* 16 */ | ERR_RFLAG_COMMON)
|
| 329 |
+
# define ERR_R_SSL_LIB (ERR_LIB_SSL/* 20 */ | ERR_RFLAG_COMMON)
|
| 330 |
+
# define ERR_R_BIO_LIB (ERR_LIB_BIO/* 32 */ | ERR_RFLAG_COMMON)
|
| 331 |
+
# define ERR_R_PKCS7_LIB (ERR_LIB_PKCS7/* 33 */ | ERR_RFLAG_COMMON)
|
| 332 |
+
# define ERR_R_X509V3_LIB (ERR_LIB_X509V3/* 34 */ | ERR_RFLAG_COMMON)
|
| 333 |
+
# define ERR_R_PKCS12_LIB (ERR_LIB_PKCS12/* 35 */ | ERR_RFLAG_COMMON)
|
| 334 |
+
# define ERR_R_RAND_LIB (ERR_LIB_RAND/* 36 */ | ERR_RFLAG_COMMON)
|
| 335 |
+
# define ERR_R_DSO_LIB (ERR_LIB_DSO/* 37 */ | ERR_RFLAG_COMMON)
|
| 336 |
+
# define ERR_R_ENGINE_LIB (ERR_LIB_ENGINE/* 38 */ | ERR_RFLAG_COMMON)
|
| 337 |
+
# define ERR_R_UI_LIB (ERR_LIB_UI/* 40 */ | ERR_RFLAG_COMMON)
|
| 338 |
+
# define ERR_R_ECDSA_LIB (ERR_LIB_ECDSA/* 42 */ | ERR_RFLAG_COMMON)
|
| 339 |
+
# define ERR_R_OSSL_STORE_LIB (ERR_LIB_OSSL_STORE/* 44 */ | ERR_RFLAG_COMMON)
|
| 340 |
+
# define ERR_R_CMS_LIB (ERR_LIB_CMS/* 46 */ | ERR_RFLAG_COMMON)
|
| 341 |
+
# define ERR_R_TS_LIB (ERR_LIB_TS/* 47 */ | ERR_RFLAG_COMMON)
|
| 342 |
+
# define ERR_R_CT_LIB (ERR_LIB_CT/* 50 */ | ERR_RFLAG_COMMON)
|
| 343 |
+
# define ERR_R_PROV_LIB (ERR_LIB_PROV/* 57 */ | ERR_RFLAG_COMMON)
|
| 344 |
+
# define ERR_R_ESS_LIB (ERR_LIB_ESS/* 54 */ | ERR_RFLAG_COMMON)
|
| 345 |
+
# define ERR_R_CMP_LIB (ERR_LIB_CMP/* 58 */ | ERR_RFLAG_COMMON)
|
| 346 |
+
# define ERR_R_OSSL_ENCODER_LIB (ERR_LIB_OSSL_ENCODER/* 59 */ | ERR_RFLAG_COMMON)
|
| 347 |
+
# define ERR_R_OSSL_DECODER_LIB (ERR_LIB_OSSL_DECODER/* 60 */ | ERR_RFLAG_COMMON)
|
| 348 |
+
|
| 349 |
+
/* Other common error codes, range 256..2^ERR_RFLAGS_OFFSET-1 */
|
| 350 |
+
# define ERR_R_FATAL (ERR_RFLAG_FATAL|ERR_RFLAG_COMMON)
|
| 351 |
+
# define ERR_R_MALLOC_FAILURE (256|ERR_R_FATAL)
|
| 352 |
+
# define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (257|ERR_R_FATAL)
|
| 353 |
+
# define ERR_R_PASSED_NULL_PARAMETER (258|ERR_R_FATAL)
|
| 354 |
+
# define ERR_R_INTERNAL_ERROR (259|ERR_R_FATAL)
|
| 355 |
+
# define ERR_R_DISABLED (260|ERR_R_FATAL)
|
| 356 |
+
# define ERR_R_INIT_FAIL (261|ERR_R_FATAL)
|
| 357 |
+
# define ERR_R_PASSED_INVALID_ARGUMENT (262|ERR_RFLAG_COMMON)
|
| 358 |
+
# define ERR_R_OPERATION_FAIL (263|ERR_R_FATAL)
|
| 359 |
+
# define ERR_R_INVALID_PROVIDER_FUNCTIONS (264|ERR_R_FATAL)
|
| 360 |
+
# define ERR_R_INTERRUPTED_OR_CANCELLED (265|ERR_RFLAG_COMMON)
|
| 361 |
+
# define ERR_R_NESTED_ASN1_ERROR (266|ERR_RFLAG_COMMON)
|
| 362 |
+
# define ERR_R_MISSING_ASN1_EOS (267|ERR_RFLAG_COMMON)
|
| 363 |
+
# define ERR_R_UNSUPPORTED (268|ERR_RFLAG_COMMON)
|
| 364 |
+
# define ERR_R_FETCH_FAILED (269|ERR_RFLAG_COMMON)
|
| 365 |
+
# define ERR_R_INVALID_PROPERTY_DEFINITION (270|ERR_RFLAG_COMMON)
|
| 366 |
+
# define ERR_R_UNABLE_TO_GET_READ_LOCK (271|ERR_R_FATAL)
|
| 367 |
+
# define ERR_R_UNABLE_TO_GET_WRITE_LOCK (272|ERR_R_FATAL)
|
| 368 |
+
|
| 369 |
+
typedef struct ERR_string_data_st {
|
| 370 |
+
unsigned long error;
|
| 371 |
+
const char *string;
|
| 372 |
+
} ERR_STRING_DATA;
|
| 373 |
+
|
| 374 |
+
DEFINE_LHASH_OF_INTERNAL(ERR_STRING_DATA);
|
| 375 |
+
#define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)), lh_ERR_STRING_DATA_hash_thunk, lh_ERR_STRING_DATA_comp_thunk, lh_ERR_STRING_DATA_doall_thunk, lh_ERR_STRING_DATA_doall_arg_thunk))
|
| 376 |
+
#define lh_ERR_STRING_DATA_free(lh) OPENSSL_LH_free(ossl_check_ERR_STRING_DATA_lh_type(lh))
|
| 377 |
+
#define lh_ERR_STRING_DATA_flush(lh) OPENSSL_LH_flush(ossl_check_ERR_STRING_DATA_lh_type(lh))
|
| 378 |
+
#define lh_ERR_STRING_DATA_insert(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_insert(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_ERR_STRING_DATA_lh_plain_type(ptr)))
|
| 379 |
+
#define lh_ERR_STRING_DATA_delete(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_delete(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_const_ERR_STRING_DATA_lh_plain_type(ptr)))
|
| 380 |
+
#define lh_ERR_STRING_DATA_retrieve(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_retrieve(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_const_ERR_STRING_DATA_lh_plain_type(ptr)))
|
| 381 |
+
#define lh_ERR_STRING_DATA_error(lh) OPENSSL_LH_error(ossl_check_ERR_STRING_DATA_lh_type(lh))
|
| 382 |
+
#define lh_ERR_STRING_DATA_num_items(lh) OPENSSL_LH_num_items(ossl_check_ERR_STRING_DATA_lh_type(lh))
|
| 383 |
+
#define lh_ERR_STRING_DATA_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_ERR_STRING_DATA_lh_type(lh), out)
|
| 384 |
+
#define lh_ERR_STRING_DATA_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_ERR_STRING_DATA_lh_type(lh), out)
|
| 385 |
+
#define lh_ERR_STRING_DATA_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_ERR_STRING_DATA_lh_type(lh), out)
|
| 386 |
+
#define lh_ERR_STRING_DATA_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_ERR_STRING_DATA_lh_type(lh))
|
| 387 |
+
#define lh_ERR_STRING_DATA_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_ERR_STRING_DATA_lh_type(lh), dl)
|
| 388 |
+
#define lh_ERR_STRING_DATA_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_ERR_STRING_DATA_lh_doallfunc_type(dfn))
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
/* 12 lines and some on an 80 column terminal */
|
| 392 |
+
#define ERR_MAX_DATA_SIZE 1024
|
| 393 |
+
|
| 394 |
+
/* Building blocks */
|
| 395 |
+
void ERR_new(void);
|
| 396 |
+
void ERR_set_debug(const char *file, int line, const char *func);
|
| 397 |
+
void ERR_set_error(int lib, int reason, const char *fmt, ...);
|
| 398 |
+
void ERR_vset_error(int lib, int reason, const char *fmt, va_list args);
|
| 399 |
+
|
| 400 |
+
/* Main error raising functions */
|
| 401 |
+
# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
|
| 402 |
+
# define ERR_raise_data \
|
| 403 |
+
(ERR_new(), \
|
| 404 |
+
ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC), \
|
| 405 |
+
ERR_set_error)
|
| 406 |
+
|
| 407 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 408 |
+
/* Backward compatibility */
|
| 409 |
+
# define ERR_put_error(lib, func, reason, file, line) \
|
| 410 |
+
(ERR_new(), \
|
| 411 |
+
ERR_set_debug((file), (line), OPENSSL_FUNC), \
|
| 412 |
+
ERR_set_error((lib), (reason), NULL))
|
| 413 |
+
# endif
|
| 414 |
+
|
| 415 |
+
void ERR_set_error_data(char *data, int flags);
|
| 416 |
+
|
| 417 |
+
unsigned long ERR_get_error(void);
|
| 418 |
+
unsigned long ERR_get_error_all(const char **file, int *line,
|
| 419 |
+
const char **func,
|
| 420 |
+
const char **data, int *flags);
|
| 421 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 422 |
+
OSSL_DEPRECATEDIN_3_0
|
| 423 |
+
unsigned long ERR_get_error_line(const char **file, int *line);
|
| 424 |
+
OSSL_DEPRECATEDIN_3_0
|
| 425 |
+
unsigned long ERR_get_error_line_data(const char **file, int *line,
|
| 426 |
+
const char **data, int *flags);
|
| 427 |
+
#endif
|
| 428 |
+
unsigned long ERR_peek_error(void);
|
| 429 |
+
unsigned long ERR_peek_error_line(const char **file, int *line);
|
| 430 |
+
unsigned long ERR_peek_error_func(const char **func);
|
| 431 |
+
unsigned long ERR_peek_error_data(const char **data, int *flags);
|
| 432 |
+
unsigned long ERR_peek_error_all(const char **file, int *line,
|
| 433 |
+
const char **func,
|
| 434 |
+
const char **data, int *flags);
|
| 435 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 436 |
+
OSSL_DEPRECATEDIN_3_0
|
| 437 |
+
unsigned long ERR_peek_error_line_data(const char **file, int *line,
|
| 438 |
+
const char **data, int *flags);
|
| 439 |
+
# endif
|
| 440 |
+
unsigned long ERR_peek_last_error(void);
|
| 441 |
+
unsigned long ERR_peek_last_error_line(const char **file, int *line);
|
| 442 |
+
unsigned long ERR_peek_last_error_func(const char **func);
|
| 443 |
+
unsigned long ERR_peek_last_error_data(const char **data, int *flags);
|
| 444 |
+
unsigned long ERR_peek_last_error_all(const char **file, int *line,
|
| 445 |
+
const char **func,
|
| 446 |
+
const char **data, int *flags);
|
| 447 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 448 |
+
OSSL_DEPRECATEDIN_3_0
|
| 449 |
+
unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
|
| 450 |
+
const char **data, int *flags);
|
| 451 |
+
# endif
|
| 452 |
+
|
| 453 |
+
void ERR_clear_error(void);
|
| 454 |
+
|
| 455 |
+
char *ERR_error_string(unsigned long e, char *buf);
|
| 456 |
+
void ERR_error_string_n(unsigned long e, char *buf, size_t len);
|
| 457 |
+
const char *ERR_lib_error_string(unsigned long e);
|
| 458 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 459 |
+
OSSL_DEPRECATEDIN_3_0 const char *ERR_func_error_string(unsigned long e);
|
| 460 |
+
# endif
|
| 461 |
+
const char *ERR_reason_error_string(unsigned long e);
|
| 462 |
+
|
| 463 |
+
void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
|
| 464 |
+
void *u);
|
| 465 |
+
# ifndef OPENSSL_NO_STDIO
|
| 466 |
+
void ERR_print_errors_fp(FILE *fp);
|
| 467 |
+
# endif
|
| 468 |
+
void ERR_print_errors(BIO *bp);
|
| 469 |
+
|
| 470 |
+
void ERR_add_error_data(int num, ...);
|
| 471 |
+
void ERR_add_error_vdata(int num, va_list args);
|
| 472 |
+
void ERR_add_error_txt(const char *sepr, const char *txt);
|
| 473 |
+
void ERR_add_error_mem_bio(const char *sep, BIO *bio);
|
| 474 |
+
|
| 475 |
+
int ERR_load_strings(int lib, ERR_STRING_DATA *str);
|
| 476 |
+
int ERR_load_strings_const(const ERR_STRING_DATA *str);
|
| 477 |
+
int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
|
| 478 |
+
|
| 479 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 480 |
+
# define ERR_load_crypto_strings() \
|
| 481 |
+
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
|
| 482 |
+
# define ERR_free_strings() while(0) continue
|
| 483 |
+
#endif
|
| 484 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 485 |
+
OSSL_DEPRECATEDIN_1_1_0 void ERR_remove_thread_state(void *);
|
| 486 |
+
#endif
|
| 487 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_0_0
|
| 488 |
+
OSSL_DEPRECATEDIN_1_0_0 void ERR_remove_state(unsigned long pid);
|
| 489 |
+
#endif
|
| 490 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 491 |
+
OSSL_DEPRECATEDIN_3_0 ERR_STATE *ERR_get_state(void);
|
| 492 |
+
#endif
|
| 493 |
+
|
| 494 |
+
int ERR_get_next_error_library(void);
|
| 495 |
+
|
| 496 |
+
int ERR_set_mark(void);
|
| 497 |
+
int ERR_pop_to_mark(void);
|
| 498 |
+
int ERR_clear_last_mark(void);
|
| 499 |
+
int ERR_count_to_mark(void);
|
| 500 |
+
int ERR_pop(void);
|
| 501 |
+
|
| 502 |
+
ERR_STATE *OSSL_ERR_STATE_new(void);
|
| 503 |
+
void OSSL_ERR_STATE_save(ERR_STATE *es);
|
| 504 |
+
void OSSL_ERR_STATE_save_to_mark(ERR_STATE *es);
|
| 505 |
+
void OSSL_ERR_STATE_restore(const ERR_STATE *es);
|
| 506 |
+
void OSSL_ERR_STATE_free(ERR_STATE *es);
|
| 507 |
+
|
| 508 |
+
#ifdef __cplusplus
|
| 509 |
+
}
|
| 510 |
+
#endif
|
| 511 |
+
|
| 512 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ess.h
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ess.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ESS_H
|
| 16 |
+
# define OPENSSL_ESS_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
# include <openssl/safestack.h>
|
| 22 |
+
# include <openssl/x509.h>
|
| 23 |
+
# include <openssl/esserr.h>
|
| 24 |
+
|
| 25 |
+
# ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
# endif
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
|
| 31 |
+
typedef struct ESS_cert_id ESS_CERT_ID;
|
| 32 |
+
typedef struct ESS_signing_cert ESS_SIGNING_CERT;
|
| 33 |
+
|
| 34 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID, ESS_CERT_ID, ESS_CERT_ID)
|
| 35 |
+
#define sk_ESS_CERT_ID_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_sk_type(sk))
|
| 36 |
+
#define sk_ESS_CERT_ID_value(sk, idx) ((ESS_CERT_ID *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_sk_type(sk), (idx)))
|
| 37 |
+
#define sk_ESS_CERT_ID_new(cmp) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new(ossl_check_ESS_CERT_ID_compfunc_type(cmp)))
|
| 38 |
+
#define sk_ESS_CERT_ID_new_null() ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new_null())
|
| 39 |
+
#define sk_ESS_CERT_ID_new_reserve(cmp, n) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new_reserve(ossl_check_ESS_CERT_ID_compfunc_type(cmp), (n)))
|
| 40 |
+
#define sk_ESS_CERT_ID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ESS_CERT_ID_sk_type(sk), (n))
|
| 41 |
+
#define sk_ESS_CERT_ID_free(sk) OPENSSL_sk_free(ossl_check_ESS_CERT_ID_sk_type(sk))
|
| 42 |
+
#define sk_ESS_CERT_ID_zero(sk) OPENSSL_sk_zero(ossl_check_ESS_CERT_ID_sk_type(sk))
|
| 43 |
+
#define sk_ESS_CERT_ID_delete(sk, i) ((ESS_CERT_ID *)OPENSSL_sk_delete(ossl_check_ESS_CERT_ID_sk_type(sk), (i)))
|
| 44 |
+
#define sk_ESS_CERT_ID_delete_ptr(sk, ptr) ((ESS_CERT_ID *)OPENSSL_sk_delete_ptr(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr)))
|
| 45 |
+
#define sk_ESS_CERT_ID_push(sk, ptr) OPENSSL_sk_push(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 46 |
+
#define sk_ESS_CERT_ID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 47 |
+
#define sk_ESS_CERT_ID_pop(sk) ((ESS_CERT_ID *)OPENSSL_sk_pop(ossl_check_ESS_CERT_ID_sk_type(sk)))
|
| 48 |
+
#define sk_ESS_CERT_ID_shift(sk) ((ESS_CERT_ID *)OPENSSL_sk_shift(ossl_check_ESS_CERT_ID_sk_type(sk)))
|
| 49 |
+
#define sk_ESS_CERT_ID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ESS_CERT_ID_sk_type(sk),ossl_check_ESS_CERT_ID_freefunc_type(freefunc))
|
| 50 |
+
#define sk_ESS_CERT_ID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr), (idx))
|
| 51 |
+
#define sk_ESS_CERT_ID_set(sk, idx, ptr) ((ESS_CERT_ID *)OPENSSL_sk_set(ossl_check_ESS_CERT_ID_sk_type(sk), (idx), ossl_check_ESS_CERT_ID_type(ptr)))
|
| 52 |
+
#define sk_ESS_CERT_ID_find(sk, ptr) OPENSSL_sk_find(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 53 |
+
#define sk_ESS_CERT_ID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 54 |
+
#define sk_ESS_CERT_ID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr), pnum)
|
| 55 |
+
#define sk_ESS_CERT_ID_sort(sk) OPENSSL_sk_sort(ossl_check_ESS_CERT_ID_sk_type(sk))
|
| 56 |
+
#define sk_ESS_CERT_ID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ESS_CERT_ID_sk_type(sk))
|
| 57 |
+
#define sk_ESS_CERT_ID_dup(sk) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_dup(ossl_check_const_ESS_CERT_ID_sk_type(sk)))
|
| 58 |
+
#define sk_ESS_CERT_ID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_freefunc_type(freefunc)))
|
| 59 |
+
#define sk_ESS_CERT_ID_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_compfunc_type(cmp)))
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
|
| 64 |
+
typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
|
| 65 |
+
|
| 66 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID_V2, ESS_CERT_ID_V2, ESS_CERT_ID_V2)
|
| 67 |
+
#define sk_ESS_CERT_ID_V2_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk))
|
| 68 |
+
#define sk_ESS_CERT_ID_V2_value(sk, idx) ((ESS_CERT_ID_V2 *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), (idx)))
|
| 69 |
+
#define sk_ESS_CERT_ID_V2_new(cmp) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new(ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp)))
|
| 70 |
+
#define sk_ESS_CERT_ID_V2_new_null() ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new_null())
|
| 71 |
+
#define sk_ESS_CERT_ID_V2_new_reserve(cmp, n) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new_reserve(ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp), (n)))
|
| 72 |
+
#define sk_ESS_CERT_ID_V2_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (n))
|
| 73 |
+
#define sk_ESS_CERT_ID_V2_free(sk) OPENSSL_sk_free(ossl_check_ESS_CERT_ID_V2_sk_type(sk))
|
| 74 |
+
#define sk_ESS_CERT_ID_V2_zero(sk) OPENSSL_sk_zero(ossl_check_ESS_CERT_ID_V2_sk_type(sk))
|
| 75 |
+
#define sk_ESS_CERT_ID_V2_delete(sk, i) ((ESS_CERT_ID_V2 *)OPENSSL_sk_delete(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (i)))
|
| 76 |
+
#define sk_ESS_CERT_ID_V2_delete_ptr(sk, ptr) ((ESS_CERT_ID_V2 *)OPENSSL_sk_delete_ptr(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr)))
|
| 77 |
+
#define sk_ESS_CERT_ID_V2_push(sk, ptr) OPENSSL_sk_push(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 78 |
+
#define sk_ESS_CERT_ID_V2_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 79 |
+
#define sk_ESS_CERT_ID_V2_pop(sk) ((ESS_CERT_ID_V2 *)OPENSSL_sk_pop(ossl_check_ESS_CERT_ID_V2_sk_type(sk)))
|
| 80 |
+
#define sk_ESS_CERT_ID_V2_shift(sk) ((ESS_CERT_ID_V2 *)OPENSSL_sk_shift(ossl_check_ESS_CERT_ID_V2_sk_type(sk)))
|
| 81 |
+
#define sk_ESS_CERT_ID_V2_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ESS_CERT_ID_V2_sk_type(sk),ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc))
|
| 82 |
+
#define sk_ESS_CERT_ID_V2_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr), (idx))
|
| 83 |
+
#define sk_ESS_CERT_ID_V2_set(sk, idx, ptr) ((ESS_CERT_ID_V2 *)OPENSSL_sk_set(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (idx), ossl_check_ESS_CERT_ID_V2_type(ptr)))
|
| 84 |
+
#define sk_ESS_CERT_ID_V2_find(sk, ptr) OPENSSL_sk_find(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 85 |
+
#define sk_ESS_CERT_ID_V2_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 86 |
+
#define sk_ESS_CERT_ID_V2_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr), pnum)
|
| 87 |
+
#define sk_ESS_CERT_ID_V2_sort(sk) OPENSSL_sk_sort(ossl_check_ESS_CERT_ID_V2_sk_type(sk))
|
| 88 |
+
#define sk_ESS_CERT_ID_V2_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk))
|
| 89 |
+
#define sk_ESS_CERT_ID_V2_dup(sk) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_dup(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk)))
|
| 90 |
+
#define sk_ESS_CERT_ID_V2_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc)))
|
| 91 |
+
#define sk_ESS_CERT_ID_V2_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_V2_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp)))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
|
| 95 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
|
| 96 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
|
| 97 |
+
|
| 98 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID)
|
| 99 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID, ESS_CERT_ID)
|
| 100 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID)
|
| 101 |
+
|
| 102 |
+
DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT)
|
| 103 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT)
|
| 104 |
+
|
| 105 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID_V2)
|
| 106 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID_V2, ESS_CERT_ID_V2)
|
| 107 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID_V2)
|
| 108 |
+
|
| 109 |
+
DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT_V2)
|
| 110 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT_V2)
|
| 111 |
+
|
| 112 |
+
ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert,
|
| 113 |
+
const STACK_OF(X509) *certs,
|
| 114 |
+
int set_issuer_serial);
|
| 115 |
+
ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg,
|
| 116 |
+
const X509 *signcert,
|
| 117 |
+
const
|
| 118 |
+
STACK_OF(X509) *certs,
|
| 119 |
+
int set_issuer_serial);
|
| 120 |
+
int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss,
|
| 121 |
+
const ESS_SIGNING_CERT_V2 *ssv2,
|
| 122 |
+
const STACK_OF(X509) *chain,
|
| 123 |
+
int require_signing_cert);
|
| 124 |
+
|
| 125 |
+
# ifdef __cplusplus
|
| 126 |
+
}
|
| 127 |
+
# endif
|
| 128 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/fipskey.h
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/fipskey.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#ifndef OPENSSL_FIPSKEY_H
|
| 14 |
+
# define OPENSSL_FIPSKEY_H
|
| 15 |
+
# pragma once
|
| 16 |
+
|
| 17 |
+
# ifdef __cplusplus
|
| 18 |
+
extern "C" {
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* The FIPS validation HMAC key, usable as an array initializer.
|
| 23 |
+
*/
|
| 24 |
+
#define FIPS_KEY_ELEMENTS \
|
| 25 |
+
0xf4, 0x55, 0x66, 0x50, 0xac, 0x31, 0xd3, 0x54, 0x61, 0x61, 0x0b, 0xac, 0x4e, 0xd8, 0x1b, 0x1a, 0x18, 0x1b, 0x2d, 0x8a, 0x43, 0xea, 0x28, 0x54, 0xcb, 0xae, 0x22, 0xca, 0x74, 0x56, 0x08, 0x13
|
| 26 |
+
|
| 27 |
+
/*
|
| 28 |
+
* The FIPS validation key, as a string.
|
| 29 |
+
*/
|
| 30 |
+
#define FIPS_KEY_STRING "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813"
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* The FIPS provider vendor name, as a string.
|
| 34 |
+
*/
|
| 35 |
+
#define FIPS_VENDOR "OpenSSL FIPS Provider"
|
| 36 |
+
|
| 37 |
+
# ifdef __cplusplus
|
| 38 |
+
}
|
| 39 |
+
# endif
|
| 40 |
+
|
| 41 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/lhash.h
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
/*
|
| 13 |
+
* Header for dynamic hash table routines Author - Eric Young
|
| 14 |
+
*/
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_LHASH_H
|
| 17 |
+
# define OPENSSL_LHASH_H
|
| 18 |
+
# pragma once
|
| 19 |
+
|
| 20 |
+
# include <openssl/macros.h>
|
| 21 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 22 |
+
# define HEADER_LHASH_H
|
| 23 |
+
# endif
|
| 24 |
+
|
| 25 |
+
# include <openssl/e_os2.h>
|
| 26 |
+
# include <openssl/bio.h>
|
| 27 |
+
# ifndef OPENSSL_NO_STDIO
|
| 28 |
+
# include <stdio.h>
|
| 29 |
+
# endif
|
| 30 |
+
|
| 31 |
+
#ifdef __cplusplus
|
| 32 |
+
extern "C" {
|
| 33 |
+
#endif
|
| 34 |
+
|
| 35 |
+
typedef struct lhash_node_st OPENSSL_LH_NODE;
|
| 36 |
+
typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *);
|
| 37 |
+
typedef int (*OPENSSL_LH_COMPFUNCTHUNK) (const void *, const void *, OPENSSL_LH_COMPFUNC cfn);
|
| 38 |
+
typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *);
|
| 39 |
+
typedef unsigned long (*OPENSSL_LH_HASHFUNCTHUNK) (const void *, OPENSSL_LH_HASHFUNC hfn);
|
| 40 |
+
typedef void (*OPENSSL_LH_DOALL_FUNC) (void *);
|
| 41 |
+
typedef void (*OPENSSL_LH_DOALL_FUNC_THUNK) (void *, OPENSSL_LH_DOALL_FUNC doall);
|
| 42 |
+
typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *);
|
| 43 |
+
typedef void (*OPENSSL_LH_DOALL_FUNCARG_THUNK) (void *, void *, OPENSSL_LH_DOALL_FUNCARG doall);
|
| 44 |
+
typedef struct lhash_st OPENSSL_LHASH;
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* Macros for declaring and implementing type-safe wrappers for LHASH
|
| 48 |
+
* callbacks. This way, callbacks can be provided to LHASH structures without
|
| 49 |
+
* function pointer casting and the macro-defined callbacks provide
|
| 50 |
+
* per-variable casting before deferring to the underlying type-specific
|
| 51 |
+
* callbacks. NB: It is possible to place a "static" in front of both the
|
| 52 |
+
* DECLARE and IMPLEMENT macros if the functions are strictly internal.
|
| 53 |
+
*/
|
| 54 |
+
|
| 55 |
+
/* First: "hash" functions */
|
| 56 |
+
# define DECLARE_LHASH_HASH_FN(name, o_type) \
|
| 57 |
+
unsigned long name##_LHASH_HASH(const void *);
|
| 58 |
+
# define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
|
| 59 |
+
unsigned long name##_LHASH_HASH(const void *arg) { \
|
| 60 |
+
const o_type *a = arg; \
|
| 61 |
+
return name##_hash(a); }
|
| 62 |
+
# define LHASH_HASH_FN(name) name##_LHASH_HASH
|
| 63 |
+
|
| 64 |
+
/* Second: "compare" functions */
|
| 65 |
+
# define DECLARE_LHASH_COMP_FN(name, o_type) \
|
| 66 |
+
int name##_LHASH_COMP(const void *, const void *);
|
| 67 |
+
# define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
|
| 68 |
+
int name##_LHASH_COMP(const void *arg1, const void *arg2) { \
|
| 69 |
+
const o_type *a = arg1; \
|
| 70 |
+
const o_type *b = arg2; \
|
| 71 |
+
return name##_cmp(a,b); }
|
| 72 |
+
# define LHASH_COMP_FN(name) name##_LHASH_COMP
|
| 73 |
+
|
| 74 |
+
/* Fourth: "doall_arg" functions */
|
| 75 |
+
# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
|
| 76 |
+
void name##_LHASH_DOALL_ARG(void *, void *);
|
| 77 |
+
# define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
|
| 78 |
+
void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \
|
| 79 |
+
o_type *a = arg1; \
|
| 80 |
+
a_type *b = arg2; \
|
| 81 |
+
name##_doall_arg(a, b); }
|
| 82 |
+
# define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
# define LH_LOAD_MULT 256
|
| 86 |
+
|
| 87 |
+
int OPENSSL_LH_error(OPENSSL_LHASH *lh);
|
| 88 |
+
OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c);
|
| 89 |
+
OPENSSL_LHASH *OPENSSL_LH_set_thunks(OPENSSL_LHASH *lh,
|
| 90 |
+
OPENSSL_LH_HASHFUNCTHUNK hw,
|
| 91 |
+
OPENSSL_LH_COMPFUNCTHUNK cw,
|
| 92 |
+
OPENSSL_LH_DOALL_FUNC_THUNK daw,
|
| 93 |
+
OPENSSL_LH_DOALL_FUNCARG_THUNK daaw);
|
| 94 |
+
void OPENSSL_LH_free(OPENSSL_LHASH *lh);
|
| 95 |
+
void OPENSSL_LH_flush(OPENSSL_LHASH *lh);
|
| 96 |
+
void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data);
|
| 97 |
+
void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data);
|
| 98 |
+
void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data);
|
| 99 |
+
void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func);
|
| 100 |
+
void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh,
|
| 101 |
+
OPENSSL_LH_DOALL_FUNCARG func, void *arg);
|
| 102 |
+
void OPENSSL_LH_doall_arg_thunk(OPENSSL_LHASH *lh,
|
| 103 |
+
OPENSSL_LH_DOALL_FUNCARG_THUNK daaw,
|
| 104 |
+
OPENSSL_LH_DOALL_FUNCARG fn, void *arg);
|
| 105 |
+
|
| 106 |
+
unsigned long OPENSSL_LH_strhash(const char *c);
|
| 107 |
+
unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh);
|
| 108 |
+
unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh);
|
| 109 |
+
void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load);
|
| 110 |
+
|
| 111 |
+
# ifndef OPENSSL_NO_STDIO
|
| 112 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
| 113 |
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
| 114 |
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
| 115 |
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
| 116 |
+
# endif
|
| 117 |
+
# endif
|
| 118 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
| 119 |
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
| 120 |
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
| 121 |
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
| 122 |
+
# endif
|
| 123 |
+
|
| 124 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 125 |
+
# define _LHASH OPENSSL_LHASH
|
| 126 |
+
# define LHASH_NODE OPENSSL_LH_NODE
|
| 127 |
+
# define lh_error OPENSSL_LH_error
|
| 128 |
+
# define lh_new OPENSSL_LH_new
|
| 129 |
+
# define lh_free OPENSSL_LH_free
|
| 130 |
+
# define lh_insert OPENSSL_LH_insert
|
| 131 |
+
# define lh_delete OPENSSL_LH_delete
|
| 132 |
+
# define lh_retrieve OPENSSL_LH_retrieve
|
| 133 |
+
# define lh_doall OPENSSL_LH_doall
|
| 134 |
+
# define lh_doall_arg OPENSSL_LH_doall_arg
|
| 135 |
+
# define lh_strhash OPENSSL_LH_strhash
|
| 136 |
+
# define lh_num_items OPENSSL_LH_num_items
|
| 137 |
+
# ifndef OPENSSL_NO_STDIO
|
| 138 |
+
# define lh_stats OPENSSL_LH_stats
|
| 139 |
+
# define lh_node_stats OPENSSL_LH_node_stats
|
| 140 |
+
# define lh_node_usage_stats OPENSSL_LH_node_usage_stats
|
| 141 |
+
# endif
|
| 142 |
+
# define lh_stats_bio OPENSSL_LH_stats_bio
|
| 143 |
+
# define lh_node_stats_bio OPENSSL_LH_node_stats_bio
|
| 144 |
+
# define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio
|
| 145 |
+
# endif
|
| 146 |
+
|
| 147 |
+
/* Type checking... */
|
| 148 |
+
|
| 149 |
+
# define LHASH_OF(type) struct lhash_st_##type
|
| 150 |
+
|
| 151 |
+
/* Helper macro for internal use */
|
| 152 |
+
# define DEFINE_LHASH_OF_INTERNAL(type) \
|
| 153 |
+
LHASH_OF(type) { \
|
| 154 |
+
union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; \
|
| 155 |
+
}; \
|
| 156 |
+
typedef int (*lh_##type##_compfunc)(const type *a, const type *b); \
|
| 157 |
+
typedef unsigned long (*lh_##type##_hashfunc)(const type *a); \
|
| 158 |
+
typedef void (*lh_##type##_doallfunc)(type *a); \
|
| 159 |
+
static ossl_inline unsigned long lh_##type##_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) \
|
| 160 |
+
{ \
|
| 161 |
+
unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
|
| 162 |
+
return hfn_conv((const type *)data); \
|
| 163 |
+
} \
|
| 164 |
+
static ossl_inline int lh_##type##_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) \
|
| 165 |
+
{ \
|
| 166 |
+
int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
|
| 167 |
+
return cfn_conv((const type *)da, (const type *)db); \
|
| 168 |
+
} \
|
| 169 |
+
static ossl_inline void lh_##type##_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) \
|
| 170 |
+
{ \
|
| 171 |
+
void (*doall_conv)(type *) = (void (*)(type *))doall; \
|
| 172 |
+
doall_conv((type *)node); \
|
| 173 |
+
} \
|
| 174 |
+
static ossl_inline void lh_##type##_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) \
|
| 175 |
+
{ \
|
| 176 |
+
void (*doall_conv)(type *, void *) = (void (*)(type *, void *))doall; \
|
| 177 |
+
doall_conv((type *)node, arg); \
|
| 178 |
+
} \
|
| 179 |
+
static ossl_unused ossl_inline type *\
|
| 180 |
+
ossl_check_##type##_lh_plain_type(type *ptr) \
|
| 181 |
+
{ \
|
| 182 |
+
return ptr; \
|
| 183 |
+
} \
|
| 184 |
+
static ossl_unused ossl_inline const type * \
|
| 185 |
+
ossl_check_const_##type##_lh_plain_type(const type *ptr) \
|
| 186 |
+
{ \
|
| 187 |
+
return ptr; \
|
| 188 |
+
} \
|
| 189 |
+
static ossl_unused ossl_inline const OPENSSL_LHASH * \
|
| 190 |
+
ossl_check_const_##type##_lh_type(const LHASH_OF(type) *lh) \
|
| 191 |
+
{ \
|
| 192 |
+
return (const OPENSSL_LHASH *)lh; \
|
| 193 |
+
} \
|
| 194 |
+
static ossl_unused ossl_inline OPENSSL_LHASH * \
|
| 195 |
+
ossl_check_##type##_lh_type(LHASH_OF(type) *lh) \
|
| 196 |
+
{ \
|
| 197 |
+
return (OPENSSL_LHASH *)lh; \
|
| 198 |
+
} \
|
| 199 |
+
static ossl_unused ossl_inline OPENSSL_LH_COMPFUNC \
|
| 200 |
+
ossl_check_##type##_lh_compfunc_type(lh_##type##_compfunc cmp) \
|
| 201 |
+
{ \
|
| 202 |
+
return (OPENSSL_LH_COMPFUNC)cmp; \
|
| 203 |
+
} \
|
| 204 |
+
static ossl_unused ossl_inline OPENSSL_LH_HASHFUNC \
|
| 205 |
+
ossl_check_##type##_lh_hashfunc_type(lh_##type##_hashfunc hfn) \
|
| 206 |
+
{ \
|
| 207 |
+
return (OPENSSL_LH_HASHFUNC)hfn; \
|
| 208 |
+
} \
|
| 209 |
+
static ossl_unused ossl_inline OPENSSL_LH_DOALL_FUNC \
|
| 210 |
+
ossl_check_##type##_lh_doallfunc_type(lh_##type##_doallfunc dfn) \
|
| 211 |
+
{ \
|
| 212 |
+
return (OPENSSL_LH_DOALL_FUNC)dfn; \
|
| 213 |
+
} \
|
| 214 |
+
LHASH_OF(type)
|
| 215 |
+
|
| 216 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
| 217 |
+
# define DEFINE_LHASH_OF_DEPRECATED(type) \
|
| 218 |
+
static ossl_unused ossl_inline void \
|
| 219 |
+
lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
| 220 |
+
{ \
|
| 221 |
+
OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
| 222 |
+
} \
|
| 223 |
+
static ossl_unused ossl_inline void \
|
| 224 |
+
lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
| 225 |
+
{ \
|
| 226 |
+
OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
| 227 |
+
} \
|
| 228 |
+
static ossl_unused ossl_inline void \
|
| 229 |
+
lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
| 230 |
+
{ \
|
| 231 |
+
OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
| 232 |
+
}
|
| 233 |
+
# else
|
| 234 |
+
# define DEFINE_LHASH_OF_DEPRECATED(type)
|
| 235 |
+
# endif
|
| 236 |
+
|
| 237 |
+
# define DEFINE_LHASH_OF_EX(type) \
|
| 238 |
+
LHASH_OF(type) { \
|
| 239 |
+
union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; \
|
| 240 |
+
}; \
|
| 241 |
+
static unsigned long \
|
| 242 |
+
lh_##type##_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) \
|
| 243 |
+
{ \
|
| 244 |
+
unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
|
| 245 |
+
return hfn_conv((const type *)data); \
|
| 246 |
+
} \
|
| 247 |
+
static int lh_##type##_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) \
|
| 248 |
+
{ \
|
| 249 |
+
int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
|
| 250 |
+
return cfn_conv((const type *)da, (const type *)db); \
|
| 251 |
+
} \
|
| 252 |
+
static ossl_unused ossl_inline void \
|
| 253 |
+
lh_##type##_free(LHASH_OF(type) *lh) \
|
| 254 |
+
{ \
|
| 255 |
+
OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
|
| 256 |
+
} \
|
| 257 |
+
static ossl_unused ossl_inline void \
|
| 258 |
+
lh_##type##_flush(LHASH_OF(type) *lh) \
|
| 259 |
+
{ \
|
| 260 |
+
OPENSSL_LH_flush((OPENSSL_LHASH *)lh); \
|
| 261 |
+
} \
|
| 262 |
+
static ossl_unused ossl_inline type * \
|
| 263 |
+
lh_##type##_insert(LHASH_OF(type) *lh, type *d) \
|
| 264 |
+
{ \
|
| 265 |
+
return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
|
| 266 |
+
} \
|
| 267 |
+
static ossl_unused ossl_inline type * \
|
| 268 |
+
lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \
|
| 269 |
+
{ \
|
| 270 |
+
return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \
|
| 271 |
+
} \
|
| 272 |
+
static ossl_unused ossl_inline type * \
|
| 273 |
+
lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \
|
| 274 |
+
{ \
|
| 275 |
+
return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \
|
| 276 |
+
} \
|
| 277 |
+
static ossl_unused ossl_inline int \
|
| 278 |
+
lh_##type##_error(LHASH_OF(type) *lh) \
|
| 279 |
+
{ \
|
| 280 |
+
return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \
|
| 281 |
+
} \
|
| 282 |
+
static ossl_unused ossl_inline unsigned long \
|
| 283 |
+
lh_##type##_num_items(LHASH_OF(type) *lh) \
|
| 284 |
+
{ \
|
| 285 |
+
return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \
|
| 286 |
+
} \
|
| 287 |
+
static ossl_unused ossl_inline unsigned long \
|
| 288 |
+
lh_##type##_get_down_load(LHASH_OF(type) *lh) \
|
| 289 |
+
{ \
|
| 290 |
+
return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \
|
| 291 |
+
} \
|
| 292 |
+
static ossl_unused ossl_inline void \
|
| 293 |
+
lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \
|
| 294 |
+
{ \
|
| 295 |
+
OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \
|
| 296 |
+
} \
|
| 297 |
+
static ossl_unused ossl_inline void \
|
| 298 |
+
lh_##type##_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) \
|
| 299 |
+
{ \
|
| 300 |
+
void (*doall_conv)(type *) = (void (*)(type *))doall; \
|
| 301 |
+
doall_conv((type *)node); \
|
| 302 |
+
} \
|
| 303 |
+
static ossl_unused ossl_inline void \
|
| 304 |
+
lh_##type##_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) \
|
| 305 |
+
{ \
|
| 306 |
+
void (*doall_conv)(type *, void *) = (void (*)(type *, void *))doall; \
|
| 307 |
+
doall_conv((type *)node, arg); \
|
| 308 |
+
} \
|
| 309 |
+
static ossl_unused ossl_inline void \
|
| 310 |
+
lh_##type##_doall(LHASH_OF(type) *lh, void (*doall)(type *)) \
|
| 311 |
+
{ \
|
| 312 |
+
OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
|
| 313 |
+
} \
|
| 314 |
+
static ossl_unused ossl_inline LHASH_OF(type) * \
|
| 315 |
+
lh_##type##_new(unsigned long (*hfn)(const type *), \
|
| 316 |
+
int (*cfn)(const type *, const type *)) \
|
| 317 |
+
{ \
|
| 318 |
+
return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
|
| 319 |
+
lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
|
| 320 |
+
lh_##type##_doall_thunk, \
|
| 321 |
+
lh_##type##_doall_arg_thunk); \
|
| 322 |
+
} \
|
| 323 |
+
static ossl_unused ossl_inline void \
|
| 324 |
+
lh_##type##_doall_arg(LHASH_OF(type) *lh, \
|
| 325 |
+
void (*doallarg)(type *, void *), void *arg) \
|
| 326 |
+
{ \
|
| 327 |
+
OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, \
|
| 328 |
+
(OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); \
|
| 329 |
+
} \
|
| 330 |
+
LHASH_OF(type)
|
| 331 |
+
|
| 332 |
+
# define DEFINE_LHASH_OF(type) \
|
| 333 |
+
DEFINE_LHASH_OF_EX(type); \
|
| 334 |
+
DEFINE_LHASH_OF_DEPRECATED(type) \
|
| 335 |
+
LHASH_OF(type)
|
| 336 |
+
|
| 337 |
+
#define IMPLEMENT_LHASH_DOALL_ARG_CONST(type, argtype) \
|
| 338 |
+
int_implement_lhash_doall(type, argtype, const type)
|
| 339 |
+
|
| 340 |
+
#define IMPLEMENT_LHASH_DOALL_ARG(type, argtype) \
|
| 341 |
+
int_implement_lhash_doall(type, argtype, type)
|
| 342 |
+
|
| 343 |
+
#define int_implement_lhash_doall(type, argtype, cbargtype) \
|
| 344 |
+
static ossl_unused ossl_inline void \
|
| 345 |
+
lh_##type##_doall_##argtype##_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG fn) \
|
| 346 |
+
{ \
|
| 347 |
+
void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn; \
|
| 348 |
+
fn_conv((cbargtype *)node, (argtype *)arg); \
|
| 349 |
+
} \
|
| 350 |
+
static ossl_unused ossl_inline void \
|
| 351 |
+
lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \
|
| 352 |
+
void (*fn)(cbargtype *, argtype *), \
|
| 353 |
+
argtype *arg) \
|
| 354 |
+
{ \
|
| 355 |
+
OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh, \
|
| 356 |
+
lh_##type##_doall_##argtype##_thunk, \
|
| 357 |
+
(OPENSSL_LH_DOALL_FUNCARG)fn, \
|
| 358 |
+
(void *)arg); \
|
| 359 |
+
} \
|
| 360 |
+
LHASH_OF(type)
|
| 361 |
+
|
| 362 |
+
DEFINE_LHASH_OF_INTERNAL(OPENSSL_STRING);
|
| 363 |
+
#define lh_OPENSSL_STRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_STRING) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_OPENSSL_STRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_STRING_lh_compfunc_type(cmp)), lh_OPENSSL_STRING_hash_thunk, lh_OPENSSL_STRING_comp_thunk, lh_OPENSSL_STRING_doall_thunk, lh_OPENSSL_STRING_doall_arg_thunk))
|
| 364 |
+
#define lh_OPENSSL_STRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_STRING_lh_type(lh))
|
| 365 |
+
#define lh_OPENSSL_STRING_flush(lh) OPENSSL_LH_flush(ossl_check_OPENSSL_STRING_lh_type(lh))
|
| 366 |
+
#define lh_OPENSSL_STRING_insert(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_insert(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_OPENSSL_STRING_lh_plain_type(ptr)))
|
| 367 |
+
#define lh_OPENSSL_STRING_delete(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_delete(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_const_OPENSSL_STRING_lh_plain_type(ptr)))
|
| 368 |
+
#define lh_OPENSSL_STRING_retrieve(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_retrieve(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_const_OPENSSL_STRING_lh_plain_type(ptr)))
|
| 369 |
+
#define lh_OPENSSL_STRING_error(lh) OPENSSL_LH_error(ossl_check_OPENSSL_STRING_lh_type(lh))
|
| 370 |
+
#define lh_OPENSSL_STRING_num_items(lh) OPENSSL_LH_num_items(ossl_check_OPENSSL_STRING_lh_type(lh))
|
| 371 |
+
#define lh_OPENSSL_STRING_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out)
|
| 372 |
+
#define lh_OPENSSL_STRING_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out)
|
| 373 |
+
#define lh_OPENSSL_STRING_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out)
|
| 374 |
+
#define lh_OPENSSL_STRING_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_OPENSSL_STRING_lh_type(lh))
|
| 375 |
+
#define lh_OPENSSL_STRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_STRING_lh_type(lh), dl)
|
| 376 |
+
#define lh_OPENSSL_STRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_OPENSSL_STRING_lh_doallfunc_type(dfn))
|
| 377 |
+
DEFINE_LHASH_OF_INTERNAL(OPENSSL_CSTRING);
|
| 378 |
+
#define lh_OPENSSL_CSTRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_CSTRING) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_OPENSSL_CSTRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_CSTRING_lh_compfunc_type(cmp)), lh_OPENSSL_CSTRING_hash_thunk, lh_OPENSSL_CSTRING_comp_thunk, lh_OPENSSL_CSTRING_doall_thunk, lh_OPENSSL_CSTRING_doall_arg_thunk))
|
| 379 |
+
#define lh_OPENSSL_CSTRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_CSTRING_lh_type(lh))
|
| 380 |
+
#define lh_OPENSSL_CSTRING_flush(lh) OPENSSL_LH_flush(ossl_check_OPENSSL_CSTRING_lh_type(lh))
|
| 381 |
+
#define lh_OPENSSL_CSTRING_insert(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_insert(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_plain_type(ptr)))
|
| 382 |
+
#define lh_OPENSSL_CSTRING_delete(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_delete(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_const_OPENSSL_CSTRING_lh_plain_type(ptr)))
|
| 383 |
+
#define lh_OPENSSL_CSTRING_retrieve(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_retrieve(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_const_OPENSSL_CSTRING_lh_plain_type(ptr)))
|
| 384 |
+
#define lh_OPENSSL_CSTRING_error(lh) OPENSSL_LH_error(ossl_check_OPENSSL_CSTRING_lh_type(lh))
|
| 385 |
+
#define lh_OPENSSL_CSTRING_num_items(lh) OPENSSL_LH_num_items(ossl_check_OPENSSL_CSTRING_lh_type(lh))
|
| 386 |
+
#define lh_OPENSSL_CSTRING_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out)
|
| 387 |
+
#define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out)
|
| 388 |
+
#define lh_OPENSSL_CSTRING_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out)
|
| 389 |
+
#define lh_OPENSSL_CSTRING_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh))
|
| 390 |
+
#define lh_OPENSSL_CSTRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh), dl)
|
| 391 |
+
#define lh_OPENSSL_CSTRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_doallfunc_type(dfn))
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
#ifdef __cplusplus
|
| 395 |
+
}
|
| 396 |
+
#endif
|
| 397 |
+
|
| 398 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ocsp.h
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ocsp.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_OCSP_H
|
| 16 |
+
# define OPENSSL_OCSP_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_OCSP_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
# include <openssl/http.h>
|
| 26 |
+
# include <openssl/asn1.h>
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* These definitions are outside the OPENSSL_NO_OCSP guard because although for
|
| 30 |
+
* historical reasons they have OCSP_* names, they can actually be used
|
| 31 |
+
* independently of OCSP. E.g. see RFC5280
|
| 32 |
+
*/
|
| 33 |
+
/*-
|
| 34 |
+
* CRLReason ::= ENUMERATED {
|
| 35 |
+
* unspecified (0),
|
| 36 |
+
* keyCompromise (1),
|
| 37 |
+
* cACompromise (2),
|
| 38 |
+
* affiliationChanged (3),
|
| 39 |
+
* superseded (4),
|
| 40 |
+
* cessationOfOperation (5),
|
| 41 |
+
* certificateHold (6),
|
| 42 |
+
* -- value 7 is not used
|
| 43 |
+
* removeFromCRL (8),
|
| 44 |
+
* privilegeWithdrawn (9),
|
| 45 |
+
* aACompromise (10) }
|
| 46 |
+
*/
|
| 47 |
+
# define OCSP_REVOKED_STATUS_NOSTATUS -1
|
| 48 |
+
# define OCSP_REVOKED_STATUS_UNSPECIFIED 0
|
| 49 |
+
# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
|
| 50 |
+
# define OCSP_REVOKED_STATUS_CACOMPROMISE 2
|
| 51 |
+
# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
|
| 52 |
+
# define OCSP_REVOKED_STATUS_SUPERSEDED 4
|
| 53 |
+
# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
|
| 54 |
+
# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
|
| 55 |
+
# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
|
| 56 |
+
# define OCSP_REVOKED_STATUS_PRIVILEGEWITHDRAWN 9
|
| 57 |
+
# define OCSP_REVOKED_STATUS_AACOMPROMISE 10
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
# ifndef OPENSSL_NO_OCSP
|
| 61 |
+
|
| 62 |
+
# include <openssl/x509.h>
|
| 63 |
+
# include <openssl/x509v3.h>
|
| 64 |
+
# include <openssl/safestack.h>
|
| 65 |
+
# include <openssl/ocsperr.h>
|
| 66 |
+
|
| 67 |
+
# ifdef __cplusplus
|
| 68 |
+
extern "C" {
|
| 69 |
+
# endif
|
| 70 |
+
|
| 71 |
+
/* Various flags and values */
|
| 72 |
+
|
| 73 |
+
# define OCSP_DEFAULT_NONCE_LENGTH 16
|
| 74 |
+
|
| 75 |
+
# define OCSP_NOCERTS 0x1
|
| 76 |
+
# define OCSP_NOINTERN 0x2
|
| 77 |
+
# define OCSP_NOSIGS 0x4
|
| 78 |
+
# define OCSP_NOCHAIN 0x8
|
| 79 |
+
# define OCSP_NOVERIFY 0x10
|
| 80 |
+
# define OCSP_NOEXPLICIT 0x20
|
| 81 |
+
# define OCSP_NOCASIGN 0x40
|
| 82 |
+
# define OCSP_NODELEGATED 0x80
|
| 83 |
+
# define OCSP_NOCHECKS 0x100
|
| 84 |
+
# define OCSP_TRUSTOTHER 0x200
|
| 85 |
+
# define OCSP_RESPID_KEY 0x400
|
| 86 |
+
# define OCSP_NOTIME 0x800
|
| 87 |
+
# define OCSP_PARTIAL_CHAIN 0x1000
|
| 88 |
+
|
| 89 |
+
typedef struct ocsp_cert_id_st OCSP_CERTID;
|
| 90 |
+
typedef struct ocsp_one_request_st OCSP_ONEREQ;
|
| 91 |
+
typedef struct ocsp_req_info_st OCSP_REQINFO;
|
| 92 |
+
typedef struct ocsp_signature_st OCSP_SIGNATURE;
|
| 93 |
+
typedef struct ocsp_request_st OCSP_REQUEST;
|
| 94 |
+
|
| 95 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_CERTID, OCSP_CERTID, OCSP_CERTID)
|
| 96 |
+
#define sk_OCSP_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
| 97 |
+
#define sk_OCSP_CERTID_value(sk, idx) ((OCSP_CERTID *)OPENSSL_sk_value(ossl_check_const_OCSP_CERTID_sk_type(sk), (idx)))
|
| 98 |
+
#define sk_OCSP_CERTID_new(cmp) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new(ossl_check_OCSP_CERTID_compfunc_type(cmp)))
|
| 99 |
+
#define sk_OCSP_CERTID_new_null() ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new_null())
|
| 100 |
+
#define sk_OCSP_CERTID_new_reserve(cmp, n) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_CERTID_compfunc_type(cmp), (n)))
|
| 101 |
+
#define sk_OCSP_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_CERTID_sk_type(sk), (n))
|
| 102 |
+
#define sk_OCSP_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 103 |
+
#define sk_OCSP_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 104 |
+
#define sk_OCSP_CERTID_delete(sk, i) ((OCSP_CERTID *)OPENSSL_sk_delete(ossl_check_OCSP_CERTID_sk_type(sk), (i)))
|
| 105 |
+
#define sk_OCSP_CERTID_delete_ptr(sk, ptr) ((OCSP_CERTID *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr)))
|
| 106 |
+
#define sk_OCSP_CERTID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 107 |
+
#define sk_OCSP_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 108 |
+
#define sk_OCSP_CERTID_pop(sk) ((OCSP_CERTID *)OPENSSL_sk_pop(ossl_check_OCSP_CERTID_sk_type(sk)))
|
| 109 |
+
#define sk_OCSP_CERTID_shift(sk) ((OCSP_CERTID *)OPENSSL_sk_shift(ossl_check_OCSP_CERTID_sk_type(sk)))
|
| 110 |
+
#define sk_OCSP_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_CERTID_sk_type(sk),ossl_check_OCSP_CERTID_freefunc_type(freefunc))
|
| 111 |
+
#define sk_OCSP_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr), (idx))
|
| 112 |
+
#define sk_OCSP_CERTID_set(sk, idx, ptr) ((OCSP_CERTID *)OPENSSL_sk_set(ossl_check_OCSP_CERTID_sk_type(sk), (idx), ossl_check_OCSP_CERTID_type(ptr)))
|
| 113 |
+
#define sk_OCSP_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 114 |
+
#define sk_OCSP_CERTID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 115 |
+
#define sk_OCSP_CERTID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr), pnum)
|
| 116 |
+
#define sk_OCSP_CERTID_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 117 |
+
#define sk_OCSP_CERTID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
| 118 |
+
#define sk_OCSP_CERTID_dup(sk) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_dup(ossl_check_const_OCSP_CERTID_sk_type(sk)))
|
| 119 |
+
#define sk_OCSP_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_copyfunc_type(copyfunc), ossl_check_OCSP_CERTID_freefunc_type(freefunc)))
|
| 120 |
+
#define sk_OCSP_CERTID_set_cmp_func(sk, cmp) ((sk_OCSP_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_compfunc_type(cmp)))
|
| 121 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_ONEREQ, OCSP_ONEREQ, OCSP_ONEREQ)
|
| 122 |
+
#define sk_OCSP_ONEREQ_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_ONEREQ_sk_type(sk))
|
| 123 |
+
#define sk_OCSP_ONEREQ_value(sk, idx) ((OCSP_ONEREQ *)OPENSSL_sk_value(ossl_check_const_OCSP_ONEREQ_sk_type(sk), (idx)))
|
| 124 |
+
#define sk_OCSP_ONEREQ_new(cmp) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new(ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
| 125 |
+
#define sk_OCSP_ONEREQ_new_null() ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new_null())
|
| 126 |
+
#define sk_OCSP_ONEREQ_new_reserve(cmp, n) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_ONEREQ_compfunc_type(cmp), (n)))
|
| 127 |
+
#define sk_OCSP_ONEREQ_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_ONEREQ_sk_type(sk), (n))
|
| 128 |
+
#define sk_OCSP_ONEREQ_free(sk) OPENSSL_sk_free(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 129 |
+
#define sk_OCSP_ONEREQ_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 130 |
+
#define sk_OCSP_ONEREQ_delete(sk, i) ((OCSP_ONEREQ *)OPENSSL_sk_delete(ossl_check_OCSP_ONEREQ_sk_type(sk), (i)))
|
| 131 |
+
#define sk_OCSP_ONEREQ_delete_ptr(sk, ptr) ((OCSP_ONEREQ *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr)))
|
| 132 |
+
#define sk_OCSP_ONEREQ_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 133 |
+
#define sk_OCSP_ONEREQ_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 134 |
+
#define sk_OCSP_ONEREQ_pop(sk) ((OCSP_ONEREQ *)OPENSSL_sk_pop(ossl_check_OCSP_ONEREQ_sk_type(sk)))
|
| 135 |
+
#define sk_OCSP_ONEREQ_shift(sk) ((OCSP_ONEREQ *)OPENSSL_sk_shift(ossl_check_OCSP_ONEREQ_sk_type(sk)))
|
| 136 |
+
#define sk_OCSP_ONEREQ_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_ONEREQ_sk_type(sk),ossl_check_OCSP_ONEREQ_freefunc_type(freefunc))
|
| 137 |
+
#define sk_OCSP_ONEREQ_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr), (idx))
|
| 138 |
+
#define sk_OCSP_ONEREQ_set(sk, idx, ptr) ((OCSP_ONEREQ *)OPENSSL_sk_set(ossl_check_OCSP_ONEREQ_sk_type(sk), (idx), ossl_check_OCSP_ONEREQ_type(ptr)))
|
| 139 |
+
#define sk_OCSP_ONEREQ_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 140 |
+
#define sk_OCSP_ONEREQ_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 141 |
+
#define sk_OCSP_ONEREQ_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr), pnum)
|
| 142 |
+
#define sk_OCSP_ONEREQ_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 143 |
+
#define sk_OCSP_ONEREQ_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_ONEREQ_sk_type(sk))
|
| 144 |
+
#define sk_OCSP_ONEREQ_dup(sk) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_dup(ossl_check_const_OCSP_ONEREQ_sk_type(sk)))
|
| 145 |
+
#define sk_OCSP_ONEREQ_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_copyfunc_type(copyfunc), ossl_check_OCSP_ONEREQ_freefunc_type(freefunc)))
|
| 146 |
+
#define sk_OCSP_ONEREQ_set_cmp_func(sk, cmp) ((sk_OCSP_ONEREQ_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
|
| 150 |
+
# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
|
| 151 |
+
# define OCSP_RESPONSE_STATUS_INTERNALERROR 2
|
| 152 |
+
# define OCSP_RESPONSE_STATUS_TRYLATER 3
|
| 153 |
+
# define OCSP_RESPONSE_STATUS_SIGREQUIRED 5
|
| 154 |
+
# define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6
|
| 155 |
+
|
| 156 |
+
typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
|
| 157 |
+
|
| 158 |
+
# define V_OCSP_RESPID_NAME 0
|
| 159 |
+
# define V_OCSP_RESPID_KEY 1
|
| 160 |
+
|
| 161 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_RESPID, OCSP_RESPID, OCSP_RESPID)
|
| 162 |
+
#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
| 163 |
+
#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
|
| 164 |
+
#define sk_OCSP_RESPID_new(cmp) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new(ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
| 165 |
+
#define sk_OCSP_RESPID_new_null() ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new_null())
|
| 166 |
+
#define sk_OCSP_RESPID_new_reserve(cmp, n) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_RESPID_compfunc_type(cmp), (n)))
|
| 167 |
+
#define sk_OCSP_RESPID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_RESPID_sk_type(sk), (n))
|
| 168 |
+
#define sk_OCSP_RESPID_free(sk) OPENSSL_sk_free(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 169 |
+
#define sk_OCSP_RESPID_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 170 |
+
#define sk_OCSP_RESPID_delete(sk, i) ((OCSP_RESPID *)OPENSSL_sk_delete(ossl_check_OCSP_RESPID_sk_type(sk), (i)))
|
| 171 |
+
#define sk_OCSP_RESPID_delete_ptr(sk, ptr) ((OCSP_RESPID *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr)))
|
| 172 |
+
#define sk_OCSP_RESPID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 173 |
+
#define sk_OCSP_RESPID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 174 |
+
#define sk_OCSP_RESPID_pop(sk) ((OCSP_RESPID *)OPENSSL_sk_pop(ossl_check_OCSP_RESPID_sk_type(sk)))
|
| 175 |
+
#define sk_OCSP_RESPID_shift(sk) ((OCSP_RESPID *)OPENSSL_sk_shift(ossl_check_OCSP_RESPID_sk_type(sk)))
|
| 176 |
+
#define sk_OCSP_RESPID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(sk),ossl_check_OCSP_RESPID_freefunc_type(freefunc))
|
| 177 |
+
#define sk_OCSP_RESPID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr), (idx))
|
| 178 |
+
#define sk_OCSP_RESPID_set(sk, idx, ptr) ((OCSP_RESPID *)OPENSSL_sk_set(ossl_check_OCSP_RESPID_sk_type(sk), (idx), ossl_check_OCSP_RESPID_type(ptr)))
|
| 179 |
+
#define sk_OCSP_RESPID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 180 |
+
#define sk_OCSP_RESPID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 181 |
+
#define sk_OCSP_RESPID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr), pnum)
|
| 182 |
+
#define sk_OCSP_RESPID_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 183 |
+
#define sk_OCSP_RESPID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
| 184 |
+
#define sk_OCSP_RESPID_dup(sk) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_dup(ossl_check_const_OCSP_RESPID_sk_type(sk)))
|
| 185 |
+
#define sk_OCSP_RESPID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_copyfunc_type(copyfunc), ossl_check_OCSP_RESPID_freefunc_type(freefunc)))
|
| 186 |
+
#define sk_OCSP_RESPID_set_cmp_func(sk, cmp) ((sk_OCSP_RESPID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
|
| 190 |
+
|
| 191 |
+
# define V_OCSP_CERTSTATUS_GOOD 0
|
| 192 |
+
# define V_OCSP_CERTSTATUS_REVOKED 1
|
| 193 |
+
# define V_OCSP_CERTSTATUS_UNKNOWN 2
|
| 194 |
+
|
| 195 |
+
typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
|
| 196 |
+
typedef struct ocsp_single_response_st OCSP_SINGLERESP;
|
| 197 |
+
|
| 198 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_SINGLERESP, OCSP_SINGLERESP, OCSP_SINGLERESP)
|
| 199 |
+
#define sk_OCSP_SINGLERESP_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
| 200 |
+
#define sk_OCSP_SINGLERESP_value(sk, idx) ((OCSP_SINGLERESP *)OPENSSL_sk_value(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), (idx)))
|
| 201 |
+
#define sk_OCSP_SINGLERESP_new(cmp) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new(ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
| 202 |
+
#define sk_OCSP_SINGLERESP_new_null() ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new_null())
|
| 203 |
+
#define sk_OCSP_SINGLERESP_new_reserve(cmp, n) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_SINGLERESP_compfunc_type(cmp), (n)))
|
| 204 |
+
#define sk_OCSP_SINGLERESP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_SINGLERESP_sk_type(sk), (n))
|
| 205 |
+
#define sk_OCSP_SINGLERESP_free(sk) OPENSSL_sk_free(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 206 |
+
#define sk_OCSP_SINGLERESP_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 207 |
+
#define sk_OCSP_SINGLERESP_delete(sk, i) ((OCSP_SINGLERESP *)OPENSSL_sk_delete(ossl_check_OCSP_SINGLERESP_sk_type(sk), (i)))
|
| 208 |
+
#define sk_OCSP_SINGLERESP_delete_ptr(sk, ptr) ((OCSP_SINGLERESP *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr)))
|
| 209 |
+
#define sk_OCSP_SINGLERESP_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 210 |
+
#define sk_OCSP_SINGLERESP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 211 |
+
#define sk_OCSP_SINGLERESP_pop(sk) ((OCSP_SINGLERESP *)OPENSSL_sk_pop(ossl_check_OCSP_SINGLERESP_sk_type(sk)))
|
| 212 |
+
#define sk_OCSP_SINGLERESP_shift(sk) ((OCSP_SINGLERESP *)OPENSSL_sk_shift(ossl_check_OCSP_SINGLERESP_sk_type(sk)))
|
| 213 |
+
#define sk_OCSP_SINGLERESP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_SINGLERESP_sk_type(sk),ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc))
|
| 214 |
+
#define sk_OCSP_SINGLERESP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr), (idx))
|
| 215 |
+
#define sk_OCSP_SINGLERESP_set(sk, idx, ptr) ((OCSP_SINGLERESP *)OPENSSL_sk_set(ossl_check_OCSP_SINGLERESP_sk_type(sk), (idx), ossl_check_OCSP_SINGLERESP_type(ptr)))
|
| 216 |
+
#define sk_OCSP_SINGLERESP_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 217 |
+
#define sk_OCSP_SINGLERESP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 218 |
+
#define sk_OCSP_SINGLERESP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr), pnum)
|
| 219 |
+
#define sk_OCSP_SINGLERESP_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 220 |
+
#define sk_OCSP_SINGLERESP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
| 221 |
+
#define sk_OCSP_SINGLERESP_dup(sk) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_dup(ossl_check_const_OCSP_SINGLERESP_sk_type(sk)))
|
| 222 |
+
#define sk_OCSP_SINGLERESP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_copyfunc_type(copyfunc), ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc)))
|
| 223 |
+
#define sk_OCSP_SINGLERESP_set_cmp_func(sk, cmp) ((sk_OCSP_SINGLERESP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
typedef struct ocsp_response_data_st OCSP_RESPDATA;
|
| 227 |
+
|
| 228 |
+
typedef struct ocsp_basic_response_st OCSP_BASICRESP;
|
| 229 |
+
|
| 230 |
+
typedef struct ocsp_crl_id_st OCSP_CRLID;
|
| 231 |
+
typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
|
| 232 |
+
|
| 233 |
+
# define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
|
| 234 |
+
# define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
|
| 235 |
+
|
| 236 |
+
# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)
|
| 237 |
+
|
| 238 |
+
# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)
|
| 239 |
+
|
| 240 |
+
# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
|
| 241 |
+
(char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \
|
| 242 |
+
bp,(char **)(x),cb,NULL)
|
| 243 |
+
|
| 244 |
+
# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio(\
|
| 245 |
+
(char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \
|
| 246 |
+
bp,(char **)(x),cb,NULL)
|
| 247 |
+
|
| 248 |
+
# define PEM_write_bio_OCSP_REQUEST(bp,o) \
|
| 249 |
+
PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\
|
| 250 |
+
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
| 251 |
+
|
| 252 |
+
# define PEM_write_bio_OCSP_RESPONSE(bp,o) \
|
| 253 |
+
PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\
|
| 254 |
+
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
| 255 |
+
|
| 256 |
+
# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)
|
| 257 |
+
|
| 258 |
+
# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)
|
| 259 |
+
|
| 260 |
+
# define ASN1_BIT_STRING_digest(data,type,md,len) \
|
| 261 |
+
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)
|
| 262 |
+
|
| 263 |
+
# define OCSP_CERTSTATUS_dup(cs)\
|
| 264 |
+
(OCSP_CERTSTATUS*)ASN1_dup((i2d_of_void *)i2d_OCSP_CERTSTATUS,\
|
| 265 |
+
(d2i_of_void *)d2i_OCSP_CERTSTATUS,(char *)(cs))
|
| 266 |
+
|
| 267 |
+
DECLARE_ASN1_DUP_FUNCTION(OCSP_CERTID)
|
| 268 |
+
|
| 269 |
+
OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
|
| 270 |
+
const OCSP_REQUEST *req, int buf_size);
|
| 271 |
+
OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
|
| 272 |
+
|
| 273 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 274 |
+
typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
|
| 275 |
+
# define OCSP_REQ_CTX_new(io, buf_size) \
|
| 276 |
+
OSSL_HTTP_REQ_CTX_new(io, io, buf_size)
|
| 277 |
+
# define OCSP_REQ_CTX_free OSSL_HTTP_REQ_CTX_free
|
| 278 |
+
# define OCSP_REQ_CTX_http(rctx, op, path) \
|
| 279 |
+
(OSSL_HTTP_REQ_CTX_set_expected(rctx, NULL, 1 /* asn1 */, 0, 0) && \
|
| 280 |
+
OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, \
|
| 281 |
+
NULL, NULL, path))
|
| 282 |
+
# define OCSP_REQ_CTX_add1_header OSSL_HTTP_REQ_CTX_add1_header
|
| 283 |
+
# define OCSP_REQ_CTX_i2d(r, it, req) \
|
| 284 |
+
OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", it, req)
|
| 285 |
+
# define OCSP_REQ_CTX_set1_req(r, req) \
|
| 286 |
+
OCSP_REQ_CTX_i2d(r, ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)(req))
|
| 287 |
+
# define OCSP_REQ_CTX_nbio OSSL_HTTP_REQ_CTX_nbio
|
| 288 |
+
# define OCSP_REQ_CTX_nbio_d2i OSSL_HTTP_REQ_CTX_nbio_d2i
|
| 289 |
+
# define OCSP_sendreq_nbio(p, r) \
|
| 290 |
+
OSSL_HTTP_REQ_CTX_nbio_d2i(r, (ASN1_VALUE **)(p), \
|
| 291 |
+
ASN1_ITEM_rptr(OCSP_RESPONSE))
|
| 292 |
+
# define OCSP_REQ_CTX_get0_mem_bio OSSL_HTTP_REQ_CTX_get0_mem_bio
|
| 293 |
+
# define OCSP_set_max_response_length OSSL_HTTP_REQ_CTX_set_max_response_length
|
| 294 |
+
# endif
|
| 295 |
+
|
| 296 |
+
OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
|
| 297 |
+
const X509 *issuer);
|
| 298 |
+
|
| 299 |
+
OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
|
| 300 |
+
const X509_NAME *issuerName,
|
| 301 |
+
const ASN1_BIT_STRING *issuerKey,
|
| 302 |
+
const ASN1_INTEGER *serialNumber);
|
| 303 |
+
|
| 304 |
+
OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
|
| 305 |
+
|
| 306 |
+
int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);
|
| 307 |
+
int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
|
| 308 |
+
int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
|
| 309 |
+
int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
|
| 310 |
+
|
| 311 |
+
int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
|
| 312 |
+
int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
|
| 313 |
+
|
| 314 |
+
int OCSP_request_sign(OCSP_REQUEST *req,
|
| 315 |
+
X509 *signer,
|
| 316 |
+
EVP_PKEY *key,
|
| 317 |
+
const EVP_MD *dgst,
|
| 318 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 319 |
+
|
| 320 |
+
int OCSP_response_status(OCSP_RESPONSE *resp);
|
| 321 |
+
OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
|
| 322 |
+
|
| 323 |
+
const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
|
| 324 |
+
const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
|
| 325 |
+
const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
|
| 326 |
+
int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
|
| 327 |
+
STACK_OF(X509) *extra_certs);
|
| 328 |
+
|
| 329 |
+
int OCSP_resp_count(OCSP_BASICRESP *bs);
|
| 330 |
+
OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
|
| 331 |
+
const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs);
|
| 332 |
+
const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
|
| 333 |
+
int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
|
| 334 |
+
const ASN1_OCTET_STRING **pid,
|
| 335 |
+
const X509_NAME **pname);
|
| 336 |
+
int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
|
| 337 |
+
ASN1_OCTET_STRING **pid,
|
| 338 |
+
X509_NAME **pname);
|
| 339 |
+
|
| 340 |
+
int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
|
| 341 |
+
int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
|
| 342 |
+
ASN1_GENERALIZEDTIME **revtime,
|
| 343 |
+
ASN1_GENERALIZEDTIME **thisupd,
|
| 344 |
+
ASN1_GENERALIZEDTIME **nextupd);
|
| 345 |
+
int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
|
| 346 |
+
int *reason,
|
| 347 |
+
ASN1_GENERALIZEDTIME **revtime,
|
| 348 |
+
ASN1_GENERALIZEDTIME **thisupd,
|
| 349 |
+
ASN1_GENERALIZEDTIME **nextupd);
|
| 350 |
+
int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
|
| 351 |
+
ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
|
| 352 |
+
|
| 353 |
+
int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs,
|
| 354 |
+
X509_STORE *store, unsigned long flags);
|
| 355 |
+
|
| 356 |
+
# define OCSP_parse_url(url, host, port, path, ssl) \
|
| 357 |
+
OSSL_HTTP_parse_url(url, ssl, NULL, host, port, NULL, path, NULL, NULL)
|
| 358 |
+
|
| 359 |
+
int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
| 360 |
+
int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
| 361 |
+
|
| 362 |
+
int OCSP_request_onereq_count(OCSP_REQUEST *req);
|
| 363 |
+
OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
|
| 364 |
+
OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
|
| 365 |
+
int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
|
| 366 |
+
ASN1_OCTET_STRING **pikeyHash,
|
| 367 |
+
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
|
| 368 |
+
int OCSP_request_is_signed(OCSP_REQUEST *req);
|
| 369 |
+
OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
|
| 370 |
+
OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
|
| 371 |
+
OCSP_CERTID *cid,
|
| 372 |
+
int status, int reason,
|
| 373 |
+
ASN1_TIME *revtime,
|
| 374 |
+
ASN1_TIME *thisupd,
|
| 375 |
+
ASN1_TIME *nextupd);
|
| 376 |
+
int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
|
| 377 |
+
int OCSP_basic_sign(OCSP_BASICRESP *brsp,
|
| 378 |
+
X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
|
| 379 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 380 |
+
int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
|
| 381 |
+
X509 *signer, EVP_MD_CTX *ctx,
|
| 382 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 383 |
+
int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
|
| 384 |
+
int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
|
| 385 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 386 |
+
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
|
| 387 |
+
int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
|
| 388 |
+
const char *propq);
|
| 389 |
+
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
|
| 390 |
+
|
| 391 |
+
X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
|
| 392 |
+
|
| 393 |
+
X509_EXTENSION *OCSP_accept_responses_new(char **oids);
|
| 394 |
+
|
| 395 |
+
X509_EXTENSION *OCSP_archive_cutoff_new(char *tim);
|
| 396 |
+
|
| 397 |
+
X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
|
| 398 |
+
|
| 399 |
+
int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
|
| 400 |
+
int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
|
| 401 |
+
int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
|
| 402 |
+
int lastpos);
|
| 403 |
+
int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
|
| 404 |
+
X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
|
| 405 |
+
X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
|
| 406 |
+
void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,
|
| 407 |
+
int *idx);
|
| 408 |
+
int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
|
| 409 |
+
unsigned long flags);
|
| 410 |
+
int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
|
| 411 |
+
|
| 412 |
+
int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
|
| 413 |
+
int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
|
| 414 |
+
int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos);
|
| 415 |
+
int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
|
| 416 |
+
X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
|
| 417 |
+
X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
|
| 418 |
+
void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
|
| 419 |
+
int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
|
| 420 |
+
unsigned long flags);
|
| 421 |
+
int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
|
| 422 |
+
|
| 423 |
+
int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
|
| 424 |
+
int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
|
| 425 |
+
int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
|
| 426 |
+
int lastpos);
|
| 427 |
+
int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
|
| 428 |
+
int lastpos);
|
| 429 |
+
X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
|
| 430 |
+
X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
|
| 431 |
+
void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,
|
| 432 |
+
int *idx);
|
| 433 |
+
int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,
|
| 434 |
+
int crit, unsigned long flags);
|
| 435 |
+
int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
|
| 436 |
+
|
| 437 |
+
int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
|
| 438 |
+
int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
|
| 439 |
+
int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
|
| 440 |
+
int lastpos);
|
| 441 |
+
int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
|
| 442 |
+
int lastpos);
|
| 443 |
+
X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
|
| 444 |
+
X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
|
| 445 |
+
void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,
|
| 446 |
+
int *idx);
|
| 447 |
+
int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,
|
| 448 |
+
int crit, unsigned long flags);
|
| 449 |
+
int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
|
| 450 |
+
const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
|
| 451 |
+
|
| 452 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP)
|
| 453 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS)
|
| 454 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO)
|
| 455 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP)
|
| 456 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA)
|
| 457 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPID)
|
| 458 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE)
|
| 459 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES)
|
| 460 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ)
|
| 461 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)
|
| 462 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST)
|
| 463 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE)
|
| 464 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO)
|
| 465 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CRLID)
|
| 466 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC)
|
| 467 |
+
|
| 468 |
+
const char *OCSP_response_status_str(long s);
|
| 469 |
+
const char *OCSP_cert_status_str(long s);
|
| 470 |
+
const char *OCSP_crl_reason_str(long s);
|
| 471 |
+
|
| 472 |
+
int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
|
| 473 |
+
int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
|
| 474 |
+
|
| 475 |
+
int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
| 476 |
+
X509_STORE *st, unsigned long flags);
|
| 477 |
+
|
| 478 |
+
|
| 479 |
+
# ifdef __cplusplus
|
| 480 |
+
}
|
| 481 |
+
# endif
|
| 482 |
+
# endif /* !defined(OPENSSL_NO_OCSP) */
|
| 483 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/opensslv.h
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/opensslv.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1999-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#ifndef OPENSSL_OPENSSLV_H
|
| 14 |
+
# define OPENSSL_OPENSSLV_H
|
| 15 |
+
# pragma once
|
| 16 |
+
|
| 17 |
+
# ifdef __cplusplus
|
| 18 |
+
extern "C" {
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* SECTION 1: VERSION DATA. These will change for each release
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* Base version macros
|
| 27 |
+
*
|
| 28 |
+
* These macros express version number MAJOR.MINOR.PATCH exactly
|
| 29 |
+
*/
|
| 30 |
+
# define OPENSSL_VERSION_MAJOR 3
|
| 31 |
+
# define OPENSSL_VERSION_MINOR 5
|
| 32 |
+
# define OPENSSL_VERSION_PATCH 4
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Additional version information
|
| 36 |
+
*
|
| 37 |
+
* These are also part of the new version scheme, but aren't part
|
| 38 |
+
* of the version number itself.
|
| 39 |
+
*/
|
| 40 |
+
|
| 41 |
+
/* Could be: #define OPENSSL_VERSION_PRE_RELEASE "-alpha.1" */
|
| 42 |
+
# define OPENSSL_VERSION_PRE_RELEASE ""
|
| 43 |
+
/* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+fips" */
|
| 44 |
+
/* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+vendor.1" */
|
| 45 |
+
# define OPENSSL_VERSION_BUILD_METADATA ""
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* Note: The OpenSSL Project will never define OPENSSL_VERSION_BUILD_METADATA
|
| 49 |
+
* to be anything but the empty string. Its use is entirely reserved for
|
| 50 |
+
* others
|
| 51 |
+
*/
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* Shared library version
|
| 55 |
+
*
|
| 56 |
+
* This is strictly to express ABI version, which may or may not
|
| 57 |
+
* be related to the API version expressed with the macros above.
|
| 58 |
+
* This is defined in free form.
|
| 59 |
+
*/
|
| 60 |
+
# define OPENSSL_SHLIB_VERSION 3
|
| 61 |
+
|
| 62 |
+
/*
|
| 63 |
+
* SECTION 2: USEFUL MACROS
|
| 64 |
+
*/
|
| 65 |
+
|
| 66 |
+
/* For checking general API compatibility when preprocessing */
|
| 67 |
+
# define OPENSSL_VERSION_PREREQ(maj,min) \
|
| 68 |
+
((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min))
|
| 69 |
+
|
| 70 |
+
/*
|
| 71 |
+
* Macros to get the version in easily digested string form, both the short
|
| 72 |
+
* "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced
|
| 73 |
+
* with the values from the corresponding OPENSSL_VERSION_ macros) and the
|
| 74 |
+
* longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and
|
| 75 |
+
* OPENSSL_VERSION_BUILD_METADATA_STR appended.
|
| 76 |
+
*/
|
| 77 |
+
# define OPENSSL_VERSION_STR "3.5.4"
|
| 78 |
+
# define OPENSSL_FULL_VERSION_STR "3.5.4"
|
| 79 |
+
|
| 80 |
+
/*
|
| 81 |
+
* SECTION 3: ADDITIONAL METADATA
|
| 82 |
+
*
|
| 83 |
+
* These strings are defined separately to allow them to be parsable.
|
| 84 |
+
*/
|
| 85 |
+
# define OPENSSL_RELEASE_DATE "30 Sep 2025"
|
| 86 |
+
|
| 87 |
+
/*
|
| 88 |
+
* SECTION 4: BACKWARD COMPATIBILITY
|
| 89 |
+
*/
|
| 90 |
+
|
| 91 |
+
# define OPENSSL_VERSION_TEXT "OpenSSL 3.5.4 30 Sep 2025"
|
| 92 |
+
|
| 93 |
+
/* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PP0L */
|
| 94 |
+
# define OPENSSL_VERSION_NUMBER \
|
| 95 |
+
( (OPENSSL_VERSION_MAJOR<<28) \
|
| 96 |
+
|(OPENSSL_VERSION_MINOR<<20) \
|
| 97 |
+
|(OPENSSL_VERSION_PATCH<<4) \
|
| 98 |
+
|0x0L )
|
| 99 |
+
|
| 100 |
+
# ifdef __cplusplus
|
| 101 |
+
}
|
| 102 |
+
# endif
|
| 103 |
+
|
| 104 |
+
# include <openssl/macros.h>
|
| 105 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 106 |
+
# define HEADER_OPENSSLV_H
|
| 107 |
+
# endif
|
| 108 |
+
|
| 109 |
+
#endif /* OPENSSL_OPENSSLV_H */
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/pkcs12.h
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/pkcs12.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_PKCS12_H
|
| 16 |
+
# define OPENSSL_PKCS12_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_PKCS12_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/bio.h>
|
| 25 |
+
# include <openssl/core.h>
|
| 26 |
+
# include <openssl/x509.h>
|
| 27 |
+
# include <openssl/pkcs12err.h>
|
| 28 |
+
# ifndef OPENSSL_NO_STDIO
|
| 29 |
+
# include <stdio.h>
|
| 30 |
+
# endif
|
| 31 |
+
|
| 32 |
+
#ifdef __cplusplus
|
| 33 |
+
extern "C" {
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
# define PKCS12_KEY_ID 1
|
| 37 |
+
# define PKCS12_IV_ID 2
|
| 38 |
+
# define PKCS12_MAC_ID 3
|
| 39 |
+
|
| 40 |
+
/* Default iteration count */
|
| 41 |
+
# ifndef PKCS12_DEFAULT_ITER
|
| 42 |
+
# define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER
|
| 43 |
+
# endif
|
| 44 |
+
|
| 45 |
+
# define PKCS12_MAC_KEY_LENGTH 20
|
| 46 |
+
|
| 47 |
+
/* The macro is expected to be used only internally. Kept for backwards compatibility. */
|
| 48 |
+
# define PKCS12_SALT_LEN 8
|
| 49 |
+
|
| 50 |
+
/* It's not clear if these are actually needed... */
|
| 51 |
+
# define PKCS12_key_gen PKCS12_key_gen_utf8
|
| 52 |
+
# define PKCS12_add_friendlyname PKCS12_add_friendlyname_utf8
|
| 53 |
+
|
| 54 |
+
/* MS key usage constants */
|
| 55 |
+
|
| 56 |
+
# define KEY_EX 0x10
|
| 57 |
+
# define KEY_SIG 0x80
|
| 58 |
+
|
| 59 |
+
typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA;
|
| 60 |
+
|
| 61 |
+
typedef struct PKCS12_st PKCS12;
|
| 62 |
+
|
| 63 |
+
typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG;
|
| 64 |
+
|
| 65 |
+
SKM_DEFINE_STACK_OF_INTERNAL(PKCS12_SAFEBAG, PKCS12_SAFEBAG, PKCS12_SAFEBAG)
|
| 66 |
+
#define sk_PKCS12_SAFEBAG_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk))
|
| 67 |
+
#define sk_PKCS12_SAFEBAG_value(sk, idx) ((PKCS12_SAFEBAG *)OPENSSL_sk_value(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk), (idx)))
|
| 68 |
+
#define sk_PKCS12_SAFEBAG_new(cmp) ((STACK_OF(PKCS12_SAFEBAG) *)OPENSSL_sk_new(ossl_check_PKCS12_SAFEBAG_compfunc_type(cmp)))
|
| 69 |
+
#define sk_PKCS12_SAFEBAG_new_null() ((STACK_OF(PKCS12_SAFEBAG) *)OPENSSL_sk_new_null())
|
| 70 |
+
#define sk_PKCS12_SAFEBAG_new_reserve(cmp, n) ((STACK_OF(PKCS12_SAFEBAG) *)OPENSSL_sk_new_reserve(ossl_check_PKCS12_SAFEBAG_compfunc_type(cmp), (n)))
|
| 71 |
+
#define sk_PKCS12_SAFEBAG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS12_SAFEBAG_sk_type(sk), (n))
|
| 72 |
+
#define sk_PKCS12_SAFEBAG_free(sk) OPENSSL_sk_free(ossl_check_PKCS12_SAFEBAG_sk_type(sk))
|
| 73 |
+
#define sk_PKCS12_SAFEBAG_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS12_SAFEBAG_sk_type(sk))
|
| 74 |
+
#define sk_PKCS12_SAFEBAG_delete(sk, i) ((PKCS12_SAFEBAG *)OPENSSL_sk_delete(ossl_check_PKCS12_SAFEBAG_sk_type(sk), (i)))
|
| 75 |
+
#define sk_PKCS12_SAFEBAG_delete_ptr(sk, ptr) ((PKCS12_SAFEBAG *)OPENSSL_sk_delete_ptr(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr)))
|
| 76 |
+
#define sk_PKCS12_SAFEBAG_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr))
|
| 77 |
+
#define sk_PKCS12_SAFEBAG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr))
|
| 78 |
+
#define sk_PKCS12_SAFEBAG_pop(sk) ((PKCS12_SAFEBAG *)OPENSSL_sk_pop(ossl_check_PKCS12_SAFEBAG_sk_type(sk)))
|
| 79 |
+
#define sk_PKCS12_SAFEBAG_shift(sk) ((PKCS12_SAFEBAG *)OPENSSL_sk_shift(ossl_check_PKCS12_SAFEBAG_sk_type(sk)))
|
| 80 |
+
#define sk_PKCS12_SAFEBAG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS12_SAFEBAG_sk_type(sk),ossl_check_PKCS12_SAFEBAG_freefunc_type(freefunc))
|
| 81 |
+
#define sk_PKCS12_SAFEBAG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr), (idx))
|
| 82 |
+
#define sk_PKCS12_SAFEBAG_set(sk, idx, ptr) ((PKCS12_SAFEBAG *)OPENSSL_sk_set(ossl_check_PKCS12_SAFEBAG_sk_type(sk), (idx), ossl_check_PKCS12_SAFEBAG_type(ptr)))
|
| 83 |
+
#define sk_PKCS12_SAFEBAG_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr))
|
| 84 |
+
#define sk_PKCS12_SAFEBAG_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr))
|
| 85 |
+
#define sk_PKCS12_SAFEBAG_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_type(ptr), pnum)
|
| 86 |
+
#define sk_PKCS12_SAFEBAG_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS12_SAFEBAG_sk_type(sk))
|
| 87 |
+
#define sk_PKCS12_SAFEBAG_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk))
|
| 88 |
+
#define sk_PKCS12_SAFEBAG_dup(sk) ((STACK_OF(PKCS12_SAFEBAG) *)OPENSSL_sk_dup(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk)))
|
| 89 |
+
#define sk_PKCS12_SAFEBAG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS12_SAFEBAG) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_copyfunc_type(copyfunc), ossl_check_PKCS12_SAFEBAG_freefunc_type(freefunc)))
|
| 90 |
+
#define sk_PKCS12_SAFEBAG_set_cmp_func(sk, cmp) ((sk_PKCS12_SAFEBAG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_compfunc_type(cmp)))
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
typedef struct pkcs12_bag_st PKCS12_BAGS;
|
| 94 |
+
|
| 95 |
+
# define PKCS12_ERROR 0
|
| 96 |
+
# define PKCS12_OK 1
|
| 97 |
+
|
| 98 |
+
/* Compatibility macros */
|
| 99 |
+
|
| 100 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 101 |
+
|
| 102 |
+
# define M_PKCS12_bag_type PKCS12_bag_type
|
| 103 |
+
# define M_PKCS12_cert_bag_type PKCS12_cert_bag_type
|
| 104 |
+
# define M_PKCS12_crl_bag_type PKCS12_cert_bag_type
|
| 105 |
+
|
| 106 |
+
# define PKCS12_certbag2x509 PKCS12_SAFEBAG_get1_cert
|
| 107 |
+
# define PKCS12_certbag2scrl PKCS12_SAFEBAG_get1_crl
|
| 108 |
+
# define PKCS12_bag_type PKCS12_SAFEBAG_get_nid
|
| 109 |
+
# define PKCS12_cert_bag_type PKCS12_SAFEBAG_get_bag_nid
|
| 110 |
+
# define PKCS12_x5092certbag PKCS12_SAFEBAG_create_cert
|
| 111 |
+
# define PKCS12_x509crl2certbag PKCS12_SAFEBAG_create_crl
|
| 112 |
+
# define PKCS12_MAKE_KEYBAG PKCS12_SAFEBAG_create0_p8inf
|
| 113 |
+
# define PKCS12_MAKE_SHKEYBAG PKCS12_SAFEBAG_create_pkcs8_encrypt
|
| 114 |
+
|
| 115 |
+
#endif
|
| 116 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 117 |
+
OSSL_DEPRECATEDIN_1_1_0 ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag,
|
| 118 |
+
int attr_nid);
|
| 119 |
+
#endif
|
| 120 |
+
|
| 121 |
+
ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid);
|
| 122 |
+
int PKCS12_mac_present(const PKCS12 *p12);
|
| 123 |
+
void PKCS12_get0_mac(const ASN1_OCTET_STRING **pmac,
|
| 124 |
+
const X509_ALGOR **pmacalg,
|
| 125 |
+
const ASN1_OCTET_STRING **psalt,
|
| 126 |
+
const ASN1_INTEGER **piter,
|
| 127 |
+
const PKCS12 *p12);
|
| 128 |
+
|
| 129 |
+
const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag,
|
| 130 |
+
int attr_nid);
|
| 131 |
+
const ASN1_OBJECT *PKCS12_SAFEBAG_get0_type(const PKCS12_SAFEBAG *bag);
|
| 132 |
+
int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag);
|
| 133 |
+
int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag);
|
| 134 |
+
const ASN1_TYPE *PKCS12_SAFEBAG_get0_bag_obj(const PKCS12_SAFEBAG *bag);
|
| 135 |
+
const ASN1_OBJECT *PKCS12_SAFEBAG_get0_bag_type(const PKCS12_SAFEBAG *bag);
|
| 136 |
+
|
| 137 |
+
X509 *PKCS12_SAFEBAG_get1_cert_ex(const PKCS12_SAFEBAG *bag, OSSL_LIB_CTX *libctx, const char *propq);
|
| 138 |
+
X509 *PKCS12_SAFEBAG_get1_cert(const PKCS12_SAFEBAG *bag);
|
| 139 |
+
X509_CRL *PKCS12_SAFEBAG_get1_crl_ex(const PKCS12_SAFEBAG *bag, OSSL_LIB_CTX *libctx, const char *propq);
|
| 140 |
+
X509_CRL *PKCS12_SAFEBAG_get1_crl(const PKCS12_SAFEBAG *bag);
|
| 141 |
+
const STACK_OF(PKCS12_SAFEBAG) *
|
| 142 |
+
PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag);
|
| 143 |
+
const PKCS8_PRIV_KEY_INFO *PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag);
|
| 144 |
+
const X509_SIG *PKCS12_SAFEBAG_get0_pkcs8(const PKCS12_SAFEBAG *bag);
|
| 145 |
+
|
| 146 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_cert(X509 *x509);
|
| 147 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_crl(X509_CRL *crl);
|
| 148 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_secret(int type, int vtype, const unsigned char *value, int len);
|
| 149 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8);
|
| 150 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8);
|
| 151 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt(int pbe_nid,
|
| 152 |
+
const char *pass,
|
| 153 |
+
int passlen,
|
| 154 |
+
unsigned char *salt,
|
| 155 |
+
int saltlen, int iter,
|
| 156 |
+
PKCS8_PRIV_KEY_INFO *p8inf);
|
| 157 |
+
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt_ex(int pbe_nid,
|
| 158 |
+
const char *pass,
|
| 159 |
+
int passlen,
|
| 160 |
+
unsigned char *salt,
|
| 161 |
+
int saltlen, int iter,
|
| 162 |
+
PKCS8_PRIV_KEY_INFO *p8inf,
|
| 163 |
+
OSSL_LIB_CTX *ctx,
|
| 164 |
+
const char *propq);
|
| 165 |
+
|
| 166 |
+
PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it,
|
| 167 |
+
int nid1, int nid2);
|
| 168 |
+
PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass,
|
| 169 |
+
int passlen);
|
| 170 |
+
PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_ex(const X509_SIG *p8, const char *pass,
|
| 171 |
+
int passlen, OSSL_LIB_CTX *ctx,
|
| 172 |
+
const char *propq);
|
| 173 |
+
PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag,
|
| 174 |
+
const char *pass, int passlen);
|
| 175 |
+
PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey_ex(const PKCS12_SAFEBAG *bag,
|
| 176 |
+
const char *pass, int passlen,
|
| 177 |
+
OSSL_LIB_CTX *ctx,
|
| 178 |
+
const char *propq);
|
| 179 |
+
X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,
|
| 180 |
+
const char *pass, int passlen, unsigned char *salt,
|
| 181 |
+
int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
|
| 182 |
+
X509_SIG *PKCS8_encrypt_ex(int pbe_nid, const EVP_CIPHER *cipher,
|
| 183 |
+
const char *pass, int passlen, unsigned char *salt,
|
| 184 |
+
int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8,
|
| 185 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 186 |
+
X509_SIG *PKCS8_set0_pbe(const char *pass, int passlen,
|
| 187 |
+
PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe);
|
| 188 |
+
X509_SIG *PKCS8_set0_pbe_ex(const char *pass, int passlen,
|
| 189 |
+
PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe,
|
| 190 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 191 |
+
PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk);
|
| 192 |
+
STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7);
|
| 193 |
+
PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen,
|
| 194 |
+
unsigned char *salt, int saltlen, int iter,
|
| 195 |
+
STACK_OF(PKCS12_SAFEBAG) *bags);
|
| 196 |
+
PKCS7 *PKCS12_pack_p7encdata_ex(int pbe_nid, const char *pass, int passlen,
|
| 197 |
+
unsigned char *salt, int saltlen, int iter,
|
| 198 |
+
STACK_OF(PKCS12_SAFEBAG) *bags,
|
| 199 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 200 |
+
|
| 201 |
+
STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass,
|
| 202 |
+
int passlen);
|
| 203 |
+
|
| 204 |
+
int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes);
|
| 205 |
+
STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12);
|
| 206 |
+
|
| 207 |
+
int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name,
|
| 208 |
+
int namelen);
|
| 209 |
+
int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name,
|
| 210 |
+
int namelen);
|
| 211 |
+
int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name,
|
| 212 |
+
int namelen);
|
| 213 |
+
int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name,
|
| 214 |
+
int namelen);
|
| 215 |
+
int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag,
|
| 216 |
+
const unsigned char *name, int namelen);
|
| 217 |
+
int PKCS12_add1_attr_by_NID(PKCS12_SAFEBAG *bag, int nid, int type,
|
| 218 |
+
const unsigned char *bytes, int len);
|
| 219 |
+
int PKCS12_add1_attr_by_txt(PKCS12_SAFEBAG *bag, const char *attrname, int type,
|
| 220 |
+
const unsigned char *bytes, int len);
|
| 221 |
+
int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage);
|
| 222 |
+
ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs,
|
| 223 |
+
int attr_nid);
|
| 224 |
+
char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);
|
| 225 |
+
const STACK_OF(X509_ATTRIBUTE) *
|
| 226 |
+
PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag);
|
| 227 |
+
void PKCS12_SAFEBAG_set0_attrs(PKCS12_SAFEBAG *bag, STACK_OF(X509_ATTRIBUTE) *attrs);
|
| 228 |
+
unsigned char *PKCS12_pbe_crypt(const X509_ALGOR *algor,
|
| 229 |
+
const char *pass, int passlen,
|
| 230 |
+
const unsigned char *in, int inlen,
|
| 231 |
+
unsigned char **data, int *datalen,
|
| 232 |
+
int en_de);
|
| 233 |
+
unsigned char *PKCS12_pbe_crypt_ex(const X509_ALGOR *algor,
|
| 234 |
+
const char *pass, int passlen,
|
| 235 |
+
const unsigned char *in, int inlen,
|
| 236 |
+
unsigned char **data, int *datalen,
|
| 237 |
+
int en_de, OSSL_LIB_CTX *libctx,
|
| 238 |
+
const char *propq);
|
| 239 |
+
void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it,
|
| 240 |
+
const char *pass, int passlen,
|
| 241 |
+
const ASN1_OCTET_STRING *oct, int zbuf);
|
| 242 |
+
void *PKCS12_item_decrypt_d2i_ex(const X509_ALGOR *algor, const ASN1_ITEM *it,
|
| 243 |
+
const char *pass, int passlen,
|
| 244 |
+
const ASN1_OCTET_STRING *oct, int zbuf,
|
| 245 |
+
OSSL_LIB_CTX *libctx,
|
| 246 |
+
const char *propq);
|
| 247 |
+
ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor,
|
| 248 |
+
const ASN1_ITEM *it,
|
| 249 |
+
const char *pass, int passlen,
|
| 250 |
+
void *obj, int zbuf);
|
| 251 |
+
ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt_ex(X509_ALGOR *algor,
|
| 252 |
+
const ASN1_ITEM *it,
|
| 253 |
+
const char *pass, int passlen,
|
| 254 |
+
void *obj, int zbuf,
|
| 255 |
+
OSSL_LIB_CTX *ctx,
|
| 256 |
+
const char *propq);
|
| 257 |
+
PKCS12 *PKCS12_init(int mode);
|
| 258 |
+
PKCS12 *PKCS12_init_ex(int mode, OSSL_LIB_CTX *ctx, const char *propq);
|
| 259 |
+
|
| 260 |
+
int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt,
|
| 261 |
+
int saltlen, int id, int iter, int n,
|
| 262 |
+
unsigned char *out, const EVP_MD *md_type);
|
| 263 |
+
int PKCS12_key_gen_asc_ex(const char *pass, int passlen, unsigned char *salt,
|
| 264 |
+
int saltlen, int id, int iter, int n,
|
| 265 |
+
unsigned char *out, const EVP_MD *md_type,
|
| 266 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 267 |
+
int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
|
| 268 |
+
int saltlen, int id, int iter, int n,
|
| 269 |
+
unsigned char *out, const EVP_MD *md_type);
|
| 270 |
+
int PKCS12_key_gen_uni_ex(unsigned char *pass, int passlen, unsigned char *salt,
|
| 271 |
+
int saltlen, int id, int iter, int n,
|
| 272 |
+
unsigned char *out, const EVP_MD *md_type,
|
| 273 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 274 |
+
int PKCS12_key_gen_utf8(const char *pass, int passlen, unsigned char *salt,
|
| 275 |
+
int saltlen, int id, int iter, int n,
|
| 276 |
+
unsigned char *out, const EVP_MD *md_type);
|
| 277 |
+
int PKCS12_key_gen_utf8_ex(const char *pass, int passlen, unsigned char *salt,
|
| 278 |
+
int saltlen, int id, int iter, int n,
|
| 279 |
+
unsigned char *out, const EVP_MD *md_type,
|
| 280 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 281 |
+
|
| 282 |
+
int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
| 283 |
+
ASN1_TYPE *param, const EVP_CIPHER *cipher,
|
| 284 |
+
const EVP_MD *md_type, int en_de);
|
| 285 |
+
int PKCS12_PBE_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
| 286 |
+
ASN1_TYPE *param, const EVP_CIPHER *cipher,
|
| 287 |
+
const EVP_MD *md_type, int en_de,
|
| 288 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 289 |
+
int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
|
| 290 |
+
unsigned char *mac, unsigned int *maclen);
|
| 291 |
+
int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen);
|
| 292 |
+
int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,
|
| 293 |
+
unsigned char *salt, int saltlen, int iter,
|
| 294 |
+
const EVP_MD *md_type);
|
| 295 |
+
int PKCS12_set_pbmac1_pbkdf2(PKCS12 *p12, const char *pass, int passlen,
|
| 296 |
+
unsigned char *salt, int saltlen, int iter,
|
| 297 |
+
const EVP_MD *md_type, const char *prf_md_name);
|
| 298 |
+
int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt,
|
| 299 |
+
int saltlen, const EVP_MD *md_type);
|
| 300 |
+
unsigned char *OPENSSL_asc2uni(const char *asc, int asclen,
|
| 301 |
+
unsigned char **uni, int *unilen);
|
| 302 |
+
char *OPENSSL_uni2asc(const unsigned char *uni, int unilen);
|
| 303 |
+
unsigned char *OPENSSL_utf82uni(const char *asc, int asclen,
|
| 304 |
+
unsigned char **uni, int *unilen);
|
| 305 |
+
char *OPENSSL_uni2utf8(const unsigned char *uni, int unilen);
|
| 306 |
+
|
| 307 |
+
DECLARE_ASN1_FUNCTIONS(PKCS12)
|
| 308 |
+
DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA)
|
| 309 |
+
DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG)
|
| 310 |
+
DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS)
|
| 311 |
+
|
| 312 |
+
DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS)
|
| 313 |
+
DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES)
|
| 314 |
+
|
| 315 |
+
void PKCS12_PBE_add(void);
|
| 316 |
+
int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
| 317 |
+
STACK_OF(X509) **ca);
|
| 318 |
+
typedef int PKCS12_create_cb(PKCS12_SAFEBAG *bag, void *cbarg);
|
| 319 |
+
PKCS12 *PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey,
|
| 320 |
+
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
| 321 |
+
int iter, int mac_iter, int keytype);
|
| 322 |
+
PKCS12 *PKCS12_create_ex(const char *pass, const char *name, EVP_PKEY *pkey,
|
| 323 |
+
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
| 324 |
+
int iter, int mac_iter, int keytype,
|
| 325 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 326 |
+
PKCS12 *PKCS12_create_ex2(const char *pass, const char *name, EVP_PKEY *pkey,
|
| 327 |
+
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
| 328 |
+
int iter, int mac_iter, int keytype,
|
| 329 |
+
OSSL_LIB_CTX *ctx, const char *propq,
|
| 330 |
+
PKCS12_create_cb *cb, void *cbarg);
|
| 331 |
+
|
| 332 |
+
PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert);
|
| 333 |
+
PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
| 334 |
+
EVP_PKEY *key, int key_usage, int iter,
|
| 335 |
+
int key_nid, const char *pass);
|
| 336 |
+
PKCS12_SAFEBAG *PKCS12_add_key_ex(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
| 337 |
+
EVP_PKEY *key, int key_usage, int iter,
|
| 338 |
+
int key_nid, const char *pass,
|
| 339 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 340 |
+
|
| 341 |
+
PKCS12_SAFEBAG *PKCS12_add_secret(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
| 342 |
+
int nid_type, const unsigned char *value, int len);
|
| 343 |
+
int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags,
|
| 344 |
+
int safe_nid, int iter, const char *pass);
|
| 345 |
+
int PKCS12_add_safe_ex(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags,
|
| 346 |
+
int safe_nid, int iter, const char *pass,
|
| 347 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 348 |
+
|
| 349 |
+
PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid);
|
| 350 |
+
PKCS12 *PKCS12_add_safes_ex(STACK_OF(PKCS7) *safes, int p7_nid,
|
| 351 |
+
OSSL_LIB_CTX *ctx, const char *propq);
|
| 352 |
+
|
| 353 |
+
int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12);
|
| 354 |
+
# ifndef OPENSSL_NO_STDIO
|
| 355 |
+
int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12);
|
| 356 |
+
# endif
|
| 357 |
+
PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12);
|
| 358 |
+
# ifndef OPENSSL_NO_STDIO
|
| 359 |
+
PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
|
| 360 |
+
# endif
|
| 361 |
+
int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass);
|
| 362 |
+
|
| 363 |
+
# ifdef __cplusplus
|
| 364 |
+
}
|
| 365 |
+
# endif
|
| 366 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/pkcs7.h
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/pkcs7.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_PKCS7_H
|
| 16 |
+
# define OPENSSL_PKCS7_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_PKCS7_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/asn1.h>
|
| 25 |
+
# include <openssl/bio.h>
|
| 26 |
+
# include <openssl/e_os2.h>
|
| 27 |
+
|
| 28 |
+
# include <openssl/symhacks.h>
|
| 29 |
+
# include <openssl/types.h>
|
| 30 |
+
# include <openssl/pkcs7err.h>
|
| 31 |
+
# ifndef OPENSSL_NO_STDIO
|
| 32 |
+
# include <stdio.h>
|
| 33 |
+
# endif
|
| 34 |
+
|
| 35 |
+
#ifdef __cplusplus
|
| 36 |
+
extern "C" {
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
/*-
|
| 41 |
+
Encryption_ID DES-CBC
|
| 42 |
+
Digest_ID MD5
|
| 43 |
+
Digest_Encryption_ID rsaEncryption
|
| 44 |
+
Key_Encryption_ID rsaEncryption
|
| 45 |
+
*/
|
| 46 |
+
|
| 47 |
+
typedef struct PKCS7_CTX_st {
|
| 48 |
+
OSSL_LIB_CTX *libctx;
|
| 49 |
+
char *propq;
|
| 50 |
+
} PKCS7_CTX;
|
| 51 |
+
|
| 52 |
+
typedef struct pkcs7_issuer_and_serial_st {
|
| 53 |
+
X509_NAME *issuer;
|
| 54 |
+
ASN1_INTEGER *serial;
|
| 55 |
+
} PKCS7_ISSUER_AND_SERIAL;
|
| 56 |
+
|
| 57 |
+
typedef struct pkcs7_signer_info_st {
|
| 58 |
+
ASN1_INTEGER *version; /* version 1 */
|
| 59 |
+
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
|
| 60 |
+
X509_ALGOR *digest_alg;
|
| 61 |
+
STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */
|
| 62 |
+
X509_ALGOR *digest_enc_alg; /* confusing name, actually used for signing */
|
| 63 |
+
ASN1_OCTET_STRING *enc_digest; /* confusing name, actually signature */
|
| 64 |
+
STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */
|
| 65 |
+
/* The private key to sign with */
|
| 66 |
+
EVP_PKEY *pkey;
|
| 67 |
+
const PKCS7_CTX *ctx;
|
| 68 |
+
} PKCS7_SIGNER_INFO;
|
| 69 |
+
SKM_DEFINE_STACK_OF_INTERNAL(PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO)
|
| 70 |
+
#define sk_PKCS7_SIGNER_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk))
|
| 71 |
+
#define sk_PKCS7_SIGNER_INFO_value(sk, idx) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_value(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk), (idx)))
|
| 72 |
+
#define sk_PKCS7_SIGNER_INFO_new(cmp) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_new(ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp)))
|
| 73 |
+
#define sk_PKCS7_SIGNER_INFO_new_null() ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_new_null())
|
| 74 |
+
#define sk_PKCS7_SIGNER_INFO_new_reserve(cmp, n) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_new_reserve(ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp), (n)))
|
| 75 |
+
#define sk_PKCS7_SIGNER_INFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), (n))
|
| 76 |
+
#define sk_PKCS7_SIGNER_INFO_free(sk) OPENSSL_sk_free(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk))
|
| 77 |
+
#define sk_PKCS7_SIGNER_INFO_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk))
|
| 78 |
+
#define sk_PKCS7_SIGNER_INFO_delete(sk, i) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_delete(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), (i)))
|
| 79 |
+
#define sk_PKCS7_SIGNER_INFO_delete_ptr(sk, ptr) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_delete_ptr(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr)))
|
| 80 |
+
#define sk_PKCS7_SIGNER_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
|
| 81 |
+
#define sk_PKCS7_SIGNER_INFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
|
| 82 |
+
#define sk_PKCS7_SIGNER_INFO_pop(sk) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_pop(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk)))
|
| 83 |
+
#define sk_PKCS7_SIGNER_INFO_shift(sk) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_shift(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk)))
|
| 84 |
+
#define sk_PKCS7_SIGNER_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk),ossl_check_PKCS7_SIGNER_INFO_freefunc_type(freefunc))
|
| 85 |
+
#define sk_PKCS7_SIGNER_INFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr), (idx))
|
| 86 |
+
#define sk_PKCS7_SIGNER_INFO_set(sk, idx, ptr) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_set(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), (idx), ossl_check_PKCS7_SIGNER_INFO_type(ptr)))
|
| 87 |
+
#define sk_PKCS7_SIGNER_INFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
|
| 88 |
+
#define sk_PKCS7_SIGNER_INFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
|
| 89 |
+
#define sk_PKCS7_SIGNER_INFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr), pnum)
|
| 90 |
+
#define sk_PKCS7_SIGNER_INFO_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk))
|
| 91 |
+
#define sk_PKCS7_SIGNER_INFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk))
|
| 92 |
+
#define sk_PKCS7_SIGNER_INFO_dup(sk) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_dup(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk)))
|
| 93 |
+
#define sk_PKCS7_SIGNER_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_copyfunc_type(copyfunc), ossl_check_PKCS7_SIGNER_INFO_freefunc_type(freefunc)))
|
| 94 |
+
#define sk_PKCS7_SIGNER_INFO_set_cmp_func(sk, cmp) ((sk_PKCS7_SIGNER_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp)))
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
typedef struct pkcs7_recip_info_st {
|
| 98 |
+
ASN1_INTEGER *version; /* version 0 */
|
| 99 |
+
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
|
| 100 |
+
X509_ALGOR *key_enc_algor;
|
| 101 |
+
ASN1_OCTET_STRING *enc_key;
|
| 102 |
+
X509 *cert; /* get the pub-key from this */
|
| 103 |
+
const PKCS7_CTX *ctx;
|
| 104 |
+
} PKCS7_RECIP_INFO;
|
| 105 |
+
SKM_DEFINE_STACK_OF_INTERNAL(PKCS7_RECIP_INFO, PKCS7_RECIP_INFO, PKCS7_RECIP_INFO)
|
| 106 |
+
#define sk_PKCS7_RECIP_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk))
|
| 107 |
+
#define sk_PKCS7_RECIP_INFO_value(sk, idx) ((PKCS7_RECIP_INFO *)OPENSSL_sk_value(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk), (idx)))
|
| 108 |
+
#define sk_PKCS7_RECIP_INFO_new(cmp) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_new(ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp)))
|
| 109 |
+
#define sk_PKCS7_RECIP_INFO_new_null() ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_new_null())
|
| 110 |
+
#define sk_PKCS7_RECIP_INFO_new_reserve(cmp, n) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_new_reserve(ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp), (n)))
|
| 111 |
+
#define sk_PKCS7_RECIP_INFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), (n))
|
| 112 |
+
#define sk_PKCS7_RECIP_INFO_free(sk) OPENSSL_sk_free(ossl_check_PKCS7_RECIP_INFO_sk_type(sk))
|
| 113 |
+
#define sk_PKCS7_RECIP_INFO_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS7_RECIP_INFO_sk_type(sk))
|
| 114 |
+
#define sk_PKCS7_RECIP_INFO_delete(sk, i) ((PKCS7_RECIP_INFO *)OPENSSL_sk_delete(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), (i)))
|
| 115 |
+
#define sk_PKCS7_RECIP_INFO_delete_ptr(sk, ptr) ((PKCS7_RECIP_INFO *)OPENSSL_sk_delete_ptr(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr)))
|
| 116 |
+
#define sk_PKCS7_RECIP_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
|
| 117 |
+
#define sk_PKCS7_RECIP_INFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
|
| 118 |
+
#define sk_PKCS7_RECIP_INFO_pop(sk) ((PKCS7_RECIP_INFO *)OPENSSL_sk_pop(ossl_check_PKCS7_RECIP_INFO_sk_type(sk)))
|
| 119 |
+
#define sk_PKCS7_RECIP_INFO_shift(sk) ((PKCS7_RECIP_INFO *)OPENSSL_sk_shift(ossl_check_PKCS7_RECIP_INFO_sk_type(sk)))
|
| 120 |
+
#define sk_PKCS7_RECIP_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS7_RECIP_INFO_sk_type(sk),ossl_check_PKCS7_RECIP_INFO_freefunc_type(freefunc))
|
| 121 |
+
#define sk_PKCS7_RECIP_INFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr), (idx))
|
| 122 |
+
#define sk_PKCS7_RECIP_INFO_set(sk, idx, ptr) ((PKCS7_RECIP_INFO *)OPENSSL_sk_set(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), (idx), ossl_check_PKCS7_RECIP_INFO_type(ptr)))
|
| 123 |
+
#define sk_PKCS7_RECIP_INFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
|
| 124 |
+
#define sk_PKCS7_RECIP_INFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
|
| 125 |
+
#define sk_PKCS7_RECIP_INFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr), pnum)
|
| 126 |
+
#define sk_PKCS7_RECIP_INFO_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS7_RECIP_INFO_sk_type(sk))
|
| 127 |
+
#define sk_PKCS7_RECIP_INFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk))
|
| 128 |
+
#define sk_PKCS7_RECIP_INFO_dup(sk) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_dup(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk)))
|
| 129 |
+
#define sk_PKCS7_RECIP_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_copyfunc_type(copyfunc), ossl_check_PKCS7_RECIP_INFO_freefunc_type(freefunc)))
|
| 130 |
+
#define sk_PKCS7_RECIP_INFO_set_cmp_func(sk, cmp) ((sk_PKCS7_RECIP_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp)))
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
typedef struct pkcs7_signed_st {
|
| 135 |
+
ASN1_INTEGER *version; /* version 1 */
|
| 136 |
+
STACK_OF(X509_ALGOR) *md_algs; /* md used */
|
| 137 |
+
STACK_OF(X509) *cert; /* [ 0 ] */ /* name should be 'certificates' */
|
| 138 |
+
STACK_OF(X509_CRL) *crl; /* [ 1 ] */ /* name should be 'crls' */
|
| 139 |
+
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
|
| 140 |
+
struct pkcs7_st *contents;
|
| 141 |
+
} PKCS7_SIGNED;
|
| 142 |
+
/*
|
| 143 |
+
* The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
|
| 144 |
+
* merging the two
|
| 145 |
+
*/
|
| 146 |
+
|
| 147 |
+
typedef struct pkcs7_enc_content_st {
|
| 148 |
+
ASN1_OBJECT *content_type;
|
| 149 |
+
X509_ALGOR *algorithm;
|
| 150 |
+
ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
|
| 151 |
+
const EVP_CIPHER *cipher;
|
| 152 |
+
const PKCS7_CTX *ctx;
|
| 153 |
+
} PKCS7_ENC_CONTENT;
|
| 154 |
+
|
| 155 |
+
typedef struct pkcs7_enveloped_st {
|
| 156 |
+
ASN1_INTEGER *version; /* version 0 */
|
| 157 |
+
STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
|
| 158 |
+
PKCS7_ENC_CONTENT *enc_data;
|
| 159 |
+
} PKCS7_ENVELOPE;
|
| 160 |
+
|
| 161 |
+
typedef struct pkcs7_signedandenveloped_st {
|
| 162 |
+
ASN1_INTEGER *version; /* version 1 */
|
| 163 |
+
STACK_OF(X509_ALGOR) *md_algs; /* md used */
|
| 164 |
+
STACK_OF(X509) *cert; /* [ 0 ] */ /* name should be 'certificates' */
|
| 165 |
+
STACK_OF(X509_CRL) *crl; /* [ 1 ] */ /* name should be 'crls' */
|
| 166 |
+
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
|
| 167 |
+
PKCS7_ENC_CONTENT *enc_data;
|
| 168 |
+
STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
|
| 169 |
+
} PKCS7_SIGN_ENVELOPE;
|
| 170 |
+
|
| 171 |
+
typedef struct pkcs7_digest_st {
|
| 172 |
+
ASN1_INTEGER *version; /* version 0 */
|
| 173 |
+
X509_ALGOR *md; /* md used */
|
| 174 |
+
struct pkcs7_st *contents;
|
| 175 |
+
ASN1_OCTET_STRING *digest;
|
| 176 |
+
} PKCS7_DIGEST;
|
| 177 |
+
|
| 178 |
+
typedef struct pkcs7_encrypted_st {
|
| 179 |
+
ASN1_INTEGER *version; /* version 0 */
|
| 180 |
+
PKCS7_ENC_CONTENT *enc_data;
|
| 181 |
+
} PKCS7_ENCRYPT;
|
| 182 |
+
|
| 183 |
+
typedef struct pkcs7_st {
|
| 184 |
+
/*
|
| 185 |
+
* The following is non NULL if it contains ASN1 encoding of this
|
| 186 |
+
* structure
|
| 187 |
+
*/
|
| 188 |
+
unsigned char *asn1;
|
| 189 |
+
long length;
|
| 190 |
+
# define PKCS7_S_HEADER 0
|
| 191 |
+
# define PKCS7_S_BODY 1
|
| 192 |
+
# define PKCS7_S_TAIL 2
|
| 193 |
+
int state; /* used during processing */
|
| 194 |
+
int detached;
|
| 195 |
+
ASN1_OBJECT *type;
|
| 196 |
+
/* content as defined by the type */
|
| 197 |
+
/*
|
| 198 |
+
* all encryption/message digests are applied to the 'contents', leaving
|
| 199 |
+
* out the 'type' field.
|
| 200 |
+
*/
|
| 201 |
+
union {
|
| 202 |
+
char *ptr;
|
| 203 |
+
/* NID_pkcs7_data */
|
| 204 |
+
ASN1_OCTET_STRING *data;
|
| 205 |
+
/* NID_pkcs7_signed */
|
| 206 |
+
PKCS7_SIGNED *sign; /* field name 'signed' would clash with C keyword */
|
| 207 |
+
/* NID_pkcs7_enveloped */
|
| 208 |
+
PKCS7_ENVELOPE *enveloped;
|
| 209 |
+
/* NID_pkcs7_signedAndEnveloped */
|
| 210 |
+
PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
|
| 211 |
+
/* NID_pkcs7_digest */
|
| 212 |
+
PKCS7_DIGEST *digest;
|
| 213 |
+
/* NID_pkcs7_encrypted */
|
| 214 |
+
PKCS7_ENCRYPT *encrypted;
|
| 215 |
+
/* Anything else */
|
| 216 |
+
ASN1_TYPE *other;
|
| 217 |
+
} d;
|
| 218 |
+
PKCS7_CTX ctx;
|
| 219 |
+
} PKCS7;
|
| 220 |
+
SKM_DEFINE_STACK_OF_INTERNAL(PKCS7, PKCS7, PKCS7)
|
| 221 |
+
#define sk_PKCS7_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_sk_type(sk))
|
| 222 |
+
#define sk_PKCS7_value(sk, idx) ((PKCS7 *)OPENSSL_sk_value(ossl_check_const_PKCS7_sk_type(sk), (idx)))
|
| 223 |
+
#define sk_PKCS7_new(cmp) ((STACK_OF(PKCS7) *)OPENSSL_sk_new(ossl_check_PKCS7_compfunc_type(cmp)))
|
| 224 |
+
#define sk_PKCS7_new_null() ((STACK_OF(PKCS7) *)OPENSSL_sk_new_null())
|
| 225 |
+
#define sk_PKCS7_new_reserve(cmp, n) ((STACK_OF(PKCS7) *)OPENSSL_sk_new_reserve(ossl_check_PKCS7_compfunc_type(cmp), (n)))
|
| 226 |
+
#define sk_PKCS7_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS7_sk_type(sk), (n))
|
| 227 |
+
#define sk_PKCS7_free(sk) OPENSSL_sk_free(ossl_check_PKCS7_sk_type(sk))
|
| 228 |
+
#define sk_PKCS7_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS7_sk_type(sk))
|
| 229 |
+
#define sk_PKCS7_delete(sk, i) ((PKCS7 *)OPENSSL_sk_delete(ossl_check_PKCS7_sk_type(sk), (i)))
|
| 230 |
+
#define sk_PKCS7_delete_ptr(sk, ptr) ((PKCS7 *)OPENSSL_sk_delete_ptr(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr)))
|
| 231 |
+
#define sk_PKCS7_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
|
| 232 |
+
#define sk_PKCS7_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
|
| 233 |
+
#define sk_PKCS7_pop(sk) ((PKCS7 *)OPENSSL_sk_pop(ossl_check_PKCS7_sk_type(sk)))
|
| 234 |
+
#define sk_PKCS7_shift(sk) ((PKCS7 *)OPENSSL_sk_shift(ossl_check_PKCS7_sk_type(sk)))
|
| 235 |
+
#define sk_PKCS7_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS7_sk_type(sk),ossl_check_PKCS7_freefunc_type(freefunc))
|
| 236 |
+
#define sk_PKCS7_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr), (idx))
|
| 237 |
+
#define sk_PKCS7_set(sk, idx, ptr) ((PKCS7 *)OPENSSL_sk_set(ossl_check_PKCS7_sk_type(sk), (idx), ossl_check_PKCS7_type(ptr)))
|
| 238 |
+
#define sk_PKCS7_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
|
| 239 |
+
#define sk_PKCS7_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
|
| 240 |
+
#define sk_PKCS7_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr), pnum)
|
| 241 |
+
#define sk_PKCS7_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS7_sk_type(sk))
|
| 242 |
+
#define sk_PKCS7_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS7_sk_type(sk))
|
| 243 |
+
#define sk_PKCS7_dup(sk) ((STACK_OF(PKCS7) *)OPENSSL_sk_dup(ossl_check_const_PKCS7_sk_type(sk)))
|
| 244 |
+
#define sk_PKCS7_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_sk_type(sk), ossl_check_PKCS7_copyfunc_type(copyfunc), ossl_check_PKCS7_freefunc_type(freefunc)))
|
| 245 |
+
#define sk_PKCS7_set_cmp_func(sk, cmp) ((sk_PKCS7_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_compfunc_type(cmp)))
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
# define PKCS7_OP_SET_DETACHED_SIGNATURE 1
|
| 250 |
+
# define PKCS7_OP_GET_DETACHED_SIGNATURE 2
|
| 251 |
+
|
| 252 |
+
# define PKCS7_get_signed_attributes(si) ((si)->auth_attr)
|
| 253 |
+
# define PKCS7_get_attributes(si) ((si)->unauth_attr)
|
| 254 |
+
|
| 255 |
+
# define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
|
| 256 |
+
# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
|
| 257 |
+
# define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
|
| 258 |
+
# define PKCS7_type_is_signedAndEnveloped(a) \
|
| 259 |
+
(OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
|
| 260 |
+
# define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
|
| 261 |
+
# define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
|
| 262 |
+
|
| 263 |
+
# define PKCS7_set_detached(p,v) \
|
| 264 |
+
PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)
|
| 265 |
+
# define PKCS7_get_detached(p) \
|
| 266 |
+
PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)
|
| 267 |
+
|
| 268 |
+
# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
|
| 269 |
+
|
| 270 |
+
/* S/MIME related flags */
|
| 271 |
+
|
| 272 |
+
# define PKCS7_TEXT 0x1
|
| 273 |
+
# define PKCS7_NOCERTS 0x2
|
| 274 |
+
# define PKCS7_NOSIGS 0x4
|
| 275 |
+
# define PKCS7_NOCHAIN 0x8
|
| 276 |
+
# define PKCS7_NOINTERN 0x10
|
| 277 |
+
# define PKCS7_NOVERIFY 0x20
|
| 278 |
+
# define PKCS7_DETACHED 0x40
|
| 279 |
+
# define PKCS7_BINARY 0x80
|
| 280 |
+
# define PKCS7_NOATTR 0x100
|
| 281 |
+
# define PKCS7_NOSMIMECAP 0x200
|
| 282 |
+
# define PKCS7_NOOLDMIMETYPE 0x400
|
| 283 |
+
# define PKCS7_CRLFEOL 0x800
|
| 284 |
+
# define PKCS7_STREAM 0x1000
|
| 285 |
+
# define PKCS7_NOCRL 0x2000
|
| 286 |
+
# define PKCS7_PARTIAL 0x4000
|
| 287 |
+
# define PKCS7_REUSE_DIGEST 0x8000
|
| 288 |
+
# define PKCS7_NO_DUAL_CONTENT 0x10000
|
| 289 |
+
|
| 290 |
+
/* Flags: for compatibility with older code */
|
| 291 |
+
|
| 292 |
+
# define SMIME_TEXT PKCS7_TEXT
|
| 293 |
+
# define SMIME_NOCERTS PKCS7_NOCERTS
|
| 294 |
+
# define SMIME_NOSIGS PKCS7_NOSIGS
|
| 295 |
+
# define SMIME_NOCHAIN PKCS7_NOCHAIN
|
| 296 |
+
# define SMIME_NOINTERN PKCS7_NOINTERN
|
| 297 |
+
# define SMIME_NOVERIFY PKCS7_NOVERIFY
|
| 298 |
+
# define SMIME_DETACHED PKCS7_DETACHED
|
| 299 |
+
# define SMIME_BINARY PKCS7_BINARY
|
| 300 |
+
# define SMIME_NOATTR PKCS7_NOATTR
|
| 301 |
+
|
| 302 |
+
/* CRLF ASCII canonicalisation */
|
| 303 |
+
# define SMIME_ASCIICRLF 0x80000
|
| 304 |
+
|
| 305 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)
|
| 306 |
+
|
| 307 |
+
int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
|
| 308 |
+
const EVP_MD *type, unsigned char *md,
|
| 309 |
+
unsigned int *len);
|
| 310 |
+
# ifndef OPENSSL_NO_STDIO
|
| 311 |
+
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
|
| 312 |
+
int i2d_PKCS7_fp(FILE *fp, const PKCS7 *p7);
|
| 313 |
+
# endif
|
| 314 |
+
DECLARE_ASN1_DUP_FUNCTION(PKCS7)
|
| 315 |
+
PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
|
| 316 |
+
int i2d_PKCS7_bio(BIO *bp, const PKCS7 *p7);
|
| 317 |
+
int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
|
| 318 |
+
int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
|
| 319 |
+
|
| 320 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)
|
| 321 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)
|
| 322 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED)
|
| 323 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)
|
| 324 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE)
|
| 325 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)
|
| 326 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST)
|
| 327 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT)
|
| 328 |
+
DECLARE_ASN1_FUNCTIONS(PKCS7)
|
| 329 |
+
PKCS7 *PKCS7_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 330 |
+
|
| 331 |
+
DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)
|
| 332 |
+
DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY)
|
| 333 |
+
|
| 334 |
+
DECLARE_ASN1_NDEF_FUNCTION(PKCS7)
|
| 335 |
+
DECLARE_ASN1_PRINT_FUNCTION(PKCS7)
|
| 336 |
+
|
| 337 |
+
long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
|
| 338 |
+
|
| 339 |
+
int PKCS7_type_is_other(PKCS7 *p7);
|
| 340 |
+
int PKCS7_set_type(PKCS7 *p7, int type);
|
| 341 |
+
int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
|
| 342 |
+
int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
|
| 343 |
+
int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
|
| 344 |
+
const EVP_MD *dgst);
|
| 345 |
+
int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
|
| 346 |
+
int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
|
| 347 |
+
int PKCS7_add_certificate(PKCS7 *p7, X509 *cert);
|
| 348 |
+
int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl);
|
| 349 |
+
int PKCS7_content_new(PKCS7 *p7, int nid);
|
| 350 |
+
int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
|
| 351 |
+
BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
| 352 |
+
int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
|
| 353 |
+
X509 *signer);
|
| 354 |
+
|
| 355 |
+
BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
|
| 356 |
+
int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
|
| 357 |
+
BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
|
| 358 |
+
|
| 359 |
+
PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
|
| 360 |
+
EVP_PKEY *pkey, const EVP_MD *dgst);
|
| 361 |
+
X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
| 362 |
+
int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
|
| 363 |
+
STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7);
|
| 364 |
+
|
| 365 |
+
PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
|
| 366 |
+
void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
|
| 367 |
+
X509_ALGOR **pdig, X509_ALGOR **psig);
|
| 368 |
+
void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
|
| 369 |
+
int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
|
| 370 |
+
int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
|
| 371 |
+
int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
|
| 372 |
+
int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
|
| 373 |
+
|
| 374 |
+
PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
|
| 375 |
+
ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7);
|
| 376 |
+
ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk);
|
| 377 |
+
int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
|
| 378 |
+
void *data);
|
| 379 |
+
int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
|
| 380 |
+
void *value);
|
| 381 |
+
ASN1_TYPE *PKCS7_get_attribute(const PKCS7_SIGNER_INFO *si, int nid);
|
| 382 |
+
ASN1_TYPE *PKCS7_get_signed_attribute(const PKCS7_SIGNER_INFO *si, int nid);
|
| 383 |
+
int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
|
| 384 |
+
STACK_OF(X509_ATTRIBUTE) *sk);
|
| 385 |
+
int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
|
| 386 |
+
STACK_OF(X509_ATTRIBUTE) *sk);
|
| 387 |
+
|
| 388 |
+
PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
| 389 |
+
BIO *data, int flags);
|
| 390 |
+
PKCS7 *PKCS7_sign_ex(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
| 391 |
+
BIO *data, int flags, OSSL_LIB_CTX *libctx,
|
| 392 |
+
const char *propq);
|
| 393 |
+
|
| 394 |
+
PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
|
| 395 |
+
X509 *signcert, EVP_PKEY *pkey,
|
| 396 |
+
const EVP_MD *md, int flags);
|
| 397 |
+
|
| 398 |
+
int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
|
| 399 |
+
int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
|
| 400 |
+
BIO *indata, BIO *out, int flags);
|
| 401 |
+
STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs,
|
| 402 |
+
int flags);
|
| 403 |
+
PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
|
| 404 |
+
int flags);
|
| 405 |
+
PKCS7 *PKCS7_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
| 406 |
+
const EVP_CIPHER *cipher, int flags,
|
| 407 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 408 |
+
int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
|
| 409 |
+
int flags);
|
| 410 |
+
|
| 411 |
+
int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
|
| 412 |
+
STACK_OF(X509_ALGOR) *cap);
|
| 413 |
+
STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
|
| 414 |
+
int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg);
|
| 415 |
+
|
| 416 |
+
int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
|
| 417 |
+
int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
|
| 418 |
+
int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
|
| 419 |
+
const unsigned char *md, int mdlen);
|
| 420 |
+
|
| 421 |
+
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
|
| 422 |
+
PKCS7 *SMIME_read_PKCS7_ex(BIO *bio, BIO **bcont, PKCS7 **p7);
|
| 423 |
+
PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
|
| 424 |
+
|
| 425 |
+
BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
|
| 426 |
+
|
| 427 |
+
# ifdef __cplusplus
|
| 428 |
+
}
|
| 429 |
+
# endif
|
| 430 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/safestack.h
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/safestack.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_SAFESTACK_H
|
| 16 |
+
# define OPENSSL_SAFESTACK_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_SAFESTACK_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/stack.h>
|
| 25 |
+
# include <openssl/e_os2.h>
|
| 26 |
+
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
# define STACK_OF(type) struct stack_st_##type
|
| 32 |
+
|
| 33 |
+
/* Helper macro for internal use */
|
| 34 |
+
# define SKM_DEFINE_STACK_OF_INTERNAL(t1, t2, t3) \
|
| 35 |
+
STACK_OF(t1); \
|
| 36 |
+
typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
|
| 37 |
+
typedef void (*sk_##t1##_freefunc)(t3 *a); \
|
| 38 |
+
typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
|
| 39 |
+
static ossl_unused ossl_inline t2 *ossl_check_##t1##_type(t2 *ptr) \
|
| 40 |
+
{ \
|
| 41 |
+
return ptr; \
|
| 42 |
+
} \
|
| 43 |
+
static ossl_unused ossl_inline const OPENSSL_STACK *ossl_check_const_##t1##_sk_type(const STACK_OF(t1) *sk) \
|
| 44 |
+
{ \
|
| 45 |
+
return (const OPENSSL_STACK *)sk; \
|
| 46 |
+
} \
|
| 47 |
+
static ossl_unused ossl_inline OPENSSL_STACK *ossl_check_##t1##_sk_type(STACK_OF(t1) *sk) \
|
| 48 |
+
{ \
|
| 49 |
+
return (OPENSSL_STACK *)sk; \
|
| 50 |
+
} \
|
| 51 |
+
static ossl_unused ossl_inline OPENSSL_sk_compfunc ossl_check_##t1##_compfunc_type(sk_##t1##_compfunc cmp) \
|
| 52 |
+
{ \
|
| 53 |
+
return (OPENSSL_sk_compfunc)cmp; \
|
| 54 |
+
} \
|
| 55 |
+
static ossl_unused ossl_inline OPENSSL_sk_copyfunc ossl_check_##t1##_copyfunc_type(sk_##t1##_copyfunc cpy) \
|
| 56 |
+
{ \
|
| 57 |
+
return (OPENSSL_sk_copyfunc)cpy; \
|
| 58 |
+
} \
|
| 59 |
+
static ossl_unused ossl_inline OPENSSL_sk_freefunc ossl_check_##t1##_freefunc_type(sk_##t1##_freefunc fr) \
|
| 60 |
+
{ \
|
| 61 |
+
return (OPENSSL_sk_freefunc)fr; \
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
# define SKM_DEFINE_STACK_OF(t1, t2, t3) \
|
| 65 |
+
STACK_OF(t1); \
|
| 66 |
+
typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
|
| 67 |
+
typedef void (*sk_##t1##_freefunc)(t3 *a); \
|
| 68 |
+
typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
|
| 69 |
+
static ossl_unused ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \
|
| 70 |
+
{ \
|
| 71 |
+
return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
|
| 72 |
+
} \
|
| 73 |
+
static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
|
| 74 |
+
{ \
|
| 75 |
+
return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
|
| 76 |
+
} \
|
| 77 |
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new(sk_##t1##_compfunc compare) \
|
| 78 |
+
{ \
|
| 79 |
+
return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \
|
| 80 |
+
} \
|
| 81 |
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_null(void) \
|
| 82 |
+
{ \
|
| 83 |
+
return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
|
| 84 |
+
} \
|
| 85 |
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
|
| 86 |
+
{ \
|
| 87 |
+
return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
|
| 88 |
+
} \
|
| 89 |
+
static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
|
| 90 |
+
{ \
|
| 91 |
+
return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
|
| 92 |
+
} \
|
| 93 |
+
static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \
|
| 94 |
+
{ \
|
| 95 |
+
OPENSSL_sk_free((OPENSSL_STACK *)sk); \
|
| 96 |
+
} \
|
| 97 |
+
static ossl_unused ossl_inline void sk_##t1##_zero(STACK_OF(t1) *sk) \
|
| 98 |
+
{ \
|
| 99 |
+
OPENSSL_sk_zero((OPENSSL_STACK *)sk); \
|
| 100 |
+
} \
|
| 101 |
+
static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
|
| 102 |
+
{ \
|
| 103 |
+
return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
|
| 104 |
+
} \
|
| 105 |
+
static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
|
| 106 |
+
{ \
|
| 107 |
+
return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \
|
| 108 |
+
(const void *)ptr); \
|
| 109 |
+
} \
|
| 110 |
+
static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \
|
| 111 |
+
{ \
|
| 112 |
+
return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \
|
| 113 |
+
} \
|
| 114 |
+
static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \
|
| 115 |
+
{ \
|
| 116 |
+
return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); \
|
| 117 |
+
} \
|
| 118 |
+
static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
|
| 119 |
+
{ \
|
| 120 |
+
return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
|
| 121 |
+
} \
|
| 122 |
+
static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
|
| 123 |
+
{ \
|
| 124 |
+
return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
|
| 125 |
+
} \
|
| 126 |
+
static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \
|
| 127 |
+
{ \
|
| 128 |
+
OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
|
| 129 |
+
} \
|
| 130 |
+
static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \
|
| 131 |
+
{ \
|
| 132 |
+
return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); \
|
| 133 |
+
} \
|
| 134 |
+
static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
|
| 135 |
+
{ \
|
| 136 |
+
return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); \
|
| 137 |
+
} \
|
| 138 |
+
static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \
|
| 139 |
+
{ \
|
| 140 |
+
return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \
|
| 141 |
+
} \
|
| 142 |
+
static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \
|
| 143 |
+
{ \
|
| 144 |
+
return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \
|
| 145 |
+
} \
|
| 146 |
+
static ossl_unused ossl_inline int sk_##t1##_find_all(STACK_OF(t1) *sk, t2 *ptr, int *pnum) \
|
| 147 |
+
{ \
|
| 148 |
+
return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); \
|
| 149 |
+
} \
|
| 150 |
+
static ossl_unused ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \
|
| 151 |
+
{ \
|
| 152 |
+
OPENSSL_sk_sort((OPENSSL_STACK *)sk); \
|
| 153 |
+
} \
|
| 154 |
+
static ossl_unused ossl_inline int sk_##t1##_is_sorted(const STACK_OF(t1) *sk) \
|
| 155 |
+
{ \
|
| 156 |
+
return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); \
|
| 157 |
+
} \
|
| 158 |
+
static ossl_unused ossl_inline STACK_OF(t1) * sk_##t1##_dup(const STACK_OF(t1) *sk) \
|
| 159 |
+
{ \
|
| 160 |
+
return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \
|
| 161 |
+
} \
|
| 162 |
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_deep_copy(const STACK_OF(t1) *sk, \
|
| 163 |
+
sk_##t1##_copyfunc copyfunc, \
|
| 164 |
+
sk_##t1##_freefunc freefunc) \
|
| 165 |
+
{ \
|
| 166 |
+
return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \
|
| 167 |
+
(OPENSSL_sk_copyfunc)copyfunc, \
|
| 168 |
+
(OPENSSL_sk_freefunc)freefunc); \
|
| 169 |
+
} \
|
| 170 |
+
static ossl_unused ossl_inline sk_##t1##_compfunc sk_##t1##_set_cmp_func(STACK_OF(t1) *sk, sk_##t1##_compfunc compare) \
|
| 171 |
+
{ \
|
| 172 |
+
return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
# define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
|
| 176 |
+
# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
|
| 177 |
+
# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
|
| 178 |
+
# define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \
|
| 179 |
+
SKM_DEFINE_STACK_OF(t1, const t2, t2)
|
| 180 |
+
|
| 181 |
+
/*-
|
| 182 |
+
* Strings are special: normally an lhash entry will point to a single
|
| 183 |
+
* (somewhat) mutable object. In the case of strings:
|
| 184 |
+
*
|
| 185 |
+
* a) Instead of a single char, there is an array of chars, NUL-terminated.
|
| 186 |
+
* b) The string may have be immutable.
|
| 187 |
+
*
|
| 188 |
+
* So, they need their own declarations. Especially important for
|
| 189 |
+
* type-checking tools, such as Deputy.
|
| 190 |
+
*
|
| 191 |
+
* In practice, however, it appears to be hard to have a const
|
| 192 |
+
* string. For now, I'm settling for dealing with the fact it is a
|
| 193 |
+
* string at all.
|
| 194 |
+
*/
|
| 195 |
+
typedef char *OPENSSL_STRING;
|
| 196 |
+
typedef const char *OPENSSL_CSTRING;
|
| 197 |
+
|
| 198 |
+
/*-
|
| 199 |
+
* Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
|
| 200 |
+
* STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
|
| 201 |
+
* above, instead of a single char each entry is a NUL-terminated array of
|
| 202 |
+
* chars. So, we have to implement STRING specially for STACK_OF. This is
|
| 203 |
+
* dealt with in the autogenerated macros below.
|
| 204 |
+
*/
|
| 205 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_STRING, char, char)
|
| 206 |
+
#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
|
| 207 |
+
#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
|
| 208 |
+
#define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new(ossl_check_OPENSSL_STRING_compfunc_type(cmp)))
|
| 209 |
+
#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_null())
|
| 210 |
+
#define sk_OPENSSL_STRING_new_reserve(cmp, n) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_reserve(ossl_check_OPENSSL_STRING_compfunc_type(cmp), (n)))
|
| 211 |
+
#define sk_OPENSSL_STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OPENSSL_STRING_sk_type(sk), (n))
|
| 212 |
+
#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
|
| 213 |
+
#define sk_OPENSSL_STRING_zero(sk) OPENSSL_sk_zero(ossl_check_OPENSSL_STRING_sk_type(sk))
|
| 214 |
+
#define sk_OPENSSL_STRING_delete(sk, i) ((char *)OPENSSL_sk_delete(ossl_check_OPENSSL_STRING_sk_type(sk), (i)))
|
| 215 |
+
#define sk_OPENSSL_STRING_delete_ptr(sk, ptr) ((char *)OPENSSL_sk_delete_ptr(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr)))
|
| 216 |
+
#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
| 217 |
+
#define sk_OPENSSL_STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
| 218 |
+
#define sk_OPENSSL_STRING_pop(sk) ((char *)OPENSSL_sk_pop(ossl_check_OPENSSL_STRING_sk_type(sk)))
|
| 219 |
+
#define sk_OPENSSL_STRING_shift(sk) ((char *)OPENSSL_sk_shift(ossl_check_OPENSSL_STRING_sk_type(sk)))
|
| 220 |
+
#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk),ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
|
| 221 |
+
#define sk_OPENSSL_STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr), (idx))
|
| 222 |
+
#define sk_OPENSSL_STRING_set(sk, idx, ptr) ((char *)OPENSSL_sk_set(ossl_check_OPENSSL_STRING_sk_type(sk), (idx), ossl_check_OPENSSL_STRING_type(ptr)))
|
| 223 |
+
#define sk_OPENSSL_STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
| 224 |
+
#define sk_OPENSSL_STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
| 225 |
+
#define sk_OPENSSL_STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr), pnum)
|
| 226 |
+
#define sk_OPENSSL_STRING_sort(sk) OPENSSL_sk_sort(ossl_check_OPENSSL_STRING_sk_type(sk))
|
| 227 |
+
#define sk_OPENSSL_STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OPENSSL_STRING_sk_type(sk))
|
| 228 |
+
#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
|
| 229 |
+
#define sk_OPENSSL_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_STRING_freefunc_type(freefunc)))
|
| 230 |
+
#define sk_OPENSSL_STRING_set_cmp_func(sk, cmp) ((sk_OPENSSL_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_compfunc_type(cmp)))
|
| 231 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_CSTRING, const char, char)
|
| 232 |
+
#define sk_OPENSSL_CSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_CSTRING_sk_type(sk))
|
| 233 |
+
#define sk_OPENSSL_CSTRING_value(sk, idx) ((const char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), (idx)))
|
| 234 |
+
#define sk_OPENSSL_CSTRING_new(cmp) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new(ossl_check_OPENSSL_CSTRING_compfunc_type(cmp)))
|
| 235 |
+
#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
|
| 236 |
+
#define sk_OPENSSL_CSTRING_new_reserve(cmp, n) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_reserve(ossl_check_OPENSSL_CSTRING_compfunc_type(cmp), (n)))
|
| 237 |
+
#define sk_OPENSSL_CSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OPENSSL_CSTRING_sk_type(sk), (n))
|
| 238 |
+
#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
|
| 239 |
+
#define sk_OPENSSL_CSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_OPENSSL_CSTRING_sk_type(sk))
|
| 240 |
+
#define sk_OPENSSL_CSTRING_delete(sk, i) ((const char *)OPENSSL_sk_delete(ossl_check_OPENSSL_CSTRING_sk_type(sk), (i)))
|
| 241 |
+
#define sk_OPENSSL_CSTRING_delete_ptr(sk, ptr) ((const char *)OPENSSL_sk_delete_ptr(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr)))
|
| 242 |
+
#define sk_OPENSSL_CSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
| 243 |
+
#define sk_OPENSSL_CSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
| 244 |
+
#define sk_OPENSSL_CSTRING_pop(sk) ((const char *)OPENSSL_sk_pop(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
|
| 245 |
+
#define sk_OPENSSL_CSTRING_shift(sk) ((const char *)OPENSSL_sk_shift(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
|
| 246 |
+
#define sk_OPENSSL_CSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_CSTRING_sk_type(sk),ossl_check_OPENSSL_CSTRING_freefunc_type(freefunc))
|
| 247 |
+
#define sk_OPENSSL_CSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr), (idx))
|
| 248 |
+
#define sk_OPENSSL_CSTRING_set(sk, idx, ptr) ((const char *)OPENSSL_sk_set(ossl_check_OPENSSL_CSTRING_sk_type(sk), (idx), ossl_check_OPENSSL_CSTRING_type(ptr)))
|
| 249 |
+
#define sk_OPENSSL_CSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
| 250 |
+
#define sk_OPENSSL_CSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
| 251 |
+
#define sk_OPENSSL_CSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr), pnum)
|
| 252 |
+
#define sk_OPENSSL_CSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_OPENSSL_CSTRING_sk_type(sk))
|
| 253 |
+
#define sk_OPENSSL_CSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OPENSSL_CSTRING_sk_type(sk))
|
| 254 |
+
#define sk_OPENSSL_CSTRING_dup(sk) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_CSTRING_sk_type(sk)))
|
| 255 |
+
#define sk_OPENSSL_CSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_CSTRING_freefunc_type(freefunc)))
|
| 256 |
+
#define sk_OPENSSL_CSTRING_set_cmp_func(sk, cmp) ((sk_OPENSSL_CSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_compfunc_type(cmp)))
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
#if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
| 260 |
+
/*
|
| 261 |
+
* This is not used by OpenSSL. A block of bytes, NOT nul-terminated.
|
| 262 |
+
* These should also be distinguished from "normal" stacks.
|
| 263 |
+
*/
|
| 264 |
+
typedef void *OPENSSL_BLOCK;
|
| 265 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_BLOCK, void, void)
|
| 266 |
+
#define sk_OPENSSL_BLOCK_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_BLOCK_sk_type(sk))
|
| 267 |
+
#define sk_OPENSSL_BLOCK_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_OPENSSL_BLOCK_sk_type(sk), (idx)))
|
| 268 |
+
#define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_new(ossl_check_OPENSSL_BLOCK_compfunc_type(cmp)))
|
| 269 |
+
#define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_new_null())
|
| 270 |
+
#define sk_OPENSSL_BLOCK_new_reserve(cmp, n) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_new_reserve(ossl_check_OPENSSL_BLOCK_compfunc_type(cmp), (n)))
|
| 271 |
+
#define sk_OPENSSL_BLOCK_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OPENSSL_BLOCK_sk_type(sk), (n))
|
| 272 |
+
#define sk_OPENSSL_BLOCK_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_BLOCK_sk_type(sk))
|
| 273 |
+
#define sk_OPENSSL_BLOCK_zero(sk) OPENSSL_sk_zero(ossl_check_OPENSSL_BLOCK_sk_type(sk))
|
| 274 |
+
#define sk_OPENSSL_BLOCK_delete(sk, i) ((void *)OPENSSL_sk_delete(ossl_check_OPENSSL_BLOCK_sk_type(sk), (i)))
|
| 275 |
+
#define sk_OPENSSL_BLOCK_delete_ptr(sk, ptr) ((void *)OPENSSL_sk_delete_ptr(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr)))
|
| 276 |
+
#define sk_OPENSSL_BLOCK_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
| 277 |
+
#define sk_OPENSSL_BLOCK_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
| 278 |
+
#define sk_OPENSSL_BLOCK_pop(sk) ((void *)OPENSSL_sk_pop(ossl_check_OPENSSL_BLOCK_sk_type(sk)))
|
| 279 |
+
#define sk_OPENSSL_BLOCK_shift(sk) ((void *)OPENSSL_sk_shift(ossl_check_OPENSSL_BLOCK_sk_type(sk)))
|
| 280 |
+
#define sk_OPENSSL_BLOCK_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_BLOCK_sk_type(sk),ossl_check_OPENSSL_BLOCK_freefunc_type(freefunc))
|
| 281 |
+
#define sk_OPENSSL_BLOCK_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr), (idx))
|
| 282 |
+
#define sk_OPENSSL_BLOCK_set(sk, idx, ptr) ((void *)OPENSSL_sk_set(ossl_check_OPENSSL_BLOCK_sk_type(sk), (idx), ossl_check_OPENSSL_BLOCK_type(ptr)))
|
| 283 |
+
#define sk_OPENSSL_BLOCK_find(sk, ptr) OPENSSL_sk_find(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
| 284 |
+
#define sk_OPENSSL_BLOCK_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
| 285 |
+
#define sk_OPENSSL_BLOCK_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr), pnum)
|
| 286 |
+
#define sk_OPENSSL_BLOCK_sort(sk) OPENSSL_sk_sort(ossl_check_OPENSSL_BLOCK_sk_type(sk))
|
| 287 |
+
#define sk_OPENSSL_BLOCK_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OPENSSL_BLOCK_sk_type(sk))
|
| 288 |
+
#define sk_OPENSSL_BLOCK_dup(sk) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_BLOCK_sk_type(sk)))
|
| 289 |
+
#define sk_OPENSSL_BLOCK_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_copyfunc_type(copyfunc), ossl_check_OPENSSL_BLOCK_freefunc_type(freefunc)))
|
| 290 |
+
#define sk_OPENSSL_BLOCK_set_cmp_func(sk, cmp) ((sk_OPENSSL_BLOCK_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_compfunc_type(cmp)))
|
| 291 |
+
|
| 292 |
+
#endif
|
| 293 |
+
|
| 294 |
+
# ifdef __cplusplus
|
| 295 |
+
}
|
| 296 |
+
# endif
|
| 297 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/srp.h
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/srp.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright (c) 2004, EdelKey Project. All Rights Reserved.
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*
|
| 13 |
+
* Originally written by Christophe Renou and Peter Sylvester,
|
| 14 |
+
* for the EdelKey project.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_SRP_H
|
| 20 |
+
# define OPENSSL_SRP_H
|
| 21 |
+
# pragma once
|
| 22 |
+
|
| 23 |
+
# include <openssl/macros.h>
|
| 24 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 25 |
+
# define HEADER_SRP_H
|
| 26 |
+
# endif
|
| 27 |
+
|
| 28 |
+
#include <openssl/opensslconf.h>
|
| 29 |
+
|
| 30 |
+
#ifndef OPENSSL_NO_SRP
|
| 31 |
+
# include <stdio.h>
|
| 32 |
+
# include <string.h>
|
| 33 |
+
# include <openssl/safestack.h>
|
| 34 |
+
# include <openssl/bn.h>
|
| 35 |
+
# include <openssl/crypto.h>
|
| 36 |
+
|
| 37 |
+
# ifdef __cplusplus
|
| 38 |
+
extern "C" {
|
| 39 |
+
# endif
|
| 40 |
+
|
| 41 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 42 |
+
|
| 43 |
+
typedef struct SRP_gN_cache_st {
|
| 44 |
+
char *b64_bn;
|
| 45 |
+
BIGNUM *bn;
|
| 46 |
+
} SRP_gN_cache;
|
| 47 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN_cache, SRP_gN_cache, SRP_gN_cache)
|
| 48 |
+
#define sk_SRP_gN_cache_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_cache_sk_type(sk))
|
| 49 |
+
#define sk_SRP_gN_cache_value(sk, idx) ((SRP_gN_cache *)OPENSSL_sk_value(ossl_check_const_SRP_gN_cache_sk_type(sk), (idx)))
|
| 50 |
+
#define sk_SRP_gN_cache_new(cmp) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new(ossl_check_SRP_gN_cache_compfunc_type(cmp)))
|
| 51 |
+
#define sk_SRP_gN_cache_new_null() ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_null())
|
| 52 |
+
#define sk_SRP_gN_cache_new_reserve(cmp, n) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_cache_compfunc_type(cmp), (n)))
|
| 53 |
+
#define sk_SRP_gN_cache_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_cache_sk_type(sk), (n))
|
| 54 |
+
#define sk_SRP_gN_cache_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_cache_sk_type(sk))
|
| 55 |
+
#define sk_SRP_gN_cache_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_cache_sk_type(sk))
|
| 56 |
+
#define sk_SRP_gN_cache_delete(sk, i) ((SRP_gN_cache *)OPENSSL_sk_delete(ossl_check_SRP_gN_cache_sk_type(sk), (i)))
|
| 57 |
+
#define sk_SRP_gN_cache_delete_ptr(sk, ptr) ((SRP_gN_cache *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)))
|
| 58 |
+
#define sk_SRP_gN_cache_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
| 59 |
+
#define sk_SRP_gN_cache_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
| 60 |
+
#define sk_SRP_gN_cache_pop(sk) ((SRP_gN_cache *)OPENSSL_sk_pop(ossl_check_SRP_gN_cache_sk_type(sk)))
|
| 61 |
+
#define sk_SRP_gN_cache_shift(sk) ((SRP_gN_cache *)OPENSSL_sk_shift(ossl_check_SRP_gN_cache_sk_type(sk)))
|
| 62 |
+
#define sk_SRP_gN_cache_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_cache_sk_type(sk),ossl_check_SRP_gN_cache_freefunc_type(freefunc))
|
| 63 |
+
#define sk_SRP_gN_cache_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), (idx))
|
| 64 |
+
#define sk_SRP_gN_cache_set(sk, idx, ptr) ((SRP_gN_cache *)OPENSSL_sk_set(ossl_check_SRP_gN_cache_sk_type(sk), (idx), ossl_check_SRP_gN_cache_type(ptr)))
|
| 65 |
+
#define sk_SRP_gN_cache_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
| 66 |
+
#define sk_SRP_gN_cache_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
| 67 |
+
#define sk_SRP_gN_cache_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), pnum)
|
| 68 |
+
#define sk_SRP_gN_cache_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_cache_sk_type(sk))
|
| 69 |
+
#define sk_SRP_gN_cache_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_cache_sk_type(sk))
|
| 70 |
+
#define sk_SRP_gN_cache_dup(sk) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_cache_sk_type(sk)))
|
| 71 |
+
#define sk_SRP_gN_cache_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_copyfunc_type(copyfunc), ossl_check_SRP_gN_cache_freefunc_type(freefunc)))
|
| 72 |
+
#define sk_SRP_gN_cache_set_cmp_func(sk, cmp) ((sk_SRP_gN_cache_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_compfunc_type(cmp)))
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
typedef struct SRP_user_pwd_st {
|
| 77 |
+
/* Owned by us. */
|
| 78 |
+
char *id;
|
| 79 |
+
BIGNUM *s;
|
| 80 |
+
BIGNUM *v;
|
| 81 |
+
/* Not owned by us. */
|
| 82 |
+
const BIGNUM *g;
|
| 83 |
+
const BIGNUM *N;
|
| 84 |
+
/* Owned by us. */
|
| 85 |
+
char *info;
|
| 86 |
+
} SRP_user_pwd;
|
| 87 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SRP_user_pwd, SRP_user_pwd, SRP_user_pwd)
|
| 88 |
+
#define sk_SRP_user_pwd_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_user_pwd_sk_type(sk))
|
| 89 |
+
#define sk_SRP_user_pwd_value(sk, idx) ((SRP_user_pwd *)OPENSSL_sk_value(ossl_check_const_SRP_user_pwd_sk_type(sk), (idx)))
|
| 90 |
+
#define sk_SRP_user_pwd_new(cmp) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new(ossl_check_SRP_user_pwd_compfunc_type(cmp)))
|
| 91 |
+
#define sk_SRP_user_pwd_new_null() ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_null())
|
| 92 |
+
#define sk_SRP_user_pwd_new_reserve(cmp, n) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_reserve(ossl_check_SRP_user_pwd_compfunc_type(cmp), (n)))
|
| 93 |
+
#define sk_SRP_user_pwd_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_user_pwd_sk_type(sk), (n))
|
| 94 |
+
#define sk_SRP_user_pwd_free(sk) OPENSSL_sk_free(ossl_check_SRP_user_pwd_sk_type(sk))
|
| 95 |
+
#define sk_SRP_user_pwd_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_user_pwd_sk_type(sk))
|
| 96 |
+
#define sk_SRP_user_pwd_delete(sk, i) ((SRP_user_pwd *)OPENSSL_sk_delete(ossl_check_SRP_user_pwd_sk_type(sk), (i)))
|
| 97 |
+
#define sk_SRP_user_pwd_delete_ptr(sk, ptr) ((SRP_user_pwd *)OPENSSL_sk_delete_ptr(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)))
|
| 98 |
+
#define sk_SRP_user_pwd_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
| 99 |
+
#define sk_SRP_user_pwd_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
| 100 |
+
#define sk_SRP_user_pwd_pop(sk) ((SRP_user_pwd *)OPENSSL_sk_pop(ossl_check_SRP_user_pwd_sk_type(sk)))
|
| 101 |
+
#define sk_SRP_user_pwd_shift(sk) ((SRP_user_pwd *)OPENSSL_sk_shift(ossl_check_SRP_user_pwd_sk_type(sk)))
|
| 102 |
+
#define sk_SRP_user_pwd_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_user_pwd_sk_type(sk),ossl_check_SRP_user_pwd_freefunc_type(freefunc))
|
| 103 |
+
#define sk_SRP_user_pwd_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), (idx))
|
| 104 |
+
#define sk_SRP_user_pwd_set(sk, idx, ptr) ((SRP_user_pwd *)OPENSSL_sk_set(ossl_check_SRP_user_pwd_sk_type(sk), (idx), ossl_check_SRP_user_pwd_type(ptr)))
|
| 105 |
+
#define sk_SRP_user_pwd_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
| 106 |
+
#define sk_SRP_user_pwd_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
| 107 |
+
#define sk_SRP_user_pwd_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), pnum)
|
| 108 |
+
#define sk_SRP_user_pwd_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_user_pwd_sk_type(sk))
|
| 109 |
+
#define sk_SRP_user_pwd_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_user_pwd_sk_type(sk))
|
| 110 |
+
#define sk_SRP_user_pwd_dup(sk) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_dup(ossl_check_const_SRP_user_pwd_sk_type(sk)))
|
| 111 |
+
#define sk_SRP_user_pwd_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_copyfunc_type(copyfunc), ossl_check_SRP_user_pwd_freefunc_type(freefunc)))
|
| 112 |
+
#define sk_SRP_user_pwd_set_cmp_func(sk, cmp) ((sk_SRP_user_pwd_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_compfunc_type(cmp)))
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
OSSL_DEPRECATEDIN_3_0
|
| 116 |
+
SRP_user_pwd *SRP_user_pwd_new(void);
|
| 117 |
+
OSSL_DEPRECATEDIN_3_0
|
| 118 |
+
void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
|
| 119 |
+
|
| 120 |
+
OSSL_DEPRECATEDIN_3_0
|
| 121 |
+
void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g,
|
| 122 |
+
const BIGNUM *N);
|
| 123 |
+
OSSL_DEPRECATEDIN_3_0
|
| 124 |
+
int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id,
|
| 125 |
+
const char *info);
|
| 126 |
+
OSSL_DEPRECATEDIN_3_0
|
| 127 |
+
int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
|
| 128 |
+
|
| 129 |
+
typedef struct SRP_VBASE_st {
|
| 130 |
+
STACK_OF(SRP_user_pwd) *users_pwd;
|
| 131 |
+
STACK_OF(SRP_gN_cache) *gN_cache;
|
| 132 |
+
/* to simulate a user */
|
| 133 |
+
char *seed_key;
|
| 134 |
+
const BIGNUM *default_g;
|
| 135 |
+
const BIGNUM *default_N;
|
| 136 |
+
} SRP_VBASE;
|
| 137 |
+
|
| 138 |
+
/*
|
| 139 |
+
* Internal structure storing N and g pair
|
| 140 |
+
*/
|
| 141 |
+
typedef struct SRP_gN_st {
|
| 142 |
+
char *id;
|
| 143 |
+
const BIGNUM *g;
|
| 144 |
+
const BIGNUM *N;
|
| 145 |
+
} SRP_gN;
|
| 146 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN, SRP_gN, SRP_gN)
|
| 147 |
+
#define sk_SRP_gN_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_sk_type(sk))
|
| 148 |
+
#define sk_SRP_gN_value(sk, idx) ((SRP_gN *)OPENSSL_sk_value(ossl_check_const_SRP_gN_sk_type(sk), (idx)))
|
| 149 |
+
#define sk_SRP_gN_new(cmp) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new(ossl_check_SRP_gN_compfunc_type(cmp)))
|
| 150 |
+
#define sk_SRP_gN_new_null() ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_null())
|
| 151 |
+
#define sk_SRP_gN_new_reserve(cmp, n) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_compfunc_type(cmp), (n)))
|
| 152 |
+
#define sk_SRP_gN_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_sk_type(sk), (n))
|
| 153 |
+
#define sk_SRP_gN_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_sk_type(sk))
|
| 154 |
+
#define sk_SRP_gN_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_sk_type(sk))
|
| 155 |
+
#define sk_SRP_gN_delete(sk, i) ((SRP_gN *)OPENSSL_sk_delete(ossl_check_SRP_gN_sk_type(sk), (i)))
|
| 156 |
+
#define sk_SRP_gN_delete_ptr(sk, ptr) ((SRP_gN *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)))
|
| 157 |
+
#define sk_SRP_gN_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
| 158 |
+
#define sk_SRP_gN_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
| 159 |
+
#define sk_SRP_gN_pop(sk) ((SRP_gN *)OPENSSL_sk_pop(ossl_check_SRP_gN_sk_type(sk)))
|
| 160 |
+
#define sk_SRP_gN_shift(sk) ((SRP_gN *)OPENSSL_sk_shift(ossl_check_SRP_gN_sk_type(sk)))
|
| 161 |
+
#define sk_SRP_gN_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_sk_type(sk),ossl_check_SRP_gN_freefunc_type(freefunc))
|
| 162 |
+
#define sk_SRP_gN_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), (idx))
|
| 163 |
+
#define sk_SRP_gN_set(sk, idx, ptr) ((SRP_gN *)OPENSSL_sk_set(ossl_check_SRP_gN_sk_type(sk), (idx), ossl_check_SRP_gN_type(ptr)))
|
| 164 |
+
#define sk_SRP_gN_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
| 165 |
+
#define sk_SRP_gN_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
| 166 |
+
#define sk_SRP_gN_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), pnum)
|
| 167 |
+
#define sk_SRP_gN_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_sk_type(sk))
|
| 168 |
+
#define sk_SRP_gN_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_sk_type(sk))
|
| 169 |
+
#define sk_SRP_gN_dup(sk) ((STACK_OF(SRP_gN) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_sk_type(sk)))
|
| 170 |
+
#define sk_SRP_gN_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_sk_type(sk), ossl_check_SRP_gN_copyfunc_type(copyfunc), ossl_check_SRP_gN_freefunc_type(freefunc)))
|
| 171 |
+
#define sk_SRP_gN_set_cmp_func(sk, cmp) ((sk_SRP_gN_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_compfunc_type(cmp)))
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
OSSL_DEPRECATEDIN_3_0
|
| 176 |
+
SRP_VBASE *SRP_VBASE_new(char *seed_key);
|
| 177 |
+
OSSL_DEPRECATEDIN_3_0
|
| 178 |
+
void SRP_VBASE_free(SRP_VBASE *vb);
|
| 179 |
+
OSSL_DEPRECATEDIN_3_0
|
| 180 |
+
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
|
| 181 |
+
|
| 182 |
+
OSSL_DEPRECATEDIN_3_0
|
| 183 |
+
int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd);
|
| 184 |
+
|
| 185 |
+
/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
|
| 186 |
+
OSSL_DEPRECATEDIN_3_0
|
| 187 |
+
SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
|
| 188 |
+
|
| 189 |
+
OSSL_DEPRECATEDIN_3_0
|
| 190 |
+
char *SRP_create_verifier_ex(const char *user, const char *pass, char **salt,
|
| 191 |
+
char **verifier, const char *N, const char *g,
|
| 192 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 193 |
+
OSSL_DEPRECATEDIN_3_0
|
| 194 |
+
char *SRP_create_verifier(const char *user, const char *pass, char **salt,
|
| 195 |
+
char **verifier, const char *N, const char *g);
|
| 196 |
+
OSSL_DEPRECATEDIN_3_0
|
| 197 |
+
int SRP_create_verifier_BN_ex(const char *user, const char *pass, BIGNUM **salt,
|
| 198 |
+
BIGNUM **verifier, const BIGNUM *N,
|
| 199 |
+
const BIGNUM *g, OSSL_LIB_CTX *libctx,
|
| 200 |
+
const char *propq);
|
| 201 |
+
OSSL_DEPRECATEDIN_3_0
|
| 202 |
+
int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,
|
| 203 |
+
BIGNUM **verifier, const BIGNUM *N,
|
| 204 |
+
const BIGNUM *g);
|
| 205 |
+
|
| 206 |
+
# define SRP_NO_ERROR 0
|
| 207 |
+
# define SRP_ERR_VBASE_INCOMPLETE_FILE 1
|
| 208 |
+
# define SRP_ERR_VBASE_BN_LIB 2
|
| 209 |
+
# define SRP_ERR_OPEN_FILE 3
|
| 210 |
+
# define SRP_ERR_MEMORY 4
|
| 211 |
+
|
| 212 |
+
# define DB_srptype 0
|
| 213 |
+
# define DB_srpverifier 1
|
| 214 |
+
# define DB_srpsalt 2
|
| 215 |
+
# define DB_srpid 3
|
| 216 |
+
# define DB_srpgN 4
|
| 217 |
+
# define DB_srpinfo 5
|
| 218 |
+
# undef DB_NUMBER
|
| 219 |
+
# define DB_NUMBER 6
|
| 220 |
+
|
| 221 |
+
# define DB_SRP_INDEX 'I'
|
| 222 |
+
# define DB_SRP_VALID 'V'
|
| 223 |
+
# define DB_SRP_REVOKED 'R'
|
| 224 |
+
# define DB_SRP_MODIF 'v'
|
| 225 |
+
|
| 226 |
+
/* see srp.c */
|
| 227 |
+
OSSL_DEPRECATEDIN_3_0
|
| 228 |
+
char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N);
|
| 229 |
+
OSSL_DEPRECATEDIN_3_0
|
| 230 |
+
SRP_gN *SRP_get_default_gN(const char *id);
|
| 231 |
+
|
| 232 |
+
/* server side .... */
|
| 233 |
+
OSSL_DEPRECATEDIN_3_0
|
| 234 |
+
BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
|
| 235 |
+
const BIGNUM *b, const BIGNUM *N);
|
| 236 |
+
OSSL_DEPRECATEDIN_3_0
|
| 237 |
+
BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
| 238 |
+
const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
|
| 239 |
+
OSSL_DEPRECATEDIN_3_0
|
| 240 |
+
BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
| 241 |
+
const BIGNUM *v);
|
| 242 |
+
|
| 243 |
+
OSSL_DEPRECATEDIN_3_0
|
| 244 |
+
int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N);
|
| 245 |
+
OSSL_DEPRECATEDIN_3_0
|
| 246 |
+
BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
|
| 247 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 248 |
+
OSSL_DEPRECATEDIN_3_0
|
| 249 |
+
BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
|
| 250 |
+
|
| 251 |
+
/* client side .... */
|
| 252 |
+
|
| 253 |
+
OSSL_DEPRECATEDIN_3_0
|
| 254 |
+
BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
|
| 255 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 256 |
+
OSSL_DEPRECATEDIN_3_0
|
| 257 |
+
BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
|
| 258 |
+
OSSL_DEPRECATEDIN_3_0
|
| 259 |
+
BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);
|
| 260 |
+
OSSL_DEPRECATEDIN_3_0
|
| 261 |
+
BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
| 262 |
+
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
|
| 263 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 264 |
+
OSSL_DEPRECATEDIN_3_0
|
| 265 |
+
BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
| 266 |
+
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
|
| 267 |
+
OSSL_DEPRECATEDIN_3_0
|
| 268 |
+
int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N);
|
| 269 |
+
|
| 270 |
+
# define SRP_MINIMAL_N 1024
|
| 271 |
+
|
| 272 |
+
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 273 |
+
|
| 274 |
+
/* This method ignores the configured seed and fails for an unknown user. */
|
| 275 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 276 |
+
OSSL_DEPRECATEDIN_1_1_0
|
| 277 |
+
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
|
| 278 |
+
# endif
|
| 279 |
+
|
| 280 |
+
# ifdef __cplusplus
|
| 281 |
+
}
|
| 282 |
+
# endif
|
| 283 |
+
# endif
|
| 284 |
+
|
| 285 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ssl.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/ui.h
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ui.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_UI_H
|
| 16 |
+
# define OPENSSL_UI_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_UI_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
|
| 26 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 27 |
+
# include <openssl/crypto.h>
|
| 28 |
+
# endif
|
| 29 |
+
# include <openssl/safestack.h>
|
| 30 |
+
# include <openssl/pem.h>
|
| 31 |
+
# include <openssl/types.h>
|
| 32 |
+
# include <openssl/uierr.h>
|
| 33 |
+
|
| 34 |
+
/* For compatibility reasons, the macro OPENSSL_NO_UI is currently retained */
|
| 35 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 36 |
+
# ifdef OPENSSL_NO_UI_CONSOLE
|
| 37 |
+
# define OPENSSL_NO_UI
|
| 38 |
+
# endif
|
| 39 |
+
# endif
|
| 40 |
+
|
| 41 |
+
# ifdef __cplusplus
|
| 42 |
+
extern "C" {
|
| 43 |
+
# endif
|
| 44 |
+
|
| 45 |
+
/*
|
| 46 |
+
* All the following functions return -1 or NULL on error and in some cases
|
| 47 |
+
* (UI_process()) -2 if interrupted or in some other way cancelled. When
|
| 48 |
+
* everything is fine, they return 0, a positive value or a non-NULL pointer,
|
| 49 |
+
* all depending on their purpose.
|
| 50 |
+
*/
|
| 51 |
+
|
| 52 |
+
/* Creators and destructor. */
|
| 53 |
+
UI *UI_new(void);
|
| 54 |
+
UI *UI_new_method(const UI_METHOD *method);
|
| 55 |
+
void UI_free(UI *ui);
|
| 56 |
+
|
| 57 |
+
/*-
|
| 58 |
+
The following functions are used to add strings to be printed and prompt
|
| 59 |
+
strings to prompt for data. The names are UI_{add,dup}_<function>_string
|
| 60 |
+
and UI_{add,dup}_input_boolean.
|
| 61 |
+
|
| 62 |
+
UI_{add,dup}_<function>_string have the following meanings:
|
| 63 |
+
add add a text or prompt string. The pointers given to these
|
| 64 |
+
functions are used verbatim, no copying is done.
|
| 65 |
+
dup make a copy of the text or prompt string, then add the copy
|
| 66 |
+
to the collection of strings in the user interface.
|
| 67 |
+
<function>
|
| 68 |
+
The function is a name for the functionality that the given
|
| 69 |
+
string shall be used for. It can be one of:
|
| 70 |
+
input use the string as data prompt.
|
| 71 |
+
verify use the string as verification prompt. This
|
| 72 |
+
is used to verify a previous input.
|
| 73 |
+
info use the string for informational output.
|
| 74 |
+
error use the string for error output.
|
| 75 |
+
Honestly, there's currently no difference between info and error for the
|
| 76 |
+
moment.
|
| 77 |
+
|
| 78 |
+
UI_{add,dup}_input_boolean have the same semantics for "add" and "dup",
|
| 79 |
+
and are typically used when one wants to prompt for a yes/no response.
|
| 80 |
+
|
| 81 |
+
All of the functions in this group take a UI and a prompt string.
|
| 82 |
+
The string input and verify addition functions also take a flag argument,
|
| 83 |
+
a buffer for the result to end up with, a minimum input size and a maximum
|
| 84 |
+
input size (the result buffer MUST be large enough to be able to contain
|
| 85 |
+
the maximum number of characters). Additionally, the verify addition
|
| 86 |
+
functions takes another buffer to compare the result against.
|
| 87 |
+
The boolean input functions take an action description string (which should
|
| 88 |
+
be safe to ignore if the expected user action is obvious, for example with
|
| 89 |
+
a dialog box with an OK button and a Cancel button), a string of acceptable
|
| 90 |
+
characters to mean OK and to mean Cancel. The two last strings are checked
|
| 91 |
+
to make sure they don't have common characters. Additionally, the same
|
| 92 |
+
flag argument as for the string input is taken, as well as a result buffer.
|
| 93 |
+
The result buffer is required to be at least one byte long. Depending on
|
| 94 |
+
the answer, the first character from the OK or the Cancel character strings
|
| 95 |
+
will be stored in the first byte of the result buffer. No NUL will be
|
| 96 |
+
added, so the result is *not* a string.
|
| 97 |
+
|
| 98 |
+
On success, the all return an index of the added information. That index
|
| 99 |
+
is useful when retrieving results with UI_get0_result(). */
|
| 100 |
+
int UI_add_input_string(UI *ui, const char *prompt, int flags,
|
| 101 |
+
char *result_buf, int minsize, int maxsize);
|
| 102 |
+
int UI_dup_input_string(UI *ui, const char *prompt, int flags,
|
| 103 |
+
char *result_buf, int minsize, int maxsize);
|
| 104 |
+
int UI_add_verify_string(UI *ui, const char *prompt, int flags,
|
| 105 |
+
char *result_buf, int minsize, int maxsize,
|
| 106 |
+
const char *test_buf);
|
| 107 |
+
int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
|
| 108 |
+
char *result_buf, int minsize, int maxsize,
|
| 109 |
+
const char *test_buf);
|
| 110 |
+
int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
|
| 111 |
+
const char *ok_chars, const char *cancel_chars,
|
| 112 |
+
int flags, char *result_buf);
|
| 113 |
+
int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
|
| 114 |
+
const char *ok_chars, const char *cancel_chars,
|
| 115 |
+
int flags, char *result_buf);
|
| 116 |
+
int UI_add_info_string(UI *ui, const char *text);
|
| 117 |
+
int UI_dup_info_string(UI *ui, const char *text);
|
| 118 |
+
int UI_add_error_string(UI *ui, const char *text);
|
| 119 |
+
int UI_dup_error_string(UI *ui, const char *text);
|
| 120 |
+
|
| 121 |
+
/* These are the possible flags. They can be or'ed together. */
|
| 122 |
+
/* Use to have echoing of input */
|
| 123 |
+
# define UI_INPUT_FLAG_ECHO 0x01
|
| 124 |
+
/*
|
| 125 |
+
* Use a default password. Where that password is found is completely up to
|
| 126 |
+
* the application, it might for example be in the user data set with
|
| 127 |
+
* UI_add_user_data(). It is not recommended to have more than one input in
|
| 128 |
+
* each UI being marked with this flag, or the application might get
|
| 129 |
+
* confused.
|
| 130 |
+
*/
|
| 131 |
+
# define UI_INPUT_FLAG_DEFAULT_PWD 0x02
|
| 132 |
+
|
| 133 |
+
/*-
|
| 134 |
+
* The user of these routines may want to define flags of their own. The core
|
| 135 |
+
* UI won't look at those, but will pass them on to the method routines. They
|
| 136 |
+
* must use higher bits so they don't get confused with the UI bits above.
|
| 137 |
+
* UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use. A good
|
| 138 |
+
* example of use is this:
|
| 139 |
+
*
|
| 140 |
+
* #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE)
|
| 141 |
+
*
|
| 142 |
+
*/
|
| 143 |
+
# define UI_INPUT_FLAG_USER_BASE 16
|
| 144 |
+
|
| 145 |
+
/*-
|
| 146 |
+
* The following function helps construct a prompt.
|
| 147 |
+
* phrase_desc is a textual short description of the phrase to enter,
|
| 148 |
+
* for example "pass phrase", and
|
| 149 |
+
* object_name is the name of the object
|
| 150 |
+
* (which might be a card name or a file name) or NULL.
|
| 151 |
+
* The returned string shall always be allocated on the heap with
|
| 152 |
+
* OPENSSL_malloc(), and need to be free'd with OPENSSL_free().
|
| 153 |
+
*
|
| 154 |
+
* If the ui_method doesn't contain a pointer to a user-defined prompt
|
| 155 |
+
* constructor, a default string is built, looking like this:
|
| 156 |
+
*
|
| 157 |
+
* "Enter {phrase_desc} for {object_name}:"
|
| 158 |
+
*
|
| 159 |
+
* So, if phrase_desc has the value "pass phrase" and object_name has
|
| 160 |
+
* the value "foo.key", the resulting string is:
|
| 161 |
+
*
|
| 162 |
+
* "Enter pass phrase for foo.key:"
|
| 163 |
+
*/
|
| 164 |
+
char *UI_construct_prompt(UI *ui_method,
|
| 165 |
+
const char *phrase_desc, const char *object_name);
|
| 166 |
+
|
| 167 |
+
/*
|
| 168 |
+
* The following function is used to store a pointer to user-specific data.
|
| 169 |
+
* Any previous such pointer will be returned and replaced.
|
| 170 |
+
*
|
| 171 |
+
* For callback purposes, this function makes a lot more sense than using
|
| 172 |
+
* ex_data, since the latter requires that different parts of OpenSSL or
|
| 173 |
+
* applications share the same ex_data index.
|
| 174 |
+
*
|
| 175 |
+
* Note that the UI_OpenSSL() method completely ignores the user data. Other
|
| 176 |
+
* methods may not, however.
|
| 177 |
+
*/
|
| 178 |
+
void *UI_add_user_data(UI *ui, void *user_data);
|
| 179 |
+
/*
|
| 180 |
+
* Alternatively, this function is used to duplicate the user data.
|
| 181 |
+
* This uses the duplicator method function. The destroy function will
|
| 182 |
+
* be used to free the user data in this case.
|
| 183 |
+
*/
|
| 184 |
+
int UI_dup_user_data(UI *ui, void *user_data);
|
| 185 |
+
/* We need a user data retrieving function as well. */
|
| 186 |
+
void *UI_get0_user_data(UI *ui);
|
| 187 |
+
|
| 188 |
+
/* Return the result associated with a prompt given with the index i. */
|
| 189 |
+
const char *UI_get0_result(UI *ui, int i);
|
| 190 |
+
int UI_get_result_length(UI *ui, int i);
|
| 191 |
+
|
| 192 |
+
/* When all strings have been added, process the whole thing. */
|
| 193 |
+
int UI_process(UI *ui);
|
| 194 |
+
|
| 195 |
+
/*
|
| 196 |
+
* Give a user interface parameterised control commands. This can be used to
|
| 197 |
+
* send down an integer, a data pointer or a function pointer, as well as be
|
| 198 |
+
* used to get information from a UI.
|
| 199 |
+
*/
|
| 200 |
+
int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
|
| 201 |
+
|
| 202 |
+
/* The commands */
|
| 203 |
+
/*
|
| 204 |
+
* Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the
|
| 205 |
+
* OpenSSL error stack before printing any info or added error messages and
|
| 206 |
+
* before any prompting.
|
| 207 |
+
*/
|
| 208 |
+
# define UI_CTRL_PRINT_ERRORS 1
|
| 209 |
+
/*
|
| 210 |
+
* Check if a UI_process() is possible to do again with the same instance of
|
| 211 |
+
* a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0
|
| 212 |
+
* if not.
|
| 213 |
+
*/
|
| 214 |
+
# define UI_CTRL_IS_REDOABLE 2
|
| 215 |
+
|
| 216 |
+
/* Some methods may use extra data */
|
| 217 |
+
# define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg)
|
| 218 |
+
# define UI_get_app_data(s) UI_get_ex_data(s,0)
|
| 219 |
+
|
| 220 |
+
# define UI_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 221 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef)
|
| 222 |
+
int UI_set_ex_data(UI *r, int idx, void *arg);
|
| 223 |
+
void *UI_get_ex_data(const UI *r, int idx);
|
| 224 |
+
|
| 225 |
+
/* Use specific methods instead of the built-in one */
|
| 226 |
+
void UI_set_default_method(const UI_METHOD *meth);
|
| 227 |
+
const UI_METHOD *UI_get_default_method(void);
|
| 228 |
+
const UI_METHOD *UI_get_method(UI *ui);
|
| 229 |
+
const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth);
|
| 230 |
+
|
| 231 |
+
# ifndef OPENSSL_NO_UI_CONSOLE
|
| 232 |
+
|
| 233 |
+
/* The method with all the built-in thingies */
|
| 234 |
+
UI_METHOD *UI_OpenSSL(void);
|
| 235 |
+
|
| 236 |
+
# endif
|
| 237 |
+
|
| 238 |
+
/*
|
| 239 |
+
* NULL method. Literally does nothing, but may serve as a placeholder
|
| 240 |
+
* to avoid internal default.
|
| 241 |
+
*/
|
| 242 |
+
const UI_METHOD *UI_null(void);
|
| 243 |
+
|
| 244 |
+
/* ---------- For method writers ---------- */
|
| 245 |
+
/*-
|
| 246 |
+
A method contains a number of functions that implement the low level
|
| 247 |
+
of the User Interface. The functions are:
|
| 248 |
+
|
| 249 |
+
an opener This function starts a session, maybe by opening
|
| 250 |
+
a channel to a tty, or by opening a window.
|
| 251 |
+
a writer This function is called to write a given string,
|
| 252 |
+
maybe to the tty, maybe as a field label in a
|
| 253 |
+
window.
|
| 254 |
+
a flusher This function is called to flush everything that
|
| 255 |
+
has been output so far. It can be used to actually
|
| 256 |
+
display a dialog box after it has been built.
|
| 257 |
+
a reader This function is called to read a given prompt,
|
| 258 |
+
maybe from the tty, maybe from a field in a
|
| 259 |
+
window. Note that it's called with all string
|
| 260 |
+
structures, not only the prompt ones, so it must
|
| 261 |
+
check such things itself.
|
| 262 |
+
a closer This function closes the session, maybe by closing
|
| 263 |
+
the channel to the tty, or closing the window.
|
| 264 |
+
|
| 265 |
+
All these functions are expected to return:
|
| 266 |
+
|
| 267 |
+
0 on error.
|
| 268 |
+
1 on success.
|
| 269 |
+
-1 on out-of-band events, for example if some prompting has
|
| 270 |
+
been canceled (by pressing Ctrl-C, for example). This is
|
| 271 |
+
only checked when returned by the flusher or the reader.
|
| 272 |
+
|
| 273 |
+
The way this is used, the opener is first called, then the writer for all
|
| 274 |
+
strings, then the flusher, then the reader for all strings and finally the
|
| 275 |
+
closer. Note that if you want to prompt from a terminal or other command
|
| 276 |
+
line interface, the best is to have the reader also write the prompts
|
| 277 |
+
instead of having the writer do it. If you want to prompt from a dialog
|
| 278 |
+
box, the writer can be used to build up the contents of the box, and the
|
| 279 |
+
flusher to actually display the box and run the event loop until all data
|
| 280 |
+
has been given, after which the reader only grabs the given data and puts
|
| 281 |
+
them back into the UI strings.
|
| 282 |
+
|
| 283 |
+
All method functions take a UI as argument. Additionally, the writer and
|
| 284 |
+
the reader take a UI_STRING.
|
| 285 |
+
*/
|
| 286 |
+
|
| 287 |
+
/*
|
| 288 |
+
* The UI_STRING type is the data structure that contains all the needed info
|
| 289 |
+
* about a string or a prompt, including test data for a verification prompt.
|
| 290 |
+
*/
|
| 291 |
+
typedef struct ui_string_st UI_STRING;
|
| 292 |
+
|
| 293 |
+
SKM_DEFINE_STACK_OF_INTERNAL(UI_STRING, UI_STRING, UI_STRING)
|
| 294 |
+
#define sk_UI_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_UI_STRING_sk_type(sk))
|
| 295 |
+
#define sk_UI_STRING_value(sk, idx) ((UI_STRING *)OPENSSL_sk_value(ossl_check_const_UI_STRING_sk_type(sk), (idx)))
|
| 296 |
+
#define sk_UI_STRING_new(cmp) ((STACK_OF(UI_STRING) *)OPENSSL_sk_new(ossl_check_UI_STRING_compfunc_type(cmp)))
|
| 297 |
+
#define sk_UI_STRING_new_null() ((STACK_OF(UI_STRING) *)OPENSSL_sk_new_null())
|
| 298 |
+
#define sk_UI_STRING_new_reserve(cmp, n) ((STACK_OF(UI_STRING) *)OPENSSL_sk_new_reserve(ossl_check_UI_STRING_compfunc_type(cmp), (n)))
|
| 299 |
+
#define sk_UI_STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_UI_STRING_sk_type(sk), (n))
|
| 300 |
+
#define sk_UI_STRING_free(sk) OPENSSL_sk_free(ossl_check_UI_STRING_sk_type(sk))
|
| 301 |
+
#define sk_UI_STRING_zero(sk) OPENSSL_sk_zero(ossl_check_UI_STRING_sk_type(sk))
|
| 302 |
+
#define sk_UI_STRING_delete(sk, i) ((UI_STRING *)OPENSSL_sk_delete(ossl_check_UI_STRING_sk_type(sk), (i)))
|
| 303 |
+
#define sk_UI_STRING_delete_ptr(sk, ptr) ((UI_STRING *)OPENSSL_sk_delete_ptr(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr)))
|
| 304 |
+
#define sk_UI_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 305 |
+
#define sk_UI_STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 306 |
+
#define sk_UI_STRING_pop(sk) ((UI_STRING *)OPENSSL_sk_pop(ossl_check_UI_STRING_sk_type(sk)))
|
| 307 |
+
#define sk_UI_STRING_shift(sk) ((UI_STRING *)OPENSSL_sk_shift(ossl_check_UI_STRING_sk_type(sk)))
|
| 308 |
+
#define sk_UI_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_UI_STRING_sk_type(sk),ossl_check_UI_STRING_freefunc_type(freefunc))
|
| 309 |
+
#define sk_UI_STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr), (idx))
|
| 310 |
+
#define sk_UI_STRING_set(sk, idx, ptr) ((UI_STRING *)OPENSSL_sk_set(ossl_check_UI_STRING_sk_type(sk), (idx), ossl_check_UI_STRING_type(ptr)))
|
| 311 |
+
#define sk_UI_STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 312 |
+
#define sk_UI_STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 313 |
+
#define sk_UI_STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr), pnum)
|
| 314 |
+
#define sk_UI_STRING_sort(sk) OPENSSL_sk_sort(ossl_check_UI_STRING_sk_type(sk))
|
| 315 |
+
#define sk_UI_STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_UI_STRING_sk_type(sk))
|
| 316 |
+
#define sk_UI_STRING_dup(sk) ((STACK_OF(UI_STRING) *)OPENSSL_sk_dup(ossl_check_const_UI_STRING_sk_type(sk)))
|
| 317 |
+
#define sk_UI_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(UI_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_UI_STRING_sk_type(sk), ossl_check_UI_STRING_copyfunc_type(copyfunc), ossl_check_UI_STRING_freefunc_type(freefunc)))
|
| 318 |
+
#define sk_UI_STRING_set_cmp_func(sk, cmp) ((sk_UI_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_compfunc_type(cmp)))
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
/*
|
| 322 |
+
* The different types of strings that are currently supported. This is only
|
| 323 |
+
* needed by method authors.
|
| 324 |
+
*/
|
| 325 |
+
enum UI_string_types {
|
| 326 |
+
UIT_NONE = 0,
|
| 327 |
+
UIT_PROMPT, /* Prompt for a string */
|
| 328 |
+
UIT_VERIFY, /* Prompt for a string and verify */
|
| 329 |
+
UIT_BOOLEAN, /* Prompt for a yes/no response */
|
| 330 |
+
UIT_INFO, /* Send info to the user */
|
| 331 |
+
UIT_ERROR /* Send an error message to the user */
|
| 332 |
+
};
|
| 333 |
+
|
| 334 |
+
/* Create and manipulate methods */
|
| 335 |
+
UI_METHOD *UI_create_method(const char *name);
|
| 336 |
+
void UI_destroy_method(UI_METHOD *ui_method);
|
| 337 |
+
int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui));
|
| 338 |
+
int UI_method_set_writer(UI_METHOD *method,
|
| 339 |
+
int (*writer) (UI *ui, UI_STRING *uis));
|
| 340 |
+
int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui));
|
| 341 |
+
int UI_method_set_reader(UI_METHOD *method,
|
| 342 |
+
int (*reader) (UI *ui, UI_STRING *uis));
|
| 343 |
+
int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));
|
| 344 |
+
int UI_method_set_data_duplicator(UI_METHOD *method,
|
| 345 |
+
void *(*duplicator) (UI *ui, void *ui_data),
|
| 346 |
+
void (*destructor)(UI *ui, void *ui_data));
|
| 347 |
+
int UI_method_set_prompt_constructor(UI_METHOD *method,
|
| 348 |
+
char *(*prompt_constructor) (UI *ui,
|
| 349 |
+
const char
|
| 350 |
+
*phrase_desc,
|
| 351 |
+
const char
|
| 352 |
+
*object_name));
|
| 353 |
+
int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data);
|
| 354 |
+
int (*UI_method_get_opener(const UI_METHOD *method)) (UI *);
|
| 355 |
+
int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *);
|
| 356 |
+
int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *);
|
| 357 |
+
int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *);
|
| 358 |
+
int (*UI_method_get_closer(const UI_METHOD *method)) (UI *);
|
| 359 |
+
char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))
|
| 360 |
+
(UI *, const char *, const char *);
|
| 361 |
+
void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *);
|
| 362 |
+
void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *);
|
| 363 |
+
const void *UI_method_get_ex_data(const UI_METHOD *method, int idx);
|
| 364 |
+
|
| 365 |
+
/*
|
| 366 |
+
* The following functions are helpers for method writers to access relevant
|
| 367 |
+
* data from a UI_STRING.
|
| 368 |
+
*/
|
| 369 |
+
|
| 370 |
+
/* Return type of the UI_STRING */
|
| 371 |
+
enum UI_string_types UI_get_string_type(UI_STRING *uis);
|
| 372 |
+
/* Return input flags of the UI_STRING */
|
| 373 |
+
int UI_get_input_flags(UI_STRING *uis);
|
| 374 |
+
/* Return the actual string to output (the prompt, info or error) */
|
| 375 |
+
const char *UI_get0_output_string(UI_STRING *uis);
|
| 376 |
+
/*
|
| 377 |
+
* Return the optional action string to output (the boolean prompt
|
| 378 |
+
* instruction)
|
| 379 |
+
*/
|
| 380 |
+
const char *UI_get0_action_string(UI_STRING *uis);
|
| 381 |
+
/* Return the result of a prompt */
|
| 382 |
+
const char *UI_get0_result_string(UI_STRING *uis);
|
| 383 |
+
int UI_get_result_string_length(UI_STRING *uis);
|
| 384 |
+
/*
|
| 385 |
+
* Return the string to test the result against. Only useful with verifies.
|
| 386 |
+
*/
|
| 387 |
+
const char *UI_get0_test_string(UI_STRING *uis);
|
| 388 |
+
/* Return the required minimum size of the result */
|
| 389 |
+
int UI_get_result_minsize(UI_STRING *uis);
|
| 390 |
+
/* Return the required maximum size of the result */
|
| 391 |
+
int UI_get_result_maxsize(UI_STRING *uis);
|
| 392 |
+
/* Set the result of a UI_STRING. */
|
| 393 |
+
int UI_set_result(UI *ui, UI_STRING *uis, const char *result);
|
| 394 |
+
int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len);
|
| 395 |
+
|
| 396 |
+
/* A couple of popular utility functions */
|
| 397 |
+
int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
|
| 398 |
+
int verify);
|
| 399 |
+
int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
|
| 400 |
+
int verify);
|
| 401 |
+
UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
# ifdef __cplusplus
|
| 405 |
+
}
|
| 406 |
+
# endif
|
| 407 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/x509.h
ADDED
|
@@ -0,0 +1,1303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/x509.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_X509_H
|
| 17 |
+
# define OPENSSL_X509_H
|
| 18 |
+
# pragma once
|
| 19 |
+
|
| 20 |
+
# include <openssl/macros.h>
|
| 21 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 22 |
+
# define HEADER_X509_H
|
| 23 |
+
# endif
|
| 24 |
+
|
| 25 |
+
# include <openssl/e_os2.h>
|
| 26 |
+
# include <openssl/types.h>
|
| 27 |
+
# include <openssl/symhacks.h>
|
| 28 |
+
# include <openssl/buffer.h>
|
| 29 |
+
# include <openssl/evp.h>
|
| 30 |
+
# include <openssl/bio.h>
|
| 31 |
+
# include <openssl/asn1.h>
|
| 32 |
+
# include <openssl/safestack.h>
|
| 33 |
+
# include <openssl/ec.h>
|
| 34 |
+
|
| 35 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 36 |
+
# include <openssl/rsa.h>
|
| 37 |
+
# include <openssl/dsa.h>
|
| 38 |
+
# include <openssl/dh.h>
|
| 39 |
+
# endif
|
| 40 |
+
|
| 41 |
+
# include <openssl/sha.h>
|
| 42 |
+
# include <openssl/x509err.h>
|
| 43 |
+
# ifndef OPENSSL_NO_STDIO
|
| 44 |
+
# include <stdio.h>
|
| 45 |
+
# endif
|
| 46 |
+
|
| 47 |
+
#ifdef __cplusplus
|
| 48 |
+
extern "C" {
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
/* Needed stacks for types defined in other headers */
|
| 52 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_NAME, X509_NAME, X509_NAME)
|
| 53 |
+
#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
|
| 54 |
+
#define sk_X509_NAME_value(sk, idx) ((X509_NAME *)OPENSSL_sk_value(ossl_check_const_X509_NAME_sk_type(sk), (idx)))
|
| 55 |
+
#define sk_X509_NAME_new(cmp) ((STACK_OF(X509_NAME) *)OPENSSL_sk_new(ossl_check_X509_NAME_compfunc_type(cmp)))
|
| 56 |
+
#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_new_null())
|
| 57 |
+
#define sk_X509_NAME_new_reserve(cmp, n) ((STACK_OF(X509_NAME) *)OPENSSL_sk_new_reserve(ossl_check_X509_NAME_compfunc_type(cmp), (n)))
|
| 58 |
+
#define sk_X509_NAME_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_NAME_sk_type(sk), (n))
|
| 59 |
+
#define sk_X509_NAME_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_sk_type(sk))
|
| 60 |
+
#define sk_X509_NAME_zero(sk) OPENSSL_sk_zero(ossl_check_X509_NAME_sk_type(sk))
|
| 61 |
+
#define sk_X509_NAME_delete(sk, i) ((X509_NAME *)OPENSSL_sk_delete(ossl_check_X509_NAME_sk_type(sk), (i)))
|
| 62 |
+
#define sk_X509_NAME_delete_ptr(sk, ptr) ((X509_NAME *)OPENSSL_sk_delete_ptr(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr)))
|
| 63 |
+
#define sk_X509_NAME_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr))
|
| 64 |
+
#define sk_X509_NAME_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr))
|
| 65 |
+
#define sk_X509_NAME_pop(sk) ((X509_NAME *)OPENSSL_sk_pop(ossl_check_X509_NAME_sk_type(sk)))
|
| 66 |
+
#define sk_X509_NAME_shift(sk) ((X509_NAME *)OPENSSL_sk_shift(ossl_check_X509_NAME_sk_type(sk)))
|
| 67 |
+
#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk),ossl_check_X509_NAME_freefunc_type(freefunc))
|
| 68 |
+
#define sk_X509_NAME_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr), (idx))
|
| 69 |
+
#define sk_X509_NAME_set(sk, idx, ptr) ((X509_NAME *)OPENSSL_sk_set(ossl_check_X509_NAME_sk_type(sk), (idx), ossl_check_X509_NAME_type(ptr)))
|
| 70 |
+
#define sk_X509_NAME_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr))
|
| 71 |
+
#define sk_X509_NAME_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr))
|
| 72 |
+
#define sk_X509_NAME_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(ptr), pnum)
|
| 73 |
+
#define sk_X509_NAME_sort(sk) OPENSSL_sk_sort(ossl_check_X509_NAME_sk_type(sk))
|
| 74 |
+
#define sk_X509_NAME_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_NAME_sk_type(sk))
|
| 75 |
+
#define sk_X509_NAME_dup(sk) ((STACK_OF(X509_NAME) *)OPENSSL_sk_dup(ossl_check_const_X509_NAME_sk_type(sk)))
|
| 76 |
+
#define sk_X509_NAME_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_NAME) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_NAME_sk_type(sk), ossl_check_X509_NAME_copyfunc_type(copyfunc), ossl_check_X509_NAME_freefunc_type(freefunc)))
|
| 77 |
+
#define sk_X509_NAME_set_cmp_func(sk, cmp) ((sk_X509_NAME_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_compfunc_type(cmp)))
|
| 78 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509, X509, X509)
|
| 79 |
+
#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
|
| 80 |
+
#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
|
| 81 |
+
#define sk_X509_new(cmp) ((STACK_OF(X509) *)OPENSSL_sk_new(ossl_check_X509_compfunc_type(cmp)))
|
| 82 |
+
#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_new_null())
|
| 83 |
+
#define sk_X509_new_reserve(cmp, n) ((STACK_OF(X509) *)OPENSSL_sk_new_reserve(ossl_check_X509_compfunc_type(cmp), (n)))
|
| 84 |
+
#define sk_X509_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_sk_type(sk), (n))
|
| 85 |
+
#define sk_X509_free(sk) OPENSSL_sk_free(ossl_check_X509_sk_type(sk))
|
| 86 |
+
#define sk_X509_zero(sk) OPENSSL_sk_zero(ossl_check_X509_sk_type(sk))
|
| 87 |
+
#define sk_X509_delete(sk, i) ((X509 *)OPENSSL_sk_delete(ossl_check_X509_sk_type(sk), (i)))
|
| 88 |
+
#define sk_X509_delete_ptr(sk, ptr) ((X509 *)OPENSSL_sk_delete_ptr(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr)))
|
| 89 |
+
#define sk_X509_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
|
| 90 |
+
#define sk_X509_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
|
| 91 |
+
#define sk_X509_pop(sk) ((X509 *)OPENSSL_sk_pop(ossl_check_X509_sk_type(sk)))
|
| 92 |
+
#define sk_X509_shift(sk) ((X509 *)OPENSSL_sk_shift(ossl_check_X509_sk_type(sk)))
|
| 93 |
+
#define sk_X509_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_sk_type(sk),ossl_check_X509_freefunc_type(freefunc))
|
| 94 |
+
#define sk_X509_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr), (idx))
|
| 95 |
+
#define sk_X509_set(sk, idx, ptr) ((X509 *)OPENSSL_sk_set(ossl_check_X509_sk_type(sk), (idx), ossl_check_X509_type(ptr)))
|
| 96 |
+
#define sk_X509_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
|
| 97 |
+
#define sk_X509_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
|
| 98 |
+
#define sk_X509_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr), pnum)
|
| 99 |
+
#define sk_X509_sort(sk) OPENSSL_sk_sort(ossl_check_X509_sk_type(sk))
|
| 100 |
+
#define sk_X509_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_sk_type(sk))
|
| 101 |
+
#define sk_X509_dup(sk) ((STACK_OF(X509) *)OPENSSL_sk_dup(ossl_check_const_X509_sk_type(sk)))
|
| 102 |
+
#define sk_X509_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_sk_type(sk), ossl_check_X509_copyfunc_type(copyfunc), ossl_check_X509_freefunc_type(freefunc)))
|
| 103 |
+
#define sk_X509_set_cmp_func(sk, cmp) ((sk_X509_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_sk_type(sk), ossl_check_X509_compfunc_type(cmp)))
|
| 104 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_REVOKED, X509_REVOKED, X509_REVOKED)
|
| 105 |
+
#define sk_X509_REVOKED_num(sk) OPENSSL_sk_num(ossl_check_const_X509_REVOKED_sk_type(sk))
|
| 106 |
+
#define sk_X509_REVOKED_value(sk, idx) ((X509_REVOKED *)OPENSSL_sk_value(ossl_check_const_X509_REVOKED_sk_type(sk), (idx)))
|
| 107 |
+
#define sk_X509_REVOKED_new(cmp) ((STACK_OF(X509_REVOKED) *)OPENSSL_sk_new(ossl_check_X509_REVOKED_compfunc_type(cmp)))
|
| 108 |
+
#define sk_X509_REVOKED_new_null() ((STACK_OF(X509_REVOKED) *)OPENSSL_sk_new_null())
|
| 109 |
+
#define sk_X509_REVOKED_new_reserve(cmp, n) ((STACK_OF(X509_REVOKED) *)OPENSSL_sk_new_reserve(ossl_check_X509_REVOKED_compfunc_type(cmp), (n)))
|
| 110 |
+
#define sk_X509_REVOKED_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_REVOKED_sk_type(sk), (n))
|
| 111 |
+
#define sk_X509_REVOKED_free(sk) OPENSSL_sk_free(ossl_check_X509_REVOKED_sk_type(sk))
|
| 112 |
+
#define sk_X509_REVOKED_zero(sk) OPENSSL_sk_zero(ossl_check_X509_REVOKED_sk_type(sk))
|
| 113 |
+
#define sk_X509_REVOKED_delete(sk, i) ((X509_REVOKED *)OPENSSL_sk_delete(ossl_check_X509_REVOKED_sk_type(sk), (i)))
|
| 114 |
+
#define sk_X509_REVOKED_delete_ptr(sk, ptr) ((X509_REVOKED *)OPENSSL_sk_delete_ptr(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr)))
|
| 115 |
+
#define sk_X509_REVOKED_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr))
|
| 116 |
+
#define sk_X509_REVOKED_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr))
|
| 117 |
+
#define sk_X509_REVOKED_pop(sk) ((X509_REVOKED *)OPENSSL_sk_pop(ossl_check_X509_REVOKED_sk_type(sk)))
|
| 118 |
+
#define sk_X509_REVOKED_shift(sk) ((X509_REVOKED *)OPENSSL_sk_shift(ossl_check_X509_REVOKED_sk_type(sk)))
|
| 119 |
+
#define sk_X509_REVOKED_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_REVOKED_sk_type(sk),ossl_check_X509_REVOKED_freefunc_type(freefunc))
|
| 120 |
+
#define sk_X509_REVOKED_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr), (idx))
|
| 121 |
+
#define sk_X509_REVOKED_set(sk, idx, ptr) ((X509_REVOKED *)OPENSSL_sk_set(ossl_check_X509_REVOKED_sk_type(sk), (idx), ossl_check_X509_REVOKED_type(ptr)))
|
| 122 |
+
#define sk_X509_REVOKED_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr))
|
| 123 |
+
#define sk_X509_REVOKED_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr))
|
| 124 |
+
#define sk_X509_REVOKED_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_type(ptr), pnum)
|
| 125 |
+
#define sk_X509_REVOKED_sort(sk) OPENSSL_sk_sort(ossl_check_X509_REVOKED_sk_type(sk))
|
| 126 |
+
#define sk_X509_REVOKED_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_REVOKED_sk_type(sk))
|
| 127 |
+
#define sk_X509_REVOKED_dup(sk) ((STACK_OF(X509_REVOKED) *)OPENSSL_sk_dup(ossl_check_const_X509_REVOKED_sk_type(sk)))
|
| 128 |
+
#define sk_X509_REVOKED_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_REVOKED) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_copyfunc_type(copyfunc), ossl_check_X509_REVOKED_freefunc_type(freefunc)))
|
| 129 |
+
#define sk_X509_REVOKED_set_cmp_func(sk, cmp) ((sk_X509_REVOKED_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_REVOKED_sk_type(sk), ossl_check_X509_REVOKED_compfunc_type(cmp)))
|
| 130 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_CRL, X509_CRL, X509_CRL)
|
| 131 |
+
#define sk_X509_CRL_num(sk) OPENSSL_sk_num(ossl_check_const_X509_CRL_sk_type(sk))
|
| 132 |
+
#define sk_X509_CRL_value(sk, idx) ((X509_CRL *)OPENSSL_sk_value(ossl_check_const_X509_CRL_sk_type(sk), (idx)))
|
| 133 |
+
#define sk_X509_CRL_new(cmp) ((STACK_OF(X509_CRL) *)OPENSSL_sk_new(ossl_check_X509_CRL_compfunc_type(cmp)))
|
| 134 |
+
#define sk_X509_CRL_new_null() ((STACK_OF(X509_CRL) *)OPENSSL_sk_new_null())
|
| 135 |
+
#define sk_X509_CRL_new_reserve(cmp, n) ((STACK_OF(X509_CRL) *)OPENSSL_sk_new_reserve(ossl_check_X509_CRL_compfunc_type(cmp), (n)))
|
| 136 |
+
#define sk_X509_CRL_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_CRL_sk_type(sk), (n))
|
| 137 |
+
#define sk_X509_CRL_free(sk) OPENSSL_sk_free(ossl_check_X509_CRL_sk_type(sk))
|
| 138 |
+
#define sk_X509_CRL_zero(sk) OPENSSL_sk_zero(ossl_check_X509_CRL_sk_type(sk))
|
| 139 |
+
#define sk_X509_CRL_delete(sk, i) ((X509_CRL *)OPENSSL_sk_delete(ossl_check_X509_CRL_sk_type(sk), (i)))
|
| 140 |
+
#define sk_X509_CRL_delete_ptr(sk, ptr) ((X509_CRL *)OPENSSL_sk_delete_ptr(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr)))
|
| 141 |
+
#define sk_X509_CRL_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr))
|
| 142 |
+
#define sk_X509_CRL_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr))
|
| 143 |
+
#define sk_X509_CRL_pop(sk) ((X509_CRL *)OPENSSL_sk_pop(ossl_check_X509_CRL_sk_type(sk)))
|
| 144 |
+
#define sk_X509_CRL_shift(sk) ((X509_CRL *)OPENSSL_sk_shift(ossl_check_X509_CRL_sk_type(sk)))
|
| 145 |
+
#define sk_X509_CRL_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_CRL_sk_type(sk),ossl_check_X509_CRL_freefunc_type(freefunc))
|
| 146 |
+
#define sk_X509_CRL_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr), (idx))
|
| 147 |
+
#define sk_X509_CRL_set(sk, idx, ptr) ((X509_CRL *)OPENSSL_sk_set(ossl_check_X509_CRL_sk_type(sk), (idx), ossl_check_X509_CRL_type(ptr)))
|
| 148 |
+
#define sk_X509_CRL_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr))
|
| 149 |
+
#define sk_X509_CRL_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr))
|
| 150 |
+
#define sk_X509_CRL_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_type(ptr), pnum)
|
| 151 |
+
#define sk_X509_CRL_sort(sk) OPENSSL_sk_sort(ossl_check_X509_CRL_sk_type(sk))
|
| 152 |
+
#define sk_X509_CRL_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_CRL_sk_type(sk))
|
| 153 |
+
#define sk_X509_CRL_dup(sk) ((STACK_OF(X509_CRL) *)OPENSSL_sk_dup(ossl_check_const_X509_CRL_sk_type(sk)))
|
| 154 |
+
#define sk_X509_CRL_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_CRL) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_CRL_sk_type(sk), ossl_check_X509_CRL_copyfunc_type(copyfunc), ossl_check_X509_CRL_freefunc_type(freefunc)))
|
| 155 |
+
#define sk_X509_CRL_set_cmp_func(sk, cmp) ((sk_X509_CRL_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_CRL_sk_type(sk), ossl_check_X509_CRL_compfunc_type(cmp)))
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
/* Flags for X509_get_signature_info() */
|
| 159 |
+
/* Signature info is valid */
|
| 160 |
+
# define X509_SIG_INFO_VALID 0x1
|
| 161 |
+
/* Signature is suitable for TLS use */
|
| 162 |
+
# define X509_SIG_INFO_TLS 0x2
|
| 163 |
+
|
| 164 |
+
# define X509_FILETYPE_PEM 1
|
| 165 |
+
# define X509_FILETYPE_ASN1 2
|
| 166 |
+
# define X509_FILETYPE_DEFAULT 3
|
| 167 |
+
|
| 168 |
+
/*-
|
| 169 |
+
* <https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3>:
|
| 170 |
+
* The KeyUsage BITSTRING is treated as a little-endian integer, hence bit `0`
|
| 171 |
+
* is 0x80, while bit `7` is 0x01 (the LSB of the integer value), bit `8` is
|
| 172 |
+
* then the MSB of the second octet, or 0x8000.
|
| 173 |
+
*/
|
| 174 |
+
# define X509v3_KU_DIGITAL_SIGNATURE 0x0080 /* (0) */
|
| 175 |
+
# define X509v3_KU_NON_REPUDIATION 0x0040 /* (1) */
|
| 176 |
+
# define X509v3_KU_KEY_ENCIPHERMENT 0x0020 /* (2) */
|
| 177 |
+
# define X509v3_KU_DATA_ENCIPHERMENT 0x0010 /* (3) */
|
| 178 |
+
# define X509v3_KU_KEY_AGREEMENT 0x0008 /* (4) */
|
| 179 |
+
# define X509v3_KU_KEY_CERT_SIGN 0x0004 /* (5) */
|
| 180 |
+
# define X509v3_KU_CRL_SIGN 0x0002 /* (6) */
|
| 181 |
+
# define X509v3_KU_ENCIPHER_ONLY 0x0001 /* (7) */
|
| 182 |
+
# define X509v3_KU_DECIPHER_ONLY 0x8000 /* (8) */
|
| 183 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_4
|
| 184 |
+
# define X509v3_KU_UNDEF 0xffff /* vestigial, not used */
|
| 185 |
+
# endif
|
| 186 |
+
|
| 187 |
+
struct X509_algor_st {
|
| 188 |
+
ASN1_OBJECT *algorithm;
|
| 189 |
+
ASN1_TYPE *parameter;
|
| 190 |
+
} /* X509_ALGOR */ ;
|
| 191 |
+
|
| 192 |
+
typedef STACK_OF(X509_ALGOR) X509_ALGORS;
|
| 193 |
+
|
| 194 |
+
typedef struct X509_val_st {
|
| 195 |
+
ASN1_TIME *notBefore;
|
| 196 |
+
ASN1_TIME *notAfter;
|
| 197 |
+
} X509_VAL;
|
| 198 |
+
|
| 199 |
+
typedef struct X509_sig_st X509_SIG;
|
| 200 |
+
|
| 201 |
+
typedef struct X509_name_entry_st X509_NAME_ENTRY;
|
| 202 |
+
|
| 203 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_NAME_ENTRY, X509_NAME_ENTRY, X509_NAME_ENTRY)
|
| 204 |
+
#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
|
| 205 |
+
#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
|
| 206 |
+
#define sk_X509_NAME_ENTRY_new(cmp) ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new(ossl_check_X509_NAME_ENTRY_compfunc_type(cmp)))
|
| 207 |
+
#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new_null())
|
| 208 |
+
#define sk_X509_NAME_ENTRY_new_reserve(cmp, n) ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new_reserve(ossl_check_X509_NAME_ENTRY_compfunc_type(cmp), (n)))
|
| 209 |
+
#define sk_X509_NAME_ENTRY_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_NAME_ENTRY_sk_type(sk), (n))
|
| 210 |
+
#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
|
| 211 |
+
#define sk_X509_NAME_ENTRY_zero(sk) OPENSSL_sk_zero(ossl_check_X509_NAME_ENTRY_sk_type(sk))
|
| 212 |
+
#define sk_X509_NAME_ENTRY_delete(sk, i) ((X509_NAME_ENTRY *)OPENSSL_sk_delete(ossl_check_X509_NAME_ENTRY_sk_type(sk), (i)))
|
| 213 |
+
#define sk_X509_NAME_ENTRY_delete_ptr(sk, ptr) ((X509_NAME_ENTRY *)OPENSSL_sk_delete_ptr(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr)))
|
| 214 |
+
#define sk_X509_NAME_ENTRY_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
|
| 215 |
+
#define sk_X509_NAME_ENTRY_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
|
| 216 |
+
#define sk_X509_NAME_ENTRY_pop(sk) ((X509_NAME_ENTRY *)OPENSSL_sk_pop(ossl_check_X509_NAME_ENTRY_sk_type(sk)))
|
| 217 |
+
#define sk_X509_NAME_ENTRY_shift(sk) ((X509_NAME_ENTRY *)OPENSSL_sk_shift(ossl_check_X509_NAME_ENTRY_sk_type(sk)))
|
| 218 |
+
#define sk_X509_NAME_ENTRY_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_ENTRY_sk_type(sk),ossl_check_X509_NAME_ENTRY_freefunc_type(freefunc))
|
| 219 |
+
#define sk_X509_NAME_ENTRY_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr), (idx))
|
| 220 |
+
#define sk_X509_NAME_ENTRY_set(sk, idx, ptr) ((X509_NAME_ENTRY *)OPENSSL_sk_set(ossl_check_X509_NAME_ENTRY_sk_type(sk), (idx), ossl_check_X509_NAME_ENTRY_type(ptr)))
|
| 221 |
+
#define sk_X509_NAME_ENTRY_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
|
| 222 |
+
#define sk_X509_NAME_ENTRY_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
|
| 223 |
+
#define sk_X509_NAME_ENTRY_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr), pnum)
|
| 224 |
+
#define sk_X509_NAME_ENTRY_sort(sk) OPENSSL_sk_sort(ossl_check_X509_NAME_ENTRY_sk_type(sk))
|
| 225 |
+
#define sk_X509_NAME_ENTRY_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
|
| 226 |
+
#define sk_X509_NAME_ENTRY_dup(sk) ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_dup(ossl_check_const_X509_NAME_ENTRY_sk_type(sk)))
|
| 227 |
+
#define sk_X509_NAME_ENTRY_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_copyfunc_type(copyfunc), ossl_check_X509_NAME_ENTRY_freefunc_type(freefunc)))
|
| 228 |
+
#define sk_X509_NAME_ENTRY_set_cmp_func(sk, cmp) ((sk_X509_NAME_ENTRY_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_compfunc_type(cmp)))
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
# define X509_EX_V_NETSCAPE_HACK 0x8000
|
| 232 |
+
# define X509_EX_V_INIT 0x0001
|
| 233 |
+
typedef struct X509_extension_st X509_EXTENSION;
|
| 234 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_EXTENSION, X509_EXTENSION, X509_EXTENSION)
|
| 235 |
+
#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
|
| 236 |
+
#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
|
| 237 |
+
#define sk_X509_EXTENSION_new(cmp) ((STACK_OF(X509_EXTENSION) *)OPENSSL_sk_new(ossl_check_X509_EXTENSION_compfunc_type(cmp)))
|
| 238 |
+
#define sk_X509_EXTENSION_new_null() ((STACK_OF(X509_EXTENSION) *)OPENSSL_sk_new_null())
|
| 239 |
+
#define sk_X509_EXTENSION_new_reserve(cmp, n) ((STACK_OF(X509_EXTENSION) *)OPENSSL_sk_new_reserve(ossl_check_X509_EXTENSION_compfunc_type(cmp), (n)))
|
| 240 |
+
#define sk_X509_EXTENSION_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_EXTENSION_sk_type(sk), (n))
|
| 241 |
+
#define sk_X509_EXTENSION_free(sk) OPENSSL_sk_free(ossl_check_X509_EXTENSION_sk_type(sk))
|
| 242 |
+
#define sk_X509_EXTENSION_zero(sk) OPENSSL_sk_zero(ossl_check_X509_EXTENSION_sk_type(sk))
|
| 243 |
+
#define sk_X509_EXTENSION_delete(sk, i) ((X509_EXTENSION *)OPENSSL_sk_delete(ossl_check_X509_EXTENSION_sk_type(sk), (i)))
|
| 244 |
+
#define sk_X509_EXTENSION_delete_ptr(sk, ptr) ((X509_EXTENSION *)OPENSSL_sk_delete_ptr(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr)))
|
| 245 |
+
#define sk_X509_EXTENSION_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr))
|
| 246 |
+
#define sk_X509_EXTENSION_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr))
|
| 247 |
+
#define sk_X509_EXTENSION_pop(sk) ((X509_EXTENSION *)OPENSSL_sk_pop(ossl_check_X509_EXTENSION_sk_type(sk)))
|
| 248 |
+
#define sk_X509_EXTENSION_shift(sk) ((X509_EXTENSION *)OPENSSL_sk_shift(ossl_check_X509_EXTENSION_sk_type(sk)))
|
| 249 |
+
#define sk_X509_EXTENSION_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_EXTENSION_sk_type(sk),ossl_check_X509_EXTENSION_freefunc_type(freefunc))
|
| 250 |
+
#define sk_X509_EXTENSION_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr), (idx))
|
| 251 |
+
#define sk_X509_EXTENSION_set(sk, idx, ptr) ((X509_EXTENSION *)OPENSSL_sk_set(ossl_check_X509_EXTENSION_sk_type(sk), (idx), ossl_check_X509_EXTENSION_type(ptr)))
|
| 252 |
+
#define sk_X509_EXTENSION_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr))
|
| 253 |
+
#define sk_X509_EXTENSION_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr))
|
| 254 |
+
#define sk_X509_EXTENSION_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_type(ptr), pnum)
|
| 255 |
+
#define sk_X509_EXTENSION_sort(sk) OPENSSL_sk_sort(ossl_check_X509_EXTENSION_sk_type(sk))
|
| 256 |
+
#define sk_X509_EXTENSION_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_EXTENSION_sk_type(sk))
|
| 257 |
+
#define sk_X509_EXTENSION_dup(sk) ((STACK_OF(X509_EXTENSION) *)OPENSSL_sk_dup(ossl_check_const_X509_EXTENSION_sk_type(sk)))
|
| 258 |
+
#define sk_X509_EXTENSION_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_EXTENSION) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_copyfunc_type(copyfunc), ossl_check_X509_EXTENSION_freefunc_type(freefunc)))
|
| 259 |
+
#define sk_X509_EXTENSION_set_cmp_func(sk, cmp) ((sk_X509_EXTENSION_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_compfunc_type(cmp)))
|
| 260 |
+
|
| 261 |
+
typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;
|
| 262 |
+
typedef struct x509_attributes_st X509_ATTRIBUTE;
|
| 263 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_ATTRIBUTE, X509_ATTRIBUTE, X509_ATTRIBUTE)
|
| 264 |
+
#define sk_X509_ATTRIBUTE_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ATTRIBUTE_sk_type(sk))
|
| 265 |
+
#define sk_X509_ATTRIBUTE_value(sk, idx) ((X509_ATTRIBUTE *)OPENSSL_sk_value(ossl_check_const_X509_ATTRIBUTE_sk_type(sk), (idx)))
|
| 266 |
+
#define sk_X509_ATTRIBUTE_new(cmp) ((STACK_OF(X509_ATTRIBUTE) *)OPENSSL_sk_new(ossl_check_X509_ATTRIBUTE_compfunc_type(cmp)))
|
| 267 |
+
#define sk_X509_ATTRIBUTE_new_null() ((STACK_OF(X509_ATTRIBUTE) *)OPENSSL_sk_new_null())
|
| 268 |
+
#define sk_X509_ATTRIBUTE_new_reserve(cmp, n) ((STACK_OF(X509_ATTRIBUTE) *)OPENSSL_sk_new_reserve(ossl_check_X509_ATTRIBUTE_compfunc_type(cmp), (n)))
|
| 269 |
+
#define sk_X509_ATTRIBUTE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ATTRIBUTE_sk_type(sk), (n))
|
| 270 |
+
#define sk_X509_ATTRIBUTE_free(sk) OPENSSL_sk_free(ossl_check_X509_ATTRIBUTE_sk_type(sk))
|
| 271 |
+
#define sk_X509_ATTRIBUTE_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ATTRIBUTE_sk_type(sk))
|
| 272 |
+
#define sk_X509_ATTRIBUTE_delete(sk, i) ((X509_ATTRIBUTE *)OPENSSL_sk_delete(ossl_check_X509_ATTRIBUTE_sk_type(sk), (i)))
|
| 273 |
+
#define sk_X509_ATTRIBUTE_delete_ptr(sk, ptr) ((X509_ATTRIBUTE *)OPENSSL_sk_delete_ptr(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr)))
|
| 274 |
+
#define sk_X509_ATTRIBUTE_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr))
|
| 275 |
+
#define sk_X509_ATTRIBUTE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr))
|
| 276 |
+
#define sk_X509_ATTRIBUTE_pop(sk) ((X509_ATTRIBUTE *)OPENSSL_sk_pop(ossl_check_X509_ATTRIBUTE_sk_type(sk)))
|
| 277 |
+
#define sk_X509_ATTRIBUTE_shift(sk) ((X509_ATTRIBUTE *)OPENSSL_sk_shift(ossl_check_X509_ATTRIBUTE_sk_type(sk)))
|
| 278 |
+
#define sk_X509_ATTRIBUTE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ATTRIBUTE_sk_type(sk),ossl_check_X509_ATTRIBUTE_freefunc_type(freefunc))
|
| 279 |
+
#define sk_X509_ATTRIBUTE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr), (idx))
|
| 280 |
+
#define sk_X509_ATTRIBUTE_set(sk, idx, ptr) ((X509_ATTRIBUTE *)OPENSSL_sk_set(ossl_check_X509_ATTRIBUTE_sk_type(sk), (idx), ossl_check_X509_ATTRIBUTE_type(ptr)))
|
| 281 |
+
#define sk_X509_ATTRIBUTE_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr))
|
| 282 |
+
#define sk_X509_ATTRIBUTE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr))
|
| 283 |
+
#define sk_X509_ATTRIBUTE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_type(ptr), pnum)
|
| 284 |
+
#define sk_X509_ATTRIBUTE_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ATTRIBUTE_sk_type(sk))
|
| 285 |
+
#define sk_X509_ATTRIBUTE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ATTRIBUTE_sk_type(sk))
|
| 286 |
+
#define sk_X509_ATTRIBUTE_dup(sk) ((STACK_OF(X509_ATTRIBUTE) *)OPENSSL_sk_dup(ossl_check_const_X509_ATTRIBUTE_sk_type(sk)))
|
| 287 |
+
#define sk_X509_ATTRIBUTE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ATTRIBUTE) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_copyfunc_type(copyfunc), ossl_check_X509_ATTRIBUTE_freefunc_type(freefunc)))
|
| 288 |
+
#define sk_X509_ATTRIBUTE_set_cmp_func(sk, cmp) ((sk_X509_ATTRIBUTE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_compfunc_type(cmp)))
|
| 289 |
+
|
| 290 |
+
typedef struct X509_req_info_st X509_REQ_INFO;
|
| 291 |
+
typedef struct X509_req_st X509_REQ;
|
| 292 |
+
typedef struct x509_cert_aux_st X509_CERT_AUX;
|
| 293 |
+
typedef struct x509_cinf_st X509_CINF;
|
| 294 |
+
|
| 295 |
+
/* Flags for X509_print_ex() */
|
| 296 |
+
|
| 297 |
+
# define X509_FLAG_COMPAT 0
|
| 298 |
+
# define X509_FLAG_NO_HEADER 1L
|
| 299 |
+
# define X509_FLAG_NO_VERSION (1L << 1)
|
| 300 |
+
# define X509_FLAG_NO_SERIAL (1L << 2)
|
| 301 |
+
# define X509_FLAG_NO_SIGNAME (1L << 3)
|
| 302 |
+
# define X509_FLAG_NO_ISSUER (1L << 4)
|
| 303 |
+
# define X509_FLAG_NO_VALIDITY (1L << 5)
|
| 304 |
+
# define X509_FLAG_NO_SUBJECT (1L << 6)
|
| 305 |
+
# define X509_FLAG_NO_PUBKEY (1L << 7)
|
| 306 |
+
# define X509_FLAG_NO_EXTENSIONS (1L << 8)
|
| 307 |
+
# define X509_FLAG_NO_SIGDUMP (1L << 9)
|
| 308 |
+
# define X509_FLAG_NO_AUX (1L << 10)
|
| 309 |
+
# define X509_FLAG_NO_ATTRIBUTES (1L << 11)
|
| 310 |
+
# define X509_FLAG_NO_IDS (1L << 12)
|
| 311 |
+
# define X509_FLAG_EXTENSIONS_ONLY_KID (1L << 13)
|
| 312 |
+
|
| 313 |
+
/* Flags specific to X509_NAME_print_ex() */
|
| 314 |
+
|
| 315 |
+
/* The field separator information */
|
| 316 |
+
|
| 317 |
+
# define XN_FLAG_SEP_MASK (0xf << 16)
|
| 318 |
+
|
| 319 |
+
# define XN_FLAG_COMPAT 0/* Traditional; use old X509_NAME_print */
|
| 320 |
+
# define XN_FLAG_SEP_COMMA_PLUS (1 << 16)/* RFC2253 ,+ */
|
| 321 |
+
# define XN_FLAG_SEP_CPLUS_SPC (2 << 16)/* ,+ spaced: more readable */
|
| 322 |
+
# define XN_FLAG_SEP_SPLUS_SPC (3 << 16)/* ;+ spaced */
|
| 323 |
+
# define XN_FLAG_SEP_MULTILINE (4 << 16)/* One line per field */
|
| 324 |
+
|
| 325 |
+
# define XN_FLAG_DN_REV (1 << 20)/* Reverse DN order */
|
| 326 |
+
|
| 327 |
+
/* How the field name is shown */
|
| 328 |
+
|
| 329 |
+
# define XN_FLAG_FN_MASK (0x3 << 21)
|
| 330 |
+
|
| 331 |
+
# define XN_FLAG_FN_SN 0/* Object short name */
|
| 332 |
+
# define XN_FLAG_FN_LN (1 << 21)/* Object long name */
|
| 333 |
+
# define XN_FLAG_FN_OID (2 << 21)/* Always use OIDs */
|
| 334 |
+
# define XN_FLAG_FN_NONE (3 << 21)/* No field names */
|
| 335 |
+
|
| 336 |
+
# define XN_FLAG_SPC_EQ (1 << 23)/* Put spaces round '=' */
|
| 337 |
+
|
| 338 |
+
/*
|
| 339 |
+
* This determines if we dump fields we don't recognise: RFC2253 requires
|
| 340 |
+
* this.
|
| 341 |
+
*/
|
| 342 |
+
|
| 343 |
+
# define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24)
|
| 344 |
+
|
| 345 |
+
# define XN_FLAG_FN_ALIGN (1 << 25)/* Align field names to 20
|
| 346 |
+
* characters */
|
| 347 |
+
|
| 348 |
+
/* Complete set of RFC2253 flags */
|
| 349 |
+
|
| 350 |
+
# define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \
|
| 351 |
+
XN_FLAG_SEP_COMMA_PLUS | \
|
| 352 |
+
XN_FLAG_DN_REV | \
|
| 353 |
+
XN_FLAG_FN_SN | \
|
| 354 |
+
XN_FLAG_DUMP_UNKNOWN_FIELDS)
|
| 355 |
+
|
| 356 |
+
/* readable oneline form */
|
| 357 |
+
|
| 358 |
+
# define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \
|
| 359 |
+
ASN1_STRFLGS_ESC_QUOTE | \
|
| 360 |
+
XN_FLAG_SEP_CPLUS_SPC | \
|
| 361 |
+
XN_FLAG_SPC_EQ | \
|
| 362 |
+
XN_FLAG_FN_SN)
|
| 363 |
+
|
| 364 |
+
/* readable multiline form */
|
| 365 |
+
|
| 366 |
+
# define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \
|
| 367 |
+
ASN1_STRFLGS_ESC_MSB | \
|
| 368 |
+
XN_FLAG_SEP_MULTILINE | \
|
| 369 |
+
XN_FLAG_SPC_EQ | \
|
| 370 |
+
XN_FLAG_FN_LN | \
|
| 371 |
+
XN_FLAG_FN_ALIGN)
|
| 372 |
+
|
| 373 |
+
typedef struct X509_crl_info_st X509_CRL_INFO;
|
| 374 |
+
|
| 375 |
+
typedef struct private_key_st {
|
| 376 |
+
int version;
|
| 377 |
+
/* The PKCS#8 data types */
|
| 378 |
+
X509_ALGOR *enc_algor;
|
| 379 |
+
ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
|
| 380 |
+
/* When decrypted, the following will not be NULL */
|
| 381 |
+
EVP_PKEY *dec_pkey;
|
| 382 |
+
/* used to encrypt and decrypt */
|
| 383 |
+
int key_length;
|
| 384 |
+
char *key_data;
|
| 385 |
+
int key_free; /* true if we should auto free key_data */
|
| 386 |
+
/* expanded version of 'enc_algor' */
|
| 387 |
+
EVP_CIPHER_INFO cipher;
|
| 388 |
+
} X509_PKEY;
|
| 389 |
+
|
| 390 |
+
typedef struct X509_info_st {
|
| 391 |
+
X509 *x509;
|
| 392 |
+
X509_CRL *crl;
|
| 393 |
+
X509_PKEY *x_pkey;
|
| 394 |
+
EVP_CIPHER_INFO enc_cipher;
|
| 395 |
+
int enc_len;
|
| 396 |
+
char *enc_data;
|
| 397 |
+
} X509_INFO;
|
| 398 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_INFO, X509_INFO, X509_INFO)
|
| 399 |
+
#define sk_X509_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_X509_INFO_sk_type(sk))
|
| 400 |
+
#define sk_X509_INFO_value(sk, idx) ((X509_INFO *)OPENSSL_sk_value(ossl_check_const_X509_INFO_sk_type(sk), (idx)))
|
| 401 |
+
#define sk_X509_INFO_new(cmp) ((STACK_OF(X509_INFO) *)OPENSSL_sk_new(ossl_check_X509_INFO_compfunc_type(cmp)))
|
| 402 |
+
#define sk_X509_INFO_new_null() ((STACK_OF(X509_INFO) *)OPENSSL_sk_new_null())
|
| 403 |
+
#define sk_X509_INFO_new_reserve(cmp, n) ((STACK_OF(X509_INFO) *)OPENSSL_sk_new_reserve(ossl_check_X509_INFO_compfunc_type(cmp), (n)))
|
| 404 |
+
#define sk_X509_INFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_INFO_sk_type(sk), (n))
|
| 405 |
+
#define sk_X509_INFO_free(sk) OPENSSL_sk_free(ossl_check_X509_INFO_sk_type(sk))
|
| 406 |
+
#define sk_X509_INFO_zero(sk) OPENSSL_sk_zero(ossl_check_X509_INFO_sk_type(sk))
|
| 407 |
+
#define sk_X509_INFO_delete(sk, i) ((X509_INFO *)OPENSSL_sk_delete(ossl_check_X509_INFO_sk_type(sk), (i)))
|
| 408 |
+
#define sk_X509_INFO_delete_ptr(sk, ptr) ((X509_INFO *)OPENSSL_sk_delete_ptr(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr)))
|
| 409 |
+
#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
|
| 410 |
+
#define sk_X509_INFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
|
| 411 |
+
#define sk_X509_INFO_pop(sk) ((X509_INFO *)OPENSSL_sk_pop(ossl_check_X509_INFO_sk_type(sk)))
|
| 412 |
+
#define sk_X509_INFO_shift(sk) ((X509_INFO *)OPENSSL_sk_shift(ossl_check_X509_INFO_sk_type(sk)))
|
| 413 |
+
#define sk_X509_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_INFO_sk_type(sk),ossl_check_X509_INFO_freefunc_type(freefunc))
|
| 414 |
+
#define sk_X509_INFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr), (idx))
|
| 415 |
+
#define sk_X509_INFO_set(sk, idx, ptr) ((X509_INFO *)OPENSSL_sk_set(ossl_check_X509_INFO_sk_type(sk), (idx), ossl_check_X509_INFO_type(ptr)))
|
| 416 |
+
#define sk_X509_INFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
|
| 417 |
+
#define sk_X509_INFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
|
| 418 |
+
#define sk_X509_INFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr), pnum)
|
| 419 |
+
#define sk_X509_INFO_sort(sk) OPENSSL_sk_sort(ossl_check_X509_INFO_sk_type(sk))
|
| 420 |
+
#define sk_X509_INFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_INFO_sk_type(sk))
|
| 421 |
+
#define sk_X509_INFO_dup(sk) ((STACK_OF(X509_INFO) *)OPENSSL_sk_dup(ossl_check_const_X509_INFO_sk_type(sk)))
|
| 422 |
+
#define sk_X509_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_INFO_sk_type(sk), ossl_check_X509_INFO_copyfunc_type(copyfunc), ossl_check_X509_INFO_freefunc_type(freefunc)))
|
| 423 |
+
#define sk_X509_INFO_set_cmp_func(sk, cmp) ((sk_X509_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_compfunc_type(cmp)))
|
| 424 |
+
|
| 425 |
+
|
| 426 |
+
/*
|
| 427 |
+
* The next 2 structures and their 8 routines are used to manipulate Netscape's
|
| 428 |
+
* spki structures - useful if you are writing a CA web page
|
| 429 |
+
*/
|
| 430 |
+
typedef struct Netscape_spkac_st {
|
| 431 |
+
X509_PUBKEY *pubkey;
|
| 432 |
+
ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
|
| 433 |
+
} NETSCAPE_SPKAC;
|
| 434 |
+
|
| 435 |
+
typedef struct Netscape_spki_st {
|
| 436 |
+
NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
|
| 437 |
+
X509_ALGOR sig_algor;
|
| 438 |
+
ASN1_BIT_STRING *signature;
|
| 439 |
+
} NETSCAPE_SPKI;
|
| 440 |
+
|
| 441 |
+
/* Netscape certificate sequence structure */
|
| 442 |
+
typedef struct Netscape_certificate_sequence {
|
| 443 |
+
ASN1_OBJECT *type;
|
| 444 |
+
STACK_OF(X509) *certs;
|
| 445 |
+
} NETSCAPE_CERT_SEQUENCE;
|
| 446 |
+
|
| 447 |
+
/*- Unused (and iv length is wrong)
|
| 448 |
+
typedef struct CBCParameter_st
|
| 449 |
+
{
|
| 450 |
+
unsigned char iv[8];
|
| 451 |
+
} CBC_PARAM;
|
| 452 |
+
*/
|
| 453 |
+
|
| 454 |
+
/* Password based encryption structure */
|
| 455 |
+
|
| 456 |
+
typedef struct PBEPARAM_st {
|
| 457 |
+
ASN1_OCTET_STRING *salt;
|
| 458 |
+
ASN1_INTEGER *iter;
|
| 459 |
+
} PBEPARAM;
|
| 460 |
+
|
| 461 |
+
/* Password based encryption V2 structures */
|
| 462 |
+
|
| 463 |
+
typedef struct PBE2PARAM_st {
|
| 464 |
+
X509_ALGOR *keyfunc;
|
| 465 |
+
X509_ALGOR *encryption;
|
| 466 |
+
} PBE2PARAM;
|
| 467 |
+
|
| 468 |
+
typedef struct PBKDF2PARAM_st {
|
| 469 |
+
/* Usually OCTET STRING but could be anything */
|
| 470 |
+
ASN1_TYPE *salt;
|
| 471 |
+
ASN1_INTEGER *iter;
|
| 472 |
+
ASN1_INTEGER *keylength;
|
| 473 |
+
X509_ALGOR *prf;
|
| 474 |
+
} PBKDF2PARAM;
|
| 475 |
+
|
| 476 |
+
typedef struct {
|
| 477 |
+
X509_ALGOR *keyDerivationFunc;
|
| 478 |
+
X509_ALGOR *messageAuthScheme;
|
| 479 |
+
} PBMAC1PARAM;
|
| 480 |
+
|
| 481 |
+
# ifndef OPENSSL_NO_SCRYPT
|
| 482 |
+
typedef struct SCRYPT_PARAMS_st {
|
| 483 |
+
ASN1_OCTET_STRING *salt;
|
| 484 |
+
ASN1_INTEGER *costParameter;
|
| 485 |
+
ASN1_INTEGER *blockSize;
|
| 486 |
+
ASN1_INTEGER *parallelizationParameter;
|
| 487 |
+
ASN1_INTEGER *keyLength;
|
| 488 |
+
} SCRYPT_PARAMS;
|
| 489 |
+
# endif
|
| 490 |
+
|
| 491 |
+
#ifdef __cplusplus
|
| 492 |
+
}
|
| 493 |
+
#endif
|
| 494 |
+
|
| 495 |
+
# include <openssl/x509_vfy.h>
|
| 496 |
+
# include <openssl/pkcs7.h>
|
| 497 |
+
|
| 498 |
+
#ifdef __cplusplus
|
| 499 |
+
extern "C" {
|
| 500 |
+
#endif
|
| 501 |
+
|
| 502 |
+
# define X509_EXT_PACK_UNKNOWN 1
|
| 503 |
+
# define X509_EXT_PACK_STRING 2
|
| 504 |
+
|
| 505 |
+
# define X509_extract_key(x) X509_get_pubkey(x)/*****/
|
| 506 |
+
# define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a)
|
| 507 |
+
# define X509_name_cmp(a,b) X509_NAME_cmp((a),(b))
|
| 508 |
+
|
| 509 |
+
void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
|
| 510 |
+
X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
|
| 511 |
+
int (*crl_free) (X509_CRL *crl),
|
| 512 |
+
int (*crl_lookup) (X509_CRL *crl,
|
| 513 |
+
X509_REVOKED **ret,
|
| 514 |
+
const
|
| 515 |
+
ASN1_INTEGER *serial,
|
| 516 |
+
const
|
| 517 |
+
X509_NAME *issuer),
|
| 518 |
+
int (*crl_verify) (X509_CRL *crl,
|
| 519 |
+
EVP_PKEY *pk));
|
| 520 |
+
void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
|
| 521 |
+
|
| 522 |
+
void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
|
| 523 |
+
void *X509_CRL_get_meth_data(X509_CRL *crl);
|
| 524 |
+
|
| 525 |
+
const char *X509_verify_cert_error_string(long n);
|
| 526 |
+
|
| 527 |
+
int X509_verify(X509 *a, EVP_PKEY *r);
|
| 528 |
+
int X509_self_signed(X509 *cert, int verify_signature);
|
| 529 |
+
|
| 530 |
+
int X509_REQ_verify_ex(X509_REQ *a, EVP_PKEY *r, OSSL_LIB_CTX *libctx,
|
| 531 |
+
const char *propq);
|
| 532 |
+
int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
|
| 533 |
+
int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
|
| 534 |
+
int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
|
| 535 |
+
|
| 536 |
+
NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
|
| 537 |
+
char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
|
| 538 |
+
EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
|
| 539 |
+
int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
|
| 540 |
+
|
| 541 |
+
int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
|
| 542 |
+
|
| 543 |
+
int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
|
| 544 |
+
int X509_signature_print(BIO *bp, const X509_ALGOR *alg,
|
| 545 |
+
const ASN1_STRING *sig);
|
| 546 |
+
|
| 547 |
+
int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
|
| 548 |
+
int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
|
| 549 |
+
int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
|
| 550 |
+
int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
|
| 551 |
+
int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
|
| 552 |
+
int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
|
| 553 |
+
int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
|
| 554 |
+
|
| 555 |
+
int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
|
| 556 |
+
unsigned char *md, unsigned int *len);
|
| 557 |
+
int X509_digest(const X509 *data, const EVP_MD *type,
|
| 558 |
+
unsigned char *md, unsigned int *len);
|
| 559 |
+
ASN1_OCTET_STRING *X509_digest_sig(const X509 *cert,
|
| 560 |
+
EVP_MD **md_used, int *md_is_fallback);
|
| 561 |
+
int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
|
| 562 |
+
unsigned char *md, unsigned int *len);
|
| 563 |
+
int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
|
| 564 |
+
unsigned char *md, unsigned int *len);
|
| 565 |
+
int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
|
| 566 |
+
unsigned char *md, unsigned int *len);
|
| 567 |
+
|
| 568 |
+
X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
|
| 569 |
+
X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
|
| 570 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 571 |
+
# include <openssl/http.h> /* OSSL_HTTP_REQ_CTX_nbio_d2i */
|
| 572 |
+
# define X509_http_nbio(rctx, pcert) \
|
| 573 |
+
OSSL_HTTP_REQ_CTX_nbio_d2i(rctx, pcert, ASN1_ITEM_rptr(X509))
|
| 574 |
+
# define X509_CRL_http_nbio(rctx, pcrl) \
|
| 575 |
+
OSSL_HTTP_REQ_CTX_nbio_d2i(rctx, pcrl, ASN1_ITEM_rptr(X509_CRL))
|
| 576 |
+
# endif
|
| 577 |
+
|
| 578 |
+
# ifndef OPENSSL_NO_STDIO
|
| 579 |
+
X509 *d2i_X509_fp(FILE *fp, X509 **x509);
|
| 580 |
+
int i2d_X509_fp(FILE *fp, const X509 *x509);
|
| 581 |
+
X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
|
| 582 |
+
int i2d_X509_CRL_fp(FILE *fp, const X509_CRL *crl);
|
| 583 |
+
X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
|
| 584 |
+
int i2d_X509_REQ_fp(FILE *fp, const X509_REQ *req);
|
| 585 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 586 |
+
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
|
| 587 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPrivateKey_fp(FILE *fp, const RSA *rsa);
|
| 588 |
+
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
|
| 589 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPublicKey_fp(FILE *fp, const RSA *rsa);
|
| 590 |
+
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
|
| 591 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_RSA_PUBKEY_fp(FILE *fp, const RSA *rsa);
|
| 592 |
+
# endif
|
| 593 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 594 |
+
# ifndef OPENSSL_NO_DSA
|
| 595 |
+
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
|
| 596 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_DSA_PUBKEY_fp(FILE *fp, const DSA *dsa);
|
| 597 |
+
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
|
| 598 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_DSAPrivateKey_fp(FILE *fp, const DSA *dsa);
|
| 599 |
+
# endif
|
| 600 |
+
# endif
|
| 601 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 602 |
+
# ifndef OPENSSL_NO_EC
|
| 603 |
+
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
|
| 604 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_EC_PUBKEY_fp(FILE *fp, const EC_KEY *eckey);
|
| 605 |
+
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
|
| 606 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_ECPrivateKey_fp(FILE *fp, const EC_KEY *eckey);
|
| 607 |
+
# endif /* OPENSSL_NO_EC */
|
| 608 |
+
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 609 |
+
X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
|
| 610 |
+
int i2d_PKCS8_fp(FILE *fp, const X509_SIG *p8);
|
| 611 |
+
X509_PUBKEY *d2i_X509_PUBKEY_fp(FILE *fp, X509_PUBKEY **xpk);
|
| 612 |
+
int i2d_X509_PUBKEY_fp(FILE *fp, const X509_PUBKEY *xpk);
|
| 613 |
+
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
|
| 614 |
+
PKCS8_PRIV_KEY_INFO **p8inf);
|
| 615 |
+
int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, const PKCS8_PRIV_KEY_INFO *p8inf);
|
| 616 |
+
int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, const EVP_PKEY *key);
|
| 617 |
+
int i2d_PrivateKey_fp(FILE *fp, const EVP_PKEY *pkey);
|
| 618 |
+
EVP_PKEY *d2i_PrivateKey_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
|
| 619 |
+
const char *propq);
|
| 620 |
+
EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
|
| 621 |
+
int i2d_PUBKEY_fp(FILE *fp, const EVP_PKEY *pkey);
|
| 622 |
+
EVP_PKEY *d2i_PUBKEY_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
|
| 623 |
+
const char *propq);
|
| 624 |
+
EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
|
| 625 |
+
# endif
|
| 626 |
+
|
| 627 |
+
X509 *d2i_X509_bio(BIO *bp, X509 **x509);
|
| 628 |
+
int i2d_X509_bio(BIO *bp, const X509 *x509);
|
| 629 |
+
X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
|
| 630 |
+
int i2d_X509_CRL_bio(BIO *bp, const X509_CRL *crl);
|
| 631 |
+
X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
|
| 632 |
+
int i2d_X509_REQ_bio(BIO *bp, const X509_REQ *req);
|
| 633 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 634 |
+
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
|
| 635 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPrivateKey_bio(BIO *bp, const RSA *rsa);
|
| 636 |
+
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
|
| 637 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_RSAPublicKey_bio(BIO *bp, const RSA *rsa);
|
| 638 |
+
OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
|
| 639 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_RSA_PUBKEY_bio(BIO *bp, const RSA *rsa);
|
| 640 |
+
# endif
|
| 641 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 642 |
+
# ifndef OPENSSL_NO_DSA
|
| 643 |
+
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
|
| 644 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_DSA_PUBKEY_bio(BIO *bp, const DSA *dsa);
|
| 645 |
+
OSSL_DEPRECATEDIN_3_0 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
|
| 646 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_DSAPrivateKey_bio(BIO *bp, const DSA *dsa);
|
| 647 |
+
# endif
|
| 648 |
+
# endif
|
| 649 |
+
|
| 650 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 651 |
+
# ifndef OPENSSL_NO_EC
|
| 652 |
+
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
|
| 653 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_EC_PUBKEY_bio(BIO *bp, const EC_KEY *eckey);
|
| 654 |
+
OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
|
| 655 |
+
OSSL_DEPRECATEDIN_3_0 int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey);
|
| 656 |
+
# endif /* OPENSSL_NO_EC */
|
| 657 |
+
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 658 |
+
|
| 659 |
+
X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
|
| 660 |
+
int i2d_PKCS8_bio(BIO *bp, const X509_SIG *p8);
|
| 661 |
+
X509_PUBKEY *d2i_X509_PUBKEY_bio(BIO *bp, X509_PUBKEY **xpk);
|
| 662 |
+
int i2d_X509_PUBKEY_bio(BIO *bp, const X509_PUBKEY *xpk);
|
| 663 |
+
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
|
| 664 |
+
PKCS8_PRIV_KEY_INFO **p8inf);
|
| 665 |
+
int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, const PKCS8_PRIV_KEY_INFO *p8inf);
|
| 666 |
+
int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, const EVP_PKEY *key);
|
| 667 |
+
int i2d_PrivateKey_bio(BIO *bp, const EVP_PKEY *pkey);
|
| 668 |
+
EVP_PKEY *d2i_PrivateKey_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
|
| 669 |
+
const char *propq);
|
| 670 |
+
EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
|
| 671 |
+
int i2d_PUBKEY_bio(BIO *bp, const EVP_PKEY *pkey);
|
| 672 |
+
EVP_PKEY *d2i_PUBKEY_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
|
| 673 |
+
const char *propq);
|
| 674 |
+
EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
|
| 675 |
+
|
| 676 |
+
DECLARE_ASN1_DUP_FUNCTION(X509)
|
| 677 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_ALGOR)
|
| 678 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_ATTRIBUTE)
|
| 679 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_CRL)
|
| 680 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_EXTENSION)
|
| 681 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_PUBKEY)
|
| 682 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_REQ)
|
| 683 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_REVOKED)
|
| 684 |
+
int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
|
| 685 |
+
void *pval);
|
| 686 |
+
void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype,
|
| 687 |
+
const void **ppval, const X509_ALGOR *algor);
|
| 688 |
+
void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
|
| 689 |
+
int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
|
| 690 |
+
int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src);
|
| 691 |
+
|
| 692 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_NAME)
|
| 693 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_NAME_ENTRY)
|
| 694 |
+
|
| 695 |
+
int X509_cmp_time(const ASN1_TIME *s, time_t *t);
|
| 696 |
+
int X509_cmp_current_time(const ASN1_TIME *s);
|
| 697 |
+
int X509_cmp_timeframe(const X509_VERIFY_PARAM *vpm,
|
| 698 |
+
const ASN1_TIME *start, const ASN1_TIME *end);
|
| 699 |
+
ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
|
| 700 |
+
ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
|
| 701 |
+
int offset_day, long offset_sec, time_t *t);
|
| 702 |
+
ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
|
| 703 |
+
|
| 704 |
+
const char *X509_get_default_cert_area(void);
|
| 705 |
+
const char *X509_get_default_cert_dir(void);
|
| 706 |
+
const char *X509_get_default_cert_file(void);
|
| 707 |
+
const char *X509_get_default_cert_dir_env(void);
|
| 708 |
+
const char *X509_get_default_cert_file_env(void);
|
| 709 |
+
const char *X509_get_default_private_dir(void);
|
| 710 |
+
|
| 711 |
+
X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
|
| 712 |
+
X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
|
| 713 |
+
|
| 714 |
+
DECLARE_ASN1_FUNCTIONS(X509_ALGOR)
|
| 715 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS)
|
| 716 |
+
DECLARE_ASN1_FUNCTIONS(X509_VAL)
|
| 717 |
+
|
| 718 |
+
DECLARE_ASN1_FUNCTIONS(X509_PUBKEY)
|
| 719 |
+
|
| 720 |
+
X509_PUBKEY *X509_PUBKEY_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 721 |
+
int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
|
| 722 |
+
EVP_PKEY *X509_PUBKEY_get0(const X509_PUBKEY *key);
|
| 723 |
+
EVP_PKEY *X509_PUBKEY_get(const X509_PUBKEY *key);
|
| 724 |
+
int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain);
|
| 725 |
+
long X509_get_pathlen(X509 *x);
|
| 726 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(EVP_PKEY, PUBKEY)
|
| 727 |
+
EVP_PKEY *d2i_PUBKEY_ex(EVP_PKEY **a, const unsigned char **pp, long length,
|
| 728 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 729 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 730 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,RSA, RSA_PUBKEY)
|
| 731 |
+
# endif
|
| 732 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 733 |
+
# ifndef OPENSSL_NO_DSA
|
| 734 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,DSA, DSA_PUBKEY)
|
| 735 |
+
# endif
|
| 736 |
+
# endif
|
| 737 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 738 |
+
# ifndef OPENSSL_NO_EC
|
| 739 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, EC_KEY, EC_PUBKEY)
|
| 740 |
+
# endif
|
| 741 |
+
# endif
|
| 742 |
+
|
| 743 |
+
DECLARE_ASN1_FUNCTIONS(X509_SIG)
|
| 744 |
+
void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg,
|
| 745 |
+
const ASN1_OCTET_STRING **pdigest);
|
| 746 |
+
void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg,
|
| 747 |
+
ASN1_OCTET_STRING **pdigest);
|
| 748 |
+
|
| 749 |
+
DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO)
|
| 750 |
+
DECLARE_ASN1_FUNCTIONS(X509_REQ)
|
| 751 |
+
X509_REQ *X509_REQ_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 752 |
+
|
| 753 |
+
DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE)
|
| 754 |
+
X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
|
| 755 |
+
|
| 756 |
+
DECLARE_ASN1_FUNCTIONS(X509_EXTENSION)
|
| 757 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS)
|
| 758 |
+
|
| 759 |
+
DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY)
|
| 760 |
+
|
| 761 |
+
DECLARE_ASN1_FUNCTIONS(X509_NAME)
|
| 762 |
+
|
| 763 |
+
int X509_NAME_set(X509_NAME **xn, const X509_NAME *name);
|
| 764 |
+
|
| 765 |
+
DECLARE_ASN1_FUNCTIONS(X509_CINF)
|
| 766 |
+
DECLARE_ASN1_FUNCTIONS(X509)
|
| 767 |
+
X509 *X509_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 768 |
+
DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
|
| 769 |
+
|
| 770 |
+
#define X509_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 771 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509, l, p, newf, dupf, freef)
|
| 772 |
+
int X509_set_ex_data(X509 *r, int idx, void *arg);
|
| 773 |
+
void *X509_get_ex_data(const X509 *r, int idx);
|
| 774 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(X509,X509_AUX)
|
| 775 |
+
|
| 776 |
+
int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
|
| 777 |
+
|
| 778 |
+
int X509_SIG_INFO_get(const X509_SIG_INFO *siginf, int *mdnid, int *pknid,
|
| 779 |
+
int *secbits, uint32_t *flags);
|
| 780 |
+
void X509_SIG_INFO_set(X509_SIG_INFO *siginf, int mdnid, int pknid,
|
| 781 |
+
int secbits, uint32_t flags);
|
| 782 |
+
|
| 783 |
+
int X509_get_signature_info(X509 *x, int *mdnid, int *pknid, int *secbits,
|
| 784 |
+
uint32_t *flags);
|
| 785 |
+
|
| 786 |
+
void X509_get0_signature(const ASN1_BIT_STRING **psig,
|
| 787 |
+
const X509_ALGOR **palg, const X509 *x);
|
| 788 |
+
int X509_get_signature_nid(const X509 *x);
|
| 789 |
+
|
| 790 |
+
void X509_set0_distinguishing_id(X509 *x, ASN1_OCTET_STRING *d_id);
|
| 791 |
+
ASN1_OCTET_STRING *X509_get0_distinguishing_id(X509 *x);
|
| 792 |
+
void X509_REQ_set0_distinguishing_id(X509_REQ *x, ASN1_OCTET_STRING *d_id);
|
| 793 |
+
ASN1_OCTET_STRING *X509_REQ_get0_distinguishing_id(X509_REQ *x);
|
| 794 |
+
|
| 795 |
+
int X509_alias_set1(X509 *x, const unsigned char *name, int len);
|
| 796 |
+
int X509_keyid_set1(X509 *x, const unsigned char *id, int len);
|
| 797 |
+
unsigned char *X509_alias_get0(X509 *x, int *len);
|
| 798 |
+
unsigned char *X509_keyid_get0(X509 *x, int *len);
|
| 799 |
+
|
| 800 |
+
DECLARE_ASN1_FUNCTIONS(X509_REVOKED)
|
| 801 |
+
DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO)
|
| 802 |
+
DECLARE_ASN1_FUNCTIONS(X509_CRL)
|
| 803 |
+
X509_CRL *X509_CRL_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 804 |
+
|
| 805 |
+
int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
|
| 806 |
+
int X509_CRL_get0_by_serial(X509_CRL *crl,
|
| 807 |
+
X509_REVOKED **ret, const ASN1_INTEGER *serial);
|
| 808 |
+
int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
|
| 809 |
+
|
| 810 |
+
X509_PKEY *X509_PKEY_new(void);
|
| 811 |
+
void X509_PKEY_free(X509_PKEY *a);
|
| 812 |
+
|
| 813 |
+
DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI)
|
| 814 |
+
DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC)
|
| 815 |
+
DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE)
|
| 816 |
+
|
| 817 |
+
X509_INFO *X509_INFO_new(void);
|
| 818 |
+
void X509_INFO_free(X509_INFO *a);
|
| 819 |
+
char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size);
|
| 820 |
+
|
| 821 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 822 |
+
OSSL_DEPRECATEDIN_3_0
|
| 823 |
+
int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
|
| 824 |
+
ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
|
| 825 |
+
OSSL_DEPRECATEDIN_3_0
|
| 826 |
+
int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
|
| 827 |
+
unsigned char *md, unsigned int *len);
|
| 828 |
+
OSSL_DEPRECATEDIN_3_0
|
| 829 |
+
int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
| 830 |
+
ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey,
|
| 831 |
+
const EVP_MD *type);
|
| 832 |
+
#endif
|
| 833 |
+
int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
|
| 834 |
+
unsigned char *md, unsigned int *len);
|
| 835 |
+
int ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 836 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 837 |
+
EVP_PKEY *pkey);
|
| 838 |
+
int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 839 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 840 |
+
EVP_MD_CTX *ctx);
|
| 841 |
+
int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
| 842 |
+
ASN1_BIT_STRING *signature, const void *data,
|
| 843 |
+
EVP_PKEY *pkey, const EVP_MD *md);
|
| 844 |
+
int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
|
| 845 |
+
X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
|
| 846 |
+
const void *data, EVP_MD_CTX *ctx);
|
| 847 |
+
|
| 848 |
+
#define X509_VERSION_1 0
|
| 849 |
+
#define X509_VERSION_2 1
|
| 850 |
+
#define X509_VERSION_3 2
|
| 851 |
+
|
| 852 |
+
long X509_get_version(const X509 *x);
|
| 853 |
+
int X509_set_version(X509 *x, long version);
|
| 854 |
+
int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
|
| 855 |
+
ASN1_INTEGER *X509_get_serialNumber(X509 *x);
|
| 856 |
+
const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x);
|
| 857 |
+
int X509_set_issuer_name(X509 *x, const X509_NAME *name);
|
| 858 |
+
X509_NAME *X509_get_issuer_name(const X509 *a);
|
| 859 |
+
int X509_set_subject_name(X509 *x, const X509_NAME *name);
|
| 860 |
+
X509_NAME *X509_get_subject_name(const X509 *a);
|
| 861 |
+
const ASN1_TIME * X509_get0_notBefore(const X509 *x);
|
| 862 |
+
ASN1_TIME *X509_getm_notBefore(const X509 *x);
|
| 863 |
+
int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);
|
| 864 |
+
const ASN1_TIME *X509_get0_notAfter(const X509 *x);
|
| 865 |
+
ASN1_TIME *X509_getm_notAfter(const X509 *x);
|
| 866 |
+
int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm);
|
| 867 |
+
int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
|
| 868 |
+
int X509_up_ref(X509 *x);
|
| 869 |
+
int X509_get_signature_type(const X509 *x);
|
| 870 |
+
|
| 871 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 872 |
+
# define X509_get_notBefore X509_getm_notBefore
|
| 873 |
+
# define X509_get_notAfter X509_getm_notAfter
|
| 874 |
+
# define X509_set_notBefore X509_set1_notBefore
|
| 875 |
+
# define X509_set_notAfter X509_set1_notAfter
|
| 876 |
+
#endif
|
| 877 |
+
|
| 878 |
+
|
| 879 |
+
/*
|
| 880 |
+
* This one is only used so that a binary form can output, as in
|
| 881 |
+
* i2d_X509_PUBKEY(X509_get_X509_PUBKEY(x), &buf)
|
| 882 |
+
*/
|
| 883 |
+
X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x);
|
| 884 |
+
const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x);
|
| 885 |
+
void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid,
|
| 886 |
+
const ASN1_BIT_STRING **psuid);
|
| 887 |
+
const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
|
| 888 |
+
|
| 889 |
+
EVP_PKEY *X509_get0_pubkey(const X509 *x);
|
| 890 |
+
EVP_PKEY *X509_get_pubkey(X509 *x);
|
| 891 |
+
ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
|
| 892 |
+
|
| 893 |
+
#define X509_REQ_VERSION_1 0
|
| 894 |
+
|
| 895 |
+
long X509_REQ_get_version(const X509_REQ *req);
|
| 896 |
+
int X509_REQ_set_version(X509_REQ *x, long version);
|
| 897 |
+
X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req);
|
| 898 |
+
int X509_REQ_set_subject_name(X509_REQ *req, const X509_NAME *name);
|
| 899 |
+
void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
|
| 900 |
+
const X509_ALGOR **palg);
|
| 901 |
+
void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig);
|
| 902 |
+
int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg);
|
| 903 |
+
int X509_REQ_get_signature_nid(const X509_REQ *req);
|
| 904 |
+
int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
|
| 905 |
+
int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
|
| 906 |
+
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
|
| 907 |
+
EVP_PKEY *X509_REQ_get0_pubkey(const X509_REQ *req);
|
| 908 |
+
X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req);
|
| 909 |
+
int X509_REQ_extension_nid(int nid);
|
| 910 |
+
int *X509_REQ_get_extension_nids(void);
|
| 911 |
+
void X509_REQ_set_extension_nids(int *nids);
|
| 912 |
+
STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(OSSL_FUTURE_CONST X509_REQ *req);
|
| 913 |
+
int X509_REQ_add_extensions_nid(X509_REQ *req,
|
| 914 |
+
const STACK_OF(X509_EXTENSION) *exts, int nid);
|
| 915 |
+
int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *ext);
|
| 916 |
+
int X509_REQ_get_attr_count(const X509_REQ *req);
|
| 917 |
+
int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
|
| 918 |
+
int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj,
|
| 919 |
+
int lastpos);
|
| 920 |
+
X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
|
| 921 |
+
X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
|
| 922 |
+
int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
|
| 923 |
+
int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
|
| 924 |
+
const ASN1_OBJECT *obj, int type,
|
| 925 |
+
const unsigned char *bytes, int len);
|
| 926 |
+
int X509_REQ_add1_attr_by_NID(X509_REQ *req,
|
| 927 |
+
int nid, int type,
|
| 928 |
+
const unsigned char *bytes, int len);
|
| 929 |
+
int X509_REQ_add1_attr_by_txt(X509_REQ *req,
|
| 930 |
+
const char *attrname, int type,
|
| 931 |
+
const unsigned char *bytes, int len);
|
| 932 |
+
|
| 933 |
+
#define X509_CRL_VERSION_1 0
|
| 934 |
+
#define X509_CRL_VERSION_2 1
|
| 935 |
+
|
| 936 |
+
int X509_CRL_set_version(X509_CRL *x, long version);
|
| 937 |
+
int X509_CRL_set_issuer_name(X509_CRL *x, const X509_NAME *name);
|
| 938 |
+
int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
|
| 939 |
+
int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
|
| 940 |
+
int X509_CRL_sort(X509_CRL *crl);
|
| 941 |
+
int X509_CRL_up_ref(X509_CRL *crl);
|
| 942 |
+
|
| 943 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 944 |
+
# define X509_CRL_set_lastUpdate X509_CRL_set1_lastUpdate
|
| 945 |
+
# define X509_CRL_set_nextUpdate X509_CRL_set1_nextUpdate
|
| 946 |
+
#endif
|
| 947 |
+
|
| 948 |
+
long X509_CRL_get_version(const X509_CRL *crl);
|
| 949 |
+
const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl);
|
| 950 |
+
const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl);
|
| 951 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 952 |
+
OSSL_DEPRECATEDIN_1_1_0 ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl);
|
| 953 |
+
OSSL_DEPRECATEDIN_1_1_0 ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl);
|
| 954 |
+
#endif
|
| 955 |
+
X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl);
|
| 956 |
+
const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl);
|
| 957 |
+
STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);
|
| 958 |
+
void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
|
| 959 |
+
const X509_ALGOR **palg);
|
| 960 |
+
int X509_CRL_get_signature_nid(const X509_CRL *crl);
|
| 961 |
+
int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp);
|
| 962 |
+
|
| 963 |
+
const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x);
|
| 964 |
+
int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
|
| 965 |
+
const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x);
|
| 966 |
+
int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
|
| 967 |
+
const STACK_OF(X509_EXTENSION) *
|
| 968 |
+
X509_REVOKED_get0_extensions(const X509_REVOKED *r);
|
| 969 |
+
|
| 970 |
+
X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
|
| 971 |
+
EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
|
| 972 |
+
|
| 973 |
+
int X509_REQ_check_private_key(const X509_REQ *req, EVP_PKEY *pkey);
|
| 974 |
+
|
| 975 |
+
int X509_check_private_key(const X509 *cert, const EVP_PKEY *pkey);
|
| 976 |
+
int X509_chain_check_suiteb(int *perror_depth,
|
| 977 |
+
X509 *x, STACK_OF(X509) *chain,
|
| 978 |
+
unsigned long flags);
|
| 979 |
+
int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
|
| 980 |
+
void OSSL_STACK_OF_X509_free(STACK_OF(X509) *certs);
|
| 981 |
+
STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain);
|
| 982 |
+
|
| 983 |
+
int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
|
| 984 |
+
unsigned long X509_issuer_and_serial_hash(X509 *a);
|
| 985 |
+
|
| 986 |
+
int X509_issuer_name_cmp(const X509 *a, const X509 *b);
|
| 987 |
+
unsigned long X509_issuer_name_hash(X509 *a);
|
| 988 |
+
|
| 989 |
+
int X509_subject_name_cmp(const X509 *a, const X509 *b);
|
| 990 |
+
unsigned long X509_subject_name_hash(X509 *x);
|
| 991 |
+
|
| 992 |
+
# ifndef OPENSSL_NO_MD5
|
| 993 |
+
unsigned long X509_issuer_name_hash_old(X509 *a);
|
| 994 |
+
unsigned long X509_subject_name_hash_old(X509 *x);
|
| 995 |
+
# endif
|
| 996 |
+
|
| 997 |
+
# define X509_ADD_FLAG_DEFAULT 0
|
| 998 |
+
# define X509_ADD_FLAG_UP_REF 0x1
|
| 999 |
+
# define X509_ADD_FLAG_PREPEND 0x2
|
| 1000 |
+
# define X509_ADD_FLAG_NO_DUP 0x4
|
| 1001 |
+
# define X509_ADD_FLAG_NO_SS 0x8
|
| 1002 |
+
int X509_add_cert(STACK_OF(X509) *sk, X509 *cert, int flags);
|
| 1003 |
+
int X509_add_certs(STACK_OF(X509) *sk, STACK_OF(X509) *certs, int flags);
|
| 1004 |
+
|
| 1005 |
+
int X509_cmp(const X509 *a, const X509 *b);
|
| 1006 |
+
int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
|
| 1007 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 1008 |
+
# define X509_NAME_hash(x) X509_NAME_hash_ex(x, NULL, NULL, NULL)
|
| 1009 |
+
OSSL_DEPRECATEDIN_3_0 int X509_certificate_type(const X509 *x,
|
| 1010 |
+
const EVP_PKEY *pubkey);
|
| 1011 |
+
#endif
|
| 1012 |
+
unsigned long X509_NAME_hash_ex(const X509_NAME *x, OSSL_LIB_CTX *libctx,
|
| 1013 |
+
const char *propq, int *ok);
|
| 1014 |
+
unsigned long X509_NAME_hash_old(const X509_NAME *x);
|
| 1015 |
+
|
| 1016 |
+
int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
|
| 1017 |
+
int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
|
| 1018 |
+
int X509_aux_print(BIO *out, X509 *x, int indent);
|
| 1019 |
+
# ifndef OPENSSL_NO_STDIO
|
| 1020 |
+
int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
|
| 1021 |
+
unsigned long cflag);
|
| 1022 |
+
int X509_print_fp(FILE *bp, X509 *x);
|
| 1023 |
+
int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
|
| 1024 |
+
int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
|
| 1025 |
+
int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
|
| 1026 |
+
unsigned long flags);
|
| 1027 |
+
# endif
|
| 1028 |
+
|
| 1029 |
+
int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase);
|
| 1030 |
+
int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent,
|
| 1031 |
+
unsigned long flags);
|
| 1032 |
+
int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
|
| 1033 |
+
unsigned long cflag);
|
| 1034 |
+
int X509_print(BIO *bp, X509 *x);
|
| 1035 |
+
int X509_ocspid_print(BIO *bp, X509 *x);
|
| 1036 |
+
int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag);
|
| 1037 |
+
int X509_CRL_print(BIO *bp, X509_CRL *x);
|
| 1038 |
+
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
|
| 1039 |
+
unsigned long cflag);
|
| 1040 |
+
int X509_REQ_print(BIO *bp, X509_REQ *req);
|
| 1041 |
+
|
| 1042 |
+
int X509_NAME_entry_count(const X509_NAME *name);
|
| 1043 |
+
int X509_NAME_get_text_by_NID(const X509_NAME *name, int nid,
|
| 1044 |
+
char *buf, int len);
|
| 1045 |
+
int X509_NAME_get_text_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
|
| 1046 |
+
char *buf, int len);
|
| 1047 |
+
|
| 1048 |
+
/*
|
| 1049 |
+
* NOTE: you should be passing -1, not 0 as lastpos. The functions that use
|
| 1050 |
+
* lastpos, search after that position on.
|
| 1051 |
+
*/
|
| 1052 |
+
int X509_NAME_get_index_by_NID(const X509_NAME *name, int nid, int lastpos);
|
| 1053 |
+
int X509_NAME_get_index_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
|
| 1054 |
+
int lastpos);
|
| 1055 |
+
X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc);
|
| 1056 |
+
X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
|
| 1057 |
+
int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne,
|
| 1058 |
+
int loc, int set);
|
| 1059 |
+
int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type,
|
| 1060 |
+
const unsigned char *bytes, int len, int loc,
|
| 1061 |
+
int set);
|
| 1062 |
+
int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
|
| 1063 |
+
const unsigned char *bytes, int len, int loc,
|
| 1064 |
+
int set);
|
| 1065 |
+
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
|
| 1066 |
+
const char *field, int type,
|
| 1067 |
+
const unsigned char *bytes,
|
| 1068 |
+
int len);
|
| 1069 |
+
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
|
| 1070 |
+
int type,
|
| 1071 |
+
const unsigned char *bytes,
|
| 1072 |
+
int len);
|
| 1073 |
+
int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
|
| 1074 |
+
const unsigned char *bytes, int len, int loc,
|
| 1075 |
+
int set);
|
| 1076 |
+
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
|
| 1077 |
+
const ASN1_OBJECT *obj, int type,
|
| 1078 |
+
const unsigned char *bytes,
|
| 1079 |
+
int len);
|
| 1080 |
+
int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj);
|
| 1081 |
+
int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
|
| 1082 |
+
const unsigned char *bytes, int len);
|
| 1083 |
+
ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne);
|
| 1084 |
+
ASN1_STRING * X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne);
|
| 1085 |
+
int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne);
|
| 1086 |
+
|
| 1087 |
+
int X509_NAME_get0_der(const X509_NAME *nm, const unsigned char **pder,
|
| 1088 |
+
size_t *pderlen);
|
| 1089 |
+
|
| 1090 |
+
int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x);
|
| 1091 |
+
int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,
|
| 1092 |
+
int nid, int lastpos);
|
| 1093 |
+
int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x,
|
| 1094 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 1095 |
+
int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x,
|
| 1096 |
+
int crit, int lastpos);
|
| 1097 |
+
X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc);
|
| 1098 |
+
X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc);
|
| 1099 |
+
STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x,
|
| 1100 |
+
X509_EXTENSION *ex, int loc);
|
| 1101 |
+
STACK_OF(X509_EXTENSION) *X509v3_add_extensions(STACK_OF(X509_EXTENSION) **target,
|
| 1102 |
+
const STACK_OF(X509_EXTENSION) *exts);
|
| 1103 |
+
|
| 1104 |
+
int X509_get_ext_count(const X509 *x);
|
| 1105 |
+
int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos);
|
| 1106 |
+
int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos);
|
| 1107 |
+
int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos);
|
| 1108 |
+
X509_EXTENSION *X509_get_ext(const X509 *x, int loc);
|
| 1109 |
+
X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
|
| 1110 |
+
int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
|
| 1111 |
+
void *X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx);
|
| 1112 |
+
int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
|
| 1113 |
+
unsigned long flags);
|
| 1114 |
+
|
| 1115 |
+
int X509_CRL_get_ext_count(const X509_CRL *x);
|
| 1116 |
+
int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos);
|
| 1117 |
+
int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj,
|
| 1118 |
+
int lastpos);
|
| 1119 |
+
int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos);
|
| 1120 |
+
X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc);
|
| 1121 |
+
X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
|
| 1122 |
+
int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
|
| 1123 |
+
void *X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx);
|
| 1124 |
+
int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
|
| 1125 |
+
unsigned long flags);
|
| 1126 |
+
|
| 1127 |
+
int X509_REVOKED_get_ext_count(const X509_REVOKED *x);
|
| 1128 |
+
int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos);
|
| 1129 |
+
int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
|
| 1130 |
+
int lastpos);
|
| 1131 |
+
int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit,
|
| 1132 |
+
int lastpos);
|
| 1133 |
+
X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc);
|
| 1134 |
+
X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
|
| 1135 |
+
int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
|
| 1136 |
+
void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit,
|
| 1137 |
+
int *idx);
|
| 1138 |
+
int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
|
| 1139 |
+
unsigned long flags);
|
| 1140 |
+
|
| 1141 |
+
X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
|
| 1142 |
+
int nid, int crit,
|
| 1143 |
+
ASN1_OCTET_STRING *data);
|
| 1144 |
+
X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
|
| 1145 |
+
const ASN1_OBJECT *obj, int crit,
|
| 1146 |
+
ASN1_OCTET_STRING *data);
|
| 1147 |
+
int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj);
|
| 1148 |
+
int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
|
| 1149 |
+
int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
|
| 1150 |
+
ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
|
| 1151 |
+
ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
|
| 1152 |
+
int X509_EXTENSION_get_critical(const X509_EXTENSION *ex);
|
| 1153 |
+
|
| 1154 |
+
int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x);
|
| 1155 |
+
int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid,
|
| 1156 |
+
int lastpos);
|
| 1157 |
+
int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk,
|
| 1158 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 1159 |
+
X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc);
|
| 1160 |
+
X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc);
|
| 1161 |
+
STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,
|
| 1162 |
+
X509_ATTRIBUTE *attr);
|
| 1163 |
+
STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE)
|
| 1164 |
+
**x, const ASN1_OBJECT *obj,
|
| 1165 |
+
int type,
|
| 1166 |
+
const unsigned char *bytes,
|
| 1167 |
+
int len);
|
| 1168 |
+
STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE)
|
| 1169 |
+
**x, int nid, int type,
|
| 1170 |
+
const unsigned char *bytes,
|
| 1171 |
+
int len);
|
| 1172 |
+
STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE)
|
| 1173 |
+
**x, const char *attrname,
|
| 1174 |
+
int type,
|
| 1175 |
+
const unsigned char *bytes,
|
| 1176 |
+
int len);
|
| 1177 |
+
void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x,
|
| 1178 |
+
const ASN1_OBJECT *obj, int lastpos, int type);
|
| 1179 |
+
X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
|
| 1180 |
+
int atrtype, const void *data,
|
| 1181 |
+
int len);
|
| 1182 |
+
X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
|
| 1183 |
+
const ASN1_OBJECT *obj,
|
| 1184 |
+
int atrtype, const void *data,
|
| 1185 |
+
int len);
|
| 1186 |
+
X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
|
| 1187 |
+
const char *atrname, int type,
|
| 1188 |
+
const unsigned char *bytes,
|
| 1189 |
+
int len);
|
| 1190 |
+
int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
|
| 1191 |
+
int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
|
| 1192 |
+
const void *data, int len);
|
| 1193 |
+
void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
|
| 1194 |
+
void *data);
|
| 1195 |
+
int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr);
|
| 1196 |
+
ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
|
| 1197 |
+
ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
|
| 1198 |
+
|
| 1199 |
+
int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
|
| 1200 |
+
int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
|
| 1201 |
+
int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
|
| 1202 |
+
int lastpos);
|
| 1203 |
+
X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
|
| 1204 |
+
X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
|
| 1205 |
+
int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
|
| 1206 |
+
int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
|
| 1207 |
+
const ASN1_OBJECT *obj, int type,
|
| 1208 |
+
const unsigned char *bytes, int len);
|
| 1209 |
+
int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
|
| 1210 |
+
int nid, int type,
|
| 1211 |
+
const unsigned char *bytes, int len);
|
| 1212 |
+
int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
|
| 1213 |
+
const char *attrname, int type,
|
| 1214 |
+
const unsigned char *bytes, int len);
|
| 1215 |
+
|
| 1216 |
+
/* lookup a cert from a X509 STACK */
|
| 1217 |
+
X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, const X509_NAME *name,
|
| 1218 |
+
const ASN1_INTEGER *serial);
|
| 1219 |
+
X509 *X509_find_by_subject(STACK_OF(X509) *sk, const X509_NAME *name);
|
| 1220 |
+
|
| 1221 |
+
DECLARE_ASN1_FUNCTIONS(PBEPARAM)
|
| 1222 |
+
DECLARE_ASN1_FUNCTIONS(PBE2PARAM)
|
| 1223 |
+
DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM)
|
| 1224 |
+
DECLARE_ASN1_FUNCTIONS(PBMAC1PARAM)
|
| 1225 |
+
# ifndef OPENSSL_NO_SCRYPT
|
| 1226 |
+
DECLARE_ASN1_FUNCTIONS(SCRYPT_PARAMS)
|
| 1227 |
+
# endif
|
| 1228 |
+
|
| 1229 |
+
int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
|
| 1230 |
+
const unsigned char *salt, int saltlen);
|
| 1231 |
+
int PKCS5_pbe_set0_algor_ex(X509_ALGOR *algor, int alg, int iter,
|
| 1232 |
+
const unsigned char *salt, int saltlen,
|
| 1233 |
+
OSSL_LIB_CTX *libctx);
|
| 1234 |
+
|
| 1235 |
+
X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
|
| 1236 |
+
const unsigned char *salt, int saltlen);
|
| 1237 |
+
X509_ALGOR *PKCS5_pbe_set_ex(int alg, int iter,
|
| 1238 |
+
const unsigned char *salt, int saltlen,
|
| 1239 |
+
OSSL_LIB_CTX *libctx);
|
| 1240 |
+
|
| 1241 |
+
X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
|
| 1242 |
+
unsigned char *salt, int saltlen);
|
| 1243 |
+
X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
|
| 1244 |
+
unsigned char *salt, int saltlen,
|
| 1245 |
+
unsigned char *aiv, int prf_nid);
|
| 1246 |
+
X509_ALGOR *PKCS5_pbe2_set_iv_ex(const EVP_CIPHER *cipher, int iter,
|
| 1247 |
+
unsigned char *salt, int saltlen,
|
| 1248 |
+
unsigned char *aiv, int prf_nid,
|
| 1249 |
+
OSSL_LIB_CTX *libctx);
|
| 1250 |
+
|
| 1251 |
+
#ifndef OPENSSL_NO_SCRYPT
|
| 1252 |
+
X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher,
|
| 1253 |
+
const unsigned char *salt, int saltlen,
|
| 1254 |
+
unsigned char *aiv, uint64_t N, uint64_t r,
|
| 1255 |
+
uint64_t p);
|
| 1256 |
+
#endif
|
| 1257 |
+
|
| 1258 |
+
X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
|
| 1259 |
+
int prf_nid, int keylen);
|
| 1260 |
+
X509_ALGOR *PKCS5_pbkdf2_set_ex(int iter, unsigned char *salt, int saltlen,
|
| 1261 |
+
int prf_nid, int keylen,
|
| 1262 |
+
OSSL_LIB_CTX *libctx);
|
| 1263 |
+
|
| 1264 |
+
PBKDF2PARAM *PBMAC1_get1_pbkdf2_param(const X509_ALGOR *macalg);
|
| 1265 |
+
/* PKCS#8 utilities */
|
| 1266 |
+
|
| 1267 |
+
DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO)
|
| 1268 |
+
|
| 1269 |
+
EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8);
|
| 1270 |
+
EVP_PKEY *EVP_PKCS82PKEY_ex(const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx,
|
| 1271 |
+
const char *propq);
|
| 1272 |
+
PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey);
|
| 1273 |
+
|
| 1274 |
+
int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
|
| 1275 |
+
int version, int ptype, void *pval,
|
| 1276 |
+
unsigned char *penc, int penclen);
|
| 1277 |
+
int PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg,
|
| 1278 |
+
const unsigned char **pk, int *ppklen,
|
| 1279 |
+
const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8);
|
| 1280 |
+
|
| 1281 |
+
const STACK_OF(X509_ATTRIBUTE) *
|
| 1282 |
+
PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8);
|
| 1283 |
+
int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr);
|
| 1284 |
+
int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type,
|
| 1285 |
+
const unsigned char *bytes, int len);
|
| 1286 |
+
int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj,
|
| 1287 |
+
int type, const unsigned char *bytes, int len);
|
| 1288 |
+
|
| 1289 |
+
|
| 1290 |
+
void X509_PUBKEY_set0_public_key(X509_PUBKEY *pub,
|
| 1291 |
+
unsigned char *penc, int penclen);
|
| 1292 |
+
int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
|
| 1293 |
+
int ptype, void *pval,
|
| 1294 |
+
unsigned char *penc, int penclen);
|
| 1295 |
+
int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
|
| 1296 |
+
const unsigned char **pk, int *ppklen,
|
| 1297 |
+
X509_ALGOR **pa, const X509_PUBKEY *pub);
|
| 1298 |
+
int X509_PUBKEY_eq(const X509_PUBKEY *a, const X509_PUBKEY *b);
|
| 1299 |
+
|
| 1300 |
+
# ifdef __cplusplus
|
| 1301 |
+
}
|
| 1302 |
+
# endif
|
| 1303 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/x509_acert.h
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/x509_acert.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2022-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_X509_ACERT_H
|
| 16 |
+
# define OPENSSL_X509_ACERT_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/x509v3.h>
|
| 20 |
+
# include <openssl/x509.h>
|
| 21 |
+
# include <openssl/pem.h>
|
| 22 |
+
|
| 23 |
+
typedef struct X509_acert_st X509_ACERT;
|
| 24 |
+
typedef struct X509_acert_info_st X509_ACERT_INFO;
|
| 25 |
+
typedef struct ossl_object_digest_info_st OSSL_OBJECT_DIGEST_INFO;
|
| 26 |
+
typedef struct ossl_issuer_serial_st OSSL_ISSUER_SERIAL;
|
| 27 |
+
typedef struct X509_acert_issuer_v2form_st X509_ACERT_ISSUER_V2FORM;
|
| 28 |
+
|
| 29 |
+
DECLARE_ASN1_FUNCTIONS(X509_ACERT)
|
| 30 |
+
DECLARE_ASN1_DUP_FUNCTION(X509_ACERT)
|
| 31 |
+
DECLARE_ASN1_ITEM(X509_ACERT_INFO)
|
| 32 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(X509_ACERT_INFO)
|
| 33 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(OSSL_OBJECT_DIGEST_INFO)
|
| 34 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(OSSL_ISSUER_SERIAL)
|
| 35 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(X509_ACERT_ISSUER_V2FORM)
|
| 36 |
+
|
| 37 |
+
# ifndef OPENSSL_NO_STDIO
|
| 38 |
+
X509_ACERT *d2i_X509_ACERT_fp(FILE *fp, X509_ACERT **acert);
|
| 39 |
+
int i2d_X509_ACERT_fp(FILE *fp, const X509_ACERT *acert);
|
| 40 |
+
# endif
|
| 41 |
+
|
| 42 |
+
DECLARE_PEM_rw(X509_ACERT, X509_ACERT)
|
| 43 |
+
|
| 44 |
+
X509_ACERT *d2i_X509_ACERT_bio(BIO *bp, X509_ACERT **acert);
|
| 45 |
+
int i2d_X509_ACERT_bio(BIO *bp, const X509_ACERT *acert);
|
| 46 |
+
|
| 47 |
+
int X509_ACERT_sign(X509_ACERT *x, EVP_PKEY *pkey, const EVP_MD *md);
|
| 48 |
+
int X509_ACERT_sign_ctx(X509_ACERT *x, EVP_MD_CTX *ctx);
|
| 49 |
+
int X509_ACERT_verify(X509_ACERT *a, EVP_PKEY *r);
|
| 50 |
+
|
| 51 |
+
# define X509_ACERT_VERSION_2 1
|
| 52 |
+
|
| 53 |
+
const GENERAL_NAMES *X509_ACERT_get0_holder_entityName(const X509_ACERT *x);
|
| 54 |
+
const OSSL_ISSUER_SERIAL *X509_ACERT_get0_holder_baseCertId(const X509_ACERT *x);
|
| 55 |
+
const OSSL_OBJECT_DIGEST_INFO * X509_ACERT_get0_holder_digest(const X509_ACERT *x);
|
| 56 |
+
const X509_NAME *X509_ACERT_get0_issuerName(const X509_ACERT *x);
|
| 57 |
+
long X509_ACERT_get_version(const X509_ACERT *x);
|
| 58 |
+
void X509_ACERT_get0_signature(const X509_ACERT *x,
|
| 59 |
+
const ASN1_BIT_STRING **psig,
|
| 60 |
+
const X509_ALGOR **palg);
|
| 61 |
+
int X509_ACERT_get_signature_nid(const X509_ACERT *x);
|
| 62 |
+
const X509_ALGOR *X509_ACERT_get0_info_sigalg(const X509_ACERT *x);
|
| 63 |
+
const ASN1_INTEGER *X509_ACERT_get0_serialNumber(const X509_ACERT *x);
|
| 64 |
+
const ASN1_TIME *X509_ACERT_get0_notBefore(const X509_ACERT *x);
|
| 65 |
+
const ASN1_TIME *X509_ACERT_get0_notAfter(const X509_ACERT *x);
|
| 66 |
+
const ASN1_BIT_STRING *X509_ACERT_get0_issuerUID(const X509_ACERT *x);
|
| 67 |
+
|
| 68 |
+
int X509_ACERT_print(BIO *bp, X509_ACERT *x);
|
| 69 |
+
int X509_ACERT_print_ex(BIO *bp, X509_ACERT *x, unsigned long nmflags,
|
| 70 |
+
unsigned long cflag);
|
| 71 |
+
|
| 72 |
+
int X509_ACERT_get_attr_count(const X509_ACERT *x);
|
| 73 |
+
int X509_ACERT_get_attr_by_NID(const X509_ACERT *x, int nid, int lastpos);
|
| 74 |
+
int X509_ACERT_get_attr_by_OBJ(const X509_ACERT *x, const ASN1_OBJECT *obj,
|
| 75 |
+
int lastpos);
|
| 76 |
+
X509_ATTRIBUTE *X509_ACERT_get_attr(const X509_ACERT *x, int loc);
|
| 77 |
+
X509_ATTRIBUTE *X509_ACERT_delete_attr(X509_ACERT *x, int loc);
|
| 78 |
+
|
| 79 |
+
void *X509_ACERT_get_ext_d2i(const X509_ACERT *x, int nid, int *crit, int *idx);
|
| 80 |
+
int X509_ACERT_add1_ext_i2d(X509_ACERT *x, int nid, void *value, int crit,
|
| 81 |
+
unsigned long flags);
|
| 82 |
+
const STACK_OF(X509_EXTENSION) *X509_ACERT_get0_extensions(const X509_ACERT *x);
|
| 83 |
+
|
| 84 |
+
# define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY 0
|
| 85 |
+
# define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT 1
|
| 86 |
+
# define OSSL_OBJECT_DIGEST_INFO_OTHER 2 /* must not be used in RFC 5755 profile */
|
| 87 |
+
int X509_ACERT_set_version(X509_ACERT *x, long version);
|
| 88 |
+
void X509_ACERT_set0_holder_entityName(X509_ACERT *x, GENERAL_NAMES *name);
|
| 89 |
+
void X509_ACERT_set0_holder_baseCertId(X509_ACERT *x, OSSL_ISSUER_SERIAL *isss);
|
| 90 |
+
void X509_ACERT_set0_holder_digest(X509_ACERT *x,
|
| 91 |
+
OSSL_OBJECT_DIGEST_INFO *dinfo);
|
| 92 |
+
|
| 93 |
+
int X509_ACERT_add1_attr(X509_ACERT *x, X509_ATTRIBUTE *attr);
|
| 94 |
+
int X509_ACERT_add1_attr_by_OBJ(X509_ACERT *x, const ASN1_OBJECT *obj,
|
| 95 |
+
int type, const void *bytes, int len);
|
| 96 |
+
int X509_ACERT_add1_attr_by_NID(X509_ACERT *x, int nid, int type,
|
| 97 |
+
const void *bytes, int len);
|
| 98 |
+
int X509_ACERT_add1_attr_by_txt(X509_ACERT *x, const char *attrname, int type,
|
| 99 |
+
const unsigned char *bytes, int len);
|
| 100 |
+
int X509_ACERT_add_attr_nconf(CONF *conf, const char *section,
|
| 101 |
+
X509_ACERT *acert);
|
| 102 |
+
|
| 103 |
+
int X509_ACERT_set1_issuerName(X509_ACERT *x, const X509_NAME *name);
|
| 104 |
+
int X509_ACERT_set1_serialNumber(X509_ACERT *x, const ASN1_INTEGER *serial);
|
| 105 |
+
int X509_ACERT_set1_notBefore(X509_ACERT *x, const ASN1_GENERALIZEDTIME *time);
|
| 106 |
+
int X509_ACERT_set1_notAfter(X509_ACERT *x, const ASN1_GENERALIZEDTIME *time);
|
| 107 |
+
|
| 108 |
+
void OSSL_OBJECT_DIGEST_INFO_get0_digest(const OSSL_OBJECT_DIGEST_INFO *o,
|
| 109 |
+
int *digestedObjectType,
|
| 110 |
+
const X509_ALGOR **digestAlgorithm,
|
| 111 |
+
const ASN1_BIT_STRING **digest);
|
| 112 |
+
|
| 113 |
+
int OSSL_OBJECT_DIGEST_INFO_set1_digest(OSSL_OBJECT_DIGEST_INFO *o,
|
| 114 |
+
int digestedObjectType,
|
| 115 |
+
X509_ALGOR *digestAlgorithm,
|
| 116 |
+
ASN1_BIT_STRING *digest);
|
| 117 |
+
|
| 118 |
+
const X509_NAME *OSSL_ISSUER_SERIAL_get0_issuer(const OSSL_ISSUER_SERIAL *isss);
|
| 119 |
+
const ASN1_INTEGER *OSSL_ISSUER_SERIAL_get0_serial(const OSSL_ISSUER_SERIAL *isss);
|
| 120 |
+
const ASN1_BIT_STRING *OSSL_ISSUER_SERIAL_get0_issuerUID(const OSSL_ISSUER_SERIAL *isss);
|
| 121 |
+
|
| 122 |
+
int OSSL_ISSUER_SERIAL_set1_issuer(OSSL_ISSUER_SERIAL *isss,
|
| 123 |
+
const X509_NAME *issuer);
|
| 124 |
+
int OSSL_ISSUER_SERIAL_set1_serial(OSSL_ISSUER_SERIAL *isss,
|
| 125 |
+
const ASN1_INTEGER *serial);
|
| 126 |
+
int OSSL_ISSUER_SERIAL_set1_issuerUID(OSSL_ISSUER_SERIAL *isss,
|
| 127 |
+
const ASN1_BIT_STRING *uid);
|
| 128 |
+
|
| 129 |
+
# define OSSL_IETFAS_OCTETS 0
|
| 130 |
+
# define OSSL_IETFAS_OID 1
|
| 131 |
+
# define OSSL_IETFAS_STRING 2
|
| 132 |
+
|
| 133 |
+
typedef struct OSSL_IETF_ATTR_SYNTAX_VALUE_st OSSL_IETF_ATTR_SYNTAX_VALUE;
|
| 134 |
+
typedef struct OSSL_IETF_ATTR_SYNTAX_st OSSL_IETF_ATTR_SYNTAX;
|
| 135 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_IETF_ATTR_SYNTAX_VALUE, OSSL_IETF_ATTR_SYNTAX_VALUE, OSSL_IETF_ATTR_SYNTAX_VALUE)
|
| 136 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk))
|
| 137 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_value(sk, idx) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_value(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), (idx)))
|
| 138 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_new(cmp) ((STACK_OF(OSSL_IETF_ATTR_SYNTAX_VALUE) *)OPENSSL_sk_new(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_compfunc_type(cmp)))
|
| 139 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_new_null() ((STACK_OF(OSSL_IETF_ATTR_SYNTAX_VALUE) *)OPENSSL_sk_new_null())
|
| 140 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_new_reserve(cmp, n) ((STACK_OF(OSSL_IETF_ATTR_SYNTAX_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_compfunc_type(cmp), (n)))
|
| 141 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), (n))
|
| 142 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk))
|
| 143 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk))
|
| 144 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_delete(sk, i) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_delete(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), (i)))
|
| 145 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_delete_ptr(sk, ptr) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr)))
|
| 146 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr))
|
| 147 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr))
|
| 148 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_pop(sk) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_pop(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk)))
|
| 149 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_shift(sk) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_shift(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk)))
|
| 150 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk),ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_freefunc_type(freefunc))
|
| 151 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr), (idx))
|
| 152 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_set(sk, idx, ptr) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_set(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), (idx), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr)))
|
| 153 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr))
|
| 154 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr))
|
| 155 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_type(ptr), pnum)
|
| 156 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk))
|
| 157 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk))
|
| 158 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_dup(sk) ((STACK_OF(OSSL_IETF_ATTR_SYNTAX_VALUE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk)))
|
| 159 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_IETF_ATTR_SYNTAX_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_copyfunc_type(copyfunc), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_freefunc_type(freefunc)))
|
| 160 |
+
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_set_cmp_func(sk, cmp) ((sk_OSSL_IETF_ATTR_SYNTAX_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_compfunc_type(cmp)))
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
DECLARE_ASN1_ITEM(OSSL_IETF_ATTR_SYNTAX_VALUE)
|
| 164 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(OSSL_IETF_ATTR_SYNTAX_VALUE)
|
| 165 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_IETF_ATTR_SYNTAX)
|
| 166 |
+
|
| 167 |
+
const GENERAL_NAMES *
|
| 168 |
+
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority(const OSSL_IETF_ATTR_SYNTAX *a);
|
| 169 |
+
void OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority(OSSL_IETF_ATTR_SYNTAX *a,
|
| 170 |
+
GENERAL_NAMES *names);
|
| 171 |
+
|
| 172 |
+
int OSSL_IETF_ATTR_SYNTAX_get_value_num(const OSSL_IETF_ATTR_SYNTAX *a);
|
| 173 |
+
void *OSSL_IETF_ATTR_SYNTAX_get0_value(const OSSL_IETF_ATTR_SYNTAX *a,
|
| 174 |
+
int ind, int *type);
|
| 175 |
+
int OSSL_IETF_ATTR_SYNTAX_add1_value(OSSL_IETF_ATTR_SYNTAX *a, int type,
|
| 176 |
+
void *data);
|
| 177 |
+
int OSSL_IETF_ATTR_SYNTAX_print(BIO *bp, OSSL_IETF_ATTR_SYNTAX *a, int indent);
|
| 178 |
+
|
| 179 |
+
struct TARGET_CERT_st {
|
| 180 |
+
OSSL_ISSUER_SERIAL *targetCertificate;
|
| 181 |
+
GENERAL_NAME *targetName;
|
| 182 |
+
OSSL_OBJECT_DIGEST_INFO *certDigestInfo;
|
| 183 |
+
};
|
| 184 |
+
|
| 185 |
+
typedef struct TARGET_CERT_st OSSL_TARGET_CERT;
|
| 186 |
+
|
| 187 |
+
# define OSSL_TGT_TARGET_NAME 0
|
| 188 |
+
# define OSSL_TGT_TARGET_GROUP 1
|
| 189 |
+
# define OSSL_TGT_TARGET_CERT 2
|
| 190 |
+
|
| 191 |
+
typedef struct TARGET_st {
|
| 192 |
+
int type;
|
| 193 |
+
union {
|
| 194 |
+
GENERAL_NAME *targetName;
|
| 195 |
+
GENERAL_NAME *targetGroup;
|
| 196 |
+
OSSL_TARGET_CERT *targetCert;
|
| 197 |
+
} choice;
|
| 198 |
+
} OSSL_TARGET;
|
| 199 |
+
|
| 200 |
+
typedef STACK_OF(OSSL_TARGET) OSSL_TARGETS;
|
| 201 |
+
typedef STACK_OF(OSSL_TARGETS) OSSL_TARGETING_INFORMATION;
|
| 202 |
+
|
| 203 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_TARGET, OSSL_TARGET, OSSL_TARGET)
|
| 204 |
+
#define sk_OSSL_TARGET_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_TARGET_sk_type(sk))
|
| 205 |
+
#define sk_OSSL_TARGET_value(sk, idx) ((OSSL_TARGET *)OPENSSL_sk_value(ossl_check_const_OSSL_TARGET_sk_type(sk), (idx)))
|
| 206 |
+
#define sk_OSSL_TARGET_new(cmp) ((STACK_OF(OSSL_TARGET) *)OPENSSL_sk_new(ossl_check_OSSL_TARGET_compfunc_type(cmp)))
|
| 207 |
+
#define sk_OSSL_TARGET_new_null() ((STACK_OF(OSSL_TARGET) *)OPENSSL_sk_new_null())
|
| 208 |
+
#define sk_OSSL_TARGET_new_reserve(cmp, n) ((STACK_OF(OSSL_TARGET) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_TARGET_compfunc_type(cmp), (n)))
|
| 209 |
+
#define sk_OSSL_TARGET_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_TARGET_sk_type(sk), (n))
|
| 210 |
+
#define sk_OSSL_TARGET_free(sk) OPENSSL_sk_free(ossl_check_OSSL_TARGET_sk_type(sk))
|
| 211 |
+
#define sk_OSSL_TARGET_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_TARGET_sk_type(sk))
|
| 212 |
+
#define sk_OSSL_TARGET_delete(sk, i) ((OSSL_TARGET *)OPENSSL_sk_delete(ossl_check_OSSL_TARGET_sk_type(sk), (i)))
|
| 213 |
+
#define sk_OSSL_TARGET_delete_ptr(sk, ptr) ((OSSL_TARGET *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr)))
|
| 214 |
+
#define sk_OSSL_TARGET_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr))
|
| 215 |
+
#define sk_OSSL_TARGET_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr))
|
| 216 |
+
#define sk_OSSL_TARGET_pop(sk) ((OSSL_TARGET *)OPENSSL_sk_pop(ossl_check_OSSL_TARGET_sk_type(sk)))
|
| 217 |
+
#define sk_OSSL_TARGET_shift(sk) ((OSSL_TARGET *)OPENSSL_sk_shift(ossl_check_OSSL_TARGET_sk_type(sk)))
|
| 218 |
+
#define sk_OSSL_TARGET_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_TARGET_sk_type(sk),ossl_check_OSSL_TARGET_freefunc_type(freefunc))
|
| 219 |
+
#define sk_OSSL_TARGET_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr), (idx))
|
| 220 |
+
#define sk_OSSL_TARGET_set(sk, idx, ptr) ((OSSL_TARGET *)OPENSSL_sk_set(ossl_check_OSSL_TARGET_sk_type(sk), (idx), ossl_check_OSSL_TARGET_type(ptr)))
|
| 221 |
+
#define sk_OSSL_TARGET_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr))
|
| 222 |
+
#define sk_OSSL_TARGET_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr))
|
| 223 |
+
#define sk_OSSL_TARGET_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_type(ptr), pnum)
|
| 224 |
+
#define sk_OSSL_TARGET_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_TARGET_sk_type(sk))
|
| 225 |
+
#define sk_OSSL_TARGET_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_TARGET_sk_type(sk))
|
| 226 |
+
#define sk_OSSL_TARGET_dup(sk) ((STACK_OF(OSSL_TARGET) *)OPENSSL_sk_dup(ossl_check_const_OSSL_TARGET_sk_type(sk)))
|
| 227 |
+
#define sk_OSSL_TARGET_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_TARGET) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_copyfunc_type(copyfunc), ossl_check_OSSL_TARGET_freefunc_type(freefunc)))
|
| 228 |
+
#define sk_OSSL_TARGET_set_cmp_func(sk, cmp) ((sk_OSSL_TARGET_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_compfunc_type(cmp)))
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_TARGETS, OSSL_TARGETS, OSSL_TARGETS)
|
| 232 |
+
#define sk_OSSL_TARGETS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_TARGETS_sk_type(sk))
|
| 233 |
+
#define sk_OSSL_TARGETS_value(sk, idx) ((OSSL_TARGETS *)OPENSSL_sk_value(ossl_check_const_OSSL_TARGETS_sk_type(sk), (idx)))
|
| 234 |
+
#define sk_OSSL_TARGETS_new(cmp) ((STACK_OF(OSSL_TARGETS) *)OPENSSL_sk_new(ossl_check_OSSL_TARGETS_compfunc_type(cmp)))
|
| 235 |
+
#define sk_OSSL_TARGETS_new_null() ((STACK_OF(OSSL_TARGETS) *)OPENSSL_sk_new_null())
|
| 236 |
+
#define sk_OSSL_TARGETS_new_reserve(cmp, n) ((STACK_OF(OSSL_TARGETS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_TARGETS_compfunc_type(cmp), (n)))
|
| 237 |
+
#define sk_OSSL_TARGETS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_TARGETS_sk_type(sk), (n))
|
| 238 |
+
#define sk_OSSL_TARGETS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_TARGETS_sk_type(sk))
|
| 239 |
+
#define sk_OSSL_TARGETS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_TARGETS_sk_type(sk))
|
| 240 |
+
#define sk_OSSL_TARGETS_delete(sk, i) ((OSSL_TARGETS *)OPENSSL_sk_delete(ossl_check_OSSL_TARGETS_sk_type(sk), (i)))
|
| 241 |
+
#define sk_OSSL_TARGETS_delete_ptr(sk, ptr) ((OSSL_TARGETS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr)))
|
| 242 |
+
#define sk_OSSL_TARGETS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr))
|
| 243 |
+
#define sk_OSSL_TARGETS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr))
|
| 244 |
+
#define sk_OSSL_TARGETS_pop(sk) ((OSSL_TARGETS *)OPENSSL_sk_pop(ossl_check_OSSL_TARGETS_sk_type(sk)))
|
| 245 |
+
#define sk_OSSL_TARGETS_shift(sk) ((OSSL_TARGETS *)OPENSSL_sk_shift(ossl_check_OSSL_TARGETS_sk_type(sk)))
|
| 246 |
+
#define sk_OSSL_TARGETS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_TARGETS_sk_type(sk),ossl_check_OSSL_TARGETS_freefunc_type(freefunc))
|
| 247 |
+
#define sk_OSSL_TARGETS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr), (idx))
|
| 248 |
+
#define sk_OSSL_TARGETS_set(sk, idx, ptr) ((OSSL_TARGETS *)OPENSSL_sk_set(ossl_check_OSSL_TARGETS_sk_type(sk), (idx), ossl_check_OSSL_TARGETS_type(ptr)))
|
| 249 |
+
#define sk_OSSL_TARGETS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr))
|
| 250 |
+
#define sk_OSSL_TARGETS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr))
|
| 251 |
+
#define sk_OSSL_TARGETS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_type(ptr), pnum)
|
| 252 |
+
#define sk_OSSL_TARGETS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_TARGETS_sk_type(sk))
|
| 253 |
+
#define sk_OSSL_TARGETS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_TARGETS_sk_type(sk))
|
| 254 |
+
#define sk_OSSL_TARGETS_dup(sk) ((STACK_OF(OSSL_TARGETS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_TARGETS_sk_type(sk)))
|
| 255 |
+
#define sk_OSSL_TARGETS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_TARGETS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_copyfunc_type(copyfunc), ossl_check_OSSL_TARGETS_freefunc_type(freefunc)))
|
| 256 |
+
#define sk_OSSL_TARGETS_set_cmp_func(sk, cmp) ((sk_OSSL_TARGETS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_compfunc_type(cmp)))
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_TARGET)
|
| 260 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_TARGETS)
|
| 261 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_TARGETING_INFORMATION)
|
| 262 |
+
|
| 263 |
+
typedef STACK_OF(OSSL_ISSUER_SERIAL) OSSL_AUTHORITY_ATTRIBUTE_ID_SYNTAX;
|
| 264 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_AUTHORITY_ATTRIBUTE_ID_SYNTAX)
|
| 265 |
+
|
| 266 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_ISSUER_SERIAL, OSSL_ISSUER_SERIAL, OSSL_ISSUER_SERIAL)
|
| 267 |
+
#define sk_OSSL_ISSUER_SERIAL_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk))
|
| 268 |
+
#define sk_OSSL_ISSUER_SERIAL_value(sk, idx) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_value(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk), (idx)))
|
| 269 |
+
#define sk_OSSL_ISSUER_SERIAL_new(cmp) ((STACK_OF(OSSL_ISSUER_SERIAL) *)OPENSSL_sk_new(ossl_check_OSSL_ISSUER_SERIAL_compfunc_type(cmp)))
|
| 270 |
+
#define sk_OSSL_ISSUER_SERIAL_new_null() ((STACK_OF(OSSL_ISSUER_SERIAL) *)OPENSSL_sk_new_null())
|
| 271 |
+
#define sk_OSSL_ISSUER_SERIAL_new_reserve(cmp, n) ((STACK_OF(OSSL_ISSUER_SERIAL) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_ISSUER_SERIAL_compfunc_type(cmp), (n)))
|
| 272 |
+
#define sk_OSSL_ISSUER_SERIAL_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), (n))
|
| 273 |
+
#define sk_OSSL_ISSUER_SERIAL_free(sk) OPENSSL_sk_free(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk))
|
| 274 |
+
#define sk_OSSL_ISSUER_SERIAL_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk))
|
| 275 |
+
#define sk_OSSL_ISSUER_SERIAL_delete(sk, i) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_delete(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), (i)))
|
| 276 |
+
#define sk_OSSL_ISSUER_SERIAL_delete_ptr(sk, ptr) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr)))
|
| 277 |
+
#define sk_OSSL_ISSUER_SERIAL_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr))
|
| 278 |
+
#define sk_OSSL_ISSUER_SERIAL_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr))
|
| 279 |
+
#define sk_OSSL_ISSUER_SERIAL_pop(sk) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_pop(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk)))
|
| 280 |
+
#define sk_OSSL_ISSUER_SERIAL_shift(sk) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_shift(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk)))
|
| 281 |
+
#define sk_OSSL_ISSUER_SERIAL_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk),ossl_check_OSSL_ISSUER_SERIAL_freefunc_type(freefunc))
|
| 282 |
+
#define sk_OSSL_ISSUER_SERIAL_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr), (idx))
|
| 283 |
+
#define sk_OSSL_ISSUER_SERIAL_set(sk, idx, ptr) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_set(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), (idx), ossl_check_OSSL_ISSUER_SERIAL_type(ptr)))
|
| 284 |
+
#define sk_OSSL_ISSUER_SERIAL_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr))
|
| 285 |
+
#define sk_OSSL_ISSUER_SERIAL_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr))
|
| 286 |
+
#define sk_OSSL_ISSUER_SERIAL_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_type(ptr), pnum)
|
| 287 |
+
#define sk_OSSL_ISSUER_SERIAL_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk))
|
| 288 |
+
#define sk_OSSL_ISSUER_SERIAL_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk))
|
| 289 |
+
#define sk_OSSL_ISSUER_SERIAL_dup(sk) ((STACK_OF(OSSL_ISSUER_SERIAL) *)OPENSSL_sk_dup(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk)))
|
| 290 |
+
#define sk_OSSL_ISSUER_SERIAL_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_ISSUER_SERIAL) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_copyfunc_type(copyfunc), ossl_check_OSSL_ISSUER_SERIAL_freefunc_type(freefunc)))
|
| 291 |
+
#define sk_OSSL_ISSUER_SERIAL_set_cmp_func(sk, cmp) ((sk_OSSL_ISSUER_SERIAL_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_compfunc_type(cmp)))
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/openssl/x509v3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/include/progs.h
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by apps/progs.pl
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "function.h"
|
| 14 |
+
|
| 15 |
+
extern int asn1parse_main(int argc, char *argv[]);
|
| 16 |
+
extern int ca_main(int argc, char *argv[]);
|
| 17 |
+
extern int ciphers_main(int argc, char *argv[]);
|
| 18 |
+
extern int cmp_main(int argc, char *argv[]);
|
| 19 |
+
extern int cms_main(int argc, char *argv[]);
|
| 20 |
+
extern int crl_main(int argc, char *argv[]);
|
| 21 |
+
extern int crl2pkcs7_main(int argc, char *argv[]);
|
| 22 |
+
extern int dgst_main(int argc, char *argv[]);
|
| 23 |
+
extern int dhparam_main(int argc, char *argv[]);
|
| 24 |
+
extern int dsa_main(int argc, char *argv[]);
|
| 25 |
+
extern int dsaparam_main(int argc, char *argv[]);
|
| 26 |
+
extern int ec_main(int argc, char *argv[]);
|
| 27 |
+
extern int ecparam_main(int argc, char *argv[]);
|
| 28 |
+
extern int enc_main(int argc, char *argv[]);
|
| 29 |
+
extern int engine_main(int argc, char *argv[]);
|
| 30 |
+
extern int errstr_main(int argc, char *argv[]);
|
| 31 |
+
extern int fipsinstall_main(int argc, char *argv[]);
|
| 32 |
+
extern int gendsa_main(int argc, char *argv[]);
|
| 33 |
+
extern int genpkey_main(int argc, char *argv[]);
|
| 34 |
+
extern int genrsa_main(int argc, char *argv[]);
|
| 35 |
+
extern int help_main(int argc, char *argv[]);
|
| 36 |
+
extern int info_main(int argc, char *argv[]);
|
| 37 |
+
extern int kdf_main(int argc, char *argv[]);
|
| 38 |
+
extern int list_main(int argc, char *argv[]);
|
| 39 |
+
extern int mac_main(int argc, char *argv[]);
|
| 40 |
+
extern int nseq_main(int argc, char *argv[]);
|
| 41 |
+
extern int ocsp_main(int argc, char *argv[]);
|
| 42 |
+
extern int passwd_main(int argc, char *argv[]);
|
| 43 |
+
extern int pkcs12_main(int argc, char *argv[]);
|
| 44 |
+
extern int pkcs7_main(int argc, char *argv[]);
|
| 45 |
+
extern int pkcs8_main(int argc, char *argv[]);
|
| 46 |
+
extern int pkey_main(int argc, char *argv[]);
|
| 47 |
+
extern int pkeyparam_main(int argc, char *argv[]);
|
| 48 |
+
extern int pkeyutl_main(int argc, char *argv[]);
|
| 49 |
+
extern int prime_main(int argc, char *argv[]);
|
| 50 |
+
extern int rand_main(int argc, char *argv[]);
|
| 51 |
+
extern int rehash_main(int argc, char *argv[]);
|
| 52 |
+
extern int req_main(int argc, char *argv[]);
|
| 53 |
+
extern int rsa_main(int argc, char *argv[]);
|
| 54 |
+
extern int rsautl_main(int argc, char *argv[]);
|
| 55 |
+
extern int s_client_main(int argc, char *argv[]);
|
| 56 |
+
extern int s_server_main(int argc, char *argv[]);
|
| 57 |
+
extern int s_time_main(int argc, char *argv[]);
|
| 58 |
+
extern int sess_id_main(int argc, char *argv[]);
|
| 59 |
+
extern int skeyutl_main(int argc, char *argv[]);
|
| 60 |
+
extern int smime_main(int argc, char *argv[]);
|
| 61 |
+
extern int speed_main(int argc, char *argv[]);
|
| 62 |
+
extern int spkac_main(int argc, char *argv[]);
|
| 63 |
+
extern int srp_main(int argc, char *argv[]);
|
| 64 |
+
extern int storeutl_main(int argc, char *argv[]);
|
| 65 |
+
extern int ts_main(int argc, char *argv[]);
|
| 66 |
+
extern int verify_main(int argc, char *argv[]);
|
| 67 |
+
extern int version_main(int argc, char *argv[]);
|
| 68 |
+
extern int x509_main(int argc, char *argv[]);
|
| 69 |
+
|
| 70 |
+
extern const OPTIONS asn1parse_options[];
|
| 71 |
+
extern const OPTIONS ca_options[];
|
| 72 |
+
extern const OPTIONS ciphers_options[];
|
| 73 |
+
extern const OPTIONS cmp_options[];
|
| 74 |
+
extern const OPTIONS cms_options[];
|
| 75 |
+
extern const OPTIONS crl_options[];
|
| 76 |
+
extern const OPTIONS crl2pkcs7_options[];
|
| 77 |
+
extern const OPTIONS dgst_options[];
|
| 78 |
+
extern const OPTIONS dhparam_options[];
|
| 79 |
+
extern const OPTIONS dsa_options[];
|
| 80 |
+
extern const OPTIONS dsaparam_options[];
|
| 81 |
+
extern const OPTIONS ec_options[];
|
| 82 |
+
extern const OPTIONS ecparam_options[];
|
| 83 |
+
extern const OPTIONS enc_options[];
|
| 84 |
+
extern const OPTIONS engine_options[];
|
| 85 |
+
extern const OPTIONS errstr_options[];
|
| 86 |
+
extern const OPTIONS fipsinstall_options[];
|
| 87 |
+
extern const OPTIONS gendsa_options[];
|
| 88 |
+
extern const OPTIONS genpkey_options[];
|
| 89 |
+
extern const OPTIONS genrsa_options[];
|
| 90 |
+
extern const OPTIONS help_options[];
|
| 91 |
+
extern const OPTIONS info_options[];
|
| 92 |
+
extern const OPTIONS kdf_options[];
|
| 93 |
+
extern const OPTIONS list_options[];
|
| 94 |
+
extern const OPTIONS mac_options[];
|
| 95 |
+
extern const OPTIONS nseq_options[];
|
| 96 |
+
extern const OPTIONS ocsp_options[];
|
| 97 |
+
extern const OPTIONS passwd_options[];
|
| 98 |
+
extern const OPTIONS pkcs12_options[];
|
| 99 |
+
extern const OPTIONS pkcs7_options[];
|
| 100 |
+
extern const OPTIONS pkcs8_options[];
|
| 101 |
+
extern const OPTIONS pkey_options[];
|
| 102 |
+
extern const OPTIONS pkeyparam_options[];
|
| 103 |
+
extern const OPTIONS pkeyutl_options[];
|
| 104 |
+
extern const OPTIONS prime_options[];
|
| 105 |
+
extern const OPTIONS rand_options[];
|
| 106 |
+
extern const OPTIONS rehash_options[];
|
| 107 |
+
extern const OPTIONS req_options[];
|
| 108 |
+
extern const OPTIONS rsa_options[];
|
| 109 |
+
extern const OPTIONS rsautl_options[];
|
| 110 |
+
extern const OPTIONS s_client_options[];
|
| 111 |
+
extern const OPTIONS s_server_options[];
|
| 112 |
+
extern const OPTIONS s_time_options[];
|
| 113 |
+
extern const OPTIONS sess_id_options[];
|
| 114 |
+
extern const OPTIONS skeyutl_options[];
|
| 115 |
+
extern const OPTIONS smime_options[];
|
| 116 |
+
extern const OPTIONS speed_options[];
|
| 117 |
+
extern const OPTIONS spkac_options[];
|
| 118 |
+
extern const OPTIONS srp_options[];
|
| 119 |
+
extern const OPTIONS storeutl_options[];
|
| 120 |
+
extern const OPTIONS ts_options[];
|
| 121 |
+
extern const OPTIONS verify_options[];
|
| 122 |
+
extern const OPTIONS version_options[];
|
| 123 |
+
extern const OPTIONS x509_options[];
|
| 124 |
+
|
| 125 |
+
extern FUNCTION functions[];
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_digests.h
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_digests.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
|
| 15 |
+
/* Well known OIDs precompiled */
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 }
|
| 19 |
+
*/
|
| 20 |
+
#define DER_OID_V_sigAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03
|
| 21 |
+
#define DER_OID_SZ_sigAlgs 10
|
| 22 |
+
extern const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs];
|
| 23 |
+
|
| 24 |
+
/*
|
| 25 |
+
* id-sha1 OBJECT IDENTIFIER ::= { iso(1)
|
| 26 |
+
* identified-organization(3) oiw(14)
|
| 27 |
+
* secsig(3) algorithms(2) 26 }
|
| 28 |
+
*/
|
| 29 |
+
#define DER_OID_V_id_sha1 DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x1A
|
| 30 |
+
#define DER_OID_SZ_id_sha1 7
|
| 31 |
+
extern const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1];
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* id-md2 OBJECT IDENTIFIER ::= {
|
| 35 |
+
* iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 }
|
| 36 |
+
*/
|
| 37 |
+
#define DER_OID_V_id_md2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02
|
| 38 |
+
#define DER_OID_SZ_id_md2 10
|
| 39 |
+
extern const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2];
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* id-md5 OBJECT IDENTIFIER ::= {
|
| 43 |
+
* iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 }
|
| 44 |
+
*/
|
| 45 |
+
#define DER_OID_V_id_md5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05
|
| 46 |
+
#define DER_OID_SZ_id_md5 10
|
| 47 |
+
extern const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5];
|
| 48 |
+
|
| 49 |
+
/*
|
| 50 |
+
* id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 }
|
| 51 |
+
*/
|
| 52 |
+
#define DER_OID_V_id_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01
|
| 53 |
+
#define DER_OID_SZ_id_sha256 11
|
| 54 |
+
extern const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256];
|
| 55 |
+
|
| 56 |
+
/*
|
| 57 |
+
* id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 }
|
| 58 |
+
*/
|
| 59 |
+
#define DER_OID_V_id_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02
|
| 60 |
+
#define DER_OID_SZ_id_sha384 11
|
| 61 |
+
extern const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384];
|
| 62 |
+
|
| 63 |
+
/*
|
| 64 |
+
* id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 }
|
| 65 |
+
*/
|
| 66 |
+
#define DER_OID_V_id_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03
|
| 67 |
+
#define DER_OID_SZ_id_sha512 11
|
| 68 |
+
extern const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512];
|
| 69 |
+
|
| 70 |
+
/*
|
| 71 |
+
* id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 }
|
| 72 |
+
*/
|
| 73 |
+
#define DER_OID_V_id_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04
|
| 74 |
+
#define DER_OID_SZ_id_sha224 11
|
| 75 |
+
extern const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224];
|
| 76 |
+
|
| 77 |
+
/*
|
| 78 |
+
* id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 }
|
| 79 |
+
*/
|
| 80 |
+
#define DER_OID_V_id_sha512_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x05
|
| 81 |
+
#define DER_OID_SZ_id_sha512_224 11
|
| 82 |
+
extern const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224];
|
| 83 |
+
|
| 84 |
+
/*
|
| 85 |
+
* id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 }
|
| 86 |
+
*/
|
| 87 |
+
#define DER_OID_V_id_sha512_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x06
|
| 88 |
+
#define DER_OID_SZ_id_sha512_256 11
|
| 89 |
+
extern const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256];
|
| 90 |
+
|
| 91 |
+
/*
|
| 92 |
+
* id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 }
|
| 93 |
+
*/
|
| 94 |
+
#define DER_OID_V_id_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x07
|
| 95 |
+
#define DER_OID_SZ_id_sha3_224 11
|
| 96 |
+
extern const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224];
|
| 97 |
+
|
| 98 |
+
/*
|
| 99 |
+
* id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 }
|
| 100 |
+
*/
|
| 101 |
+
#define DER_OID_V_id_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08
|
| 102 |
+
#define DER_OID_SZ_id_sha3_256 11
|
| 103 |
+
extern const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256];
|
| 104 |
+
|
| 105 |
+
/*
|
| 106 |
+
* id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 }
|
| 107 |
+
*/
|
| 108 |
+
#define DER_OID_V_id_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x09
|
| 109 |
+
#define DER_OID_SZ_id_sha3_384 11
|
| 110 |
+
extern const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384];
|
| 111 |
+
|
| 112 |
+
/*
|
| 113 |
+
* id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 }
|
| 114 |
+
*/
|
| 115 |
+
#define DER_OID_V_id_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A
|
| 116 |
+
#define DER_OID_SZ_id_sha3_512 11
|
| 117 |
+
extern const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512];
|
| 118 |
+
|
| 119 |
+
/*
|
| 120 |
+
* id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 }
|
| 121 |
+
*/
|
| 122 |
+
#define DER_OID_V_id_shake128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0B
|
| 123 |
+
#define DER_OID_SZ_id_shake128 11
|
| 124 |
+
extern const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128];
|
| 125 |
+
|
| 126 |
+
/*
|
| 127 |
+
* id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 }
|
| 128 |
+
*/
|
| 129 |
+
#define DER_OID_V_id_shake256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0C
|
| 130 |
+
#define DER_OID_SZ_id_shake256 11
|
| 131 |
+
extern const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256];
|
| 132 |
+
|
| 133 |
+
/*
|
| 134 |
+
* id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 }
|
| 135 |
+
*/
|
| 136 |
+
#define DER_OID_V_id_shake128_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x11
|
| 137 |
+
#define DER_OID_SZ_id_shake128_len 11
|
| 138 |
+
extern const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len];
|
| 139 |
+
|
| 140 |
+
/*
|
| 141 |
+
* id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 }
|
| 142 |
+
*/
|
| 143 |
+
#define DER_OID_V_id_shake256_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x12
|
| 144 |
+
#define DER_OID_SZ_id_shake256_len 11
|
| 145 |
+
extern const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len];
|
| 146 |
+
|
| 147 |
+
/*
|
| 148 |
+
* id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19}
|
| 149 |
+
*/
|
| 150 |
+
#define DER_OID_V_id_KMACWithSHAKE128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x13
|
| 151 |
+
#define DER_OID_SZ_id_KMACWithSHAKE128 11
|
| 152 |
+
extern const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128];
|
| 153 |
+
|
| 154 |
+
/*
|
| 155 |
+
* id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20}
|
| 156 |
+
*/
|
| 157 |
+
#define DER_OID_V_id_KMACWithSHAKE256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x14
|
| 158 |
+
#define DER_OID_SZ_id_KMACWithSHAKE256 11
|
| 159 |
+
extern const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256];
|
| 160 |
+
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_dsa.h
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_dsa.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
|
| 15 |
+
/* Well known OIDs precompiled */
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* id-dsa OBJECT IDENTIFIER ::= {
|
| 19 |
+
* iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_dsa DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x01
|
| 22 |
+
#define DER_OID_SZ_id_dsa 9
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-dsa-with-sha1 OBJECT IDENTIFIER ::= {
|
| 27 |
+
* iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 }
|
| 28 |
+
*/
|
| 29 |
+
#define DER_OID_V_id_dsa_with_sha1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x03
|
| 30 |
+
#define DER_OID_SZ_id_dsa_with_sha1 9
|
| 31 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1];
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 }
|
| 35 |
+
*/
|
| 36 |
+
#define DER_OID_V_id_dsa_with_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x01
|
| 37 |
+
#define DER_OID_SZ_id_dsa_with_sha224 11
|
| 38 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224];
|
| 39 |
+
|
| 40 |
+
/*
|
| 41 |
+
* id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 }
|
| 42 |
+
*/
|
| 43 |
+
#define DER_OID_V_id_dsa_with_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x02
|
| 44 |
+
#define DER_OID_SZ_id_dsa_with_sha256 11
|
| 45 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256];
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 }
|
| 49 |
+
*/
|
| 50 |
+
#define DER_OID_V_id_dsa_with_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x03
|
| 51 |
+
#define DER_OID_SZ_id_dsa_with_sha384 11
|
| 52 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384];
|
| 53 |
+
|
| 54 |
+
/*
|
| 55 |
+
* id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 }
|
| 56 |
+
*/
|
| 57 |
+
#define DER_OID_V_id_dsa_with_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x04
|
| 58 |
+
#define DER_OID_SZ_id_dsa_with_sha512 11
|
| 59 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512];
|
| 60 |
+
|
| 61 |
+
/*
|
| 62 |
+
* id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 }
|
| 63 |
+
*/
|
| 64 |
+
#define DER_OID_V_id_dsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x05
|
| 65 |
+
#define DER_OID_SZ_id_dsa_with_sha3_224 11
|
| 66 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224];
|
| 67 |
+
|
| 68 |
+
/*
|
| 69 |
+
* id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 }
|
| 70 |
+
*/
|
| 71 |
+
#define DER_OID_V_id_dsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x06
|
| 72 |
+
#define DER_OID_SZ_id_dsa_with_sha3_256 11
|
| 73 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256];
|
| 74 |
+
|
| 75 |
+
/*
|
| 76 |
+
* id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 }
|
| 77 |
+
*/
|
| 78 |
+
#define DER_OID_V_id_dsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x07
|
| 79 |
+
#define DER_OID_SZ_id_dsa_with_sha3_384 11
|
| 80 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384];
|
| 81 |
+
|
| 82 |
+
/*
|
| 83 |
+
* id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 }
|
| 84 |
+
*/
|
| 85 |
+
#define DER_OID_V_id_dsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x08
|
| 86 |
+
#define DER_OID_SZ_id_dsa_with_sha3_512 11
|
| 87 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512];
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
/* Subject Public Key Info */
|
| 91 |
+
int ossl_DER_w_algorithmIdentifier_DSA(WPACKET *pkt, int tag, DSA *dsa);
|
| 92 |
+
/* Signature */
|
| 93 |
+
int ossl_DER_w_algorithmIdentifier_DSA_with_MD(WPACKET *pkt, int tag,
|
| 94 |
+
DSA *dsa, int mdnid);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_ec.h
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_ec.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "crypto/ec.h"
|
| 14 |
+
#include "internal/der.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_ecdsa_with_SHA1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x01
|
| 22 |
+
#define DER_OID_SZ_ecdsa_with_SHA1 9
|
| 23 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_ecPublicKey DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01
|
| 29 |
+
#define DER_OID_SZ_id_ecPublicKey 9
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_c2pnb163v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x01
|
| 36 |
+
#define DER_OID_SZ_c2pnb163v1 10
|
| 37 |
+
extern const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1];
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 }
|
| 41 |
+
*/
|
| 42 |
+
#define DER_OID_V_c2pnb163v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x02
|
| 43 |
+
#define DER_OID_SZ_c2pnb163v2 10
|
| 44 |
+
extern const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2];
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 }
|
| 48 |
+
*/
|
| 49 |
+
#define DER_OID_V_c2pnb163v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x03
|
| 50 |
+
#define DER_OID_SZ_c2pnb163v3 10
|
| 51 |
+
extern const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3];
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 }
|
| 55 |
+
*/
|
| 56 |
+
#define DER_OID_V_c2pnb176w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x04
|
| 57 |
+
#define DER_OID_SZ_c2pnb176w1 10
|
| 58 |
+
extern const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1];
|
| 59 |
+
|
| 60 |
+
/*
|
| 61 |
+
* c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 }
|
| 62 |
+
*/
|
| 63 |
+
#define DER_OID_V_c2tnb191v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x05
|
| 64 |
+
#define DER_OID_SZ_c2tnb191v1 10
|
| 65 |
+
extern const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1];
|
| 66 |
+
|
| 67 |
+
/*
|
| 68 |
+
* c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 }
|
| 69 |
+
*/
|
| 70 |
+
#define DER_OID_V_c2tnb191v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x06
|
| 71 |
+
#define DER_OID_SZ_c2tnb191v2 10
|
| 72 |
+
extern const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2];
|
| 73 |
+
|
| 74 |
+
/*
|
| 75 |
+
* c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 }
|
| 76 |
+
*/
|
| 77 |
+
#define DER_OID_V_c2tnb191v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x07
|
| 78 |
+
#define DER_OID_SZ_c2tnb191v3 10
|
| 79 |
+
extern const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3];
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 }
|
| 83 |
+
*/
|
| 84 |
+
#define DER_OID_V_c2onb191v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x08
|
| 85 |
+
#define DER_OID_SZ_c2onb191v4 10
|
| 86 |
+
extern const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4];
|
| 87 |
+
|
| 88 |
+
/*
|
| 89 |
+
* c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 }
|
| 90 |
+
*/
|
| 91 |
+
#define DER_OID_V_c2onb191v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x09
|
| 92 |
+
#define DER_OID_SZ_c2onb191v5 10
|
| 93 |
+
extern const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5];
|
| 94 |
+
|
| 95 |
+
/*
|
| 96 |
+
* c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 }
|
| 97 |
+
*/
|
| 98 |
+
#define DER_OID_V_c2pnb208w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0A
|
| 99 |
+
#define DER_OID_SZ_c2pnb208w1 10
|
| 100 |
+
extern const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1];
|
| 101 |
+
|
| 102 |
+
/*
|
| 103 |
+
* c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 }
|
| 104 |
+
*/
|
| 105 |
+
#define DER_OID_V_c2tnb239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0B
|
| 106 |
+
#define DER_OID_SZ_c2tnb239v1 10
|
| 107 |
+
extern const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1];
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 }
|
| 111 |
+
*/
|
| 112 |
+
#define DER_OID_V_c2tnb239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0C
|
| 113 |
+
#define DER_OID_SZ_c2tnb239v2 10
|
| 114 |
+
extern const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2];
|
| 115 |
+
|
| 116 |
+
/*
|
| 117 |
+
* c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 }
|
| 118 |
+
*/
|
| 119 |
+
#define DER_OID_V_c2tnb239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0D
|
| 120 |
+
#define DER_OID_SZ_c2tnb239v3 10
|
| 121 |
+
extern const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3];
|
| 122 |
+
|
| 123 |
+
/*
|
| 124 |
+
* c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 }
|
| 125 |
+
*/
|
| 126 |
+
#define DER_OID_V_c2onb239v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0E
|
| 127 |
+
#define DER_OID_SZ_c2onb239v4 10
|
| 128 |
+
extern const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4];
|
| 129 |
+
|
| 130 |
+
/*
|
| 131 |
+
* c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 }
|
| 132 |
+
*/
|
| 133 |
+
#define DER_OID_V_c2onb239v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0F
|
| 134 |
+
#define DER_OID_SZ_c2onb239v5 10
|
| 135 |
+
extern const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5];
|
| 136 |
+
|
| 137 |
+
/*
|
| 138 |
+
* c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 }
|
| 139 |
+
*/
|
| 140 |
+
#define DER_OID_V_c2pnb272w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x10
|
| 141 |
+
#define DER_OID_SZ_c2pnb272w1 10
|
| 142 |
+
extern const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1];
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 }
|
| 146 |
+
*/
|
| 147 |
+
#define DER_OID_V_c2pnb304w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x11
|
| 148 |
+
#define DER_OID_SZ_c2pnb304w1 10
|
| 149 |
+
extern const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1];
|
| 150 |
+
|
| 151 |
+
/*
|
| 152 |
+
* c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 }
|
| 153 |
+
*/
|
| 154 |
+
#define DER_OID_V_c2tnb359v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x12
|
| 155 |
+
#define DER_OID_SZ_c2tnb359v1 10
|
| 156 |
+
extern const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1];
|
| 157 |
+
|
| 158 |
+
/*
|
| 159 |
+
* c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 }
|
| 160 |
+
*/
|
| 161 |
+
#define DER_OID_V_c2pnb368w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x13
|
| 162 |
+
#define DER_OID_SZ_c2pnb368w1 10
|
| 163 |
+
extern const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1];
|
| 164 |
+
|
| 165 |
+
/*
|
| 166 |
+
* c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 }
|
| 167 |
+
*/
|
| 168 |
+
#define DER_OID_V_c2tnb431r1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x14
|
| 169 |
+
#define DER_OID_SZ_c2tnb431r1 10
|
| 170 |
+
extern const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1];
|
| 171 |
+
|
| 172 |
+
/*
|
| 173 |
+
* prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 }
|
| 174 |
+
*/
|
| 175 |
+
#define DER_OID_V_prime192v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x01
|
| 176 |
+
#define DER_OID_SZ_prime192v1 10
|
| 177 |
+
extern const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1];
|
| 178 |
+
|
| 179 |
+
/*
|
| 180 |
+
* prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 }
|
| 181 |
+
*/
|
| 182 |
+
#define DER_OID_V_prime192v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x02
|
| 183 |
+
#define DER_OID_SZ_prime192v2 10
|
| 184 |
+
extern const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2];
|
| 185 |
+
|
| 186 |
+
/*
|
| 187 |
+
* prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 }
|
| 188 |
+
*/
|
| 189 |
+
#define DER_OID_V_prime192v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x03
|
| 190 |
+
#define DER_OID_SZ_prime192v3 10
|
| 191 |
+
extern const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3];
|
| 192 |
+
|
| 193 |
+
/*
|
| 194 |
+
* prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 }
|
| 195 |
+
*/
|
| 196 |
+
#define DER_OID_V_prime239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x04
|
| 197 |
+
#define DER_OID_SZ_prime239v1 10
|
| 198 |
+
extern const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1];
|
| 199 |
+
|
| 200 |
+
/*
|
| 201 |
+
* prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 }
|
| 202 |
+
*/
|
| 203 |
+
#define DER_OID_V_prime239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x05
|
| 204 |
+
#define DER_OID_SZ_prime239v2 10
|
| 205 |
+
extern const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2];
|
| 206 |
+
|
| 207 |
+
/*
|
| 208 |
+
* prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 }
|
| 209 |
+
*/
|
| 210 |
+
#define DER_OID_V_prime239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x06
|
| 211 |
+
#define DER_OID_SZ_prime239v3 10
|
| 212 |
+
extern const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3];
|
| 213 |
+
|
| 214 |
+
/*
|
| 215 |
+
* prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 }
|
| 216 |
+
*/
|
| 217 |
+
#define DER_OID_V_prime256v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07
|
| 218 |
+
#define DER_OID_SZ_prime256v1 10
|
| 219 |
+
extern const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1];
|
| 220 |
+
|
| 221 |
+
/*
|
| 222 |
+
* ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 223 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 }
|
| 224 |
+
*/
|
| 225 |
+
#define DER_OID_V_ecdsa_with_SHA224 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x01
|
| 226 |
+
#define DER_OID_SZ_ecdsa_with_SHA224 10
|
| 227 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224];
|
| 228 |
+
|
| 229 |
+
/*
|
| 230 |
+
* ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 231 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
|
| 232 |
+
*/
|
| 233 |
+
#define DER_OID_V_ecdsa_with_SHA256 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02
|
| 234 |
+
#define DER_OID_SZ_ecdsa_with_SHA256 10
|
| 235 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256];
|
| 236 |
+
|
| 237 |
+
/*
|
| 238 |
+
* ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 239 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
|
| 240 |
+
*/
|
| 241 |
+
#define DER_OID_V_ecdsa_with_SHA384 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03
|
| 242 |
+
#define DER_OID_SZ_ecdsa_with_SHA384 10
|
| 243 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384];
|
| 244 |
+
|
| 245 |
+
/*
|
| 246 |
+
* ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 247 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
|
| 248 |
+
*/
|
| 249 |
+
#define DER_OID_V_ecdsa_with_SHA512 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x04
|
| 250 |
+
#define DER_OID_SZ_ecdsa_with_SHA512 10
|
| 251 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512];
|
| 252 |
+
|
| 253 |
+
/*
|
| 254 |
+
* id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 }
|
| 255 |
+
*/
|
| 256 |
+
#define DER_OID_V_id_ecdsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x09
|
| 257 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_224 11
|
| 258 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224];
|
| 259 |
+
|
| 260 |
+
/*
|
| 261 |
+
* id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 }
|
| 262 |
+
*/
|
| 263 |
+
#define DER_OID_V_id_ecdsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0A
|
| 264 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_256 11
|
| 265 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256];
|
| 266 |
+
|
| 267 |
+
/*
|
| 268 |
+
* id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 }
|
| 269 |
+
*/
|
| 270 |
+
#define DER_OID_V_id_ecdsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0B
|
| 271 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_384 11
|
| 272 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384];
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 }
|
| 276 |
+
*/
|
| 277 |
+
#define DER_OID_V_id_ecdsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0C
|
| 278 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_512 11
|
| 279 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512];
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
/* Subject Public Key Info */
|
| 283 |
+
int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec);
|
| 284 |
+
/* Signature */
|
| 285 |
+
int ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(WPACKET *pkt, int cont,
|
| 286 |
+
EC_KEY *ec, int mdnid);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_ecx.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_ecx.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
#include "crypto/ecx.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_X25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6E
|
| 22 |
+
#define DER_OID_SZ_id_X25519 5
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_X448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6F
|
| 29 |
+
#define DER_OID_SZ_id_X448 5
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_id_Ed25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x70
|
| 36 |
+
#define DER_OID_SZ_id_Ed25519 5
|
| 37 |
+
extern const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519];
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 }
|
| 41 |
+
*/
|
| 42 |
+
#define DER_OID_V_id_Ed448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x71
|
| 43 |
+
#define DER_OID_SZ_id_Ed448 5
|
| 44 |
+
extern const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448];
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec);
|
| 48 |
+
int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec);
|
| 49 |
+
int ossl_DER_w_algorithmIdentifier_X25519(WPACKET *pkt, int cont, ECX_KEY *ec);
|
| 50 |
+
int ossl_DER_w_algorithmIdentifier_X448(WPACKET *pkt, int cont, ECX_KEY *ec);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/BSD-x86/asm/providers/common/include/prov/der_ml_dsa.h
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_ml_dsa.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
#include "crypto/ml_dsa.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* id-ml-dsa-44 OBJECT IDENTIFIER ::= { sigAlgs 17 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_ml_dsa_44 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x11
|
| 22 |
+
#define DER_OID_SZ_id_ml_dsa_44 11
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_ml_dsa_44[DER_OID_SZ_id_ml_dsa_44];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-ml-dsa-65 OBJECT IDENTIFIER ::= { sigAlgs 18 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_ml_dsa_65 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x12
|
| 29 |
+
#define DER_OID_SZ_id_ml_dsa_65 11
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_ml_dsa_65[DER_OID_SZ_id_ml_dsa_65];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* id-ml-dsa-87 OBJECT IDENTIFIER ::= { sigAlgs 19 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_id_ml_dsa_87 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x13
|
| 36 |
+
#define DER_OID_SZ_id_ml_dsa_87 11
|
| 37 |
+
extern const unsigned char ossl_der_oid_id_ml_dsa_87[DER_OID_SZ_id_ml_dsa_87];
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
int ossl_DER_w_algorithmIdentifier_ML_DSA(WPACKET *pkt, int tag, ML_DSA_KEY *key);
|