Shammer's Philosophy

My private adversaria

2014-01-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

Linux iptables samples - 20141129

iptablesはこれまでも使用していたが、情報としてまとめていなかったのでまとめることにしました。 tcp-flagsについて tcp-flags は2つの引数を取る。最初はチェック対象のTCPフラグ、2つ目はどのフラグがONのパケットを対象にするか。指定可能なフラグは以…

Linux tc command samples - 20141125

What is tc? Linuxにはtcコマンドというものがある。https://linuxjf.osdn.jp/JFdocs/Adv-Routing-HOWTO/lartc.qdisc.htmlから辿ることのできる内容が一次情報に近そうだ。結構古そうだが。このコマンドを使用することで、パケットの遅延やdropを発生させる…

Emacs Server configuration

Emacs can be configured as server mode. Server mode helps to collect all process to view or edit text files by emacsclient. Add following configuration to init.el (require 'server) (unless (server-running-p) (server-start)) Add emacsclient…

skkdic-expr2 install failed?

Mac

After replaced my Mac, there is no skkdic-expr2, but skkdic-expr is exists. I installed skktools by the way as same as Install skk-tools into Mavericks - Shammerism. According to クリスマスの日。 - 日々、とんは語る。, glib2 is required to …

Emacs 24.4 Install on Debian, only terminal version.

This is a split article of Install Emacs 24.3 on Debian 7.4 - Shammerism. apt-get install build-essential apt-get install libncurses-dev apt-get install autoconf wget http://ftp.gnu.org/pub/gnu/emacs/emacs-24.4.tar.gz cd emacs-24.4 ./confi…

Disable IPv6 access when executing apt-get

Here is a reference. http://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method I think these 2 methods are reasonable. Using -o Acquire::ForceIPv4=true like apt-get -o Acquire::ForceIPv4=true update Generate /etc…

接続先サーバで使用可能なcipherを知りたい--curl_20141108

SSL

curlの最新版、7.39.0が先日出たようだ。これで接続先サーバで使用可能なcipherを知りたい--curl_20141029 - Shammerismのスクリプトを試してみたが、問題なさそうだ。でも、、、なんか不安だ。本当に漏れはないだろうか。とりあえず、実行結果の例。 ~:# ./…

Emacs 24.4

I have been looking forward Emacs 24.4, and it was released at 2014/10/20, according to GNU Emacs For Mac OS X. Then, I install this and use. I was surprised that Ctrl-J key action has been changed. Until 24.3, this key is new-line + auto-…

接続先サーバで使用可能なcipherを知りたい--curl_20141029

SSL

接続先サーバで使用可能なcipherを知りたい--curl_20141027 - Shammerismで作成したスクリプト、応答が302とかでHTMLのコンテントがない場合や、何も応答を返さないサーバーがあると誤判定してしまう可能性がある。コンテントがない場合はどうにもならないが…

接続先サーバで使用可能なcipherを知りたい--curl_20141027

SSL

curlのビルド時にどのSSLライブラリを使用するかで使用可能なcipherも変わってくる。そのため、全てのcipherを確認することはできない。あくまでも、確認できるのはクライアントが使用可能なcipherの中で、サーバーも使用可能なものを調べる、というスタンス…

AquaSKK で辞書が保存できなかった理由

Mac

わかってみれば実にシンプルな理由だった。環境設定の辞書で「変更」をクリックしてユーザー辞書を選択すると、file://という形で登録される。このfile://という形式は、「変更」をやった結果なので問題ないと思っていたが、これだとダメなようだ。このfile:…

Install Tomcat7 on Debian wheezy via apt-get

On wheezy, we can install tomcat 7.0.28 via apt-get. apt-get update apt-get install openjdk-7-jdk apt-get install tomcat7 apt-get install tomcat7-admin edit /etc/tomcat7/tomcat-user.xml No system user required. Tomcat seems to check tomcat…

Emacs Font configuration on Debian

Today's article is a Debian version of Emacs Font change - Shammerism. But both Monaco and Osaka font are not installed as default. Some steps are required different from Mac OS X. Install Osaka su - mkdir -p /usr/share/fonts/ttc-osaka cd …

Tomcat configuration

I cannot transfer big data to tomcat. In detail, tomcat seems to stop reading post parameter if it's size is big(I tried more than 50MB text). This is caused by default tomcat config parameter "maxPostSize". Changing this parameter to -1 a…

Emacs Font change

I install Debian in my personal laptop and using Mac OS X in my office. Of course, I install and use Emacs both environment. I selected Inconsolata as my favorite font, but recently I prefer Monaco and Osaka combination. This is a memo of …

Squeeze apt source list

I use Debian Squeeze as my test server default destribution. But, recently, squeeze apt is not good. My /etc/apt/sources.list is like below. + # cat /etc/apt/sources.list # # /etc/apt/sources.list # # # squeeze # deb http://ftp.jp.debian.o…

launchctl command examples

Mac

In Mac OS X, using launchctl instead of init. This is a command of launchctl to use daemon process running on Mac OS X. sudo launchctl list This command lists up all daemon processes. sudo launchctl start $LABEL start $LABEL daemon process…

OpenSSLで接続先サーバの証明書を取得する

SSL

OpenSSLのs_clientにはshowcertsというオプションがあり、それを使用することで証明書の内容を表示できる。この表示された証明書のみを保存すれば証明書を取得できる。以下のような感じで実行する。 $ openssl s_client -connect $Host:443 2>&1 < /dev/null…

DNS forward and delegate

Introduction I have a question about the difference between DNS forward and delegate, I referred this point in this article. And I found the article about DNS sub-domain, http://www.atmarkit.co.jp/fwin2k/win2ktips/740dnsdelegate/dnsdelegat…

Bind forwarder option

What is DNS forwarder? DNS forwarder is like an upper DNS servers. If some DNS server receives a query which is not owned as authority, the DNS server can forward the request to other DNS servers. Those other DNS servers who work as a reso…

Install HP Printer Driver on Debian wheezy

I use HP PhotoSmart printer, and can get and install driver by this site procedure. This is my memo. su - apt-get update apt-get install avahi-utils apt-get install libcups2 apt-get install libcups2-dev apt-get install cups-bsd apt-get ins…