Fix honda findings related to CA certificates - #643
Open
mykola-kobets-epam wants to merge 112 commits into
Open
Conversation
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
When multiple update items are installed at same time, removing orphans function that called at the end of update item install can remove already partially installed blobs from other items that leads to undefined behaviour. The fix is to perform removing orphans in dedicated thread after all items are processed. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
ResizeSpace called Partition::Free + Partition::Allocate which toggled mAllocationCount on every resize. Since mAllocationCount > 0 suppresses disk re-reads, mAvailableSize became stale and lazy eviction stopped triggering, leading to ENOSPC on subsequent allocations. Add Partition::AdjustSize that adjusts mAvailableSize and triggers eviction when needed without touching mAllocationCount. ResizeSpace now calls AdjustSize instead of the Free/Allocate pair on the partition, keeping mAllocationCount as a pure count of live Space objects. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
…llation When a download is cancelled to process a new desired status, mCancel is set to true. Once the cancelled download finishes and mInProgress becomes false, a subsequent DownloadUpdateItems call would enter StartAction and immediately return false because mCancel was still set, causing the new download to fail with eCanceled without attempting any network activity. Only reject starting a new action when mCancel is true and mInProgress is also true, meaning there is an active download being cancelled. A stale mCancel with no in-progress action should not block the next download. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Checking mInProgressBlobs.IsEmpty is not necessary as when mNumActiveInstalls is zero then mInProgressBlobs is empty. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Move install service layers to InstallServiceLayers and install component layers to InstallComponentLayers to reduce size of InstallUpdateItem function. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Replace the mNumActiveInstalls counter and flat mInProgressBlobs list with per-item InstallItem structs that record which blobs and layers each concurrent install owns. Feed those into RemoveOrphans via AddInstallingItems so that blobs actively being downloaded are treated as used and not deleted as orphans. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
…cessed" This reverts commit 468fee5. Introducing installing items handling resolve this issue as well. So this fix is not required anymore. Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
RemoveOutdatedItems test items had empty manifest digests, causing CalcItemBlobsAndLayers to fail with eInvalidArgument when RemoveOrphans called CreateBlobPath on them. Provide valid sha256 digests and add a LoadImageManifest mock returning a valid manifest to fix the error. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Verify that blobs being downloaded by an active install are not deleted as orphans when RemoveOrphans runs concurrently via RemoveItem. The test blocks the downloader after the manifest file is created, triggers RemoveItem through ItemRemoverItf, and asserts the file survives before allowing the install to complete. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
The `releaseInstalling` RAII guard was scoped inside the `if (waitInstalling)` block, causing `ReleaseInstallingBlob` to fire immediately on block exit rather than at function return. Move the guard to function scope and add the `waitInstalling` check inside the lambda to preserve conditional behavior. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Add mSubnet to InstanceFirewallParams and populate it from the instance network allocation. This lets the service manager firewall recognise the instance's own network (subnet) and allow unrestricted communication between instances that share it, while still filtering cross-network traffic. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Replace per-item StaticArray<UnitInstanceStatus, N> with a flat StaticArray<UnitInstanceStatus*, cMaxNumInstances> in UnitInstancesStatuses, backed by mUnitInstancesStatuses owned by UnitStatusHandler. This removes the per-item instance limit and avoids large inline storage inside each UnitInstancesStatuses entry. Remove cMaxNumUpdateItemInstances constant as it is no longer needed. Update UnitInstancesStatuses::operator== to dereference pointers for deep value comparison. Update tests accordingly. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
On destruction iterate mPhysicalNetworks (the networks whose bridge was actually created) instead of every persisted provider, and treat eNotFound from DeleteLink as success in ClearNetwork. This stops the spurious "Can't clear network: err=link not found" error on systemctl restart aos.target, where the destructor tried to delete bridges that were never created this session or already removed when the last instance left. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Add a master parameter to InterfaceFactoryItf::CreateVlan so the vlan is enslaved to the bridge via IFLA_MASTER in the same RTM_NEWLINK message. CreateNetwork no longer issues a separate SetMasterLink, saving a netlink round-trip on network creation. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
… fallback Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Discarding a staged batch without applying it is not expressible with FlushBatch/Revert: FlushBatch commits and Revert undoes an already applied batch. Add AbortBatch to both backend interfaces and mocks. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
FlushBatch commits the firewall, traffic-monitor and storage backends in sequence and gives each failure its own recovery so a partial batch never leaves one backend applied while another is not: a firewall-flush failure aborts the still-staged traffic batch, a traffic-flush failure reverts the already-flushed firewall, and a storage-commit failure reverts both. The storage transaction is rolled back on every failure path, and the batch entries are re-applied per instance so one bad instance is isolated instead of failing the whole flush. Cover the firewall-, traffic- and commit-failure paths with tests. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
ReconcileInstances registered the network DNS server (AdoptDNSServer) only
on the leftover-cleanup path, not for instances adopted as running via
InitInstance. DeleteInstanceNetworkConfig then could not find the DNS
server ("DNS server not found for cleanup") and left stale addnhosts
entries when such an instance was later removed.
Adopt the DNS server before continuing the running-instance branch too.
AdoptDNSServer is idempotent, so multiple instances on one network are
safe; a failure is logged and does not abort adoption.
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Adopt a running leftover instance on restart, assert the network DNS server is registered (CreateServer), and that a subsequent StopInstanceNetwork drops the instance host entry (RemoveHost). Without the reconcile fix neither call happens, so the test fails. Update Start_KeepsLeftoverInstanceWithLiveInterface to expect the DNS server adoption too. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Signed-off-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com> Reviewed-by: Mykola Kobets <mykola_kobets@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
MakeUnique/MakeShared placement-constructed objects via the Allocator-based operator new, which only guarded a failed allocation with assert(). In release builds (NDEBUG) that assert is compiled out, so an exhausted allocator returned nullptr and the constructor still ran at a null address (UB). Both factories now call Allocator::Allocate() explicitly, check the result, and return an empty pointer instead of constructing when the allocation fails. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
MakeUnique/MakeShared already returned an empty (falsy) pointer on allocator exhaustion, but most call sites across the codebase never checked the result before dereferencing it, so an out-of-memory condition would still crash on a null-pointer dereference instead of being reported as an error. Add a check after every such call site, propagating eNoMemory using whichever convention the enclosing function already uses (Error, RetWithError<X>, bool, or void with a log message). Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Rework the memory allocation abstraction in memory.hpp: - Rename Allocator to AllocatorItf, keeping only Allocate/Free and a virtual destructor. This decouples callers from any particular allocation strategy. - Remove StaticAllocator, BufferAllocator and the custom placement new/delete operator overloads (allocator.hpp is deleted). Sizing a static arena correctly, especially for multithreaded usage, was error prone and required extra bookkeeping. - Add HeapAllocator (malloc/free backed) for Linux and test usage. Safety-critical targets can provide their own AllocatorItf implementation. - Rework SharedPtr to use intrusive control blocks (SharedControlBlock/SharedObjectControlBlock/SharedAdoptControlBlock) instead of allocator-external ref-counting, so it works uniformly over any AllocatorItf implementation. - MakeUnique/MakeShared now check the allocation result before constructing the object, returning a null pointer on failure instead of relying on assert(), which is stripped in release builds. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Convert common/ classes that previously owned a private static allocator to receive an AllocatorItf reference/pointer instead, following the two-phase construct-then-Init() pattern used across the codebase (allocator as the first Init()/constructor parameter): - crypto: CertLoader, CryptoHelper, mbedtls/openssl CryptoProviderItf implementations, pkcs11::Utils, PKCS11RSAPrivateKey. - pkcs11: LibraryContext, PKCS11Manager. - monitoring: Average, Monitoring. - spaceallocator: SpaceAllocator; also renamed its own "space" allocator members (OutdatedItem::mSpaceAllocator, the nested Space class's mSpaceAllocator) to avoid confusion with the new memory AllocatorItf member. - fs: CalculateSize takes an AllocatorItf parameter (first), and FileInfoProvider forwards it internally; dropped the shared static allocator and its guarding mutex, since callers now own their allocator's thread-safety. Multiple per-class named allocators are consolidated into a single AllocatorItf pointer where heap allocation removes the need for separate statically-sized pools. Unit tests construct a HeapAllocator and pass it in, always declared before any member that may allocate from it, since C++ destroys members in reverse declaration order. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Convert cm/ classes that previously owned a private static allocator to receive an AllocatorItf reference/pointer instead, following the two-phase construct-then-Init() pattern used across the codebase (allocator as the first Init() parameter, or constructor parameter for Instance/ComponentInstance/ServiceInstance which have no Init()): - alerts, imagemanager, nodeinfoprovider, storagestate, unitconfig, updatemanager (desiredstatushandler, unitstatushandler, updatemanager). - launcher: Launcher composition root and all of its composed sub-components (InstanceManager, ImageInfoProvider, StorageState, NodeManager, Node, Balancer, RunRequestsLoader), forwarding the same allocator instance through the whole ownership chain. Multiple per-class named allocators are consolidated into a single AllocatorItf pointer where heap allocation removes the need for separate statically-sized pools. Unit tests construct a HeapAllocator and pass it in, always declared before any member that may allocate from it, since C++ destroys members in reverse declaration order. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Convert iam/ classes that previously owned a private static allocator to receive an AllocatorItf reference/pointer instead, following the two-phase construct-then-Init() pattern used across the codebase (allocator as the first Init() parameter): - nodemanager: NodeManager. - certhandler: CertModule, PKCS11Module (consolidating its separate temp-object and local-cache allocators into a single AllocatorItf pointer). CertHandler has no Init(), so the allocator is passed through its constructor instead. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Convert sm/ classes that previously owned a private static allocator to receive an AllocatorItf reference/pointer instead, following the two-phase construct-then-Init() pattern used across the codebase (allocator as the first Init() parameter): - imagemanager: ImageManager. - launcher: Launcher. - networkmanager: NetworkManager (consolidating its separate network-info and resolv-hosts allocators into a single AllocatorItf pointer). - nodeconfig: NodeConfig. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
The map is keyed by instance ID only, so its capacity should be cMaxNumInstances rather than cMaxNumInstances * cMaxNumOwners, which oversized the allocation. Realign member declarations accordingly. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Remove unmatched suppression: templateRecursion from array. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
UpdateInstances() left mLaunchInProgress stuck true if StartLaunch() succeeded but the subsequent stop/start array allocation failed, since the early return skipped FinishLaunch(). Guard it with a DeferRelease that calls FinishLaunch() whenever the function exits with a non-none error, leaving the async thread responsible for FinishLaunch() on the success path. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
cppcheck flags mAllocator as an unused struct member since it is only ever referenced implicitly (as the source allocator passed to other members) rather than accessed directly. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
The AllocatorItf redesign dropped the mutex that previously guarded the shared pointer allocation's reference count inside the old Allocator class, leaving SharedControlBlock::Take/Give to increment and decrement a plain size_t with no synchronization. Concurrent copies/resets of a SharedPtr from multiple threads could therefore race on the ref count. Add a Mutex to SharedControlBlock guarding Take/Give, restoring the previous thread safety guarantee. Give() releases the lock before calling Dispose(), since disposal destroys the control block (and its mutex) itself. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
LibraryContext::PKCS11OpenSession opened a PKCS11 session but did not close it if allocating the SessionContext wrapper failed, leaking the underlying session handle. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
|
al1img
reviewed
Aug 21, 2026
| return AOS_ERROR_WRAP(ErrorEnum::eFailed); | ||
| } | ||
|
|
||
| if (!cert.mKeyUsage.HasValue()) { |
Collaborator
There was a problem hiding this comment.
if (cert.mKeyUsage.HasValue()) first
| cert.mVersion = crt->version; | ||
| cert.mIsCA = mbedtls_x509_crt_get_ca_istrue(crt) > 0; | ||
|
|
||
| cert.mKeyUsage.Reset(); |
|
|
||
| resultCert.mVersion = static_cast<int>(X509_get_version(cert)) + 1; | ||
|
|
||
| err = GetBasicConstraints(cert, resultCert.mIsCA); |
| return AOS_ERROR_WRAP(err); | ||
| } | ||
|
|
||
| err = GetKeyUsage(cert, resultCert.mKeyUsage); |
| return {nullptr, err}; | ||
| } | ||
|
|
||
| err = ValidateCertificateChain(*chain); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.