Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Norbert Pócs
nettle
Commits
2bf5235b
Commit
2bf5235b
authored
Aug 2, 2020
by
Maamoun TK
Committed by
Niels Möller
Aug 26, 2020
Browse files
Options
Downloads
Patches
Plain Diff
Check for ENV_OVERRIDE in get_ppc_features()
parent
d0e6f97b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fat-ppc.c
+30
-8
30 additions, 8 deletions
fat-ppc.c
with
30 additions
and
8 deletions
fat-ppc.c
+
30
−
8
View file @
2bf5235b
...
...
@@ -68,8 +68,29 @@ struct ppc_features
int
have_crypto_ext
;
};
#define MATCH(s, slen, literal, llen) \
((slen) == (llen) && memcmp ((s), (literal), llen) == 0)
static
void
get_ppc_features
(
struct
ppc_features
*
features
)
{
const
char
*
s
;
features
->
have_crypto_ext
=
0
;
s
=
secure_getenv
(
ENV_OVERRIDE
);
if
(
s
)
for
(;;)
{
const
char
*
sep
=
strchr
(
s
,
','
);
size_t
length
=
sep
?
(
size_t
)
(
sep
-
s
)
:
strlen
(
s
);
if
(
MATCH
(
s
,
length
,
"crypto_ext"
,
10
))
features
->
have_crypto_ext
=
1
;
if
(
!
sep
)
break
;
s
=
sep
+
1
;
}
else
{
#if defined(_AIX) && defined(__power_8_andup)
features
->
have_crypto_ext
=
__power_8_andup
()
!=
0
?
1
:
0
;
...
...
@@ -89,6 +110,7 @@ get_ppc_features (struct ppc_features *features)
(
hwcap2
&
PPC_FEATURE2_VEC_CRYPTO
)
==
PPC_FEATURE2_VEC_CRYPTO
?
1
:
0
;
#endif
}
}
DECLARE_FAT_FUNC
(
_nettle_aes_encrypt
,
aes_crypt_internal_func
)
DECLARE_FAT_FUNC_VAR
(
aes_encrypt
,
aes_crypt_internal_func
,
c
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment