Skip to content

File tree

3 files changed

+131
-2
lines changed

3 files changed

+131
-2
lines changed

tools/libressl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=libressl
11-
PKG_VERSION:=3.7.3
12-
PKG_HASH:=7948c856a90c825bd7268b6f85674a8dcd254bae42e221781b24e3f8dc335db3
11+
PKG_VERSION:=4.2.1
12+
PKG_HASH:=6d5c2f58583588ea791f4c8645004071d00dfa554a5bf788a006ca1eb5abd70b
1313

1414
PKG_CPE_ID:=cpe:/a:openbsd:libressl
1515

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
--- a/crypto/ec/ec_local.h
2+
+++ b/crypto/ec/ec_local.h
3+
@@ -253,9 +253,9 @@ struct ec_key_st {
4+
int eckey_compute_pubkey(EC_KEY *eckey);
5+
int ecdh_compute_key(unsigned char **out, size_t *out_len,
6+
const EC_POINT *pub_key, const EC_KEY *ecdh);
7+
-int ecdsa_verify(int type, const unsigned char *dgst, int dgst_len,
8+
+int libressl_ecdsa_verify(int type, const unsigned char *dgst, int dgst_len,
9+
const unsigned char *sigbuf, int sig_len, EC_KEY *eckey);
10+
-int ecdsa_verify_sig(const unsigned char *dgst, int dgst_len,
11+
+int libressl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len,
12+
const ECDSA_SIG *sig, EC_KEY *eckey);
13+
14+
/*
15+
--- a/crypto/ecdsa/ecdsa.c
16+
+++ b/crypto/ecdsa/ecdsa.c
17+
@@ -217,7 +217,7 @@ ecdsa_prepare_digest(const unsigned char
18+
}
19+
20+
int
21+
-ecdsa_sign(int type, const unsigned char *digest, int digest_len,
22+
+libressl_ecdsa_sign(int type, const unsigned char *digest, int digest_len,
23+
unsigned char *signature, unsigned int *signature_len, const BIGNUM *kinv,
24+
const BIGNUM *r, EC_KEY *key)
25+
{
26+
@@ -266,7 +266,7 @@ LCRYPTO_ALIAS(ECDSA_sign);
27+
*/
28+
29+
int
30+
-ecdsa_sign_setup(EC_KEY *key, BN_CTX *in_ctx, BIGNUM **out_kinv, BIGNUM **out_r)
31+
+libressl_ecdsa_sign_setup(EC_KEY *key, BN_CTX *in_ctx, BIGNUM **out_kinv, BIGNUM **out_r)
32+
{
33+
const EC_GROUP *group;
34+
EC_POINT *point = NULL;
35+
@@ -517,7 +517,7 @@ ecdsa_compute_s(BIGNUM **out_s, const BI
36+
*/
37+
38+
ECDSA_SIG *
39+
-ecdsa_sign_sig(const unsigned char *digest, int digest_len,
40+
+libressl_ecdsa_sign_sig(const unsigned char *digest, int digest_len,
41+
const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *key)
42+
{
43+
BN_CTX *ctx = NULL;
44+
@@ -600,7 +600,7 @@ ECDSA_do_sign(const unsigned char *diges
45+
LCRYPTO_ALIAS(ECDSA_do_sign);
46+
47+
int
48+
-ecdsa_verify(int type, const unsigned char *digest, int digest_len,
49+
+libressl_ecdsa_verify(int type, const unsigned char *digest, int digest_len,
50+
const unsigned char *sigbuf, int sig_len, EC_KEY *key)
51+
{
52+
ECDSA_SIG *s;
53+
@@ -649,7 +649,7 @@ LCRYPTO_ALIAS(ECDSA_verify);
54+
*/
55+
56+
int
57+
-ecdsa_verify_sig(const unsigned char *digest, int digest_len,
58+
+libressl_ecdsa_verify_sig(const unsigned char *digest, int digest_len,
59+
const ECDSA_SIG *sig, EC_KEY *key)
60+
{
61+
const EC_GROUP *group;
62+
--- a/crypto/ecdsa/ecdsa_local.h
63+
+++ b/crypto/ecdsa/ecdsa_local.h
64+
@@ -68,12 +68,12 @@ struct ECDSA_SIG_st {
65+
BIGNUM *s;
66+
};
67+
68+
-int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *in_ctx, BIGNUM **out_kinv,
69+
+int libressl_ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *in_ctx, BIGNUM **out_kinv,
70+
BIGNUM **out_r);
71+
-int ecdsa_sign(int type, const unsigned char *digest, int digest_len,
72+
+int libressl_ecdsa_sign(int type, const unsigned char *digest, int digest_len,
73+
unsigned char *signature, unsigned int *signature_len, const BIGNUM *kinv,
74+
const BIGNUM *r, EC_KEY *eckey);
75+
-ECDSA_SIG *ecdsa_sign_sig(const unsigned char *digest, int digest_len,
76+
+ECDSA_SIG *libressl_ecdsa_sign_sig(const unsigned char *digest, int digest_len,
77+
const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey);
78+
79+
__END_HIDDEN_DECLS
80+
--- a/crypto/ec/ec_key.c
81+
+++ b/crypto/ec/ec_key.c
82+
@@ -774,12 +774,12 @@ static const EC_KEY_METHOD openssl_ec_ke
83+
.keygen = ec_key_gen,
84+
.compute_key = ecdh_compute_key,
85+
86+
- .sign = ecdsa_sign,
87+
- .sign_setup = ecdsa_sign_setup,
88+
- .sign_sig = ecdsa_sign_sig,
89+
+ .sign = libressl_ecdsa_sign,
90+
+ .sign_setup = libressl_ecdsa_sign_setup,
91+
+ .sign_sig = libressl_ecdsa_sign_sig,
92+
93+
- .verify = ecdsa_verify,
94+
- .verify_sig = ecdsa_verify_sig,
95+
+ .verify = libressl_ecdsa_verify,
96+
+ .verify_sig = libressl_ecdsa_verify_sig,
97+
};
98+
99+
const EC_KEY_METHOD *
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--- a/libcrypto.pc.in
2+
+++ b/libcrypto.pc.in
3+
@@ -23,6 +23,5 @@ includedir=@includedir@
4+
Name: LibreSSL-libcrypto
5+
Description: LibreSSL cryptography library
6+
Version: @VERSION@
7+
-Libs: -L${libdir} -lcrypto
8+
-Libs.private: @LIBS@ @PLATFORM_LDADD@
9+
+Libs: -L${libdir} -lcrypto @LIBS@ @PLATFORM_LDADD@
10+
Cflags: -I${includedir}
11+
--- a/libssl.pc.in
12+
+++ b/libssl.pc.in
13+
@@ -23,6 +23,6 @@ includedir=@includedir@
14+
Name: LibreSSL-libssl
15+
Description: Secure Sockets Layer and cryptography libraries
16+
Version: @VERSION@
17+
-Requires.private: libcrypto
18+
+Requires: libcrypto
19+
Libs: -L${libdir} -lssl
20+
Cflags: -I${includedir}
21+
--- a/libtls.pc.in
22+
+++ b/libtls.pc.in
23+
@@ -23,6 +23,5 @@ includedir=@includedir@
24+
Name: LibreSSL-libtls
25+
Description: Secure communications using the TLS socket protocol.
26+
Version: @VERSION@
27+
-Libs: -L${libdir} -ltls
28+
-Libs.private: @LIBS@ @PLATFORM_LDADD@ -lssl -lcrypto
29+
+Libs: -L${libdir} -ltls @LIBS@ @PLATFORM_LDADD@ -lssl -lcrypto
30+
Cflags: -I${includedir}

0 commit comments

Comments
 (0)