BSL v0.0.0
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
PolicyProvider.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 The Johns Hopkins University Applied Physics
3 * Laboratory LLC.
4 *
5 * This file is part of the Bundle Protocol Security Library (BSL).
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * This work was performed for the Jet Propulsion Laboratory, California
18 * Institute of Technology, sponsored by the United States Government under
19 * the prime contract 80NM0018D0004 between the Caltech and NASA under
20 * subcontract 1700763.
21 */
27#include <BPSecLib_Private.h>
28
29#include "PublicInterfaceImpl.h"
30
32 const BSL_BundleRef_t *bundle, BSL_PolicyLocation_e location)
33{
34 // TODO - this should just check the policy_registry to see what is there,.
35 // and if it's present then just call the callbacks and pass through the arguments.
36 CHK_ARG_NONNULL(bsl);
37 CHK_ARG_NONNULL(output_action_set);
38 CHK_ARG_NONNULL(bundle);
39 CHK_PRECONDITION(bsl->policy_registry.query_fn != NULL);
40 return bsl->policy_registry.query_fn(bsl->policy_registry.user_data, output_action_set, bundle, location);
41}
Single entry-point include file for all of the BPSec Lib (BSL) frontend API.
BSL_PolicyLocation_e
Indicates where in the lifecycle of the BPA the bundle is querying for security policy.
int BSL_PolicyRegistry_InspectActions(const BSL_LibCtx_t *bsl, BSL_SecurityActionSet_t *output_action_set, const BSL_BundleRef_t *bundle, BSL_PolicyLocation_e location)
Queries the policy provider for any security operations to take on the bundle.
Private interface for the dynamic backend library context.
Reference to a Bundle owned and stored in the host BPA.
Concrete definition of library context.
BSL_PolicyInspect_f query_fn
Function pointer to query policy.
Contains the populated security operations for this bundle.