Loading libcrypto_utils/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ cc_library { }, host_supported: true, srcs: [ "android_pubkey.c", "android_pubkey.cpp", ], cflags: [ "-Wall", Loading libcrypto_utils/android_pubkey.c→libcrypto_utils/android_pubkey.cpp +13 −14 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ // little-endian 32 bit words. Note that Android only supports little-endian // processors, so we don't do any byte order conversions when parsing the binary // struct. typedef struct RSAPublicKey { struct RSAPublicKey { // Modulus length. This must be ANDROID_PUBKEY_MODULUS_SIZE. uint32_t modulus_size_words; Loading @@ -50,7 +50,7 @@ typedef struct RSAPublicKey { // RSA modulus: 3 or 65537 uint32_t exponent; } RSAPublicKey; }; bool android_pubkey_decode(const uint8_t* key_buffer, size_t size, RSA** key) { const RSAPublicKey* key_struct = (RSAPublicKey*)key_buffer; Loading Loading @@ -116,8 +116,7 @@ bool android_pubkey_encode(const RSA* key, uint8_t* key_buffer, size_t size) { BIGNUM* n0inv = BN_new(); BIGNUM* rr = BN_new(); if (sizeof(RSAPublicKey) > size || RSA_size(key) != ANDROID_PUBKEY_MODULUS_SIZE) { if (sizeof(RSAPublicKey) > size || RSA_size(key) != ANDROID_PUBKEY_MODULUS_SIZE) { goto cleanup; } Loading Loading
libcrypto_utils/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ cc_library { }, host_supported: true, srcs: [ "android_pubkey.c", "android_pubkey.cpp", ], cflags: [ "-Wall", Loading
libcrypto_utils/android_pubkey.c→libcrypto_utils/android_pubkey.cpp +13 −14 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ // little-endian 32 bit words. Note that Android only supports little-endian // processors, so we don't do any byte order conversions when parsing the binary // struct. typedef struct RSAPublicKey { struct RSAPublicKey { // Modulus length. This must be ANDROID_PUBKEY_MODULUS_SIZE. uint32_t modulus_size_words; Loading @@ -50,7 +50,7 @@ typedef struct RSAPublicKey { // RSA modulus: 3 or 65537 uint32_t exponent; } RSAPublicKey; }; bool android_pubkey_decode(const uint8_t* key_buffer, size_t size, RSA** key) { const RSAPublicKey* key_struct = (RSAPublicKey*)key_buffer; Loading Loading @@ -116,8 +116,7 @@ bool android_pubkey_encode(const RSA* key, uint8_t* key_buffer, size_t size) { BIGNUM* n0inv = BN_new(); BIGNUM* rr = BN_new(); if (sizeof(RSAPublicKey) > size || RSA_size(key) != ANDROID_PUBKEY_MODULUS_SIZE) { if (sizeof(RSAPublicKey) > size || RSA_size(key) != ANDROID_PUBKEY_MODULUS_SIZE) { goto cleanup; } Loading