summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Paxton <bryan@starbelly.io>2021-04-07 11:24:59 -0500
committerBryan Paxton <bryan@starbelly.io>2021-04-07 11:24:59 -0500
commit7c51766488dd75da259ec20ba1980463d9e4002d (patch)
treea92717f5f9393c844226a9101a5a8c044f2a5dd5
parentb80705a09a2442eaa970e0516b83885c350029e9 (diff)
downloaderlang-7c51766488dd75da259ec20ba1980463d9e4002d.tar.gz
Rename aead attr to prop_aead
-rw-r--r--lib/crypto/c_src/atoms.c4
-rw-r--r--lib/crypto/c_src/atoms.h2
-rw-r--r--lib/crypto/c_src/cipher.c4
-rw-r--r--lib/crypto/src/crypto.erl2
-rw-r--r--lib/crypto/test/crypto_SUITE.erl10
5 files changed, 12 insertions, 10 deletions
diff --git a/lib/crypto/c_src/atoms.c b/lib/crypto/c_src/atoms.c
index e1205a467e..5671e6d801 100644
--- a/lib/crypto/c_src/atoms.c
+++ b/lib/crypto/c_src/atoms.c
@@ -52,7 +52,7 @@ ERL_NIF_TERM atom_not_supported;
ERL_NIF_TERM atom_type;
ERL_NIF_TERM atom_size;
ERL_NIF_TERM atom_block_size;
-ERL_NIF_TERM atom_aead;
+ERL_NIF_TERM atom_prop_aead;
ERL_NIF_TERM atom_key_length;
ERL_NIF_TERM atom_iv_length;
ERL_NIF_TERM atom_mode;
@@ -187,7 +187,7 @@ int init_atoms(ErlNifEnv *env, const ERL_NIF_TERM fips_mode, const ERL_NIF_TERM
atom_type = enif_make_atom(env,"type");
atom_size = enif_make_atom(env,"size");
atom_block_size = enif_make_atom(env,"block_size");
- atom_aead = enif_make_atom(env,"aead");
+ atom_prop_aead = enif_make_atom(env,"prop_aead");
atom_key_length = enif_make_atom(env,"key_length");
atom_iv_length = enif_make_atom(env,"iv_length");
atom_mode = enif_make_atom(env,"mode");
diff --git a/lib/crypto/c_src/atoms.h b/lib/crypto/c_src/atoms.h
index dbb797fc3f..414e3045ea 100644
--- a/lib/crypto/c_src/atoms.h
+++ b/lib/crypto/c_src/atoms.h
@@ -57,7 +57,7 @@ extern ERL_NIF_TERM atom_type;
extern ERL_NIF_TERM atom_size;
extern ERL_NIF_TERM atom_block_size;
extern ERL_NIF_TERM atom_key_length;
-extern ERL_NIF_TERM atom_aead;
+extern ERL_NIF_TERM atom_prop_aead;
extern ERL_NIF_TERM atom_iv_length;
extern ERL_NIF_TERM atom_mode;
extern ERL_NIF_TERM atom_encrypt;
diff --git a/lib/crypto/c_src/cipher.c b/lib/crypto/c_src/cipher.c
index c0d9a5e8ef..132c98f17d 100644
--- a/lib/crypto/c_src/cipher.c
+++ b/lib/crypto/c_src/cipher.c
@@ -229,7 +229,9 @@ ERL_NIF_TERM cipher_info_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
enif_make_int(env, EVP_CIPHER_iv_length(cipher)), &ret);
enif_make_map_put(env, ret, atom_block_size,
enif_make_int(env, EVP_CIPHER_block_size(cipher)), &ret);
- enif_make_map_put(env, ret, atom_aead, (((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0) ? atom_true : atom_false), &ret);
+ enif_make_map_put(env, ret, atom_prop_aead,
+ (((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0) ? atom_true : atom_false),
+ &ret);
mode = EVP_CIPHER_mode(cipher);
switch (mode) {
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 9a15cb0b61..69cd928085 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -726,7 +726,7 @@ mac_final_nif(_Ref) -> ?nif_stub.
block_size := integer(),
mode := CipherModes,
type := undefined | integer(),
- aead := boolean()
+ prop_aead := boolean()
},
CipherModes :: undefined
| cbc_mode
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index de50cbd6bd..1d2929b228 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -57,8 +57,8 @@
bad_verify_name/1,
cipher_info/0,
cipher_info/1,
- cipher_info_aead_attr/0,
- cipher_info_aead_attr/1,
+ cipher_info_prop_aead_attr/0,
+ cipher_info_prop_aead_attr/1,
cipher_padding/1,
compute/0,
compute/1,
@@ -1244,9 +1244,9 @@ cipher_info(Config) when is_list(Config) ->
ct:fail('Cipher unsupported',[])
end.
-cipher_info_aead_attr() ->
- [{doc, "crypto cipher_info aead attribute testing"}].
-cipher_info_aead_attr(Config) when is_list(Config) ->
+cipher_info_prop_aead_attr() ->
+ [{doc, "crypto cipher_info prop_aead attribute testing"}].
+cipher_info_prop_aead_attr(Config) when is_list(Config) ->
AeadCiphers = [aes_128_ccm, aes_192_ccm, aes_256_ccm, aes_128_gcm, aes_192_gcm, aes_256_gcm, chacha20_poly1305],
case lists:foldl(fun(C,Ok) ->
case crypto:cipher_info(C) of