Skip to content

Commit 62c803c

Browse files
committed
Fix build errors
1 parent a674b8e commit 62c803c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/COSE/Signer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void setKey(CBORObject keyIn) throws CoseException {
8282
* @since COSE 0.9.1
8383
* @param keyIn key to be used for signing or verification
8484
*/
85-
public void setKey(OneKey keyIn) {
85+
public void setKey(OneKey keyIn) throws CoseException {
8686
setupKey(keyIn);
8787
}
8888

@@ -92,7 +92,7 @@ public void setKey(OneKey keyIn) {
9292
*
9393
* @param key key to be used
9494
*/
95-
private void setupKey(OneKey key) {
95+
private void setupKey(OneKey key) throws CoseException {
9696
CBORObject cn2;
9797
CBORObject cn;
9898

@@ -103,13 +103,13 @@ private void setupKey(OneKey key) {
103103
cn = key.get(KeyKeys.Algorithm);
104104
if (cn != null) {
105105
cn2 = findAttribute(HeaderKeys.Algorithm);
106-
if (cn2 == null) addAttribute(HeaderKeys.Algorithm, cn, Attribute.ProtectedAttributes);
106+
if (cn2 == null) addAttribute(HeaderKeys.Algorithm, cn, Attribute.PROTECTED);
107107
}
108108

109109
cn = key.get(KeyKeys.KeyId);
110110
if (cn != null) {
111111
cn2 = findAttribute(HeaderKeys.KID);
112-
if (cn2 == null) addAttribute(HeaderKeys.KID, cn, Attribute.UnprotectedAttributes);
112+
if (cn2 == null) addAttribute(HeaderKeys.KID, cn, Attribute.UNPROTECTED);
113113
}
114114
}
115115

0 commit comments

Comments
 (0)