|
Connecting over SSLThe driver supports connecting to » MongoDB over SSL and can optionally use SSL Stream Context options to provide more details, such as verifying certificates against specific certificate chain, or authenticate to » MongoDB using X509 certificates. Example #1 Connect to MongoDB Instance with SSL Encryption
<?php Example #2 Connect to MongoDB Instance with SSL Encryption, verifying it is who we think it is
<?php
Example #3 Connect to MongoDB Instance that Requires Client Certificates
<?php Example #4 Authenticating with X.509 certificates The username is the certificate subject from the X509, which can be extracted like this: openssl x509 -in /vagrant/certs/ca-signed-client.pem -inform PEM -subject -nameopt RFC2253
<?php Where username is the certificate subject. Changelog
|