Skip to content

Commit 010b655

Browse files
r10siequidoo
andauthored
api: correct DC_CERTCK_ACCEPT_* values and docs (#6176)
this PR changes `DC_CERTCK_ACCEPT_*` to the same values in cffi as rust does. and regards the same values as deprecated afterwards there is some confusion about what is deprecated and what not, see deltachat/deltachat-android#3408 iOS needs to be adapted as it was following the docs in the CFFI before, same desktop. both need to be graceful on reading and strict on writing. ~~**this PR is considered harmful,** so we should not merge that in during 1.48 release, there is no urgency, things are fine (wondering if it isn't even worth the effort, however, having different values and deprecations is a call for trouble in the future ...)~~ --------- Co-authored-by: iequidoo <[email protected]>
1 parent fe53eb2 commit 010b655

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

deltachat-ffi/deltachat.h

+8-2
Original file line numberDiff line numberDiff line change
@@ -5709,8 +5709,14 @@ int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
57095709
#define DC_CERTCK_STRICT 1
57105710

57115711
/**
5712-
* Accept invalid certificates, including self-signed ones
5713-
* or having incorrect hostname.
5712+
* Accept certificates that are expired, self-signed
5713+
* or not valid for the server hostname.
5714+
*/
5715+
#define DC_CERTCK_ACCEPT_INVALID 2
5716+
5717+
/**
5718+
* For API compatibility only: Treat this as DC_CERTCK_ACCEPT_INVALID on reading.
5719+
* Must not be written.
57145720
*/
57155721
#define DC_CERTCK_ACCEPT_INVALID_CERTIFICATES 3
57165722

node/constants.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Generated!
22

33
module.exports = {
4+
DC_CERTCK_ACCEPT_INVALID: 2,
45
DC_CERTCK_ACCEPT_INVALID_CERTIFICATES: 3,
56
DC_CERTCK_AUTO: 0,
67
DC_CERTCK_STRICT: 1,

node/lib/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Generated!
22

33
export enum C {
4+
DC_CERTCK_ACCEPT_INVALID = 2,
45
DC_CERTCK_ACCEPT_INVALID_CERTIFICATES = 3,
56
DC_CERTCK_AUTO = 0,
67
DC_CERTCK_STRICT = 1,

0 commit comments

Comments
 (0)