oxidizing / letters

Letters is an OCaml library for creating and sending emails over SMTP using LWT
MIT License
54 stars 6 forks source link

Test PEM file doesn't work #44

Open aronerben opened 2 years ago

aronerben commented 2 years ago

Test

     let ethereal_conf_with_single_ca_cert =
       (* Use PEM file containing correct chain *)
       Config.set_ca_cert "../../../ethereal-email-chain.pem" ethereal_conf_with_ca_detect
     in
...
           ; Alcotest_lwt.test_case
               "Send plain text email, use specific CA cert file"
               `Slow
               (test_send_plain_text_email ethereal_conf_with_single_ca_cert)

throws

[failure] Sending email failed, TLS failure: BAD_CERTIFICATE

@mikonieminen Do you have any idea why? Where did you get that file?

mikonieminen commented 2 years ago

It's from this commit: https://github.com/oxidizing/letters/commit/9f5fa34c7251e00372b3f5680911ddaaec63cf78

Basically they changed CA for their certificate and the old CA chain file didn't work anymore and since this test is about providing own CA cert chain, I just extracted the chain data manually and added it into a file. If I remember correctly, I just used browser to download the chain data.

aronerben commented 2 years ago

Thank you, do you remember where you got that cert from?