summaryrefslogtreecommitdiff
path: root/crypt/cert.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:34:38 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:34:38 +0000
commit7576c27563a3e43c0a276bf222244bcaf220a6fa (patch)
treead96fd1f1b9b57a50005db7803f6b79e748bb820 /crypt/cert.c
parentab5f5211585bf0f33bbfa2d4aaf17e4f0d1fa564 (diff)
parent064374be911f72dfaec8a75f06da1f9fc1827712 (diff)
Merge branch 't/hurdsig-global-dispositions' into refs/top-bases/t/hurdsig-SA_SIGINFO
Diffstat (limited to 'crypt/cert.c')
-rw-r--r--crypt/cert.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/crypt/cert.c b/crypt/cert.c
index 80029e9078..e070ca398d 100644
--- a/crypt/cert.c
+++ b/crypt/cert.c
@@ -10,6 +10,22 @@
#include <stdlib.h>
#include "crypt.h"
+/* This file tests the deprecated setkey/encrypt interface. */
+#include <shlib-compat.h>
+#if TEST_COMPAT (libcrypt, GLIBC_2_0, GLIBC_2_28)
+
+#define libcrypt_version_reference(symbol, version) \
+ _libcrypt_version_reference (symbol, VERSION_libcrypt_##version)
+#define _libcrypt_version_reference(symbol, version) \
+ __libcrypt_version_reference (symbol, version)
+#define __libcrypt_version_reference(symbol, version) \
+ __asm__ (".symver " #symbol ", " #symbol "@" #version)
+
+extern void setkey (const char *);
+extern void encrypt (const char *, int);
+libcrypt_version_reference (setkey, GLIBC_2_0);
+libcrypt_version_reference (encrypt, GLIBC_2_0);
+
int totfails = 0;
int main (int argc, char *argv[]);
@@ -104,3 +120,13 @@ put8 (char *cp)
printf("%02x", t);
}
}
+
+#else /* encrypt and setkey are not available. */
+
+int
+main (void)
+{
+ return 77; /* UNSUPPORTED */
+}
+
+#endif