Skip to content

Commit 6d9d362

Browse files
committed
PHPLIB-195: Document SSL driver options for MongoDB\Client
1 parent aeb5023 commit 6d9d362

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,99 @@ description: |
1717
interface: phpmethod
1818
operation: ~
1919
optional: true
20+
---
21+
arg_name: option
22+
name: allow_invalid_hostname
23+
type: boolean
24+
description: |
25+
Disables hostname validation if ``true``. Defaults to ``false``.
26+
27+
Allowing invalid hostnames may expose the driver to a `man-in-the-middle
28+
attack <https://en.wikipedia.org/wiki/Man-in-the-middle_attack>`_.
29+
interface: phpmethod
30+
operation: ~
31+
optional: true
32+
---
33+
arg_name: option
34+
name: ca_dir
35+
type: string
36+
description: |
37+
Path to a correctly hashed certificate directory. The system certificate store
38+
will be used by default.
39+
40+
Falls back to the deprecated ``capath`` SSL context option if not specified.
41+
interface: phpmethod
42+
operation: ~
43+
optional: true
44+
---
45+
arg_name: option
46+
name: ca_file
47+
type: string
48+
description: |
49+
Path to a certificate authority file. The system certificate store will be
50+
used by default.
51+
52+
Falls back to the deprecated ``cafile`` SSL context option if not specified.
53+
interface: phpmethod
54+
operation: ~
55+
optional: true
56+
---
57+
arg_name: option
58+
name: crl_file
59+
type: string
60+
description: |
61+
Path to a certificate revocation list file.
62+
interface: phpmethod
63+
operation: ~
64+
optional: true
65+
---
66+
arg_name: option
67+
name: pem_file
68+
type: string
69+
description: |
70+
Path to a PEM encoded certificate to use for client authentication.
71+
72+
Falls back to the deprecated ``local_cert`` SSL context option if not
73+
specified.
74+
interface: phpmethod
75+
operation: ~
76+
optional: true
77+
---
78+
arg_name: option
79+
name: pem_pwd
80+
type: string
81+
description: |
82+
Passphrase for the PEM encoded certificate (if applicable).
83+
84+
Falls back to the deprecated ``passphrase`` SSL context option if not
85+
specified.
86+
interface: phpmethod
87+
operation: ~
88+
optional: true
89+
---
90+
arg_name: option
91+
name: weak_cert_validation
92+
type: boolean
93+
description: |
94+
Disables certificate validation ``true``. Defaults to ``false``.
95+
96+
Falls back to the deprecated ``allow_self_signed`` SSL context option if not
97+
specified.
98+
interface: phpmethod
99+
operation: ~
100+
optional: true
101+
---
102+
arg_name: option
103+
name: context
104+
type: resource
105+
description: |
106+
:php:`SSL context options <manual/en/context.ssl.php>` to be used as fallbacks
107+
for other driver options (as specified). Note that the driver does not consult
108+
the default stream context.
109+
110+
This option is supported for backwards compatibility, but should be considered
111+
deprecated.
112+
interface: phpmethod
113+
operation: ~
114+
optional: true
20115
...

0 commit comments

Comments
 (0)