blob: e326f1d0b72f71887117757539223def2af69c00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<!--
$FML: openssl.sgml,v 1.1 2001/04/28 08:16:10 fukachan Exp $
-->
<chapter id="openssl">
<title> openssl �λȤ��� </title>
<sect1>
<title> ���оθ����� </title>
<sect2>
<title> private key ���� </title>
<para>
<screen>
% openssl genrsa -des 1024 > private.pem
1120 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
...................+++++
.............+++++
e is 65537 (0x10001)
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:
% ls
private.pem
</screen>
</para>
</sect2>
<sect2>
<title> create key to be submitted to CA </title>
<screen>
% openssl req -new -key private.pem -out csr.pem
Using configuration from /usr/local/ssl/openssl.cnf
Enter PEM pass phrase:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Hokkaido
Locality Name (eg, city) []:Sapporo
Organization Name (eg, company) [Internet Widgits Pty Ltd]:fml project
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:beth.fml.org
Email Address []:fukachan@fml.org
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
% ls
csr.pem private.pem
</screen>
</sect2>
<sect2>
<title> sign signature by CA
(here myself == private.pem, but it is meaningless).
</title>
<screen>
% openssl x509 -in csr.pem -out crt.pem -req -signkey private.pem
Signature ok
subject=/C=JP/ST=Hokkaido/L=Sapporo/O=fml project/CN=beth.fml.org/Email=fukachan@fml.org
Getting Private key
Enter PEM pass phrase:
% ls
crt.pem csr.pem private.pem
</screen>
</sect2>
</sect1>
</chapter>
|