Rename Sign0 to Sign1
Change all of the internal and interface names from Sign0 to Sign1 which is what is in the RFC.
Create a set of defines so that old code will continue to work.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21b9a06..3e0562d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,8 @@
option (include_mac "Include COSE_MAC" ON)
option (include_mac0 "Include COSE_MAC0" ON)
option (include_sign "Include COSE_SIGN" ON)
-option (include_sign0 "Include COSE_SIGN0" ON)
+option (include_sign1 "Include COSE_SIGN1" ON)
+option (include_sign0 "Include COSE_SIGN1" ON)
set ( dist_dir ${CMAKE_BINARY_DIR}/dist )
set ( prefix ${CMAKE_INSTALL_PREFIX} )
@@ -66,7 +67,7 @@
if (NOT include_sign)
add_definitions( -DINCLUDE_SIGN=0 )
endif ()
-if (NOT include_sign0)
+if (NOT include_sign0 AND NOT include_sign1)
add_definitions( -DINCLUDE_SIGN0=0 )
endif ()
diff --git a/cmake/Coveralls.cmake b/cmake/Coveralls.cmake
deleted file mode 100644
index d60adba..0000000
--- a/cmake/Coveralls.cmake
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-# Copyright (C) 2014 Joakim Söderberg <joakim.soderberg@gmail.com>
-#
-
-
-#
-# Param _COVERAGE_SRCS A list of source files that coverage should be collected for.
-# Param _COVERALLS_UPLOAD Upload the result to coveralls?
-#
-function(coveralls_setup _COVERAGE_SRCS _COVERALLS_UPLOAD)
-
- if (ARGC GREATER 2)
- set(_CMAKE_SCRIPT_PATH ${ARGN})
- message("Coveralls: Using alternate CMake script dir: ${_CMAKE_SCRIPT_PATH}")
- else()
- set(_CMAKE_SCRIPT_PATH ${PROJECT_SOURCE_DIR}/cmake)
- endif()
-
- if (NOT EXISTS "${_CMAKE_SCRIPT_PATH}/CoverallsClear.cmake")
- message(FATAL_ERROR "Coveralls: Missing ${_CMAKE_SCRIPT_PATH}/CoverallsClear.cmake")
- endif()
-
- if (NOT EXISTS "${_CMAKE_SCRIPT_PATH}/CoverallsGenerateGcov.cmake")
- message(FATAL_ERROR "Coveralls: Missing ${_CMAKE_SCRIPT_PATH}/CoverallsGenerateGcov.cmake")
- endif()
-
- # When passing a CMake list to an external process, the list
- # will be converted from the format "1;2;3" to "1 2 3".
- # This means the script we're calling won't see it as a list
- # of sources, but rather just one long path. We remedy this
- # by replacing ";" with "*" and then reversing that in the script
- # that we're calling.
- # http://cmake.3232098.n2.nabble.com/Passing-a-CMake-list-quot-as-is-quot-to-a-custom-target-td6505681.html
- set(COVERAGE_SRCS_TMP ${_COVERAGE_SRCS})
- set(COVERAGE_SRCS "")
- foreach (COVERAGE_SRC ${COVERAGE_SRCS_TMP})
- set(COVERAGE_SRCS "${COVERAGE_SRCS}*${COVERAGE_SRC}")
- endforeach()
-
- #message("Coverage sources: ${COVERAGE_SRCS}")
- set(COVERALLS_FILE ${PROJECT_BINARY_DIR}/coveralls.json)
-
- add_custom_target(coveralls_generate
-
- # Zero the coverage counters.
- COMMAND ${CMAKE_COMMAND}
- -P "${_CMAKE_SCRIPT_PATH}/CoverallsClear.cmake"
-
- # Run regress tests.
- COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
-
- # Generate Gcov and translate it into coveralls JSON.
- # We do this by executing an external CMake script.
- # (We don't want this to run at CMake generation time, but after compilation and everything has run).
- COMMAND ${CMAKE_COMMAND}
- -DCOVERAGE_SRCS="${COVERAGE_SRCS}" # TODO: This is passed like: "a b c", not "a;b;c"
- -DCOVERALLS_OUTPUT_FILE="${COVERALLS_FILE}"
- -DCOV_PATH="${PROJECT_BINARY_DIR}"
- -DPROJECT_ROOT="${PROJECT_SOURCE_DIR}"
- -P "${_CMAKE_SCRIPT_PATH}/CoverallsGenerateGcov.cmake"
-
- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
- COMMENT "Generating coveralls output..."
- )
-
- if (_COVERALLS_UPLOAD)
- message("COVERALLS UPLOAD: ON")
-
- find_program(CURL_EXECUTABLE curl)
-
- if (NOT CURL_EXECUTABLE)
- message(FATAL_ERROR "Coveralls: curl not found! Aborting")
- endif()
-
- add_custom_target(coveralls_upload
- # Upload the JSON to coveralls.
- COMMAND ${CURL_EXECUTABLE}
- -S -F json_file=@${COVERALLS_FILE}
- https://coveralls.io/api/v1/jobs
-
- DEPENDS coveralls_generate
-
- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
- COMMENT "Uploading coveralls output...")
-
- add_custom_target(coveralls DEPENDS coveralls_upload)
- else()
- message("COVERALLS UPLOAD: OFF")
- add_custom_target(coveralls DEPENDS coveralls_generate)
- endif()
-
-endfunction()
-
-macro(coveralls_turn_on_coverage)
- if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
- message(FATAL_ERROR "Coveralls: Code coverage results with an optimised (non-Debug) build may be misleading! Add -DCMAKE_BUILD_TYPE=Debug")
- endif()
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
-endmacro()
diff --git a/include/configure.h b/include/configure.h
index f29966c..b782466 100644
--- a/include/configure.h
+++ b/include/configure.h
@@ -153,6 +153,6 @@
#ifndef INCLUDE_SIGN
#define INCLUDE_SIGN 1
#endif
-#ifndef INCLUDE_SIGN0
-#define INCLUDE_SIGN0 1
+#ifndef INCLUDE_SIGN1
+#define INCLUDE_SIGN1 1
#endif
diff --git a/include/cose.h b/include/cose.h
index 0b2ef02..8150b12 100644
--- a/include/cose.h
+++ b/include/cose.h
@@ -10,7 +10,7 @@
typedef struct _cose * HCOSE;
typedef struct _cose_sign * HCOSE_SIGN;
typedef struct _cose_signer * HCOSE_SIGNER;
-typedef struct _cose_sign0 * HCOSE_SIGN0;
+typedef struct _cose_sign1 * HCOSE_SIGN1;
typedef struct _cose_encrypt * HCOSE_ENCRYPT;
typedef struct _cose_enveloped * HCOSE_ENVELOPED;
typedef struct _cose_recipient * HCOSE_RECIPIENT;
@@ -62,7 +62,7 @@
typedef enum {
COSE_unknown_object = 0,
COSE_sign_object = 98,
- COSE_sign0_object = 18,
+ COSE_sign1_object = 18,
COSE_enveloped_object = 96,
COSE_encrypt_object = 16,
COSE_mac_object = 97,
@@ -315,16 +315,29 @@
* Sign routines
*/
-HCOSE_SIGN0 COSE_Sign0_Init(COSE_INIT_FLAGS flags, CBOR_CONTEXT_COMMA cose_errback * perr);
-bool COSE_Sign0_Free(HCOSE_SIGN0 cose);
+/* allow use of the old names */
+#define COSE_Sign0_Init COSE_Sign1_Init
+#define COSE_Sign0_Free COSE_Sign1_Free
-bool COSE_Sign0_SetContent(HCOSE_SIGN0 cose, const byte * rgbContent, size_t cbContent, cose_errback * errp);
-bool COSE_Sign0_SetExternal(HCOSE_SIGN0 hcose, const byte * pbExternalData, size_t cbExternalData, cose_errback * perr);
+#define COSE_Sign0_SetContent COSE_Sign1_SetContent
+#define COSE_Sign0_SetExternal COSE_Sign1_SetExternal
-bool COSE_Sign0_Sign(HCOSE_SIGN0 h, const cn_cbor * pkey, cose_errback * perr);
-bool COSE_Sign0_validate(HCOSE_SIGN0 hSign, const cn_cbor * pkey, cose_errback * perr);
-cn_cbor * COSE_Sign0_map_get_int(HCOSE_SIGN0 h, int key, int flags, cose_errback * perror);
-bool COSE_Sign0_map_put_int(HCOSE_SIGN0 cose, int key, cn_cbor * value, int flags, cose_errback * errp);
+#define COSE_Sign0_Sign COSE_Sign1_Sign
+#define COSE_Sign0_validate COSE_Sign1_validate
+#define COSE_Sign0_map_get_int COSE_Sign1_map_get_int
+#define COSE_Sign0_map_put_int COSE_Sign1_map_put_int
+
+
+HCOSE_SIGN1 COSE_Sign1_Init(COSE_INIT_FLAGS flags, CBOR_CONTEXT_COMMA cose_errback * perr);
+bool COSE_Sign1_Free(HCOSE_SIGN1 cose);
+
+bool COSE_Sign1_SetContent(HCOSE_SIGN1 cose, const byte * rgbContent, size_t cbContent, cose_errback * errp);
+bool COSE_Sign1_SetExternal(HCOSE_SIGN1 hcose, const byte * pbExternalData, size_t cbExternalData, cose_errback * perr);
+
+bool COSE_Sign1_Sign(HCOSE_SIGN1 h, const cn_cbor * pkey, cose_errback * perr);
+bool COSE_Sign1_validate(HCOSE_SIGN1 hSign, const cn_cbor * pkey, cose_errback * perr);
+cn_cbor * COSE_Sign1_map_get_int(HCOSE_SIGN1 h, int key, int flags, cose_errback * perror);
+bool COSE_Sign1_map_put_int(HCOSE_SIGN1 cose, int key, cn_cbor * value, int flags, cose_errback * errp);
/*
* Counter Signature Routines
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8e7ba3e..62e8b43 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,7 +13,7 @@
MacMessage.c
MacMessage0.c
Sign.c
- Sign0.c
+ Sign1.c
cbor.c
Encrypt.c
Encrypt0.c
diff --git a/src/Cose.c b/src/Cose.c
index 1e4d3cc..5982e60 100644
--- a/src/Cose.c
+++ b/src/Cose.c
@@ -174,9 +174,9 @@
#endif
break;
- case COSE_sign0_object:
-#if INCLUDE_SIGN0
- h = (HCOSE)_COSE_Sign0_Init_From_Object(cborRoot, NULL, CBOR_CONTEXT_PARAM_COMMA perr);
+ case COSE_sign1_object:
+#if INCLUDE_SIGN1
+ h = (HCOSE)_COSE_Sign1_Init_From_Object(cborRoot, NULL, CBOR_CONTEXT_PARAM_COMMA perr);
if (h == NULL) {
goto errorReturn;
}
diff --git a/src/Sign0.c b/src/Sign1.c
similarity index 78%
rename from src/Sign0.c
rename to src/Sign1.c
index 73b8e1e..2c36c46 100644
--- a/src/Sign0.c
+++ b/src/Sign1.c
@@ -9,18 +9,18 @@
#include "configure.h"
#include "crypto.h"
-#if INCLUDE_SIGN0
+#if INCLUDE_SIGN1
-bool _COSE_Signer0_sign(COSE_Sign0Message * pSigner, const cn_cbor * pKey, cose_errback * perr);
-bool _COSE_Signer0_validate(COSE_Sign0Message * pSign, const cn_cbor * pKey, cose_errback * perr);
-void _COSE_Sign0_Release(COSE_Sign0Message * p);
+bool _COSE_Signer0_sign(COSE_Sign1Message * pSigner, const cn_cbor * pKey, cose_errback * perr);
+bool _COSE_Signer0_validate(COSE_Sign1Message * pSign, const cn_cbor * pKey, cose_errback * perr);
+void _COSE_Sign1_Release(COSE_Sign1Message * p);
-COSE * Sign0Root = NULL;
+COSE * Sign1Root = NULL;
/*! \private
-* @brief Test if a HCOSE_SIGN0 handle is valid
+* @brief Test if a HCOSE_SIGN1 handle is valid
*
-* Internal function to test if a sign0 message handle is valid.
+* Internal function to test if a sign1 message handle is valid.
* This will start returning invalid results and cause the code to
* crash if handles are not released before the memory that underlies them
* is deallocated. This is an issue of a block allocator is used since
@@ -31,72 +31,72 @@
* @returns result of check
*/
-bool IsValidSign0Handle(HCOSE_SIGN0 h)
+bool IsValidSign1Handle(HCOSE_SIGN1 h)
{
- COSE_Sign0Message * p = (COSE_Sign0Message *)h;
+ COSE_Sign1Message * p = (COSE_Sign1Message *)h;
if (p == NULL) return false;
- return _COSE_IsInList(Sign0Root, (COSE *) p);
+ return _COSE_IsInList(Sign1Root, (COSE *) p);
}
-HCOSE_SIGN0 COSE_Sign0_Init(COSE_INIT_FLAGS flags, CBOR_CONTEXT_COMMA cose_errback * perr)
+HCOSE_SIGN1 COSE_Sign1_Init(COSE_INIT_FLAGS flags, CBOR_CONTEXT_COMMA cose_errback * perr)
{
CHECK_CONDITION(flags == COSE_INIT_FLAGS_NONE, COSE_ERR_INVALID_PARAMETER);
- COSE_Sign0Message * pobj = (COSE_Sign0Message *)COSE_CALLOC(1, sizeof(COSE_Sign0Message), context);
+ COSE_Sign1Message * pobj = (COSE_Sign1Message *)COSE_CALLOC(1, sizeof(COSE_Sign1Message), context);
if (pobj == NULL) {
if (perr != NULL) perr->err = COSE_ERR_OUT_OF_MEMORY;
return NULL;
}
if (!_COSE_Init(flags,&pobj->m_message, COSE_sign_object, CBOR_CONTEXT_PARAM_COMMA perr)) {
- _COSE_Sign0_Release(pobj);
+ _COSE_Sign1_Release(pobj);
COSE_FREE(pobj, context);
return NULL;
}
- _COSE_InsertInList(&Sign0Root, &pobj->m_message);
+ _COSE_InsertInList(&Sign1Root, &pobj->m_message);
- return (HCOSE_SIGN0)pobj;
+ return (HCOSE_SIGN1)pobj;
errorReturn:
return NULL;
}
-HCOSE_SIGN0 _COSE_Sign0_Init_From_Object(cn_cbor * cbor, COSE_Sign0Message * pIn, CBOR_CONTEXT_COMMA cose_errback * perr)
+HCOSE_SIGN1 _COSE_Sign1_Init_From_Object(cn_cbor * cbor, COSE_Sign1Message * pIn, CBOR_CONTEXT_COMMA cose_errback * perr)
{
- COSE_Sign0Message * pobj = pIn;
+ COSE_Sign1Message * pobj = pIn;
cose_errback error = { 0 };
if (perr == NULL) perr = &error;
- if (pobj == NULL) pobj = (COSE_Sign0Message *)COSE_CALLOC(1, sizeof(COSE_Sign0Message), context);
+ if (pobj == NULL) pobj = (COSE_Sign1Message *)COSE_CALLOC(1, sizeof(COSE_Sign1Message), context);
CHECK_CONDITION(pobj != NULL, COSE_ERR_OUT_OF_MEMORY);
if (!_COSE_Init_From_Object(&pobj->m_message, cbor, CBOR_CONTEXT_PARAM_COMMA perr)) {
goto errorReturn;
}
- if (pIn == NULL) _COSE_InsertInList(&Sign0Root, &pobj->m_message);
+ if (pIn == NULL) _COSE_InsertInList(&Sign1Root, &pobj->m_message);
- return(HCOSE_SIGN0)pobj;
+ return(HCOSE_SIGN1)pobj;
errorReturn:
if (pobj != NULL) {
- _COSE_Sign0_Release(pobj);
+ _COSE_Sign1_Release(pobj);
if (pIn == NULL) COSE_FREE(pobj, context);
}
return NULL;
}
-bool COSE_Sign0_Free(HCOSE_SIGN0 h)
+bool COSE_Sign1_Free(HCOSE_SIGN1 h)
{
#ifdef USE_CBOR_CONTEXT
cn_cbor_context context;
#endif
- COSE_Sign0Message * pMessage = (COSE_Sign0Message *)h;
+ COSE_Sign1Message * pMessage = (COSE_Sign1Message *)h;
- if (!IsValidSign0Handle(h)) return false;
+ if (!IsValidSign1Handle(h)) return false;
// Check reference counting
if (pMessage->m_message.m_refCount > 1) {
@@ -104,34 +104,34 @@
return true;
}
- _COSE_RemoveFromList(&Sign0Root, &pMessage->m_message);
+ _COSE_RemoveFromList(&Sign1Root, &pMessage->m_message);
#ifdef USE_CBOR_CONTEXT
context = pMessage->m_message.m_allocContext;
#endif
- _COSE_Sign0_Release(pMessage);
+ _COSE_Sign1_Release(pMessage);
COSE_FREE(pMessage, &context);
return true;
}
-void _COSE_Sign0_Release(COSE_Sign0Message * p)
+void _COSE_Sign1_Release(COSE_Sign1Message * p)
{
_COSE_Release(&p->m_message);
}
-bool COSE_Sign0_SetContent(HCOSE_SIGN0 h, const byte * rgb, size_t cb, cose_errback * perr)
+bool COSE_Sign1_SetContent(HCOSE_SIGN1 h, const byte * rgb, size_t cb, cose_errback * perr)
{
#ifdef USE_CBOR_CONTEXT
cn_cbor_context * context = NULL;
#endif
cn_cbor * p = NULL;
- COSE_Sign0Message * pMessage = (COSE_Sign0Message *)h;
+ COSE_Sign1Message * pMessage = (COSE_Sign1Message *)h;
bool fRet = false;
- CHECK_CONDITION(IsValidSign0Handle(h), COSE_ERR_INVALID_HANDLE);
+ CHECK_CONDITION(IsValidSign1Handle(h), COSE_ERR_INVALID_HANDLE);
CHECK_CONDITION(rgb != NULL, COSE_ERR_INVALID_PARAMETER);
#ifdef USE_CBOR_CONTEXT
@@ -166,25 +166,25 @@
* @return result of the operation.
*/
-bool COSE_Sign0_SetExternal(HCOSE_SIGN0 hcose, const byte * pbExternalData, size_t cbExternalData, cose_errback * perr)
+bool COSE_Sign1_SetExternal(HCOSE_SIGN1 hcose, const byte * pbExternalData, size_t cbExternalData, cose_errback * perr)
{
- if (!IsValidSign0Handle(hcose)) {
+ if (!IsValidSign1Handle(hcose)) {
if (perr != NULL) perr->err = COSE_ERR_INVALID_HANDLE;
return false;
}
- return _COSE_SetExternal(&((COSE_Sign0Message *)hcose)->m_message, pbExternalData, cbExternalData, perr);
+ return _COSE_SetExternal(&((COSE_Sign1Message *)hcose)->m_message, pbExternalData, cbExternalData, perr);
}
-bool COSE_Sign0_Sign(HCOSE_SIGN0 h, const cn_cbor * pKey, cose_errback * perr)
+bool COSE_Sign1_Sign(HCOSE_SIGN1 h, const cn_cbor * pKey, cose_errback * perr)
{
#ifdef USE_CBOR_CONTEXT
// cn_cbor_context * context = NULL;
#endif
- COSE_Sign0Message * pMessage = (COSE_Sign0Message *)h;
+ COSE_Sign1Message * pMessage = (COSE_Sign1Message *)h;
const cn_cbor * pcborProtected;
- if (!IsValidSign0Handle(h)) {
+ if (!IsValidSign1Handle(h)) {
CHECK_CONDITION(false, COSE_ERR_INVALID_HANDLE);
errorReturn:
return false;
@@ -201,16 +201,16 @@
return true;
}
-bool COSE_Sign0_validate(HCOSE_SIGN0 hSign, const cn_cbor * pKey, cose_errback * perr)
+bool COSE_Sign1_validate(HCOSE_SIGN1 hSign, const cn_cbor * pKey, cose_errback * perr)
{
bool f;
- COSE_Sign0Message * pSign;
+ COSE_Sign1Message * pSign;
const cn_cbor * cnContent;
const cn_cbor * cnProtected;
- CHECK_CONDITION(IsValidSign0Handle(hSign), COSE_ERR_INVALID_HANDLE);
+ CHECK_CONDITION(IsValidSign1Handle(hSign), COSE_ERR_INVALID_HANDLE);
- pSign = (COSE_Sign0Message *)hSign;
+ pSign = (COSE_Sign1Message *)hSign;
cnContent = _COSE_arrayget_int(&pSign->m_message, INDEX_BODY);
CHECK_CONDITION(cnContent != NULL && cnContent->type == CN_CBOR_BYTES, COSE_ERR_INVALID_PARAMETER);
@@ -227,29 +227,29 @@
}
-cn_cbor * COSE_Sign0_map_get_int(HCOSE_SIGN0 h, int key, int flags, cose_errback * perror)
+cn_cbor * COSE_Sign1_map_get_int(HCOSE_SIGN1 h, int key, int flags, cose_errback * perror)
{
- if (!IsValidSign0Handle(h)) {
+ if (!IsValidSign1Handle(h)) {
if (perror != NULL) perror->err = COSE_ERR_INVALID_HANDLE;
return NULL;
}
- return _COSE_map_get_int(&((COSE_Sign0Message *)h)->m_message, key, flags, perror);
+ return _COSE_map_get_int(&((COSE_Sign1Message *)h)->m_message, key, flags, perror);
}
-bool COSE_Sign0_map_put_int(HCOSE_SIGN0 h, int key, cn_cbor * value, int flags, cose_errback * perr)
+bool COSE_Sign1_map_put_int(HCOSE_SIGN1 h, int key, cn_cbor * value, int flags, cose_errback * perr)
{
- CHECK_CONDITION(IsValidSign0Handle(h), COSE_ERR_INVALID_HANDLE);
+ CHECK_CONDITION(IsValidSign1Handle(h), COSE_ERR_INVALID_HANDLE);
CHECK_CONDITION(value != NULL, COSE_ERR_INVALID_PARAMETER);
- return _COSE_map_put(&((COSE_Sign0Message *)h)->m_message, key, value, flags, perr);
+ return _COSE_map_put(&((COSE_Sign1Message *)h)->m_message, key, value, flags, perr);
errorReturn:
return false;
}
-static bool CreateSign0AAD(COSE_Sign0Message * pMessage, byte ** ppbToSign, size_t * pcbToSign, char * szContext, cose_errback * perr)
+static bool CreateSign1AAD(COSE_Sign1Message * pMessage, byte ** ppbToSign, size_t * pcbToSign, char * szContext, cose_errback * perr)
{
cn_cbor * pArray = NULL;
#ifdef USE_CBOR_CONTEXT
@@ -311,7 +311,7 @@
return false;
}
-bool _COSE_Signer0_sign(COSE_Sign0Message * pSigner, const cn_cbor * pKey, cose_errback * perr)
+bool _COSE_Signer0_sign(COSE_Sign1Message * pSigner, const cn_cbor * pKey, cose_errback * perr)
{
#ifdef USE_CBOR_CONTEXT
cn_cbor_context * context = &pSigner->m_message.m_allocContext;
@@ -349,7 +349,7 @@
}
- if (!CreateSign0AAD(pSigner, &pbToSign, &cbToSign, "Signature1", perr)) goto errorReturn;
+ if (!CreateSign1AAD(pSigner, &pbToSign, &cbToSign, "Signature1", perr)) goto errorReturn;
switch (alg) {
#ifdef USE_ECDSA_SHA_256
@@ -379,7 +379,7 @@
return f;
}
-bool _COSE_Signer0_validate(COSE_Sign0Message * pSign, const cn_cbor * pKey, cose_errback * perr)
+bool _COSE_Signer0_validate(COSE_Sign1Message * pSign, const cn_cbor * pKey, cose_errback * perr)
{
byte * pbToSign = NULL;
int alg;
@@ -408,7 +408,7 @@
// Build protected headers
- if (!CreateSign0AAD(pSign, &pbToSign, &cbToSign, "Signature1", perr)) goto errorReturn;
+ if (!CreateSign1AAD(pSign, &pbToSign, &cbToSign, "Signature1", perr)) goto errorReturn;
switch (alg) {
#ifdef USE_ECDSA_SHA_256
diff --git a/src/cose_int.h b/src/cose_int.h
index 524fe82..9debbc0 100644
--- a/src/cose_int.h
+++ b/src/cose_int.h
@@ -44,7 +44,7 @@
typedef struct {
COSE m_message; // The message object
-} COSE_Sign0Message;
+} COSE_Sign1Message;
struct _SignerInfo {
COSE m_message;
@@ -212,9 +212,9 @@
extern bool _COSE_Signer_validate(COSE_SignMessage * pSign, COSE_SignerInfo * pSigner, const cn_cbor * pbContent, const cn_cbor * pbProtected, cose_errback * perr);
-// Sign0 items
-extern HCOSE_SIGN0 _COSE_Sign0_Init_From_Object(cn_cbor * cbor, COSE_Sign0Message * pIn, CBOR_CONTEXT_COMMA cose_errback * perr);
-extern void _COSE_Sign0_Release(COSE_Sign0Message * p);
+// Sign1 items
+extern HCOSE_SIGN1 _COSE_Sign1_Init_From_Object(cn_cbor * cbor, COSE_Sign1Message * pIn, CBOR_CONTEXT_COMMA cose_errback * perr);
+extern void _COSE_Sign1_Release(COSE_Sign1Message * p);
// Mac-ed items
extern HCOSE_MAC _COSE_Mac_Init_From_Object(cn_cbor *, COSE_MacMessage * pIn, CBOR_CONTEXT_COMMA cose_errback * errp);
diff --git a/test/sign.c b/test/sign.c
index 6231526..73af7c5 100644
--- a/test/sign.c
+++ b/test/sign.c
@@ -8,7 +8,7 @@
#include <cose.h>
#include <configure.h>
#include <cn-cbor/cn-cbor.h>
-#if (INCLUDE_SIGN && !(INCLUDE_SIGN0 || INCLUDE_ENCRYPT || INCLUDE_MAC)) || (INCLUDE_SIGN0 && !INCLUDE_SIGN)
+#if (INCLUDE_SIGN && !(INCLUDE_SIGN1 || INCLUDE_ENCRYPT || INCLUDE_MAC)) || (INCLUDE_SIGN1 && !INCLUDE_SIGN)
#include <cose_int.h>
#endif
@@ -253,13 +253,13 @@
}
#endif
-#if INCLUDE_SIGN0
-int _ValidateSign0(const cn_cbor * pControl, const byte * pbEncoded, size_t cbEncoded)
+#if INCLUDE_SIGN1
+int _ValidateSign1(const cn_cbor * pControl, const byte * pbEncoded, size_t cbEncoded)
{
const cn_cbor * pInput = cn_cbor_mapget_string(pControl, "input");
const cn_cbor * pFail;
const cn_cbor * pSign;
- HCOSE_SIGN0 hSig;
+ HCOSE_SIGN1 hSig;
int type;
bool fFail = false;
bool fFailBody = false;
@@ -274,12 +274,12 @@
pSign = cn_cbor_mapget_string(pInput, "sign0");
if ((pSign == NULL) || (pSign->type != CN_CBOR_MAP)) goto returnError;
- hSig = (HCOSE_SIGN0)COSE_Decode(pbEncoded, cbEncoded, &type, COSE_sign0_object, CBOR_CONTEXT_PARAM_COMMA NULL);
+ hSig = (HCOSE_SIGN1)COSE_Decode(pbEncoded, cbEncoded, &type, COSE_sign1_object, CBOR_CONTEXT_PARAM_COMMA NULL);
if (hSig == NULL) {
if (fFailBody) return 0; else goto returnError;
}
- if (!SetReceivingAttributes((HCOSE)hSig, pSign, Attributes_Sign0_protected)) goto returnError;
+ if (!SetReceivingAttributes((HCOSE)hSig, pSign, Attributes_Sign1_protected)) goto returnError;
cn_cbor * pkey = BuildKey(cn_cbor_mapget_string(pSign, "key"), false);
if (pkey == NULL) {
@@ -287,11 +287,11 @@
goto exitHere;
}
- cn_cbor * alg = COSE_Sign0_map_get_int(hSig, COSE_Header_Algorithm, COSE_BOTH, NULL);
+ cn_cbor * alg = COSE_Sign1_map_get_int(hSig, COSE_Header_Algorithm, COSE_BOTH, NULL);
if (!IsAlgorithmSupported(alg)) fNoAlgSupport = true;
pFail = cn_cbor_mapget_string(pInput, "fail");
- if (COSE_Sign0_validate(hSig, pkey, NULL)) {
+ if (COSE_Sign1_validate(hSig, pkey, NULL)) {
if (fNoAlgSupport) {
fFail = true;
}
@@ -305,7 +305,7 @@
else if ((pFail == NULL) || (pFail->type == CN_CBOR_FALSE)) fFail = true;
}
- COSE_Sign0_Free(hSig);
+ COSE_Sign1_Free(hSig);
if (fFailBody) {
if (!fFail) fFail = true;
@@ -322,15 +322,15 @@
return 0;
}
-int ValidateSign0(const cn_cbor * pControl)
+int ValidateSign1(const cn_cbor * pControl)
{
int cbEncoded;
byte * pbEncoded = GetCBOREncoding(pControl, &cbEncoded);
- return _ValidateSign0(pControl, pbEncoded, cbEncoded);
+ return _ValidateSign1(pControl, pbEncoded, cbEncoded);
}
-int BuildSign0Message(const cn_cbor * pControl)
+int BuildSign1Message(const cn_cbor * pControl)
{
//
// We don't run this for all control sequences - skip those marked fail.
@@ -339,7 +339,7 @@
const cn_cbor * pFail = cn_cbor_mapget_string(pControl, "fail");
if ((pFail != NULL) && (pFail->type == CN_CBOR_TRUE)) return 0;
- HCOSE_SIGN0 hSignObj = COSE_Sign0_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
+ HCOSE_SIGN1 hSignObj = COSE_Sign1_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
const cn_cbor * pInputs = cn_cbor_mapget_string(pControl, "input");
if (pInputs == NULL) goto returnError;
@@ -347,23 +347,23 @@
if (pSign == NULL) goto returnError;
const cn_cbor * pContent = cn_cbor_mapget_string(pInputs, "plaintext");
- if (!COSE_Sign0_SetContent(hSignObj, pContent->v.bytes, pContent->length, NULL)) goto returnError;
+ if (!COSE_Sign1_SetContent(hSignObj, pContent->v.bytes, pContent->length, NULL)) goto returnError;
- if (!SetSendingAttributes((HCOSE)hSignObj, pSign, Attributes_Sign0_protected)) goto returnError;
+ if (!SetSendingAttributes((HCOSE)hSignObj, pSign, Attributes_Sign1_protected)) goto returnError;
cn_cbor * pkey = BuildKey(cn_cbor_mapget_string(pSign, "key"), false);
if (pkey == NULL) goto returnError;
- if (!COSE_Sign0_Sign(hSignObj, pkey, NULL)) goto returnError;
+ if (!COSE_Sign1_Sign(hSignObj, pkey, NULL)) goto returnError;
size_t cb = COSE_Encode((HCOSE)hSignObj, NULL, 0, 0) + 1;
byte * rgb = (byte *)malloc(cb);
cb = COSE_Encode((HCOSE)hSignObj, rgb, 0, cb);
- COSE_Sign0_Free(hSignObj);
+ COSE_Sign1_Free(hSignObj);
- int f = _ValidateSign0(pControl, rgb, cb);
+ int f = _ValidateSign1(pControl, rgb, cb);
free(rgb);
return f;
@@ -388,8 +388,8 @@
cose_errback cose_error;
hSign = COSE_Sign_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
-#if INCLUDE_SIGN0
- hSignBad = (HCOSE_SIGN)COSE_Sign0_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
+#if INCLUDE_SIGN1
+ hSignBad = (HCOSE_SIGN)COSE_Sign1_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
#else
hSignBad = (HCOSE_SIGN)COSE_CALLOC(1, sizeof(COSE), context);
#endif
@@ -499,22 +499,22 @@
}
#endif
-#if INCLUDE_SIGN0
-void Sign0_Corners()
+#if INCLUDE_SIGN1
+void Sign1_Corners()
{
- HCOSE_SIGN0 hSign = NULL;
- HCOSE_SIGN0 hSignNULL = NULL;
- HCOSE_SIGN0 hSignBad;
+ HCOSE_SIGN1 hSign = NULL;
+ HCOSE_SIGN1 hSignNULL = NULL;
+ HCOSE_SIGN1 hSignBad;
byte rgb[10];
cn_cbor * cn = cn_cbor_int_create(5, CBOR_CONTEXT_PARAM_COMMA NULL);
cose_errback cose_error;
- hSign = COSE_Sign0_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
+ hSign = COSE_Sign1_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
#if INCLUDE_SIGN
- hSignBad = (HCOSE_SIGN0)COSE_Sign_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
+ hSignBad = (HCOSE_SIGN1)COSE_Sign_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
#else
- hSignBad = (HCOSE_SIGN0)COSE_CALLOC(1, sizeof(COSE), context);
+ hSignBad = (HCOSE_SIGN1)COSE_CALLOC(1, sizeof(COSE), context);
#endif
// Look for invalid parameter
@@ -522,53 +522,53 @@
// bad handle checks
// null pointers
- CHECK_FAILURE(COSE_Sign0_SetContent(hSignNULL, rgb, 10, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_SetContent(hSignBad, rgb, 10, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_SetContent(hSign, NULL, 10, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
+ CHECK_FAILURE(COSE_Sign1_SetContent(hSignNULL, rgb, 10, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_SetContent(hSignBad, rgb, 10, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_SetContent(hSign, NULL, 10, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_get_int(hSignNULL, 1, COSE_BOTH, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_get_int(hSignBad, 1, COSE_BOTH, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_get_int(hSign, 1, COSE_BOTH, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_get_int(hSignNULL, 1, COSE_BOTH, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_get_int(hSignBad, 1, COSE_BOTH, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_get_int(hSign, 1, COSE_BOTH, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_put_int(hSignNULL, 1, cn, COSE_PROTECT_ONLY, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_put_int(hSignBad, 1, cn, COSE_PROTECT_ONLY, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_put_int(hSign, 1, NULL, COSE_PROTECT_ONLY, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
- CHECK_FAILURE(COSE_Sign0_map_put_int(hSign, 1, cn, COSE_PROTECT_ONLY | COSE_UNPROTECT_ONLY, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_put_int(hSignNULL, 1, cn, COSE_PROTECT_ONLY, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_put_int(hSignBad, 1, cn, COSE_PROTECT_ONLY, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_put_int(hSign, 1, NULL, COSE_PROTECT_ONLY, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
+ CHECK_FAILURE(COSE_Sign1_map_put_int(hSign, 1, cn, COSE_PROTECT_ONLY | COSE_UNPROTECT_ONLY, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
- CHECK_FAILURE(COSE_Sign0_Sign(hSignNULL, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_Sign(hSignBad, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_Sign(hSign, NULL, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
+ CHECK_FAILURE(COSE_Sign1_Sign(hSignNULL, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_Sign(hSignBad, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_Sign(hSign, NULL, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
- CHECK_FAILURE(COSE_Sign0_validate(hSignNULL, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_validate(hSignBad, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_validate(hSign, NULL, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
+ CHECK_FAILURE(COSE_Sign1_validate(hSignNULL, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_validate(hSignBad, cn, &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_validate(hSign, NULL, &cose_error), COSE_ERR_INVALID_PARAMETER, CFails++);
- CHECK_FAILURE(COSE_Sign0_SetExternal(hSignNULL, rgb, sizeof(rgb), &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- CHECK_FAILURE(COSE_Sign0_SetExternal(hSignBad, rgb, sizeof(rgb), &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_SetExternal(hSignNULL, rgb, sizeof(rgb), &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
+ CHECK_FAILURE(COSE_Sign1_SetExternal(hSignBad, rgb, sizeof(rgb), &cose_error), COSE_ERR_INVALID_HANDLE, CFails++);
- COSE_Sign0_Free(hSign);
+ COSE_Sign1_Free(hSign);
//
// Unsupported algorithm
- hSign = COSE_Sign0_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
+ hSign = COSE_Sign1_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
if (hSign == NULL) CFails++;
cn = cn_cbor_int_create(15, CBOR_CONTEXT_PARAM_COMMA NULL);
- if (!COSE_Sign0_SetContent(hSign, (byte *) "Message", 7, NULL)) CFails++;
- if (!COSE_Sign0_map_put_int(hSign, COSE_Header_Algorithm, cn_cbor_int_create(-99, CBOR_CONTEXT_PARAM_COMMA NULL), COSE_PROTECT_ONLY, NULL)) CFails++;
- CHECK_FAILURE(COSE_Sign0_Sign(hSign, cn, &cose_error), COSE_ERR_UNKNOWN_ALGORITHM, CFails++);
- COSE_Sign0_Free(hSign);
+ if (!COSE_Sign1_SetContent(hSign, (byte *) "Message", 7, NULL)) CFails++;
+ if (!COSE_Sign1_map_put_int(hSign, COSE_Header_Algorithm, cn_cbor_int_create(-99, CBOR_CONTEXT_PARAM_COMMA NULL), COSE_PROTECT_ONLY, NULL)) CFails++;
+ CHECK_FAILURE(COSE_Sign1_Sign(hSign, cn, &cose_error), COSE_ERR_UNKNOWN_ALGORITHM, CFails++);
+ COSE_Sign1_Free(hSign);
- hSign = COSE_Sign0_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
+ hSign = COSE_Sign1_Init(0, CBOR_CONTEXT_PARAM_COMMA NULL);
if (hSign == NULL) CFails++;
- if (!COSE_Sign0_SetContent(hSign, (byte *) "Message", 7, NULL)) CFails++;
+ if (!COSE_Sign1_SetContent(hSign, (byte *) "Message", 7, NULL)) CFails++;
- if (!COSE_Sign0_map_put_int(hSign, COSE_Header_Algorithm, cn_cbor_string_create("hmac", CBOR_CONTEXT_PARAM_COMMA NULL), COSE_PROTECT_ONLY, NULL)) CFails++;
- CHECK_FAILURE(COSE_Sign0_Sign(hSign, cn, &cose_error), COSE_ERR_UNKNOWN_ALGORITHM, CFails++);
+ if (!COSE_Sign1_map_put_int(hSign, COSE_Header_Algorithm, cn_cbor_string_create("hmac", CBOR_CONTEXT_PARAM_COMMA NULL), COSE_PROTECT_ONLY, NULL)) CFails++;
+ CHECK_FAILURE(COSE_Sign1_Sign(hSign, cn, &cose_error), COSE_ERR_UNKNOWN_ALGORITHM, CFails++);
- COSE_Sign0_Free(hSign);
+ COSE_Sign1_Free(hSign);
return;
}
diff --git a/test/test.c b/test/test.c
index 3948453..dd6d99a 100644
--- a/test/test.c
+++ b/test/test.c
@@ -419,9 +419,9 @@
break;
#endif
-#if INCLUDE_SIGN0
- case Attributes_Sign0_protected:
- f = COSE_Sign0_map_put_int((HCOSE_SIGN0)hHandle, keyNew, pValueNew, which, NULL);
+#if INCLUDE_SIGN1
+ case Attributes_Sign1_protected:
+ f = COSE_Sign1_map_put_int((HCOSE_SIGN1)hHandle, keyNew, pValueNew, which, NULL);
break;
#endif
@@ -475,9 +475,9 @@
break;
#endif
-#if INCLUDE_SIGN0
- case Attributes_Sign0_protected:
- if (!COSE_Sign0_SetExternal((HCOSE_SIGN0)hMsg, FromHex(pcn->v.str, (int)pcn->length), pcn->length / 2, NULL)) goto returnError;
+#if INCLUDE_SIGN1
+ case Attributes_Sign1_protected:
+ if (!COSE_Sign1_SetExternal((HCOSE_SIGN1)hMsg, FromHex(pcn->v.str, (int)pcn->length), pcn->length / 2, NULL)) goto returnError;
break;
#endif
}
@@ -529,9 +529,9 @@
break;
#endif
-#if INCLUDE_SIGN0
- case Attributes_Sign0_protected:
- if (!COSE_Sign0_SetExternal((HCOSE_SIGN0)hMsg, FromHex(pcn->v.str, (int)pcn->length), pcn->length / 2, NULL)) goto returnError;
+#if INCLUDE_SIGN1
+ case Attributes_Sign1_protected:
+ if (!COSE_Sign1_SetExternal((HCOSE_SIGN1)hMsg, FromHex(pcn->v.str, (int)pcn->length), pcn->length / 2, NULL)) goto returnError;
break;
#endif
}
@@ -662,8 +662,8 @@
#if INCLUDE_SIGN
Sign_Corners();
#endif
-#if INCLUDE_SIGN0
- Sign0_Corners();
+#if INCLUDE_SIGN1
+ Sign1_Corners();
#endif
#if INCLUDE_ENCRYPT || INCLUDE_MAC
Recipient_Corners();
@@ -799,18 +799,18 @@
#endif
}
else if (cn_cbor_mapget_string(pInput, "sign0") != NULL) {
-#if INCLUDE_SIGN0
+#if INCLUDE_SIGN1
if (!fValidateDone) {
context = CreateContext(iFail);
CFails = 0;
- ValidateSign0(pControl);
+ ValidateSign1(pControl);
if (CFails == 0) fValidateDone = true;
}
if (!fBuildDone) {
context = CreateContext(iFail);
CFails = 0;
- BuildSign0Message(pControl);
+ BuildSign1Message(pControl);
if (CFails == 0) fBuildDone = true;
}
#else
@@ -879,9 +879,9 @@
#endif
}
else if (cn_cbor_mapget_string(pInput, "sign0") != NULL) {
-#if INCLUDE_SIGN0
- if (ValidateSign0(pControl)) {
- BuildSign0Message(pControl);
+#if INCLUDE_SIGN1
+ if (ValidateSign1(pControl)) {
+ BuildSign1Message(pControl);
}
#endif
}
diff --git a/test/test.h b/test/test.h
index 752f788..6617c06 100644
--- a/test/test.h
+++ b/test/test.h
@@ -29,10 +29,10 @@
int ValidateSigned(const cn_cbor * pControl);
int SignMessage();
int BuildSignedMessage(const cn_cbor * pControl);
-int ValidateSign0(const cn_cbor * pControl);
-int BuildSign0Message(const cn_cbor * pControl);
+int ValidateSign1(const cn_cbor * pControl);
+int BuildSign1Message(const cn_cbor * pControl);
void Sign_Corners();
-void Sign0_Corners();
+void Sign1_Corners();
// mac_testc
@@ -61,7 +61,7 @@
Attributes_Encrypt_protected,
Attributes_Sign_protected,
Attributes_Signer_protected,
- Attributes_Sign0_protected,
+ Attributes_Sign1_protected,
} whichSet;
extern int CFails;