@@ -24,8 +24,6 @@ struct InnerCatalystSignedDocument {
2424 metadata : Metadata ,
2525 /// Document Content
2626 content : Content ,
27- /// Document Author
28- author : KidUri ,
2927 /// Signatures
3028 signatures : Signatures ,
3129}
@@ -74,17 +72,13 @@ impl TryFrom<&[u8]> for CatalystSignedDocument {
7472 } ,
7573 Some ,
7674 ) ;
77- let author = signatures. as_ref ( ) . and_then ( |s| s. kids ( ) . first ( ) . cloned ( ) ) ;
7875
7976 if cose_sign. payload . is_none ( ) {
8077 errors. push ( anyhow ! ( "Document Content is missing" ) ) ;
8178 }
82- if author. is_none ( ) {
83- errors. push ( anyhow ! ( "Document Author is missing" ) ) ;
84- }
8579
86- match ( cose_sign. payload , author , metadata, signatures) {
87- ( Some ( payload) , Some ( author ) , Some ( metadata) , Some ( signatures) ) => {
80+ match ( cose_sign. payload , metadata, signatures) {
81+ ( Some ( payload) , Some ( metadata) , Some ( signatures) ) => {
8882 let content = Content :: new (
8983 payload,
9084 metadata. content_type ( ) ,
@@ -99,7 +93,6 @@ impl TryFrom<&[u8]> for CatalystSignedDocument {
9993 inner : InnerCatalystSignedDocument {
10094 metadata,
10195 content,
102- author,
10396 signatures,
10497 }
10598 . into ( ) ,
@@ -137,9 +130,9 @@ impl CatalystSignedDocument {
137130 & self . inner . content
138131 }
139132
140- /// Return a Document's author
133+ /// Return a Document's signatures
141134 #[ must_use]
142- pub fn author ( & self ) -> KidUri {
143- self . inner . author . clone ( )
135+ pub fn signatures ( & self ) -> & Signatures {
136+ & self . inner . signatures
144137 }
145138}
0 commit comments