Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

2007/12/14

A False Sense of Security

Creating self signed certs is straight forward:

umask 277

openssl genrsa 1024 > host.key

openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > host.cert

cat host.cert host.key > host.pem


You then import the generated cert in a client; e.g. with php/curl, the incantation is:

curl_setopt($ch, CURLOPT_CAINFO, '.../ssl/host.pem');

Et VoilĂ ! we have a 'secure' communication path between client and server...

2007/11/21

A brief history

Liking xemacs meta-A to call set-mark-command:

(defun php-hook ()
""
(define-key php-mode-map [(meta a)] 'set-mark-command))

(add-hook 'php-mode-hook 'php-hook)
(require 'php-mode)

I don't care to recall how many times I have had to resurrect this arcane formula over the years.

And php-mode is in portage for emacs, but not xemacs...