summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-06-16 10:07:11 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-06-16 10:07:11 +0300
commit9f62aba3bd26eea51d411f0d17ee4dadbf2fd873 (patch)
tree7682d8ff7d4acd70c06747661e14322f5a8dbcfd /rpmio
parentb7e71ffa4714a26618492b8200ab34b35a167b47 (diff)
downloadrpm-9f62aba3bd26eea51d411f0d17ee4dadbf2fd873.tar.gz
Drop support for openssl < 1.1
openssl 1.1 was released in 2016, this is old enough plenty. We should rather be worrying about openssl >= 3.0 at this point.
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/digest_openssl.c112
1 files changed, 0 insertions, 112 deletions
diff --git a/rpmio/digest_openssl.c b/rpmio/digest_openssl.c
index ec924f1ce..7cf363747 100644
--- a/rpmio/digest_openssl.c
+++ b/rpmio/digest_openssl.c
@@ -7,118 +7,6 @@
#include "rpmio/rpmpgp_internal.h"
-
-/* Compatibility functions for OpenSSL 1.0.2 */
-
-#ifndef HAVE_EVP_MD_CTX_NEW
-# define EVP_MD_CTX_new EVP_MD_CTX_create
-# define EVP_MD_CTX_free EVP_MD_CTX_destroy
-#endif
-
-#ifndef HAVE_RSA_SET0_KEY
-int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
-{
- if (!r) return 0;
-
- if (n) {
- r->n = n;
- }
-
- if (e) {
- r->e = e;
- }
-
- if (d) {
- r->d = d;
- }
-
- return 1;
-}
-#endif /* HAVE_RSA_SET0_KEY */
-
-#ifndef HAVE_DSA_SET0_KEY
-int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
-
-int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
-{
- if (!d) return 0;
-
- if (pub_key) {
- d->pub_key = pub_key;
- }
-
- if (priv_key) {
- d->priv_key = priv_key;
- }
-
- return 1;
-}
-#endif /* HAVE_DSA_SET0_KEY */
-
-#ifndef HAVE_DSA_SET0_PQG
-int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-
-int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
-{
- if (!d) return 0;
-
- if (p) {
- d->p = p;
- }
-
- if (q) {
- d->q = q;
- }
-
- if (g) {
- d->g = g;
- }
-
- return 1;
-}
-#endif /* HAVE_DSA_SET0_PQG */
-
-#ifndef HAVE_DSA_SIG_SET0
-int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
-
-int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
-{
- if (!sig) return 0;
-
- if (r) {
- sig->r = r;
- }
-
- if (s) {
- sig->s = s;
- }
-
- return 1;
-}
-#endif /* HAVE_DSA_SIG_SET0 */
-
-#ifndef HAVE_BN2BINPAD
-static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen)
-{
- int i;
-
- i = BN_num_bytes(a);
- if (tolen < i)
- return -1;
-
- /* Add leading zeroes if necessary */
- if (tolen > i) {
- memset(to, 0, tolen - i);
- to += tolen - i;
- }
-
- BN_bn2bin(a, to);
-
- return tolen;
-}
-#endif /* HAVE_BN2BINPAD */
-
struct DIGEST_CTX_s {
rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */
int algo; /*!< Used hash algorithm */