/*1* osd_sec.h - OSD security manager API2*3* Copyright (C) 2008 Panasas Inc. All rights reserved.4*5* Authors:6* Boaz Harrosh <[email protected]>7* Benny Halevy <[email protected]>8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License version 211*12*/13#ifndef __OSD_SEC_H__14#define __OSD_SEC_H__1516#include "osd_protocol.h"17#include "osd_types.h"1819/*20* Contains types and constants of osd capabilities and security21* encoding/decoding.22* API is trying to keep security abstract so initiator of an object23* based pNFS client knows as little as possible about security and24* capabilities. It is the Server's osd-initiator place to know more.25* Also can be used by osd-target.26*/27void osd_sec_encode_caps(void *caps, ...);/* NI */28void osd_sec_init_nosec_doall_caps(void *caps,29const struct osd_obj_id *obj, bool is_collection, const bool is_v1);3031bool osd_is_sec_alldata(struct osd_security_parameters *sec_params);3233/* Conditionally sign the CDB according to security setting in ocdb34* with cap_key */35void osd_sec_sign_cdb(struct osd_cdb *ocdb, const u8 *cap_key);3637/* Unconditionally sign the BIO data with cap_key.38* Check for osd_is_sec_alldata() was done prior to calling this. */39void osd_sec_sign_data(void *data_integ, struct bio *bio, const u8 *cap_key);4041/* Version independent copy of caps into the cdb */42void osd_set_caps(struct osd_cdb *cdb, const void *caps);4344#endif /* ndef __OSD_SEC_H__ */454647