Shammer's Philosophy

My private adversaria

2014-12-01から1ヶ月間の記事一覧

DH秘密鍵でCSRを作れない・・・

SSL

証明書の秘密鍵生成方法見直し - Shammerismのとおり、opensslのgenpkeyを使用していろいろな証明書を作成しようとしているが、DHの秘密鍵を使用してCSRを作成しようとするとできない。 # openssl genpkey -genparam -algorithm DH -out dhparam.pem -pkeyop…

証明書の秘密鍵生成方法見直し

SSL

Weblogicの対応をしていた頃は、自分でSSLの証明書を作成する際には常にRSAで鍵交換をする想定で、以下のようにRSAの鍵を作っていた。 $ openssl genrsa -out key.pem 2048 ... $しかし、実際にはRSA以外で鍵交換することも多く、そういう検証ではRSA以外の…

tcとiptablesの組み合わせ方法

以下の記事で、それぞれtcとiptablesについて書いたが、今回は両方を組み合わせて、特定のパケットのみtcで遅延させてみる。 Linux tc command samples - 20141125 - Shammerism Linux iptables samples - 20141129 - Shammerism これを本気で理解しようとし…

EmacsLisp行末判定

EmacsLisp行頭判定 - Shammerismの続きだが、、、buffer-substringを使ったが、http://www.bookshelf.jp/texi/elisp-manual/21-2-8/jp/elisp_32.htmlの「31.1 ポイント付近のテキストを調べる」でそのままズバリな関数が見つかった。新バージョンは以下。 (d…

EmacsLisp行頭判定

EmacsLispで、カーソルが行頭にあるかどうか判定する関数を探したが、beginning-of-lineがヒットするばかりで自分の欲しいものが見つからなかったので自作したものをメモ。もっと良い方法ないのだろうか。そのものズバリなのがありそうな気もするのだが。 (d…

How to avoid a filename character corruption on Mac OS?

Mac

The file name like following always corrupted on Mac OS. filename includes multi bytes character the file created on Windows the files are included in zip file Using unar command can avoid character corruption because this command checks f…

Exchange Ctrl and CapsLock on Mavericks

Mac

I got Microsoft Natual Ergonomic Keyboard 4000 US key layout version. I use this a couple of day and begin to think that I would like to exchange CapsLock and Ctrl. CapsLock is left side of A, and Ctrl is left and right bottom. I never typ…

Emacs Keybind でハマる

Emacs Lisp でCtrl+矢印のキーバインドを行いたいと思い、以下のように記述したが動作しなかった。 (define-key global-map (kbd "C-<right>") 'test)記述に問題はないはずなのに、、、と思っていたが、原因は思わぬところにあった。Mission ControlでCtrl+右矢印が</right>…

Emacs cursor is slow on Mavericks

This is caused by Keyboard preference of OS X System Preferences. This can be changed by following steps. Launch System Preferences Click Keyboard Move pointer of "Key Repeat" to Fast Move pointer of "Delay Until Repeat" to Short