diff options
Diffstat (limited to 'openbsd-compat/openssl-compat.h')
-rw-r--r-- | openbsd-compat/openssl-compat.h | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index 2ae42bacf..9e0264c04 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <openssl/evp.h> | 24 | #include <openssl/evp.h> |
25 | #include <openssl/rsa.h> | 25 | #include <openssl/rsa.h> |
26 | #include <openssl/dsa.h> | 26 | #include <openssl/dsa.h> |
27 | #include <openssl/ecdsa.h> | ||
28 | #include <openssl/dh.h> | ||
27 | 29 | ||
28 | int ssh_compatible_openssl(long, long); | 30 | int ssh_compatible_openssl(long, long); |
29 | 31 | ||
@@ -96,5 +98,139 @@ void ssh_OpenSSL_add_all_algorithms(void); | |||
96 | 98 | ||
97 | #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ | 99 | #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ |
98 | 100 | ||
101 | /* LibreSSL/OpenSSL 1.1x API compat */ | ||
102 | #ifndef HAVE_DSA_GET0_PQG | ||
103 | void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, | ||
104 | const BIGNUM **g); | ||
105 | #endif /* HAVE_DSA_GET0_PQG */ | ||
106 | |||
107 | #ifndef HAVE_DSA_SET0_PQG | ||
108 | int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); | ||
109 | #endif /* HAVE_DSA_SET0_PQG */ | ||
110 | |||
111 | #ifndef HAVE_DSA_GET0_KEY | ||
112 | void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, | ||
113 | const BIGNUM **priv_key); | ||
114 | #endif /* HAVE_DSA_GET0_KEY */ | ||
115 | |||
116 | #ifndef HAVE_DSA_SET0_KEY | ||
117 | int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); | ||
118 | #endif /* HAVE_DSA_SET0_KEY */ | ||
119 | |||
120 | #ifndef HAVE_EVP_CIPHER_CTX_GET_IV | ||
121 | int EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, | ||
122 | unsigned char *iv, size_t len); | ||
123 | #endif /* HAVE_EVP_CIPHER_CTX_GET_IV */ | ||
124 | |||
125 | #ifndef HAVE_EVP_CIPHER_CTX_SET_IV | ||
126 | int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, | ||
127 | const unsigned char *iv, size_t len); | ||
128 | #endif /* HAVE_EVP_CIPHER_CTX_SET_IV */ | ||
129 | |||
130 | #ifndef HAVE_RSA_GET0_KEY | ||
131 | void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, | ||
132 | const BIGNUM **d); | ||
133 | #endif /* HAVE_RSA_GET0_KEY */ | ||
134 | |||
135 | #ifndef HAVE_RSA_SET0_KEY | ||
136 | int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); | ||
137 | #endif /* HAVE_RSA_SET0_KEY */ | ||
138 | |||
139 | #ifndef HAVE_RSA_GET0_CRT_PARAMS | ||
140 | void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, | ||
141 | const BIGNUM **iqmp); | ||
142 | #endif /* HAVE_RSA_GET0_CRT_PARAMS */ | ||
143 | |||
144 | #ifndef HAVE_RSA_SET0_CRT_PARAMS | ||
145 | int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); | ||
146 | #endif /* HAVE_RSA_SET0_CRT_PARAMS */ | ||
147 | |||
148 | #ifndef HAVE_RSA_GET0_FACTORS | ||
149 | void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); | ||
150 | #endif /* HAVE_RSA_GET0_FACTORS */ | ||
151 | |||
152 | #ifndef HAVE_RSA_SET0_FACTORS | ||
153 | int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); | ||
154 | #endif /* HAVE_RSA_SET0_FACTORS */ | ||
155 | |||
156 | #ifndef DSA_SIG_GET0 | ||
157 | void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); | ||
158 | #endif /* DSA_SIG_GET0 */ | ||
159 | |||
160 | #ifndef DSA_SIG_SET0 | ||
161 | int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); | ||
162 | #endif /* DSA_SIG_SET0 */ | ||
163 | |||
164 | #ifndef HAVE_ECDSA_SIG_GET0 | ||
165 | void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); | ||
166 | #endif /* HAVE_ECDSA_SIG_GET0 */ | ||
167 | |||
168 | #ifndef HAVE_ECDSA_SIG_SET0 | ||
169 | int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s); | ||
170 | #endif /* HAVE_ECDSA_SIG_SET0 */ | ||
171 | |||
172 | #ifndef HAVE_DH_GET0_PQG | ||
173 | void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, | ||
174 | const BIGNUM **g); | ||
175 | #endif /* HAVE_DH_GET0_PQG */ | ||
176 | |||
177 | #ifndef HAVE_DH_SET0_PQG | ||
178 | int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); | ||
179 | #endif /* HAVE_DH_SET0_PQG */ | ||
180 | |||
181 | #ifndef HAVE_DH_GET0_KEY | ||
182 | void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); | ||
183 | #endif /* HAVE_DH_GET0_KEY */ | ||
184 | |||
185 | #ifndef HAVE_DH_SET0_KEY | ||
186 | int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); | ||
187 | #endif /* HAVE_DH_SET0_KEY */ | ||
188 | |||
189 | #ifndef HAVE_DH_SET_LENGTH | ||
190 | int DH_set_length(DH *dh, long length); | ||
191 | #endif /* HAVE_DH_SET_LENGTH */ | ||
192 | |||
193 | #ifndef HAVE_RSA_METH_FREE | ||
194 | void RSA_meth_free(RSA_METHOD *meth); | ||
195 | #endif /* HAVE_RSA_METH_FREE */ | ||
196 | |||
197 | #ifndef HAVE_RSA_METH_DUP | ||
198 | RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); | ||
199 | #endif /* HAVE_RSA_METH_DUP */ | ||
200 | |||
201 | #ifndef HAVE_RSA_METH_SET1_NAME | ||
202 | int RSA_meth_set1_name(RSA_METHOD *meth, const char *name); | ||
203 | #endif /* HAVE_RSA_METH_SET1_NAME */ | ||
204 | |||
205 | #ifndef HAVE_RSA_METH_GET_FINISH | ||
206 | int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa); | ||
207 | #endif /* HAVE_RSA_METH_GET_FINISH */ | ||
208 | |||
209 | #ifndef HAVE_RSA_METH_SET_PRIV_ENC | ||
210 | int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, | ||
211 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); | ||
212 | #endif /* HAVE_RSA_METH_SET_PRIV_ENC */ | ||
213 | |||
214 | #ifndef HAVE_RSA_METH_SET_PRIV_DEC | ||
215 | int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, | ||
216 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); | ||
217 | #endif /* HAVE_RSA_METH_SET_PRIV_DEC */ | ||
218 | |||
219 | #ifndef HAVE_RSA_METH_SET_FINISH | ||
220 | int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)); | ||
221 | #endif /* HAVE_RSA_METH_SET_FINISH */ | ||
222 | |||
223 | #ifndef HAVE_EVP_PKEY_GET0_RSA | ||
224 | RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey); | ||
225 | #endif /* HAVE_EVP_PKEY_GET0_RSA */ | ||
226 | |||
227 | #ifndef HAVE_EVP_MD_CTX_new | ||
228 | EVP_MD_CTX *EVP_MD_CTX_new(void); | ||
229 | #endif /* HAVE_EVP_MD_CTX_new */ | ||
230 | |||
231 | #ifndef HAVE_EVP_MD_CTX_free | ||
232 | void EVP_MD_CTX_free(EVP_MD_CTX *ctx); | ||
233 | #endif /* HAVE_EVP_MD_CTX_free */ | ||
234 | |||
99 | #endif /* WITH_OPENSSL */ | 235 | #endif /* WITH_OPENSSL */ |
100 | #endif /* _OPENSSL_COMPAT_H */ | 236 | #endif /* _OPENSSL_COMPAT_H */ |