downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

CURL bağlamı seçenekleri> <FTP bağlamı seçenekleri
[edit] Last updated: Fri, 23 Mar 2012

view this page in

SSL bağlamı seçenekleri

SSL bağlamı seçenekleriSSL bağlamı seçeneklerinin listesi

Açıklama

ssl:// ve tls:// aktarımları için bağlamsal seçenekler.

Seçenekler

verify_peer boolean

SSL sertifikası kullanımının doğrulanmasını gerektirir.

FALSE öntanımlıdır.

allow_self_signed boolean

Öz imzalı sertifikalara izin verilir.

FALSE öntanımlıdır.

cafile string

Uzak görevdeşin kimliğini doğrulamak için verify_peer bağlam seçeneği ile kullanmak üzere yerel dosya sistemindeki Sertifika Yetkilisi dosyasının yeri.

capath string

cafile belirtilmemişse veya sertifika yerinde yoksa uygun sertifikayı bulmak için capath tarafından işaret edilen dizin araştırılır. capath doğru olarak betimlenmiş sertifika dizini olmalıdır.

local_cert string

Yerel sertifikanın dosya sistemindeki yeri. Sertifikanızı ve özel anahtarınızı içeren PEM kodlamalı bir dosya olmalıdır. Seçimlik olarak sertifika sağlayıcıların sertifika zincirini içerebilir.

passphrase string

local_cert dosyanızı kodlayan anahtar parolası.

CN_match string

Beklenen bilinen isim (Common Name). PHP sınırlı bir dosya kalıbı eşletirmesi yapmaya çalışır. Eğer bu bilinen isim bununla eşleşmiyorsa bağlantı gerçekleşmeyecektir.

verify_depth integer

Sertifika zinciri çok derinse çıkılır.

Doğrulama yapılmaması öntanımlıdır.

ciphers string

Kullanılabilir şifrelerin listesi belirtilir. Dizge biçemi » ciphers(1) kılavuz sayfasında açıklanmıştır.

DEFAULT öntanımlıdır.

capture_peer_cert boolean

TRUE belirtilirse peer_certificate bağlam seçeneği görevdeşin sertifikasını içererek oluşturulur.

capture_peer_chain boolean

TRUE belirtilirse peer_certificate_chain bağlam seçeneği sertifika zincirini içererek oluşturulur.

Sürüm Bilgisi

Sürüm: Açıklama
5.0.0 capture_peer_cert, capture_peer_chain ve ciphers eklendi.

Notlar

Bilginize: https:// ve ftps:// sarmalayıcıları için ssl:// temel aktarım olduğundan, ssl://'e uygulanan bağlamsal seçenekler ayrıca https:// ve ftps://'e de uygulanır.

Ayrıca Bakınız



add a note add a note User Contributed Notes SSL bağlamı seçenekleri
Botjan kufca 20-Feb-2010 11:11
CN_match works contrary to intuitive thinking. I came across this when I was developing SSL server implemented in PHP. I stated (in code):

- do not allow self signed certs (works)
- verify peer certs against CA cert (works)
- verify the client's CN against CN_match (does not work), like this:

stream_context_set_option($context, 'ssl', 'CN_match', '*.example.org');

I presumed this would match any client with CN below .example.org domain.
Unfortunately this is NOT the case. The option above does not do that.

What it really does is this:
- it takes client's CN and compares it to CN_match
- IF CLIENT's CN CONTAINS AN ASTERISK like *.example.org, then it is matched against CN_match in wildcard matching fashion

Examples to illustrate behaviour:
(CNM = server's CN_match)
(CCN = client's CN)

- CNM=host.example.org, CCN=host.example.org ---> OK
- CNM=host.example.org, CCN=*.example.org ---> OK
- CNM=.example.org, CCN=*.example.org ---> OK
- CNM=example.org, CCN=*.example.org ---> ERROR

- CNM=*.example.org, CCN=host.example.org ---> ERROR
- CNM=*.example.org, CCN=*.example.org ---> OK

According to PHP sources I believe that the same applies if you are trying to act as Client and the server contains a wildcard certificate. If you set CN_match to myserver.example.org and server presents itself with *.example.org, the connection is allowed.

Everything above applies to PHP version 5.2.12.
I will supply a patch to support CN_match starting with asterisk.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites