Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit 9448cf5

Browse files
edk0Stephen Bennett
authored andcommitted
Generate fingerprints for untrusted certificates
yes, I know. they're fingerprints, it doesn't matter.
1 parent 8dbcfae commit 9448cf5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libratbox/src/openssl.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1515
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
* GNU General Public License for more details.
17-
*
17+
*
1818
* You should have received a copy of the GNU General Public License
1919
* along with this program; if not, write to the Free Software
2020
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -635,7 +635,8 @@ rb_get_ssl_certfp(rb_fde_t *F, uint8_t certfp[RB_SSL_CERTFP_LEN])
635635
res == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN ||
636636
res == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE ||
637637
res == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT ||
638-
res == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
638+
res == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY ||
639+
res == X509_V_ERR_CERT_UNTRUSTED)
639640
{
640641
unsigned int certfp_length = RB_SSL_CERTFP_LEN;
641642
X509_digest(cert, EVP_sha1(), certfp, &certfp_length);
@@ -657,7 +658,7 @@ rb_supports_ssl(void)
657658
void
658659
rb_get_ssl_info(char *buf, size_t len)
659660
{
660-
rb_snprintf(buf, len, "Using SSL: %s compiled: 0x%lx, library 0x%lx",
661+
rb_snprintf(buf, len, "Using SSL: %s compiled: 0x%lx, library 0x%lx",
661662
SSLeay_version(SSLEAY_VERSION), OPENSSL_VERSION_NUMBER, SSLeay());
662663
}
663664

0 commit comments

Comments
 (0)