Skip to content

Commit c116afa

Browse files
authored
remove MD5SHA1 OpenSSL 1.0.2 backport (#239)
1 parent 6e4e578 commit c116afa

File tree

4 files changed

+2
-134
lines changed

4 files changed

+2
-134
lines changed

evp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ func loadHash(ch crypto.Hash) *hashAlgorithm {
9696
hash.marshalledSize = md5MarshaledSize
9797
case crypto.MD5SHA1:
9898
if vMajor == 1 && vMinor == 0 {
99-
hash.md = C.go_openssl_EVP_md5_sha1_backport()
99+
// OpenSSL 1.0.2 does not support MD5SHA1.
100+
hash.md = nil
100101
} else {
101102
hash.md = C.go_openssl_EVP_md5_sha1()
102103
}

goopenssl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ int go_openssl_version_minor(void* handle);
2727
int go_openssl_version_patch(void* handle);
2828
int go_openssl_thread_setup(void);
2929
void go_openssl_load_functions(void* handle, unsigned int major, unsigned int minor, unsigned int patch);
30-
const GO_EVP_MD_PTR go_openssl_EVP_md5_sha1_backport(void);
3130
void go_openssl_DSA_get0_pqg_backport(const GO_DSA_PTR d, GO_BIGNUM_PTR *p, GO_BIGNUM_PTR *q, GO_BIGNUM_PTR *g);
3231
int go_openssl_DSA_set0_pqg_backport(GO_DSA_PTR d, GO_BIGNUM_PTR p, GO_BIGNUM_PTR q, GO_BIGNUM_PTR g);
3332
void go_openssl_DSA_get0_key_backport(const GO_DSA_PTR d, GO_BIGNUM_PTR *pub_key, GO_BIGNUM_PTR *priv_key);

port_evp_md5_sha1.c

Lines changed: 0 additions & 126 deletions
This file was deleted.

shims.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,6 @@ DEFINEFUNC(int, EVP_DigestSignFinal, (GO_EVP_MD_CTX_PTR ctx, unsigned char *sig,
230230
DEFINEFUNC(int, EVP_DigestVerifyInit, (GO_EVP_MD_CTX_PTR ctx, GO_EVP_PKEY_CTX_PTR *pctx, const GO_EVP_MD_PTR type, GO_ENGINE_PTR e, GO_EVP_PKEY_PTR pkey), (ctx, pctx, type, e, pkey)) \
231231
DEFINEFUNC(int, EVP_DigestVerifyFinal, (GO_EVP_MD_CTX_PTR ctx, const unsigned char *sig, size_t siglen), (ctx, sig, siglen)) \
232232
DEFINEFUNC_1_1_1(int, EVP_DigestVerify, (GO_EVP_MD_CTX_PTR ctx, const unsigned char *sigret, size_t siglen, const unsigned char *tbs, size_t tbslen), (ctx, sigret, siglen, tbs, tbslen)) \
233-
DEFINEFUNC_LEGACY_1_0(int, MD5_Init, (GO_MD5_CTX_PTR c), (c)) \
234-
DEFINEFUNC_LEGACY_1_0(int, MD5_Update, (GO_MD5_CTX_PTR c, const void *data, size_t len), (c, data, len)) \
235-
DEFINEFUNC_LEGACY_1_0(int, MD5_Final, (unsigned char *md, GO_MD5_CTX_PTR c), (md, c)) \
236-
DEFINEFUNC_LEGACY_1_0(int, SHA1_Init, (GO_SHA_CTX_PTR c), (c)) \
237-
DEFINEFUNC_LEGACY_1_0(int, SHA1_Update, (GO_SHA_CTX_PTR c, const void *data, size_t len), (c, data, len)) \
238-
DEFINEFUNC_LEGACY_1_0(int, SHA1_Final, (unsigned char *md, GO_SHA_CTX_PTR c), (md, c)) \
239233
DEFINEFUNC_1_1(const GO_EVP_MD_PTR, EVP_md5_sha1, (void), ()) \
240234
DEFINEFUNC(const GO_EVP_MD_PTR, EVP_ripemd160, (void), ()) \
241235
DEFINEFUNC(const GO_EVP_MD_PTR, EVP_md4, (void), ()) \

0 commit comments

Comments
 (0)