aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc/security
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2018-05-10 11:11:48 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2018-05-10 11:11:48 +0200
commita53bc7260df2723a2d17ef18311e63c79d06823f (patch)
tree22a9ee813421cedaf1a7f62c50d09d5c94484ff6 /libparc/parc/security
parentc5cac175664c8bdc74d1ac22e092eb9d1a8ae5a0 (diff)
Fixes for ECDSA signature
Change-Id: I0345d16e22024419e0a538c0a09376ef74b8e440 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'libparc/parc/security')
-rw-r--r--libparc/parc/security/parc_InMemoryVerifier.c2
-rw-r--r--libparc/parc/security/parc_Pkcs12KeyStore.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/libparc/parc/security/parc_InMemoryVerifier.c b/libparc/parc/security/parc_InMemoryVerifier.c
index e5946d33..c3af4d7d 100644
--- a/libparc/parc/security/parc_InMemoryVerifier.c
+++ b/libparc/parc/security/parc_InMemoryVerifier.c
@@ -363,7 +363,7 @@ _parcInMemoryVerifier_ECDSAKey_Verify(PARCInMemoryVerifier *verifier, PARCCrypto
PARCByteArray *bytearray = parcBuffer_Array(sigbits);
unsigned signatureLength = (unsigned) parcBuffer_Remaining(sigbits);
uint8_t *sigbuffer = parcByteArray_Array(bytearray);
- size_t signatureOffset = parcBuffer_ArrayOffset(sigbits);
+ size_t signatureOffset = parcBuffer_Position(sigbits);
success = ECDSA_verify(openssl_digest_type,
(unsigned char *) parcByteArray_Array(parcBuffer_Array(parcCryptoHash_GetDigest(localHash))),
diff --git a/libparc/parc/security/parc_Pkcs12KeyStore.c b/libparc/parc/security/parc_Pkcs12KeyStore.c
index fd12c56f..392c9d34 100644
--- a/libparc/parc/security/parc_Pkcs12KeyStore.c
+++ b/libparc/parc/security/parc_Pkcs12KeyStore.c
@@ -311,6 +311,7 @@ _GetPublickKeyDigest(PARCPkcs12KeyStore *keystore)
assertNotNull(keystore, "Parameter must be non-null PARCPkcs12KeyStore");
+#if 0
if (keystore->public_key_digest == NULL) {
AUTHORITY_KEYID *akid = X509_get_ext_d2i(keystore->x509_cert, NID_authority_key_identifier, NULL, NULL);
if (akid != NULL) {
@@ -324,6 +325,7 @@ _GetPublickKeyDigest(PARCPkcs12KeyStore *keystore)
AUTHORITY_KEYID_free(akid);
}
}
+#endif
// If we could not load the digest from the certificate, then calculate it from the public key.
if (keystore->public_key_digest == NULL) {