anchor.diff:    (buf :pointer)
     (num :int))
   
  +;;RSA *RSA_generate_key(int num, unsigned long e,
  +;;    void (*callback)(int,int,void *), void *cb_arg);
  +(cffi:defcfun ("RSA_generate_key" rsa-generate-key)
  +    :pointer
  +  (num :int)
  +  (e :unsigned-long) 
  +  (callback :pointer)
  +  (opt :pointer))
  +
  +;;void RSA_free(RSA *rsa);
  +;;
  +(cffi:defcfun ("RSA_free" rsa-free)
  +    :void
  +  (rsa :pointer))
  +
  +;void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
  +;            RSA *(*tmp_rsa_callback)(SSL *ssl, int is_export, int keylength));
  +(cffi:defcfun ("SSL_CTX_set_tmp_rsa_callback" ssl-ctx-set-tmp-rsa-callback)
  +    :pointer
  +  (ctx :pointer)
  +  (callback :pointer))
  +
  +;static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength)
  +
  +(cffi:defcallback need-tmp-rsa-callback :pointer ((ssl :pointer) (export-p :int) (key-length :int))
  +  (declare (ignore ssl export-p))
  +					;
  +					;blindly assume 512 bit key is needed
  +					;
  +  (cond ((= key-length 512)
  +	 (progn
  +	   (unless *tmp-rsa-key-512* (setf *tmp-rsa-key-512* (rsa-generate-key 512 +RSA_F4+ (cffi:null-pointer) (cffi:null-pointer))))
  +		      *tmp-rsa-key-512*)
  +	 t
  +	 (progn
  +	   (unless *tmp-rsa-key-1024* (setf *tmp-rsa-key-1024* (rsa-generate-key 1024 +RSA_F4+ (cffi:null-pointer) (cffi:null-pointer))))
  +	   *tmp-rsa-key-1024*))))
  +
   ;;; Funcall wrapper
   ;;;
   (defvar *socket*)
  
positive.code: (defconstant +SSL_CTRL_SET_SESS_CACHE_MODE+ 44)
  (defconstant +SSL_CTRL_MODE+ 33)
  
  (defconstant +SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER+ 2)
  
  ;;; Misc
  ;;;
  
negative.code:   (setf *ssl-global-context* (ssl-ctx-new *ssl-global-method*))
    (ssl-ctx-set-session-cache-mode *ssl-global-context* 3)
    (ssl-ctx-set-default-passwd-cb *ssl-global-context* 
                                   (cffi:callback pem-password-callback))
    (ssl-ctx-set-tmp-rsa-callback *ssl-global-context* (cffi:callback need-tmp-rsa-callback)))
  
  (defun ensure-initialized (&key (method 'ssl-v23-method) (rand-seed nil))
    "In most cases you do *not* need to call this function, because it 
  