Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 670124
Collapse All | Expand All

(-)a/lib/dns/openssldh_link.c (-4 / +4 lines)
Lines 73-79 Link Here
73
 * DH_get0_key, DH_set0_key, DH_get0_pqg and DH_set0_pqg
73
 * DH_get0_key, DH_set0_key, DH_get0_pqg and DH_set0_pqg
74
 * are from OpenSSL 1.1.0.
74
 * are from OpenSSL 1.1.0.
75
 */
75
 */
76
static void
76
void
77
DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) {
77
DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) {
78
	if (pub_key != NULL)
78
	if (pub_key != NULL)
79
		*pub_key = dh->pub_key;
79
		*pub_key = dh->pub_key;
Lines 81-87 Link Here
81
		*priv_key = dh->priv_key;
81
		*priv_key = dh->priv_key;
82
}
82
}
83
83
84
static int
84
int
85
DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) {
85
DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) {
86
	/* Note that it is valid for priv_key to be NULL */
86
	/* Note that it is valid for priv_key to be NULL */
87
	if (pub_key == NULL)
87
	if (pub_key == NULL)
Lines 95-101 Link Here
95
	return 1;
95
	return 1;
96
}
96
}
97
97
98
static void
98
void
99
DH_get0_pqg(const DH *dh,
99
DH_get0_pqg(const DH *dh,
100
	    const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
100
	    const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
101
{
101
{
Lines 107-113 Link Here
107
		*g = dh->g;
107
		*g = dh->g;
108
}
108
}
109
109
110
static int
110
int
111
DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
111
DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
112
	/* q is optional */
112
	/* q is optional */
113
	if (p == NULL || g == NULL)
113
	if (p == NULL || g == NULL)
(-)a/lib/dns/openssldsa_link.c (-6 / +6 lines)
Lines 49-55 Link Here
49
static isc_result_t openssldsa_todns(const dst_key_t *key, isc_buffer_t *data);
49
static isc_result_t openssldsa_todns(const dst_key_t *key, isc_buffer_t *data);
50
50
51
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
51
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
52
static void
52
void
53
DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q,
53
DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q,
54
	     const BIGNUM **g)
54
	     const BIGNUM **g)
55
{
55
{
Lines 61-67 Link Here
61
		*g = d->g;
61
		*g = d->g;
62
}
62
}
63
63
64
static int
64
int
65
DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
65
DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
66
	if (p == NULL || q == NULL || g == NULL)
66
	if (p == NULL || q == NULL || g == NULL)
67
		return 0;
67
		return 0;
Lines 75-81 Link Here
75
	return 1;
75
	return 1;
76
}
76
}
77
77
78
static void
78
void
79
DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) {
79
DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) {
80
	if (pub_key != NULL)
80
	if (pub_key != NULL)
81
		*pub_key = d->pub_key;
81
		*pub_key = d->pub_key;
Lines 83-89 Link Here
83
		*priv_key = d->priv_key;
83
		*priv_key = d->priv_key;
84
}
84
}
85
85
86
static int
86
int
87
DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) {
87
DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) {
88
	/* Note that it is valid for priv_key to be NULL */
88
	/* Note that it is valid for priv_key to be NULL */
89
	if (pub_key == NULL)
89
	if (pub_key == NULL)
Lines 97-109 Link Here
97
	return 1;
97
	return 1;
98
}
98
}
99
99
100
static void
100
void
101
DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {
101
DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {
102
	*pr = sig->r;
102
	*pr = sig->r;
103
	*ps = sig->s;
103
	*ps = sig->s;
104
}
104
}
105
105
106
static int
106
int
107
DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) {
107
DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) {
108
	if (r == NULL || s == NULL)
108
	if (r == NULL || s == NULL)
109
		return 0;
109
		return 0;
(-)a/lib/dns/opensslecdsa_link.c (-2 / +2 lines)
Lines 43-49 Link Here
43
43
44
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
44
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
45
/* From OpenSSL 1.1 */
45
/* From OpenSSL 1.1 */
46
static void
46
void
47
ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {
47
ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {
48
	if (pr != NULL)
48
	if (pr != NULL)
49
		*pr = sig->r;
49
		*pr = sig->r;
Lines 51-57 Link Here
51
		*ps = sig->s;
51
		*ps = sig->s;
52
}
52
}
53
53
54
static int
54
int
55
ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) {
55
ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) {
56
	if (r == NULL || s == NULL)
56
	if (r == NULL || s == NULL)
57
		return 0;
57
		return 0;
(-)a/lib/dns/opensslrsa_link.c (-7 / +7 lines)
Lines 122-128 Link Here
122
122
123
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
123
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
124
/* From OpenSSL 1.1.0 */
124
/* From OpenSSL 1.1.0 */
125
static int
125
int
126
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) {
126
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) {
127
127
128
	/*
128
	/*
Lines 149-155 Link Here
149
	return 1;
149
	return 1;
150
}
150
}
151
151
152
static int
152
int
153
RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) {
153
RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) {
154
154
155
	/*
155
	/*
Lines 171-177 Link Here
171
	return 1;
171
	return 1;
172
}
172
}
173
173
174
static int
174
int
175
RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) {
175
RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) {
176
	/*
176
	/*
177
	 * If the fields dmp1, dmq1 and iqmp in r are NULL, the
177
	 * If the fields dmp1, dmq1 and iqmp in r are NULL, the
Lines 198-204 Link Here
198
	return 1;
198
	return 1;
199
}
199
}
200
200
201
static void
201
void
202
RSA_get0_key(const RSA *r,
202
RSA_get0_key(const RSA *r,
203
	     const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
203
	     const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
204
{
204
{
Lines 210-216 Link Here
210
		*d = r->d;
210
		*d = r->d;
211
}
211
}
212
212
213
static void
213
void
214
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) {
214
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) {
215
	if (p != NULL)
215
	if (p != NULL)
216
		*p = r->p;
216
		*p = r->p;
Lines 218-224 Link Here
218
	*q = r->q;
218
	*q = r->q;
219
}
219
}
220
220
221
static void
221
void
222
RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
222
RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
223
		    const BIGNUM **iqmp)
223
		    const BIGNUM **iqmp)
224
{
224
{
Lines 230-236 Link Here
230
		*iqmp = r->iqmp;
230
		*iqmp = r->iqmp;
231
}
231
}
232
232
233
static int
233
int
234
RSA_test_flags(const RSA *r, int flags) {
234
RSA_test_flags(const RSA *r, int flags) {
235
	return (r->flags & flags);
235
	return (r->flags & flags);
236
}
236
}

Return to bug 670124