You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change-set removes the crypto package under
core/chaincode/shim. All of its functions have
been moved to the accesscontrol package and
the chaincode examples using it have been updated
to use the new package.
Notice that the accesscontrol package is still
under development. More change-sets will be
submitted to shape it.
This change-set comes in the context of
https://jira.hyperledger.org/browse/FAB-831
Change-Id: I42bc59265f1a84aae71e971c063d119a410eb361
Signed-off-by: Angelo De Caro <[email protected]>
// TODO: The package accesscontrol still depends on the initialization
14
+
// of the primitives package.
15
+
// This has to be removed by using the BCCSP which will carry this information.
16
+
// A similar approach has been used to remove the calls
17
+
// to InitSecurityLevel and SetSecurityLevel from the core.
18
+
primitives.SetSecurityLevel("SHA2", 256)
19
+
20
+
return&AccessControlShim{stub}
21
+
}
22
+
23
+
// AccessControlShim wraps the object passed to chaincode for shim side handling of
24
+
// APIs to provide access control capabilities.
25
+
typeAccessControlShimstruct {
26
+
stub shim.ChaincodeStubInterface
27
+
}
28
+
29
+
//ReadCertAttribute is used to read an specific attribute from the transaction certificate, *attributeName* is passed as input parameter to this function.
//VerifyAttribute is used to verify if the transaction certificate has an attribute with name *attributeName* and value *attributeValue* which are the input parameters received by this function.
//VerifyAttributes does the same as VerifyAttribute but it checks for a list of attributes and their respective values instead of a single attribute/value pair
//ReadCertAttribute is used to read an specific attribute from the transaction certificate, *attributeName* is passed as input parameter to this function.
//VerifyAttribute is used to verify if the transaction certificate has an attribute with name *attributeName* and value *attributeValue* which are the input parameters received by this function.
//VerifyAttributes does the same as VerifyAttribute but it checks for a list of attributes and their respective values instead of a single attribute/value pair
0 commit comments