aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevel <acompagn+fdio@cisco.com>2018-04-13 13:28:31 +0200
committerDevel <acompagn+fdio@cisco.com>2018-04-13 13:28:51 +0200
commit9439750179b4541c91c7d9ad1b6179baada8f141 (patch)
tree5f1f4a668648a873e9e3e55defc93982a9812217
parented721c097187deece705ae663c6bffb1fc107c6d (diff)
Updated library according to the latest changes about security in libparc
Change-Id: I04e53c986f6cb17679edc60e24c8c7c42fc9aad3 Signed-off-by: Devel <acompagn+fdio@cisco.com>
-rwxr-xr-xlibccnx-common/ccnx/common/ccnx_KeystoreUtilities.c6
-rwxr-xr-xlibccnx-common/ccnx/common/codec/test/test_ccnxCodec_NetworkBuffer.c2
-rw-r--r--libccnx-common/ccnx/common/test/test_ccnx_KeystoreUtilities.c4
-rwxr-xr-xlibccnx-common/ccnx/common/validation/ccnxValidation_EcSecp256K1.c4
-rwxr-xr-xlibccnx-common/ccnx/common/validation/test/test_ccnxValidation_EcSecp256K1.c2
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.c7
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.h4
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c2
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c2
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_Portal.c8
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalAPI.c4
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalFactory.c22
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalStack.c8
-rw-r--r--libccnx-transport-rta/ccnx/transport/transport_rta/components/codec_Signing.c2
-rw-r--r--libccnx-transport-rta/ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv.c2
-rw-r--r--libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Local.c2
-rw-r--r--libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Metis.c2
-rw-r--r--libccnx-transport-rta/ccnx/transport/transport_rta/core/test/test_rta_Framework_Commands.c2
-rw-r--r--libccnx-transport-rta/ccnx/transport/transport_rta/test/test_multi_connections.c4
19 files changed, 47 insertions, 42 deletions
diff --git a/libccnx-common/ccnx/common/ccnx_KeystoreUtilities.c b/libccnx-common/ccnx/common/ccnx_KeystoreUtilities.c
index aac2ddd0..1ba0c617 100755
--- a/libccnx-common/ccnx/common/ccnx_KeystoreUtilities.c
+++ b/libccnx-common/ccnx/common/ccnx_KeystoreUtilities.c
@@ -94,7 +94,7 @@ ccnxKeystoreUtilities_OpenFromPath(const char *path, const char *password)
PARCPkcs12KeyStore *keyStore = parcPkcs12KeyStore_Open(path, password, PARCCryptoHashType_SHA256);
PARCKeyStore *publicKeyStore = parcKeyStore_Create(keyStore, PARCPkcs12KeyStoreAsKeyStore);
parcPkcs12KeyStore_Release(&keyStore);
- PARCPublicKeySigner *pksigner = parcPublicKeySigner_Create(publicKeyStore, PARCSigningAlgorithm_RSA, PARCCryptoHashType_SHA256);
+ PARCPublicKeySigner *pksigner = parcPublicKeySigner_Create(publicKeyStore, PARCCryptoSuite_RSA_SHA256);
PARCSigner *signer = parcSigner_Create(pksigner, PARCPublicKeySignerAsSigner);
parcPublicKeySigner_Release(&pksigner);
@@ -114,12 +114,12 @@ ccnxKeystoreUtilities_CreateInPath(const char *path, const char *password, int k
{
KeystoreParams *params = NULL;
- bool success = parcPkcs12KeyStore_CreateFile(path, password, "ccnxuser", keystoreBits, keystoreDays);
+ bool success = parcPkcs12KeyStore_CreateFile(path, password, "ccnxuser", PARCSigningAlgorithm_RSA, keystoreBits, keystoreDays);
if (success) {
PARCPkcs12KeyStore *keyStore = parcPkcs12KeyStore_Open(path, password, PARCCryptoHashType_SHA256);
PARCKeyStore *publicKeyStore = parcKeyStore_Create(keyStore, PARCPkcs12KeyStoreAsKeyStore);
parcPkcs12KeyStore_Release(&keyStore);
- PARCPublicKeySigner *pksigner = parcPublicKeySigner_Create(publicKeyStore, PARCSigningAlgorithm_RSA, PARCCryptoHashType_SHA256);
+ PARCPublicKeySigner *pksigner = parcPublicKeySigner_Create(publicKeyStore, PARCCryptoSuite_RSA_SHA256);
PARCSigner *signer = parcSigner_Create(pksigner, PARCPublicKeySignerAsSigner);
parcPublicKeySigner_Release(&pksigner);
diff --git a/libccnx-common/ccnx/common/codec/test/test_ccnxCodec_NetworkBuffer.c b/libccnx-common/ccnx/common/codec/test/test_ccnxCodec_NetworkBuffer.c
index aec3018e..0b6fd116 100755
--- a/libccnx-common/ccnx/common/codec/test/test_ccnxCodec_NetworkBuffer.c
+++ b/libccnx-common/ccnx/common/codec/test/test_ccnxCodec_NetworkBuffer.c
@@ -178,7 +178,7 @@ LONGBOW_TEST_CASE(Global, ccnxCodecNetworkBuffer_ComputeSignature)
PARCPkcs12KeyStore *publicKeyStore = parcPkcs12KeyStore_Open("test_rsa.p12", "blueberry", PARCCryptoHashType_SHA256);
PARCKeyStore *keyStore = parcKeyStore_Create(publicKeyStore, PARCPkcs12KeyStoreAsKeyStore);
parcPkcs12KeyStore_Release(&publicKeyStore);
- PARCPublicKeySigner *publicKeySigner = parcPublicKeySigner_Create(keyStore, PARCSigningAlgorithm_RSA, PARCCryptoHashType_SHA256);
+ PARCPublicKeySigner *publicKeySigner = parcPublicKeySigner_Create(keyStore, PARCCryptoSuite_RSA_SHA256);
PARCSigner *signer = parcSigner_Create(publicKeySigner, PARCPublicKeySignerAsSigner);
parcPublicKeySigner_Release(&publicKeySigner);
diff --git a/libccnx-common/ccnx/common/test/test_ccnx_KeystoreUtilities.c b/libccnx-common/ccnx/common/test/test_ccnx_KeystoreUtilities.c
index 0ab770a5..39bc778c 100644
--- a/libccnx-common/ccnx/common/test/test_ccnx_KeystoreUtilities.c
+++ b/libccnx-common/ccnx/common/test/test_ccnx_KeystoreUtilities.c
@@ -211,7 +211,7 @@ LONGBOW_TEST_CASE(Local, ccnxKeystoreUtilities_OpenFromHomeDirectory_Oldfile)
mkdir(ccnxdir, 0700);
char *path = ccnxKeystoreUtilities_ConstructPath(ccnxdir, ".ccnx_keystore");
- bool success = parcPkcs12KeyStore_CreateFile(path, "1234", "ccnxuser", 1024, 365);
+ bool success = parcPkcs12KeyStore_CreateFile(path, "1234", "ccnxuser", PARCSigningAlgorithm_RSA, 1024, 365);
assertTrue(success, "parcPkcs12KeyStore_CreateFile() failed.");
KeystoreParams *signer = ccnxKeystoreUtilities_OpenFromHomeDirectory("1234");
@@ -233,7 +233,7 @@ LONGBOW_TEST_CASE(Local, ccnxKeystoreUtilities_OpenFromHomeDirectory_Newfile)
mkdir(ccnxdir, 0700);
char *path = ccnxKeystoreUtilities_ConstructPath(ccnxdir, ".ccnx_keystore.p12");
- bool success = parcPkcs12KeyStore_CreateFile(path, "1234", "ccnxuser", 1024, 365);
+ bool success = parcPkcs12KeyStore_CreateFile(path, "1234", "ccnxuser", PARCSigningAlgorithm_RSA, 1024, 365);
assertTrue(success, "parcPkcs12KeyStore_CreateFile() failed.");
KeystoreParams *signer = ccnxKeystoreUtilities_OpenFromHomeDirectory("1234");
diff --git a/libccnx-common/ccnx/common/validation/ccnxValidation_EcSecp256K1.c b/libccnx-common/ccnx/common/validation/ccnxValidation_EcSecp256K1.c
index d40a8378..1940b1d4 100755
--- a/libccnx-common/ccnx/common/validation/ccnxValidation_EcSecp256K1.c
+++ b/libccnx-common/ccnx/common/validation/ccnxValidation_EcSecp256K1.c
@@ -47,7 +47,7 @@ ccnxValidationEcSecp256K1_Set(CCNxTlvDictionary *message, const PARCBuffer *keyi
bool success = true;
switch (ccnxTlvDictionary_GetSchemaVersion(message)) {
case CCNxTlvDictionary_SchemaVersion_V1: {
- success &= ccnxTlvDictionary_PutInteger(message, CCNxCodecSchemaV1TlvDictionary_ValidationFastArray_CRYPTO_SUITE, PARCCryptoSuite_EC_SECP_256K1);
+ success &= ccnxTlvDictionary_PutInteger(message, CCNxCodecSchemaV1TlvDictionary_ValidationFastArray_CRYPTO_SUITE, PARCCryptoSuite_ECDSA_SHA256);
if (keyid) {
success &= ccnxTlvDictionary_PutBuffer(message, CCNxCodecSchemaV1TlvDictionary_ValidationFastArray_KEYID, keyid);
@@ -69,7 +69,7 @@ ccnxValidationEcSecp256K1_Test(const CCNxTlvDictionary *message)
{
if (ccnxTlvDictionary_IsValueInteger(message, CCNxCodecSchemaV1TlvDictionary_ValidationFastArray_CRYPTO_SUITE)) {
uint64_t cryptosuite = ccnxTlvDictionary_GetInteger(message, CCNxCodecSchemaV1TlvDictionary_ValidationFastArray_CRYPTO_SUITE);
- return (cryptosuite == PARCCryptoSuite_EC_SECP_256K1);
+ return (cryptosuite == PARCCryptoSuite_ECDSA_SHA256);
}
return false;
}
diff --git a/libccnx-common/ccnx/common/validation/test/test_ccnxValidation_EcSecp256K1.c b/libccnx-common/ccnx/common/validation/test/test_ccnxValidation_EcSecp256K1.c
index 8fe00f35..68176723 100755
--- a/libccnx-common/ccnx/common/validation/test/test_ccnxValidation_EcSecp256K1.c
+++ b/libccnx-common/ccnx/common/validation/test/test_ccnxValidation_EcSecp256K1.c
@@ -87,7 +87,7 @@ LONGBOW_TEST_CASE(Global, ccnxValidationEcSecp256K1_DictionaryCryptoSuiteValue)
NULL);
ccnxValidationEcSecp256K1_Set(dictionary, data->keyid, NULL);
uint64_t cryptosuite = ccnxTlvDictionary_GetInteger(dictionary, CCNxCodecSchemaV1TlvDictionary_ValidationFastArray_CRYPTO_SUITE);
- assertTrue(cryptosuite == PARCCryptoSuite_EC_SECP_256K1, "Unexpected PARCCryptoSuite value in dictionary");
+ assertTrue(cryptosuite == PARCCryptoSuite_ECDSA_SHA256, "Unexpected PARCCryptoSuite value in dictionary");
ccnxTlvDictionary_Release(&dictionary);
}
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.c b/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.c
index be5810bd..ec9a1e6b 100755
--- a/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.c
@@ -69,15 +69,18 @@ parcObject_ImplementAcquire(ccnxPortalFactory, CCNxPortalFactory);
parcObject_ImplementRelease(ccnxPortalFactory, CCNxPortalFactory);
CCNxPortalFactory *
-ccnxPortalFactory_Create(const PARCIdentity *identity)
+ccnxPortalFactory_Create(const PARCIdentity *identity, PARCCryptoSuite suite)
{
parcIdentity_OptionalAssertValid(identity);
+ if (identity == NULL)
+ return NULL;
+
parcSecurity_Init();
CCNxPortalFactory *result = parcObject_CreateInstance(CCNxPortalFactory);
if (result != NULL) {
result->identity = parcIdentity_Acquire(identity);
- result->signer = parcIdentity_CreateSigner(identity);
+ result->signer = parcIdentity_CreateSigner(identity, suite);
result->keyId = parcSigner_CreateKeyId(result->signer);
result->properties = parcProperties_Create();
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.h b/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.h
index e021b92d..c0b83086 100755
--- a/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.h
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/ccnx_PortalFactory.h
@@ -21,6 +21,8 @@
#ifndef CCNx_Portal_API_ccnx_PortalFactory_h
#define CCNx_Portal_API_ccnx_PortalFactory_h
+#include <parc/security/parc_CryptoSuite.h>
+
struct CCNxPortalFactory;
/**
* @typedef CCNxPortalFactory
@@ -80,7 +82,7 @@ extern const char *CCNxPortalFactory_LocalRouterTimeout;
* @see {@link ccnxPortalFactory_Acquire}
* @see {@link ccnxPortalFactory_Release}
*/
-CCNxPortalFactory *ccnxPortalFactory_Create(const PARCIdentity *identity);
+CCNxPortalFactory *ccnxPortalFactory_Create(const PARCIdentity *identity, PARCCryptoSuite suite);
/**
* Print a human readable representation of the given `CCNxPortalFactory` instance.
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c
index dfd5d5ba..c95b8983 100755
--- a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c
@@ -40,7 +40,7 @@
int
ccnGet(PARCIdentity *identity, CCNxName *name)
{
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
CCNxPortal *portal = ccnxPortalFactory_CreatePortal(factory, ccnxPortalRTA_Message);
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c
index a9d7a2e6..4a99e203 100755
--- a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c
@@ -78,7 +78,7 @@ ccnServe(const PARCIdentity *identity, const CCNxName *listenName, const char *c
{
parcSecurity_Init();
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
CCNxPortal *portal = ccnxPortalFactory_CreatePortal(factory, ccnxPortalRTA_Message);
assertNotNull(portal, "Expected a non-null CCNxPortal pointer.");
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_Portal.c b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_Portal.c
index 154b8be8..29cc6808 100644
--- a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_Portal.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_Portal.c
@@ -127,14 +127,14 @@ LONGBOW_TEST_FIXTURE_SETUP(Global)
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile("my_keystore", "my_keystore_password", subjectName, keyLength, validityDays);
+ bool success = parcPkcs12KeyStore_CreateFile("my_keystore", "my_keystore_password", subjectName, PARCSigningAlgorithm_RSA, keyLength, validityDays);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('my_keystore', 'my_keystore_password') failed.");
PARCIdentityFile *identityFile = parcIdentityFile_Create("my_keystore", "my_keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
parcIdentityFile_Release(&identityFile);
- data->factory = ccnxPortalFactory_Create(identity);
+ data->factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentity_Release(&identity);
longBowTestCase_SetClipBoardData(testCase, data);
@@ -604,14 +604,14 @@ LONGBOW_TEST_FIXTURE_SETUP(Performance)
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile("my_keystore", "my_keystore_password", subjectName, keyLength, validityDays);
+ bool success = parcPkcs12KeyStore_CreateFile("my_keystore", "my_keystore_password", subjectName, PARCSigningAlgorithm_RSA, keyLength, validityDays);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('my_keystore', 'my_keystore_password') failed.");
PARCIdentityFile *identityFile = parcIdentityFile_Create("my_keystore", "my_keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
parcIdentityFile_Release(&identityFile);
- data->factory = ccnxPortalFactory_Create(identity);
+ data->factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentity_Release(&identity);
longBowTestCase_SetClipBoardData(testCase, data);
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalAPI.c b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalAPI.c
index 736e6982..1368717d 100755
--- a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalAPI.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalAPI.c
@@ -68,13 +68,13 @@ LONGBOW_TEST_FIXTURE_SETUP(Global)
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile("my_keystore", "my_keystore_password", subjectName, keyLength, validityDays);
+ bool success = parcPkcs12KeyStore_CreateFile("my_keystore", "my_keystore_password", subjectName, PARCSigningAlgorithm_RSA, keyLength, validityDays);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('my_keystore', 'my_keystore_password') failed.");
PARCIdentityFile *identityFile = parcIdentityFile_Create("my_keystore", "my_keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentityFile_Release(&identityFile);
parcIdentity_Release(&identity);
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalFactory.c b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalFactory.c
index 8c98705f..da8f8a1d 100644
--- a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalFactory.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalFactory.c
@@ -88,13 +88,13 @@ LONGBOW_TEST_CASE(CreateAcquireRelease, ccnxPortalFactory_Create)
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('%s', 'keystore_password') failed.", keystoreName);
PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, "keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentityFile_Release(&identityFile);
parcIdentity_Release(&identity);
@@ -109,13 +109,13 @@ LONGBOW_TEST_CASE(CreateAcquireRelease, ccnxPortalFactory_AcquireRelease)
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('%s', 'keystore_password') failed.", keystoreName);
PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, "keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentityFile_Release(&identityFile);
parcIdentity_Release(&identity);
@@ -156,13 +156,13 @@ LONGBOW_TEST_CASE(Global, ccnxPortalFactory_GetIdentity)
const char *keystoreName = "ccnxPortalFactory_keystore";
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('%s', 'keystore_password') failed.", keystoreName);
PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, "keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
const PARCIdentity *actual = ccnxPortalFactory_GetIdentity(factory);
@@ -180,17 +180,17 @@ LONGBOW_TEST_CASE(Global, ccnxPortalFactory_GetKeyId)
const char *keystoreName = "ccnxPortalFactory_keystore";
parcSecurity_Init();
- bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('%s', 'keystore_password') failed.", keystoreName);
PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, "keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
const PARCKeyId *actual = ccnxPortalFactory_GetKeyId(factory);
- PARCSigner *signer = parcIdentity_CreateSigner(identity);
+ PARCSigner *signer = parcIdentity_CreateSigner(identity, PARCCryptoSuite_RSA_SHA256);
PARCKeyId *expected = parcSigner_CreateKeyId(signer);
parcSigner_Release(&signer);
@@ -230,9 +230,9 @@ LONGBOW_TEST_FIXTURE_TEARDOWN(Errors)
LONGBOW_TEST_CASE_EXPECTS(Errors, ccnxPortalFactory_Create_NULL_Identity, .event = &LongBowTrapInvalidValue)
{
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(NULL);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(NULL, PARCCryptoSuite_RSA_SHA256);
- ccnxPortalFactory_Release(&factory);
+ assertNull(factory,"Factory created when expected to be null");
}
int
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalStack.c b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalStack.c
index ebba0dea..f40f3294 100755
--- a/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalStack.c
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/test/test_ccnx_PortalStack.c
@@ -72,13 +72,13 @@ LONGBOW_TEST_FIXTURE_SETUP(CreateRelease)
const char *keystoreName = "test_ccnx_PortalImplementation_keystore";
- bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('%s', 'keystore_password') failed.", keystoreName);
PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, "keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentityFile_Release(&identityFile);
parcIdentity_Release(&identity);
@@ -209,13 +209,13 @@ LONGBOW_TEST_FIXTURE_SETUP(Global)
const char *keystoreName = "test_ccnx_PortalImplementation_keystore";
- bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystoreName, "keystore_password", "consumer", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile('%s', 'keystore_password') failed.", keystoreName);
PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, "keystore_password");
PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
- CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity, PARCCryptoSuite_RSA_SHA256);
parcIdentityFile_Release(&identityFile);
parcIdentity_Release(&identity);
diff --git a/libccnx-transport-rta/ccnx/transport/transport_rta/components/codec_Signing.c b/libccnx-transport-rta/ccnx/transport/transport_rta/components/codec_Signing.c
index 322bea2e..0e6b7716 100644
--- a/libccnx-transport-rta/ccnx/transport/transport_rta/components/codec_Signing.c
+++ b/libccnx-transport-rta/ccnx/transport/transport_rta/components/codec_Signing.c
@@ -62,7 +62,7 @@ component_Codec_GetSigner(RtaConnection *conn)
PARCPkcs12KeyStore *pkcs12KeyStore = parcPkcs12KeyStore_Open(params.filename, params.password, PARCCryptoHashType_SHA256);
PARCKeyStore *keyStore = parcKeyStore_Create(pkcs12KeyStore, PARCPkcs12KeyStoreAsKeyStore);
parcPkcs12KeyStore_Release(&pkcs12KeyStore);
- PARCPublicKeySigner *publicKeySigner = parcPublicKeySigner_Create(keyStore, PARCSigningAlgorithm_RSA, PARCCryptoHashType_SHA256);
+ PARCPublicKeySigner *publicKeySigner = parcPublicKeySigner_Create(keyStore, PARCCryptoSuite_RSA_SHA256);
parcKeyStore_Release(&keyStore);
signer = parcSigner_Create(publicKeySigner, PARCPublicKeySignerAsSigner);
diff --git a/libccnx-transport-rta/ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv.c b/libccnx-transport-rta/ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv.c
index 1990d8ae..6ee7d65a 100644
--- a/libccnx-transport-rta/ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv.c
+++ b/libccnx-transport-rta/ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv.c
@@ -61,7 +61,7 @@ codecTlv_CreateParams(const char *keystore_filename, const char *keystore_passwo
unlink(keystore_filename);
- bool success = parcPkcs12KeyStore_CreateFile(keystore_filename, keystore_password, "alice", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(keystore_filename, keystore_password, "alice", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile() failed.");
publicKeySigner_ConnectionConfig(connConfig, keystore_filename, keystore_password);
diff --git a/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Local.c b/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Local.c
index 014f4bbe..cecaf76e 100644
--- a/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Local.c
+++ b/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Local.c
@@ -92,7 +92,7 @@ _commonSetup(void)
unlink(data->keystoreName);
- bool success = parcPkcs12KeyStore_CreateFile(data->keystoreName, data->keystorePassword, "user", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(data->keystoreName, data->keystorePassword, "user", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12KeyStore_CreateFile() failed.");
data->commandRingBuffer = parcRingBuffer1x1_Create(128, NULL);
diff --git a/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Metis.c b/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Metis.c
index 6fe9e3d2..1793a635 100644
--- a/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Metis.c
+++ b/libccnx-transport-rta/ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Metis.c
@@ -441,7 +441,7 @@ LONGBOW_TEST_RUNNER_SETUP(connector_Forwarder_Metis)
// init + fini here so there's no memory imbalance
parcSecurity_Init();
- parcPkcs12KeyStore_CreateFile(keystorename, keystorepass, "ccnxuser", 1024, 365);
+ parcPkcs12KeyStore_CreateFile(keystorename, keystorepass, "ccnxuser", PARCSigningAlgorithm_RSA, 1024, 365);
parcSecurity_Fini();
return LONGBOW_STATUS_SUCCEEDED;
diff --git a/libccnx-transport-rta/ccnx/transport/transport_rta/core/test/test_rta_Framework_Commands.c b/libccnx-transport-rta/ccnx/transport/transport_rta/core/test/test_rta_Framework_Commands.c
index d19d680b..65b50196 100644
--- a/libccnx-transport-rta/ccnx/transport/transport_rta/core/test/test_rta_Framework_Commands.c
+++ b/libccnx-transport-rta/ccnx/transport/transport_rta/core/test/test_rta_Framework_Commands.c
@@ -126,7 +126,7 @@ _commonSetup(void)
sprintf(data->keystorePassword, "23439429");
- bool success = parcPkcs12KeyStore_CreateFile(data->keystoreName, data->keystorePassword, "user", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(data->keystoreName, data->keystorePassword, "user", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPublicKeySignerPkcs12Store_CreateFile() failed.");
close(fd);
diff --git a/libccnx-transport-rta/ccnx/transport/transport_rta/test/test_multi_connections.c b/libccnx-transport-rta/ccnx/transport/transport_rta/test/test_multi_connections.c
index 8f0051a0..000ce124 100644
--- a/libccnx-transport-rta/ccnx/transport/transport_rta/test/test_multi_connections.c
+++ b/libccnx-transport-rta/ccnx/transport/transport_rta/test/test_multi_connections.c
@@ -227,9 +227,9 @@ stackSetup(const char *alice_nonce, const char *bob_nonce)
unlink(alice_keystore_name);
unlink(bob_keystore_name);
- bool success = parcPkcs12KeyStore_CreateFile(alice_keystore_name, "23456", "alice", 1024, 30);
+ bool success = parcPkcs12KeyStore_CreateFile(alice_keystore_name, "23456", "alice", PARCSigningAlgorithm_RSA, 1024, 30);
assertTrue(success, "parcPkcs12Store_CreateFile() failed.");
- success = parcPkcs12KeyStore_CreateFile(bob_keystore_name, "34567", "bob", 2048, 15);
+ success = parcPkcs12KeyStore_CreateFile(bob_keystore_name, "34567", "bob", PARCSigningAlgorithm_RSA, 2048, 15);
assertTrue(success, "parcPkcs12Store_CreateFile() failed.");
alice_params = MultipleConnections_createParams(local_name, alice_keystore_name, "23456", alice_nonce);