Skip to content

Commit 6b6631c

Browse files
committed
Fix parsing of the OpenSSL version with "-fips" and similar suffixes
1 parent a672fe0 commit 6b6631c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cdk/cmake/DepFindSSL.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License, version 2.0, as
@@ -192,8 +192,9 @@ function(find_openssl)
192192
)
193193

194194
#message("== OPENSSL_VERSION_NUMBER: ${OPENSSL_VERSION_NUMBER}")
195+
# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1d-freebsd 10 Sep 2019"
195196
STRING(REGEX REPLACE
196-
"^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[\t ]([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z]*)[\t ].*$"
197+
"^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[\t ]([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z]|)[\t \\-].*$"
197198
"\\1;\\2;\\3;\\4"
198199
version_list "${OPENSSL_VERSION_NUMBER}"
199200
)

0 commit comments

Comments
 (0)