diff --git a/OpenHaystack/OpenHaystack/BoringSSL/BoringSSL.m b/OpenHaystack/OpenHaystack/BoringSSL/BoringSSL.m index 8d658d8..5ed0be1 100644 --- a/OpenHaystack/OpenHaystack/BoringSSL/BoringSSL.m +++ b/OpenHaystack/OpenHaystack/BoringSSL/BoringSSL.m @@ -72,7 +72,7 @@ + (EC_POINT *_Nullable)loadEllipticCurvePublicBytesWith:(EC_GROUP *)group andPoi // Public key will be stored in point int res = EC_POINT_oct2point(group, point, pointBytes.bytes, pointBytes.length, ctx); [self printPoint:point withGroup:group]; - + // Free the big numbers BN_CTX_free(ctx); @@ -117,9 +117,7 @@ + (EC_KEY *_Nullable)deriveEllipticCurvePrivateKey:(NSData *)privateKeyData grou // Free BN_CTX_free(ctx); - - - + return key; } @@ -159,6 +157,8 @@ + (NSData *_Nullable)generateNewPrivateKey { NSMutableData *privateKeyBytes = [[NSMutableData alloc] initWithLength:keySize]; size_t size = BN_bn2bin(privateKey, privateKeyBytes.mutableBytes); + + EC_KEY_free(key); if (size == 0) { diff --git a/Resources/Pins-NRF52832.jpg b/Resources/Pins-NRF52832.jpg new file mode 100644 index 0000000..7b2bb31 Binary files /dev/null and b/Resources/Pins-NRF52832.jpg differ