Using Python to find out what cipher a SSL server is using

I have a new-found interest in finding outwhat ciphers various SSL servers around here are using in some easy andconvenient way. Doing this in Perl is easy (there's an example here ), but I prefer Python.I'd normally use pyOpenSSL , my favorite Python OpenSSL module , butunfortunately it doesn't (currently) have an interface to thenecessary 'get the connection's cipher' OpenSSL routine, andthere's no visible substitute for it.

(While the .get


The consequences of your SSL certificate getting compromised

Suppose that your web server's SSL certificate's private key iscompromised and stolen by an attacker. Further suppose that you detectthis and replace the compromised certificate with a new one. Now, here'sa question: what damage can the attacker still do with their stolencertificate?

  • they can impersonate your web server. In theory they can only do thisuntil their stolen certificate expires; in practice, I think that manyusers ignore 'expired certificate' errors because they are relativelycommon.

    (SSL certificate


Charlie Brown

Charles Monroe Schulz has always been one of my favourite cartoonists. He told us wonderful stories about Charles Brown, whom I shall never forget.

One day, Charlie Brown lied on the bed, murmuring to himself, "Sometimes, I lie awake at night, and I ask, why me?"
Can you imagine how Charlie Brown comes up with the answer himself?
Then a voice answers, "Nothing personal… your name just happened to come up."

One can envisage ourselves engaging in these endless "why me

黑色的國慶前夕

起初估計道指會跌破10,000點水平的時候,我沒有預料過會有救市方案這一著。
救市消息一出,更從來沒有想過會被House否決。

一直不敢說,(淡友插個市,還在這個投資氣氛下,好易被人罵),就是上一次恆指下試16,

給你1萬元會買什麼?

【明報專訊】入讀明年小一的報名季節展開,33所私立或直資名校的面試試題疑於網上曝光,個別名校除要求面試以廣東話、英文及普通話三語答題外,部分試題對於年僅5歲的幼稚園高班學生來說相當刁鑽,如需以英語回答

給蠢才的信

給蠢才的信

蠢才:

小女子仰慕你,已經有一輩子那麼久了。我Daisy生性高傲,目中無人。但對住你,我服。

如果閣下一邊讀信,一邊懷疑我這信是否衝著你而來,那麼請你放心好了。因為要是你懷疑自己是一個「蠢才」,那麼你實

假東洋美女之回顧篇

日本人祟洋, 恨不得自己脫亞入歐. 無奈種族由天注定, 對金髮碧眼只好望門興嘆. 因此特別喜歡歐日製造的混血兒, 貪其美貌與血統兼備, 就可以韜韜光, 當作是大和榮譽出品. 難為濱崎步扮得辛苦, 染金毛、瞪眼睛, 還是長
Continue reading...

HTML5 code demo

這是 Ian Hickson 在 Google 一個有關 HTML5 的演講, 直接打 code 來 demo。部份瀏覽器已在實作這些功能了。對於熟識 HTML 的開發者,應該會看得很興奮。下面是高清版本:

Update: 貼文這段 video 竟然 no longer available… 但這是 Google 自己 host 的啊… 等一下看看會不會再有 update


SSL/TLS and forward secrecy

Here is an interesting question: does SSL have perfect forward secrecy , so that anattacker who compromises a server key still can't decrypt the server'sconversations?

(While lots of people talk about SSL, thereal name of the whole protocol is TLS , more orless. 'SSL' is the name Netscape gave to the original protocol; TLS isthe name that it was officially standardized as.)

The answer turns out to be 'sort of', as I have found out through abunch


公民力量的力量

論政團體"澳門公民力量"昨日成立,我以會員身分參加了成立儀式暨首個活動:“澳門.公民的視野論壇”,過了一個很有力量的下午。

成立儀式,外人看來也許不怎麼樣,有些人也許不習慣這樣,但我自己是覺得很感動的,