diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-23 16:02:25 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-28 23:26:59 -0300 |
commit | 6a868a671472d454b407a165fc31c5f7dfe783c6 (patch) | |
tree | 7bd2ab13a04d14215264cc992501970cacfb20ef /recipes-connectivity | |
parent | 62e212fe4812a6c726df4ac8e77d4a77e0e54247 (diff) | |
download | meta-freescale-6a868a671472d454b407a165fc31c5f7dfe783c6.tar.gz |
Move meta-fsl-ppc content to layer root
This commit is just a rename of all contents of meta-fsl-ppc
subdirectory to this layer's root, merging the contents of common
files, subsequent changes are based on top of that.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-connectivity')
107 files changed, 14340 insertions, 0 deletions
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README new file mode 100644 index 00000000..9578982d --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README | |||
@@ -0,0 +1,77 @@ | |||
1 | test_setkey script usage | ||
2 | |||
3 | The scripts in this directory may be used for testing | ||
4 | native Linux IPsec with the talitos driver as a loadable module. | ||
5 | |||
6 | It's assumed that these scripts have been placed in the directory | ||
7 | named /test_setkey. | ||
8 | |||
9 | The scripts setup_left and setup_right configure the ip addresses | ||
10 | for two boards named 'left' and 'right', which are two gateways for | ||
11 | an IPsec tunnel. Connect the eth1 interfaces of left and right boards together. | ||
12 | For smartbits testing, connect eth0 on each board to a smartbits port. | ||
13 | For other testing (ping, netperf, iperf), connect eth0 on each board to another system. | ||
14 | |||
15 | The scripts named left.conf-* and right.conf-* are setkey scripts | ||
16 | which configure the IPsec SA and SPD entries. | ||
17 | The scripts ending in -tunnel use tunnel mode IPsec, and the scripts | ||
18 | ending in -transport used transport mode IPsec. | ||
19 | Transport mode is useful for quickly testing security functionality | ||
20 | using ping or netperf between two boards. | ||
21 | Tunnel mode can be used for testing throughput using smartbits or other | ||
22 | performance test equipment. | ||
23 | |||
24 | There is a top level script called 'setup' which | ||
25 | is used for a one-step setup on the left and right boards. | ||
26 | 'setup' uses two or three parameters. The first parameter is the side, left or right. | ||
27 | The second parameter is the setkey suffix for the left.conf- and right.conf- files. | ||
28 | If the third parameter is supplied, the setup will modprobe that name, so | ||
29 | typically you should provide talitos as the third parameter if you want to load the driver. | ||
30 | If you have built the talitos driver into the kernel, omit the third parameter to setup. | ||
31 | You may test software encryption if talitos is built as a module and you omit the third parameter. | ||
32 | |||
33 | Below are example uses of the 'setup' script. | ||
34 | |||
35 | 1) One-step setup for smartbits | ||
36 | Use a tunnel mode setup on each side. | ||
37 | AES-HMAC-SHA1: | ||
38 | Left side: | ||
39 | /test_setkey/setup left aes-sha1-tunnel talitos | ||
40 | Right side: | ||
41 | /test_setkey/setup right aes-sha1-tunnel talitos | ||
42 | |||
43 | 3DES-HMAC-SHA1: | ||
44 | Left side: | ||
45 | /test_setkey/setup left 3des-sha1-tunnel talitos | ||
46 | Right side: | ||
47 | /test_setkey/setup right 3des-sha1-tunnel talitos | ||
48 | |||
49 | 2) One-step setup for testing ping, netperf, or iperf between two boards. | ||
50 | Use a transport mode setup on each side. | ||
51 | AES-HMAC-SHA1: | ||
52 | Left side: | ||
53 | /test_setkey/setup left aes-sha1-transport talitos | ||
54 | Right side: | ||
55 | /test_setkey/setup right aes-sha1-transport talitos | ||
56 | |||
57 | 3DES-HMAC-SHA1: | ||
58 | Left side: | ||
59 | /test_setkey/setup left 3des-sha1-transport talitos | ||
60 | Right side: | ||
61 | /test_setkey/setup right 3des-sha1-transport talitos | ||
62 | |||
63 | 3) Testing ipv4 | ||
64 | To test ipv4 (with no security) over the two gateways, use steps below. | ||
65 | Testing ipv4 is helpful to get your smartbits configuration verified | ||
66 | and also establish a baseline performance for throughput. | ||
67 | |||
68 | On the left board: | ||
69 | cd /test_setkey | ||
70 | ./setup_left | ||
71 | ./left.ipv4 | ||
72 | |||
73 | On the right board: | ||
74 | cd /test_setkey | ||
75 | ./setup_right | ||
76 | ./right.ipv4 | ||
77 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel new file mode 100755 index 00000000..6bd6c5d8 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel new file mode 100755 index 00000000..eebf307a --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board B setup | ||
18 | # Flush the SAD and SPD | ||
19 | flush; | ||
20 | spdflush; | ||
21 | |||
22 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
23 | # | ||
24 | # Security policies | ||
25 | |||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey new file mode 100755 index 00000000..0be30562 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey | |||
@@ -0,0 +1,4 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | |||
3 | flush; | ||
4 | spdflush; | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left new file mode 100644 index 00000000..d9d6c0c6 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left | |||
@@ -0,0 +1,29 @@ | |||
1 | # /etc/ipsec.conf - strongSwan IPsec configuration file | ||
2 | |||
3 | config setup | ||
4 | charondebug="chd 2, knl 2" | ||
5 | crlcheckinterval=180 | ||
6 | strictcrlpolicy=no | ||
7 | plutostart=no | ||
8 | |||
9 | conn %default | ||
10 | ikelifetime=60m | ||
11 | keylife=20m | ||
12 | rekeymargin=3m | ||
13 | keyingtries=1 | ||
14 | keyexchange=ikev2 | ||
15 | type=tunnel | ||
16 | auth=esp | ||
17 | compress=no | ||
18 | mobike=no | ||
19 | |||
20 | conn net-net | ||
21 | left=200.200.200.10 | ||
22 | leftsubnet=192.168.1.0/24 | ||
23 | leftcert=moonCert.pem | ||
24 | leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" | ||
25 | leftfirewall=yes | ||
26 | right=200.200.200.20 | ||
27 | rightsubnet=192.168.2.0/24 | ||
28 | rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" | ||
29 | auto=add | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right new file mode 100644 index 00000000..c14dee2b --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right | |||
@@ -0,0 +1,28 @@ | |||
1 | # /etc/ipsec.conf - strongSwan IPsec configuration file | ||
2 | |||
3 | config setup | ||
4 | charondebug="chd 2, knl 2" | ||
5 | crlcheckinterval=180 | ||
6 | strictcrlpolicy=no | ||
7 | plutostart=no | ||
8 | |||
9 | conn %default | ||
10 | ikelifetime=60m | ||
11 | keylife=20m | ||
12 | rekeymargin=3m | ||
13 | keyingtries=1 | ||
14 | keyexchange=ikev2 | ||
15 | auth=esp | ||
16 | compress=no | ||
17 | mobike=no | ||
18 | |||
19 | conn net-net | ||
20 | left=200.200.200.20 | ||
21 | leftcert=sunCert.pem | ||
22 | leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" | ||
23 | leftsubnet=192.168.2.0/24 | ||
24 | leftfirewall=yes | ||
25 | right=200.200.200.10 | ||
26 | rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" | ||
27 | rightsubnet=192.168.1.0/24 | ||
28 | auto=add | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left new file mode 100644 index 00000000..e86d6aa5 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left | |||
@@ -0,0 +1,3 @@ | |||
1 | # /etc/ipsec.secrets - strongSwan IPsec secrets file | ||
2 | |||
3 | : RSA moonKey.pem | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right new file mode 100644 index 00000000..1095b74c --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right | |||
@@ -0,0 +1,8 @@ | |||
1 | # /etc/ipsec.secrets - strongSwan IPsec secrets file | ||
2 | |||
3 | : RSA sunKey.pem | ||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left new file mode 100644 index 00000000..55025dbc --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left | |||
@@ -0,0 +1,39 @@ | |||
1 | # /etc/ipsec.conf - strongSwan IPsec configuration file | ||
2 | |||
3 | config setup | ||
4 | plutodebug=control | ||
5 | crlcheckinterval=180 | ||
6 | strictcrlpolicy=no | ||
7 | charonstart=no | ||
8 | |||
9 | conn %default | ||
10 | ikelifetime=60m | ||
11 | keylife=20m | ||
12 | rekeymargin=3m | ||
13 | keyingtries=1 | ||
14 | keyexchange=ikev1 | ||
15 | left=200.200.200.10 | ||
16 | leftcert=moonCert.pem | ||
17 | leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" | ||
18 | leftfirewall=yes | ||
19 | |||
20 | conn net-net | ||
21 | left=%defaultroute | ||
22 | leftsubnet=192.168.1.0/24 | ||
23 | leftcert=moonCert.pem | ||
24 | right=200.200.200.20 | ||
25 | rightsubnet=192.168.2.0/24 | ||
26 | rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" | ||
27 | auto=add | ||
28 | |||
29 | conn host-host | ||
30 | left=%defaultroute | ||
31 | leftcert=moonCert.pem | ||
32 | right=200.200.200.20 | ||
33 | rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" | ||
34 | auto=add | ||
35 | |||
36 | conn rw | ||
37 | leftsubnet=192.168.1.0/24 | ||
38 | right=%any | ||
39 | auto=add | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right new file mode 100644 index 00000000..479791ea --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right | |||
@@ -0,0 +1,34 @@ | |||
1 | # /etc/ipsec.conf - strongSwan IPsec configuration file | ||
2 | |||
3 | config setup | ||
4 | plutodebug=control | ||
5 | crlcheckinterval=180 | ||
6 | strictcrlpolicy=no | ||
7 | charonstart=no | ||
8 | |||
9 | conn %default | ||
10 | ikelifetime=60m | ||
11 | keylife=20m | ||
12 | rekeymargin=3m | ||
13 | keyingtries=1 | ||
14 | keyexchange=ikev1 | ||
15 | left=200.200.200.20 | ||
16 | leftcert=sunCert.pem | ||
17 | leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org" | ||
18 | leftfirewall=yes | ||
19 | |||
20 | conn net-net | ||
21 | left=%defaultroute | ||
22 | leftsubnet=192.168.2.0/24 | ||
23 | leftcert=sunCert.pem | ||
24 | right=200.200.200.10 | ||
25 | rightsubnet=192.168.1.0/24 | ||
26 | rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" | ||
27 | auto=add | ||
28 | |||
29 | conn host-host | ||
30 | left=%defaultroute | ||
31 | leftcert=sunCert.pem | ||
32 | right=200.200.200.10 | ||
33 | rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org" | ||
34 | auto=add | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport new file mode 100755 index 00000000..5422771b --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-md5 authentication using 128 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel new file mode 100755 index 00000000..52bf9c3f --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-md5 authentication using 128 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport new file mode 100755 index 00000000..e5ee0054 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha1 authentication using 160 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
16 | |||
17 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
18 | esp/transport//require; | ||
19 | |||
20 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
21 | esp/transport//require; | ||
22 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel new file mode 100755 index 00000000..eb2881db --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-sha1 authentication using 160 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport new file mode 100755 index 00000000..b5286320 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel new file mode 100755 index 00000000..e7726f08 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel | ||
36 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel | ||
40 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport new file mode 100755 index 00000000..96f57837 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-md5 authentication using 128 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel new file mode 100755 index 00000000..b2cf84bf --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-md5 authentication using 128 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport new file mode 100755 index 00000000..f3ffaf5c --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha1 authentication using 160 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
16 | |||
17 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
18 | esp/transport//require; | ||
19 | |||
20 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
21 | esp/transport//require; | ||
22 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel new file mode 100755 index 00000000..1ab7874f --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-sha1 authentication using 160 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport new file mode 100755 index 00000000..d2645d6f --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel new file mode 100755 index 00000000..8ed697d1 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel | ||
36 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel | ||
40 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport new file mode 100755 index 00000000..84275d07 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.10 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing null encryption | ||
8 | # and null authentication | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E null | ||
11 | -A null; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E null | ||
15 | -A null; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P in ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P out ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel new file mode 100755 index 00000000..478d14a8 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
28 | |||
29 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing null encryption | ||
34 | # and null authentication | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E null | ||
37 | -A null; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E null | ||
41 | -A null; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 new file mode 100755 index 00000000..e219f2ad --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 | |||
@@ -0,0 +1,2 @@ | |||
1 | set -v | ||
2 | route add -net 192.168.2.0 netmask 255.255.255.0 gw 200.200.200.20 | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem new file mode 100644 index 00000000..d5c970f4 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem | |||
@@ -0,0 +1,25 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIEIjCCAwqgAwIBAgIBFzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ | ||
3 | MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS | ||
4 | b290IENBMB4XDTA5MDgyNzEwMDMzMloXDTE0MDgyNjEwMDMzMlowRjELMAkGA1UE | ||
5 | BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xHDAaBgNVBAMTE21vb24u | ||
6 | c3Ryb25nc3dhbi5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK | ||
7 | L2M91Lu6BYYhWxWgMS9z9TMSTwszm5rhO7ZIsCtMRo4PAeYw+++SGXt3CPXb/+p+ | ||
8 | SWKGlm11rPE71eQ3ehgh2C3hAurfmWO0iQQaCw+fdreeIVCqOQIOP6UqZ327h5yY | ||
9 | YpHk8VQv4vBJTpxclU1PqnWheqe1ZlLxsW773LRml/fQt/UgvJkCBTZZONLNMfK+ | ||
10 | 7TDnYaVsAtncgvDN78nUNEe2qY92KK7SrBJ6SpUEg49m51F+XgsGcsgWVHS85on3 | ||
11 | Om/G48crLEVJjdu8CxewSRVgb+lPJWzHd8QsU0Vg/7vlqs3ZRMyNtNKrr4opSvVb | ||
12 | A6agGlTXhDCreDiXU8KHAgMBAAGjggEaMIIBFjAJBgNVHRMEAjAAMAsGA1UdDwQE | ||
13 | AwIDqDAdBgNVHQ4EFgQUapx00fiJeYn2WpTpifH6w2SdKS4wbQYDVR0jBGYwZIAU | ||
14 | XafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkwFwYDVQQK | ||
15 | ExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJvb3QgQ0GC | ||
16 | AQAwHgYDVR0RBBcwFYITbW9vbi5zdHJvbmdzd2FuLm9yZzATBgNVHSUEDDAKBggr | ||
17 | BgEFBQcDATA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vY3JsLnN0cm9uZ3N3YW4u | ||
18 | b3JnL3N0cm9uZ3N3YW4uY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCctXg2xeMozaTV | ||
19 | jiBL1P8MY9uEH5JtU0EceQ1RbI5/2vGRdnECND9oADY5vamaaE2Mdq2Qh/vlXnML | ||
20 | o3ii5ELjsQlYdTYZOcMOdcUUXYvbbFX1cwpkBhyBl1H25KptHcgQ/HnceKp3kOuq | ||
21 | wYOYjgwePXulcpWXx0E2QtQCFQQZFPyEWeNJxH0oglg53QPXfHY9I2/Gukj5V0bz | ||
22 | p7ME0Gs8KdnYdmbbDqzQgPsta96/m+HoJlsrVF+4Gqihj6BWMBQ2ybjPWZdG3oH9 | ||
23 | 25cE8v60Ry98D0Z/tygbAUFnh5oOvaf642paVgc3aoA77I8U+UZjECxISoiHultY | ||
24 | 7QTufOwP | ||
25 | -----END CERTIFICATE----- | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem new file mode 100644 index 00000000..4d99866f --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem | |||
@@ -0,0 +1,27 @@ | |||
1 | -----BEGIN RSA PRIVATE KEY----- | ||
2 | MIIEowIBAAKCAQEAyi9jPdS7ugWGIVsVoDEvc/UzEk8LM5ua4Tu2SLArTEaODwHm | ||
3 | MPvvkhl7dwj12//qfklihpZtdazxO9XkN3oYIdgt4QLq35ljtIkEGgsPn3a3niFQ | ||
4 | qjkCDj+lKmd9u4ecmGKR5PFUL+LwSU6cXJVNT6p1oXqntWZS8bFu+9y0Zpf30Lf1 | ||
5 | ILyZAgU2WTjSzTHyvu0w52GlbALZ3ILwze/J1DRHtqmPdiiu0qwSekqVBIOPZudR | ||
6 | fl4LBnLIFlR0vOaJ9zpvxuPHKyxFSY3bvAsXsEkVYG/pTyVsx3fELFNFYP+75arN | ||
7 | 2UTMjbTSq6+KKUr1WwOmoBpU14Qwq3g4l1PChwIDAQABAoIBACBFB/Xqajv6fbn9 | ||
8 | K6pxrz02uXwGmacXAtVIDoPzejWmXS4QA4l17HrJDmelSnhelDKry8nnYHkTrTz7 | ||
9 | mn0wQ4HDWy86o/okJUG/TKRLd6bf79aRQqqohqd3iQkHk43GyzuXH+oGioVKF0fc | ||
10 | ACDWw4wfjL7FMNdHCZ4Bz9DrHO/ysHe9B6rvSYm3VZRhSxaneIkaLkkDadKpVx3f | ||
11 | XNFlMxY4qKPJYYSoJZ61iMqrO7+rnA93tmyDDs8PKU3BtnpfNrdePgleJHhk8Zqy | ||
12 | Ev2/NOCSUxbKE8NCtLpGTs+T0qjjnu4k3WPd3ZOBAan0uPDekHZeHB/aXGLhYcxx | ||
13 | J5SurqECgYEA+F1gppkER5Jtoaudt/CUpdQ1sR9wxf75VBqJ4FiYABGQz9xlG4oj | ||
14 | zL/o572s0iV3bwFpnQa+WuWrxGkP6ZuB/Z82npc0N/vLou/b4dxvg4n7K+eOOEf0 | ||
15 | 8FMjsse2tqTIXKCqcmQnR0NPQ1jwuvEKsXP5w/JOlnRXAXnd4jxsJI0CgYEA0GaT | ||
16 | 61ySttUW9jC3mxuY6jkQy8TEQqR3nOFvWwmCXIWOpN/MTTPus+Telxp/pdKhU+mo | ||
17 | PmX3Unyne5PvwleWDq3YzltX5ZDZGJ5UJlKuNnfGIzQ6OcHRbb7zBpQG6qSRPuug | ||
18 | bgo688hTnb1L59nK88zWVK45euf6pyuoI+SwIGMCgYEA7yvE8knyhBXvezuv0z1b | ||
19 | eGHmHp5/VDwY0DQKSEAoiBBiWrkLqLybgwXf/KJ8dZZc8En08aFX2GLJyYe/KiB1 | ||
20 | ys3ypEBJqgvRayP+o/9KZ+qNNRd0rqAksPXvL7ABNNt0kzapTSVDae3Yu6s/j1am | ||
21 | DIL5qAeERIDedG5uDPpQzdUCgYB7MtjpP63ABhLv8XbpbBQnCxtByw3W89F+Xcrt | ||
22 | v55gQdhE4cSuMzA/CuMH4vNpPS6AI9aBJNhj3CtKo/cOJachAGb1/wvkO5ALvLW0 | ||
23 | fhZdPstUTnDJain7vfF/hwzbs/PlhXgu9T9KlLfRvXFdG+Sd4g8mumRiozcLkoRw | ||
24 | y6XPTwKBgDJP+s9wXmdG90HST/aqC7FKrVXLpB63dY5swNUfQP6sa0pFnON0r0JC | ||
25 | h/YCsGFFIAebQ2uOkM3g3f9nkwTp7910ov+/5uThvRI2w2BBPy0mVuALPjyyF1Z2 | ||
26 | cb9zpyKiIuXoXRCf4sd8r1lR9bn0Fxx0Svpxf+fpMGSI5quHNBKY | ||
27 | -----END RSA PRIVATE KEY----- | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh new file mode 100755 index 00000000..faefb245 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Usage: ./pingsizes.sh 1440 20 (or greater) | ||
4 | # | ||
5 | |||
6 | PINGDEST=${PINGDEST:-200.200.200.10} | ||
7 | k=$1 | ||
8 | lim="$((k+$2))" | ||
9 | ((k-=1)) | ||
10 | while [ "$k" != "$lim" ] ; do | ||
11 | echo -n "ping -s $((k+=1)) : " | ||
12 | ping -i 1000 -c 1 -s $k $PINGDEST | grep packets & | ||
13 | sleep 1 | ||
14 | PID=`ps -eaf | grep 'ping -i' | grep -v grep | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2` | ||
15 | if [ -n "$PID" ] ; then | ||
16 | echo "****************** killing $PID" | ||
17 | kill $PID > /dev/null | ||
18 | fi | ||
19 | done | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh new file mode 100755 index 00000000..d5ff0f7d --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Usage: ./pingsizes.sh 1440 20 (or greater) | ||
4 | # | ||
5 | |||
6 | PINGDEST=${PINGDEST:-200.200.200.10} | ||
7 | k=$1 | ||
8 | lim="$((k+$2))" | ||
9 | ((k-=1)) | ||
10 | while [ "$k" != "$lim" ] ; do | ||
11 | echo ping -s $((k+=1)) | ||
12 | ping -i 1000 -c 1 -s $k $PINGDEST & | ||
13 | sleep 1 | ||
14 | PID=`ps -eaf | grep 'ping -i' | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2` | ||
15 | if [ -n "$PID" ] ; then | ||
16 | echo "****************** killing $PID" | ||
17 | kill $PID | ||
18 | fi | ||
19 | done | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt new file mode 100644 index 00000000..46c1ff41 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | 200.200.200.20 secretkeyracoon | ||
2 | 200.200.200.10 secretkeyracoon | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf new file mode 100644 index 00000000..cf561f51 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf | |||
@@ -0,0 +1,22 @@ | |||
1 | path pre_shared_key "/test_setkey/psk.txt" ; | ||
2 | |||
3 | remote anonymous | ||
4 | { | ||
5 | exchange_mode main ; | ||
6 | lifetime time 1 hour ; | ||
7 | proposal { | ||
8 | encryption_algorithm 3des; | ||
9 | hash_algorithm sha1; | ||
10 | authentication_method pre_shared_key ; | ||
11 | dh_group 2 ; | ||
12 | } | ||
13 | } | ||
14 | |||
15 | sainfo anonymous | ||
16 | { | ||
17 | pfs_group 2; | ||
18 | lifetime time 1 hour ; | ||
19 | encryption_algorithm 3des ; | ||
20 | authentication_algorithm hmac_sha1 ; | ||
21 | compression_algorithm deflate ; | ||
22 | } | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport new file mode 100755 index 00000000..7f82fb46 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-md5 authentication using 128 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel new file mode 100755 index 00000000..5a752579 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board B setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-md5 authentication using 128 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport new file mode 100755 index 00000000..6ef885d4 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha1 authentication using 160 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
16 | |||
17 | # Security policies | ||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel new file mode 100755 index 00000000..16c31578 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board B setup | ||
18 | # Flush the SAD and SPD | ||
19 | flush; | ||
20 | spdflush; | ||
21 | |||
22 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
23 | # | ||
24 | # Security policies | ||
25 | |||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
33 | # and hmac-sha1 authentication using 160 bit long keys | ||
34 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
35 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
36 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
37 | |||
38 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
39 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
40 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
41 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport new file mode 100755 index 00000000..b9772092 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel new file mode 100755 index 00000000..e7c5b4e6 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel | ||
36 | -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel | ||
40 | -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport new file mode 100755 index 00000000..5d55d001 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-md5 authentication using 128 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel new file mode 100755 index 00000000..f49bd54a --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board B setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-md5 authentication using 128 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport new file mode 100755 index 00000000..d9c65a45 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha1 authentication using 160 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
16 | |||
17 | # Security policies | ||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel new file mode 100755 index 00000000..1f10136a --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board B setup | ||
18 | # Flush the SAD and SPD | ||
19 | flush; | ||
20 | spdflush; | ||
21 | |||
22 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
23 | # | ||
24 | # Security policies | ||
25 | |||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
33 | # and hmac-sha1 authentication using 160 bit long keys | ||
34 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
35 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
36 | -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3; | ||
37 | |||
38 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
39 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
40 | -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21; | ||
41 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport new file mode 100755 index 00000000..817a8bd4 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
8 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
11 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
15 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel new file mode 100755 index 00000000..9bca18fb --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board A setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing encryption using 192 bit long keys (168 + 24 parity) | ||
34 | # and hmac-sha2-256 authentication using 256 bit long keys | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel | ||
36 | -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831 | ||
37 | -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel | ||
40 | -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df | ||
41 | -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport new file mode 100755 index 00000000..26dfe2e1 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | #I am 200.200.200.20 | ||
3 | |||
4 | flush; | ||
5 | spdflush; | ||
6 | |||
7 | # ESP SAs doing null encryption | ||
8 | # and null authentication | ||
9 | add 200.200.200.10 200.200.200.20 esp 0x10513 | ||
10 | -E null | ||
11 | -A null; | ||
12 | |||
13 | add 200.200.200.20 200.200.200.10 esp 0x10514 | ||
14 | -E null | ||
15 | -A null; | ||
16 | |||
17 | |||
18 | spdadd 200.200.200.20 200.200.200.10 any -P out ipsec | ||
19 | esp/transport//require; | ||
20 | |||
21 | spdadd 200.200.200.10 200.200.200.20 any -P in ipsec | ||
22 | esp/transport//require; | ||
23 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel new file mode 100755 index 00000000..bc4f38eb --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel | |||
@@ -0,0 +1,42 @@ | |||
1 | #!/usr/sbin/setkey -f | ||
2 | # | ||
3 | # | ||
4 | # Example ESP Tunnel for VPN. | ||
5 | # | ||
6 | # ========= ESP ========= | ||
7 | # | | | ||
8 | # Network-A Gateway-A Gateway-B Network-B | ||
9 | # 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24 | ||
10 | # | ||
11 | # ====== 83xx board A ====== ===== 83xx board B ===== | ||
12 | # | | | | | ||
13 | # eth0 eth1 eth1 eth0 | ||
14 | # 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130 | ||
15 | # | ||
16 | # | ||
17 | # Board B setup | ||
18 | # | ||
19 | # Flush the SAD and SPD | ||
20 | flush; | ||
21 | spdflush; | ||
22 | |||
23 | # I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20) | ||
24 | # | ||
25 | # Security policies | ||
26 | spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec | ||
27 | esp/tunnel/200.200.200.20-200.200.200.10/require; | ||
28 | |||
29 | spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec | ||
30 | esp/tunnel/200.200.200.10-200.200.200.20/require; | ||
31 | |||
32 | |||
33 | # ESP SAs doing null encryption | ||
34 | # and null authentication | ||
35 | add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel | ||
36 | -E null | ||
37 | -A null; | ||
38 | |||
39 | add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel | ||
40 | -E null | ||
41 | -A null; | ||
42 | |||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 new file mode 100755 index 00000000..67cd1b2c --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 | |||
@@ -0,0 +1,2 @@ | |||
1 | set -v | ||
2 | route add -net 192.168.1.0 netmask 255.255.255.0 gw 200.200.200.10 | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup new file mode 100755 index 00000000..9e6fa7fa --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup | |||
@@ -0,0 +1,47 @@ | |||
1 | # setup - quick setup for left or right side of ipsec test | ||
2 | # see README for example use. | ||
3 | |||
4 | SCRIPT_HOME=/test_setkey/ | ||
5 | cd $SCRIPT_HOME | ||
6 | |||
7 | export PATH=$SCRIPT_HOME:$PATH | ||
8 | |||
9 | if [ "$1" != "left" -a "$1" != "right" ] ; then | ||
10 | echo "Usage: $0 side [config] [driver]" | ||
11 | echo " where side is either left or right." | ||
12 | echo " where config is either" | ||
13 | echo " aes-sha1-tunnel (default)" | ||
14 | echo " or 3des-sha1-tunnel" | ||
15 | echo " if driver is supplied, script does 'modprobe driver'" | ||
16 | exit 1 | ||
17 | fi | ||
18 | |||
19 | SIDE=$1 | ||
20 | POLICY_CFG=$SIDE.conf | ||
21 | DEFAULT_POLICY=aes-sha1-tunnel | ||
22 | |||
23 | if [ -n "$2" ] ; then | ||
24 | POLICY=$2 | ||
25 | else | ||
26 | POLICY=$DEFAULT_POLICY | ||
27 | fi | ||
28 | |||
29 | SETKEY_FILE=$POLICY_CFG-$POLICY | ||
30 | |||
31 | if [ ! -f $SETKEY_FILE ] ; then | ||
32 | echo "Missing setkey command file: $SETKEY_FILE" | ||
33 | exit 1 | ||
34 | fi | ||
35 | |||
36 | # modprobe any driver name given as last parameter | ||
37 | if [ -n "$3" ] ; then | ||
38 | modprobe $3 | ||
39 | fi | ||
40 | |||
41 | SETUP_CMD_FILE=./setup_$SIDE | ||
42 | . $SETUP_CMD_FILE | ||
43 | |||
44 | $SETKEY_FILE | ||
45 | |||
46 | setkey -D | ||
47 | setkey -D -P | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left new file mode 100755 index 00000000..da769099 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left | |||
@@ -0,0 +1,13 @@ | |||
1 | # board on left setup | ||
2 | set -v | ||
3 | ifconfig eth0 down | ||
4 | ifconfig eth0 hw ether 00:04:9F:11:22:33 | ||
5 | ifconfig eth0 192.168.1.130 netmask 255.255.255.0 | ||
6 | ifconfig eth0 up | ||
7 | ifconfig eth1 down | ||
8 | ifconfig eth1 hw ether 00:E0:0C:00:7D:FD | ||
9 | ifconfig eth1 200.200.200.10 netmask 255.255.255.0 | ||
10 | ifconfig eth1 up | ||
11 | arp -s 192.168.1.21 00:00:00:00:00:01 | ||
12 | route add default dev eth1 | ||
13 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right new file mode 100755 index 00000000..f0e333ee --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right | |||
@@ -0,0 +1,13 @@ | |||
1 | # board on right setup | ||
2 | set -v | ||
3 | ifconfig eth0 down | ||
4 | ifconfig eth0 hw ether 00:E0:0C:00:01:FD | ||
5 | ifconfig eth0 192.168.2.130 netmask 255.255.255.0 | ||
6 | ifconfig eth0 up | ||
7 | ifconfig eth1 down | ||
8 | ifconfig eth1 hw ether 00:E0:0C:00:00:FD | ||
9 | ifconfig eth1 200.200.200.20 netmask 255.255.255.0 | ||
10 | ifconfig eth1 up | ||
11 | arp -s 192.168.2.21 00:00:00:00:00:02 | ||
12 | route add default dev eth1 | ||
13 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf new file mode 100644 index 00000000..1701f4ab --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf | |||
@@ -0,0 +1,19 @@ | |||
1 | # strongswan.conf - strongSwan configuration file | ||
2 | |||
3 | charon { | ||
4 | load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-raw updown | ||
5 | multiple_authentication = no | ||
6 | } | ||
7 | |||
8 | pluto { | ||
9 | |||
10 | # plugins to load in pluto | ||
11 | #load = aes des sha1 md5 sha2 hmac gmp random pubkey | ||
12 | |||
13 | } | ||
14 | |||
15 | libstrongswan { | ||
16 | |||
17 | # set to no, the DH exponent size is optimized | ||
18 | # dh_exponent_ansi_x9_42 = no | ||
19 | } | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem new file mode 100644 index 00000000..0865ad22 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem | |||
@@ -0,0 +1,22 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIDuDCCAqCgAwIBAgIBADANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ | ||
3 | MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS | ||
4 | b290IENBMB4XDTA0MDkxMDEwMDExOFoXDTE5MDkwNzEwMDExOFowRTELMAkGA1UE | ||
5 | BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9u | ||
6 | Z1N3YW4gUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL/y | ||
7 | X2LqPVZuWLPIeknK86xhz6ljd3NNhC2z+P1uoCP3sBMuZiZQEjFzhnKcbXxCeo2f | ||
8 | FnvhOOjrrisSuVkzuu82oxXD3fIkzuS7m9V4E10EZzgmKWIf+WuNRfbgAuUINmLc | ||
9 | 4YGAXBQLPyzpP4Ou48hhz/YQo58Bics6PHy5v34qCVROIXDvqhj91P8g+pS+F21/ | ||
10 | 7P+CH2jRcVIEHZtG8M/PweTPQ95dPzpYd2Ov6SZ/U7EWmbMmT8VcUYn1aChxFmy5 | ||
11 | gweVBWlkH6MP+1DeE0/tL5c87xo5KCeGK8Tdqpe7sBRC4pPEEHDQciTUvkeuJ1Pr | ||
12 | K+1LwdqRxo7HgMRiDw8CAwEAAaOBsjCBrzASBgNVHRMBAf8ECDAGAQH/AgEBMAsG | ||
13 | A1UdDwQEAwIBBjAdBgNVHQ4EFgQUXafdcAZRMn7ntm2zteXgYOouTe8wbQYDVR0j | ||
14 | BGYwZIAUXafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkw | ||
15 | FwYDVQQKExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJv | ||
16 | b3QgQ0GCAQAwDQYJKoZIhvcNAQELBQADggEBACOSmqEBtBLR9aV3UyCI8gmzR5in | ||
17 | Lte9aUXXS+qis6F2h2Stf4sN+Nl6Gj7REC6SpfEH4wWdwiUL5J0CJhyoOjQuDl3n | ||
18 | 1Dw3dE4/zqMZdyDKEYTU75TmvusNJBdGsLkrf7EATAjoi/nrTOYPPhSUZvPp/D+Y | ||
19 | vORJ9Ej51GXlK1nwEB5iA8+tDYniNQn6BD1MEgIejzK+fbiy7braZB1kqhoEr2Si | ||
20 | 7luBSnU912sw494E88a2EWbmMvg2TVHPNzCpVkpNk7kifCiwmw9VldkqYy9y/lCa | ||
21 | Epyp7lTfKw7cbD04Vk8QJW782L6Csuxkl346b17wmOqn8AZips3tFsuAY3w= | ||
22 | -----END CERTIFICATE----- | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left new file mode 100755 index 00000000..e55c3e42 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left | |||
@@ -0,0 +1,10 @@ | |||
1 | #strongswan on left board | ||
2 | set -v | ||
3 | cp -rf ipsec.conf.left /etc/ipsec.conf | ||
4 | cp -rf ipsec.secrets.left /etc/ipsec.secrets | ||
5 | cp -rf strongswan.conf /etc/ | ||
6 | cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/ | ||
7 | cp -rf moonCert.pem /etc/ipsec.d/certs/ | ||
8 | mkdir /etc/ipsec.d/private | ||
9 | cp -rf sunKey.pem /etc/ipsec.d/private/ | ||
10 | cp -rf moonKey.pem /etc/ipsec.d/private/ | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right new file mode 100755 index 00000000..bcdbb731 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right | |||
@@ -0,0 +1,10 @@ | |||
1 | #strongswan on left board | ||
2 | set -v | ||
3 | cp -rf ipsec.conf.right /etc/ipsec.conf | ||
4 | cp -rf ipsec.secrets.right /etc/ipsec.secrets | ||
5 | cp -rf strongswan.conf /etc/ | ||
6 | cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/ | ||
7 | cp -rf sunCert.pem /etc/ipsec.d/certs/ | ||
8 | mkdir /etc/ipsec.d/private | ||
9 | cp -rf sunKey.pem /etc/ipsec.d/private/ | ||
10 | cp -rf moonKey.pem /etc/ipsec.d/private/ | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem new file mode 100644 index 00000000..d0937bab --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem | |||
@@ -0,0 +1,25 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIEIDCCAwigAwIBAgIBFjANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ | ||
3 | MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS | ||
4 | b290IENBMB4XDTA5MDgyNzA5NTkwNFoXDTE0MDgyNjA5NTkwNFowRTELMAkGA1UE | ||
5 | BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN1bi5z | ||
6 | dHJvbmdzd2FuLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+V | ||
7 | VIpn6Q5jaU//EN6p6A5cSfUfhBK0mFa2laFFZh/Y0h66AXqqrQ3X917h7YNsSk68 | ||
8 | oowY9h9I3gOx7hNVBsJr2VjdYC+b0q5NTha09/A5mimv/prYj6o0yawxoPjoDs9Y | ||
9 | h7D7Kf+F8fkgk0stlHJZX66J7dNrFXbg1xBld+Ep5Or2FbEZ9QWUpRQTuhdpNt/4 | ||
10 | 9YuxQ59DemY9IRbwsrKCHH0mGrJsDdqeb0ap+8QvSXHjCt1fr9MNKWaAFAQLKQI4 | ||
11 | e0da1ntPCEQLeE833+NNRBgGufk0KqGT3eAXqrxa9AEIUJnVcPexQdqUMjcUpXFb | ||
12 | 8WNzRWB8Egh3BDK6FsECAwEAAaOCARkwggEVMAkGA1UdEwQCMAAwCwYDVR0PBAQD | ||
13 | AgOoMB0GA1UdDgQWBBRW1p4v2qihzRlcI1PnxbZwluML+zBtBgNVHSMEZjBkgBRd | ||
14 | p91wBlEyfue2bbO15eBg6i5N76FJpEcwRTELMAkGA1UEBhMCQ0gxGTAXBgNVBAoT | ||
15 | EExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9uZ1N3YW4gUm9vdCBDQYIB | ||
16 | ADAdBgNVHREEFjAUghJzdW4uc3Ryb25nc3dhbi5vcmcwEwYDVR0lBAwwCgYIKwYB | ||
17 | BQUHAwEwOQYDVR0fBDIwMDAuoCygKoYoaHR0cDovL2NybC5zdHJvbmdzd2FuLm9y | ||
18 | Zy9zdHJvbmdzd2FuLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAo37LYT9Awx0MK/nA | ||
19 | FZpPJqUr0Ey+O5Ukcsdx7nd00SlmpiQRY8KmuRXCBQnDEgdLstd3slQjT0pJEgWF | ||
20 | 0pzxybnI6eOzYAhLfhart+X1hURiNGbXjggm2s4I5+K32bVIkNEqlsYnd/6F9oo5 | ||
21 | ZNO0/eTTruLZfkNe/zchBGKe/Z7MacVwlYWWCbMtBV4K1d5dGcRRgpQ9WivDlmat | ||
22 | Nh9wlscDSgSGk3HJkbxnq695VN7zUbDWAUvWWhV5bIDjlAR/xyT9ApqIxiyVVRul | ||
23 | fYrE7U05Hbt6GgAroAKLp6qJup9+TxQAKSjKIwJ0hf7OuYyQ8TZtVHS7AOhm+T/5 | ||
24 | G/jGGA== | ||
25 | -----END CERTIFICATE----- | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem new file mode 100644 index 00000000..d8fad9aa --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem | |||
@@ -0,0 +1,27 @@ | |||
1 | -----BEGIN RSA PRIVATE KEY----- | ||
2 | MIIEpAIBAAKCAQEA35VUimfpDmNpT/8Q3qnoDlxJ9R+EErSYVraVoUVmH9jSHroB | ||
3 | eqqtDdf3XuHtg2xKTryijBj2H0jeA7HuE1UGwmvZWN1gL5vSrk1OFrT38DmaKa/+ | ||
4 | mtiPqjTJrDGg+OgOz1iHsPsp/4Xx+SCTSy2Ucllfront02sVduDXEGV34Snk6vYV | ||
5 | sRn1BZSlFBO6F2k23/j1i7FDn0N6Zj0hFvCysoIcfSYasmwN2p5vRqn7xC9JceMK | ||
6 | 3V+v0w0pZoAUBAspAjh7R1rWe08IRAt4Tzff401EGAa5+TQqoZPd4BeqvFr0AQhQ | ||
7 | mdVw97FB2pQyNxSlcVvxY3NFYHwSCHcEMroWwQIDAQABAoIBADH51hjN2zk9HVgl | ||
8 | QmcTAWzcUie5cLMhrP+M9mtC8O3jcCwwFY6OwfnbMU8DHy0GMqHg5lB8b99UUVPw | ||
9 | HLAzjDw/ESkc6pgZs4EEhJTsxJLsvTnePgHssEgyXnXf7gRVEqJkPohfy+Zy0UCH | ||
10 | eIUQXiMlOQ7xg7iDMhwNa+UdWSt539DztSKilQn2xdPZjFnMT0/prvl4NA/8Zn54 | ||
11 | /SdWDq5yRdLWb6EK1V7yJ3687GXR1jzGtgy7TXuncUJVTYgX7RdP1Tn6gWD8YAQ/ | ||
12 | RfT0DdWYm4WHSgSb9/NW8lBZH2yy3hg+lNgofXEvTfBkO5QyW31LIr0tCV6zhJIc | ||
13 | Y9MxaKUCgYEA9sktaXfhPLe0ECjdeQEOq5EKuDrCviSKCOuAV4BDSOsdw6+5LWfY | ||
14 | Vb/oke8N70lL3RCblcj1pOKWUi2O/SpEJdDRduiw2gM9cXt3/bChSTHC4TsIxxN/ | ||
15 | Db9OGg72kZ4sRY5Au+zyAAQYBwXhFWux194Jk5qK0JblNG9J5QMqZDcCgYEA5+5h | ||
16 | BgHUMEO+pdME5lAiSc5PcNTejpA6j+OikCh4/HFXy3C/dLx+Cs1+egw64c8iVaIv | ||
17 | NEo7n7E9I0e3XqanPRXhMnBRrP+39OVsWPmZ18Li2Hi84KwJyi8Y11l3XJOqaYpF | ||
18 | wMVUuZpxR0dfG5k/5GwT/tEkmQBglOgG3m2zUMcCgYEA4m3Vd9ahV5dp5AXKpzKc | ||
19 | JjiPMFfhxJo7+FEz0ZUCp03qYljBu/Jy4MKS/grrqyiCLdQGHNlk4SNxLvdUId78 | ||
20 | 5gGBnuuDEJU2dAAIKUE9yq2YlBUZSacOxStI2snt28/X6P3LUWHm7LLU5OS1D3Vf | ||
21 | mKPF/6MlSJuas5CEqVZNN+MCgYBH9Qh7IaQgmVQUBKVXg3Mv7OduvUyTdKIGtHxi | ||
22 | N3xZ7hxsDP4JjNWaKmlcGmFGX8pqQRheI83d3NJ4GK8GmbP3Wst0p65fezMqsudr | ||
23 | r30QmPFicgs/tYCQDw6o+aPzwAi2F+VOSqrfrtAIaldSq7hL+VA21dKB+cD9UgOX | ||
24 | jPd+TwKBgQCbKeg2QNS2qhPIG9eaqJDROuxmxb/07d7OBctgMgxVvKhqW9hW42Sy | ||
25 | gJ59fyz5QjFBaSfcOdf4gkKyEawVo45/q6ymIQU37R4vF4CW9Z3CfaIbwJp7LcHV | ||
26 | zH07so/HNsZua6GWCSCLJU5MeCRiZzk2RFiS9KIaLP4gZndv4lXOiQ== | ||
27 | -----END RSA PRIVATE KEY----- | ||
diff --git a/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb b/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb new file mode 100644 index 00000000..56070605 --- /dev/null +++ b/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Scripts and configuration files for ipsec demo" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | RDEPENDS_${PN} = "ipsec-tools" | ||
6 | |||
7 | inherit allarch | ||
8 | |||
9 | SRC_URI = "file://test_setkey" | ||
10 | |||
11 | do_configure() { | ||
12 | : | ||
13 | } | ||
14 | |||
15 | do_compile() { | ||
16 | : | ||
17 | } | ||
18 | |||
19 | do_install(){ | ||
20 | install -d ${D}${datadir} | ||
21 | cp -a ${WORKDIR}/test_setkey ${D}${datadir}/ | ||
22 | } | ||
23 | |||
24 | FILES_${PN} = "${datadir}/*" | ||
25 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch b/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch new file mode 100644 index 00000000..e7b874f5 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0001-remove-double-initialization-of-cryptodev-engine.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | From 9297e3834518ff0558d6e7004a62adfd107e659a Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Tue, 10 Sep 2013 12:46:46 +0300 | ||
4 | Subject: [PATCH 01/26] remove double initialization of cryptodev engine | ||
5 | |||
6 | cryptodev engine is initialized together with the other engines in | ||
7 | ENGINE_load_builtin_engines. The initialization done through | ||
8 | OpenSSL_add_all_algorithms is redundant. | ||
9 | |||
10 | Change-Id: Ic9488500967595543ff846f147b36f383db7cb27 | ||
11 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
12 | Reviewed-on: http://git.am.freescale.net:8181/17222 | ||
13 | --- | ||
14 | crypto/engine/eng_all.c | 11 ----------- | ||
15 | crypto/engine/engine.h | 4 ---- | ||
16 | crypto/evp/c_all.c | 5 ----- | ||
17 | util/libeay.num | 2 +- | ||
18 | 4 files changed, 1 insertion(+), 21 deletions(-) | ||
19 | |||
20 | diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c | ||
21 | index 6093376..f16c043 100644 | ||
22 | --- a/crypto/engine/eng_all.c | ||
23 | +++ b/crypto/engine/eng_all.c | ||
24 | @@ -122,14 +122,3 @@ void ENGINE_load_builtin_engines(void) | ||
25 | #endif | ||
26 | ENGINE_register_all_complete(); | ||
27 | } | ||
28 | - | ||
29 | -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) | ||
30 | -void ENGINE_setup_bsd_cryptodev(void) { | ||
31 | - static int bsd_cryptodev_default_loaded = 0; | ||
32 | - if (!bsd_cryptodev_default_loaded) { | ||
33 | - ENGINE_load_cryptodev(); | ||
34 | - ENGINE_register_all_complete(); | ||
35 | - } | ||
36 | - bsd_cryptodev_default_loaded=1; | ||
37 | -} | ||
38 | -#endif | ||
39 | diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h | ||
40 | index f8be497..237a6c9 100644 | ||
41 | --- a/crypto/engine/engine.h | ||
42 | +++ b/crypto/engine/engine.h | ||
43 | @@ -740,10 +740,6 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id, | ||
44 | * values. */ | ||
45 | void *ENGINE_get_static_state(void); | ||
46 | |||
47 | -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) | ||
48 | -void ENGINE_setup_bsd_cryptodev(void); | ||
49 | -#endif | ||
50 | - | ||
51 | /* BEGIN ERROR CODES */ | ||
52 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
53 | * made after this point may be overwritten when the script is next run. | ||
54 | diff --git a/crypto/evp/c_all.c b/crypto/evp/c_all.c | ||
55 | index 766c4ce..5d6c21b 100644 | ||
56 | --- a/crypto/evp/c_all.c | ||
57 | +++ b/crypto/evp/c_all.c | ||
58 | @@ -82,9 +82,4 @@ void OPENSSL_add_all_algorithms_noconf(void) | ||
59 | OPENSSL_cpuid_setup(); | ||
60 | OpenSSL_add_all_ciphers(); | ||
61 | OpenSSL_add_all_digests(); | ||
62 | -#ifndef OPENSSL_NO_ENGINE | ||
63 | -# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) | ||
64 | - ENGINE_setup_bsd_cryptodev(); | ||
65 | -# endif | ||
66 | -#endif | ||
67 | } | ||
68 | diff --git a/util/libeay.num b/util/libeay.num | ||
69 | index aa86b2b..ae50040 100755 | ||
70 | --- a/util/libeay.num | ||
71 | +++ b/util/libeay.num | ||
72 | @@ -2801,7 +2801,7 @@ BIO_indent 3242 EXIST::FUNCTION: | ||
73 | BUF_strlcpy 3243 EXIST::FUNCTION: | ||
74 | OpenSSLDie 3244 EXIST::FUNCTION: | ||
75 | OPENSSL_cleanse 3245 EXIST::FUNCTION: | ||
76 | -ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE | ||
77 | +ENGINE_setup_bsd_cryptodev 3246 NOEXIST::FUNCTION: | ||
78 | ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH | ||
79 | EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES | ||
80 | FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION: | ||
81 | -- | ||
82 | 2.3.5 | ||
83 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch b/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch new file mode 100644 index 00000000..ab2b7ea9 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch | |||
@@ -0,0 +1,317 @@ | |||
1 | From dfd6ba263dc25ea2a4bbc32448b24ca2b1fc40e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 29 Aug 2013 16:51:18 +0300 | ||
4 | Subject: [PATCH 02/26] eng_cryptodev: add support for TLS algorithms offload | ||
5 | |||
6 | - aes-128-cbc-hmac-sha1 | ||
7 | - aes-256-cbc-hmac-sha1 | ||
8 | |||
9 | Requires TLS patches on cryptodev and TLS algorithm support in Linux | ||
10 | kernel driver. | ||
11 | |||
12 | Change-Id: I43048caa348414daddd6c1a5cdc55e769ac1945f | ||
13 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
14 | Reviewed-on: http://git.am.freescale.net:8181/17223 | ||
15 | --- | ||
16 | crypto/engine/eng_cryptodev.c | 222 +++++++++++++++++++++++++++++++++++++++--- | ||
17 | 1 file changed, 211 insertions(+), 11 deletions(-) | ||
18 | |||
19 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
20 | index 5a715ac..7588a28 100644 | ||
21 | --- a/crypto/engine/eng_cryptodev.c | ||
22 | +++ b/crypto/engine/eng_cryptodev.c | ||
23 | @@ -72,6 +72,9 @@ ENGINE_load_cryptodev(void) | ||
24 | struct dev_crypto_state { | ||
25 | struct session_op d_sess; | ||
26 | int d_fd; | ||
27 | + unsigned char *aad; | ||
28 | + unsigned int aad_len; | ||
29 | + unsigned int len; | ||
30 | |||
31 | #ifdef USE_CRYPTODEV_DIGESTS | ||
32 | char dummy_mac_key[HASH_MAX_LEN]; | ||
33 | @@ -140,17 +143,20 @@ static struct { | ||
34 | int nid; | ||
35 | int ivmax; | ||
36 | int keylen; | ||
37 | + int mackeylen; | ||
38 | } ciphers[] = { | ||
39 | - { CRYPTO_ARC4, NID_rc4, 0, 16, }, | ||
40 | - { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, | ||
41 | - { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, | ||
42 | - { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, | ||
43 | - { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, }, | ||
44 | - { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, }, | ||
45 | - { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, | ||
46 | - { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, | ||
47 | - { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, | ||
48 | - { 0, NID_undef, 0, 0, }, | ||
49 | + { CRYPTO_ARC4, NID_rc4, 0, 16, 0}, | ||
50 | + { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, 0}, | ||
51 | + { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, 0}, | ||
52 | + { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, 0}, | ||
53 | + { CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24, 0}, | ||
54 | + { CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32, 0}, | ||
55 | + { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, 0}, | ||
56 | + { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, | ||
57 | + { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, | ||
58 | + { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
59 | + { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
60 | + { 0, NID_undef, 0, 0, 0}, | ||
61 | }; | ||
62 | |||
63 | #ifdef USE_CRYPTODEV_DIGESTS | ||
64 | @@ -250,13 +256,15 @@ get_cryptodev_ciphers(const int **cnids) | ||
65 | } | ||
66 | memset(&sess, 0, sizeof(sess)); | ||
67 | sess.key = (caddr_t)"123456789abcdefghijklmno"; | ||
68 | + sess.mackey = (caddr_t)"123456789ABCDEFGHIJKLMNO"; | ||
69 | |||
70 | for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { | ||
71 | if (ciphers[i].nid == NID_undef) | ||
72 | continue; | ||
73 | sess.cipher = ciphers[i].id; | ||
74 | sess.keylen = ciphers[i].keylen; | ||
75 | - sess.mac = 0; | ||
76 | + sess.mackeylen = ciphers[i].mackeylen; | ||
77 | + | ||
78 | if (ioctl(fd, CIOCGSESSION, &sess) != -1 && | ||
79 | ioctl(fd, CIOCFSESSION, &sess.ses) != -1) | ||
80 | nids[count++] = ciphers[i].nid; | ||
81 | @@ -414,6 +422,67 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
82 | return (1); | ||
83 | } | ||
84 | |||
85 | + | ||
86 | +static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
87 | + const unsigned char *in, size_t len) | ||
88 | +{ | ||
89 | + struct crypt_auth_op cryp; | ||
90 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
91 | + struct session_op *sess = &state->d_sess; | ||
92 | + const void *iiv; | ||
93 | + unsigned char save_iv[EVP_MAX_IV_LENGTH]; | ||
94 | + | ||
95 | + if (state->d_fd < 0) | ||
96 | + return (0); | ||
97 | + if (!len) | ||
98 | + return (1); | ||
99 | + if ((len % ctx->cipher->block_size) != 0) | ||
100 | + return (0); | ||
101 | + | ||
102 | + memset(&cryp, 0, sizeof(cryp)); | ||
103 | + | ||
104 | + /* TODO: make a seamless integration with cryptodev flags */ | ||
105 | + switch (ctx->cipher->nid) { | ||
106 | + case NID_aes_128_cbc_hmac_sha1: | ||
107 | + case NID_aes_256_cbc_hmac_sha1: | ||
108 | + cryp.flags = COP_FLAG_AEAD_TLS_TYPE; | ||
109 | + } | ||
110 | + cryp.ses = sess->ses; | ||
111 | + cryp.len = state->len; | ||
112 | + cryp.src = (caddr_t) in; | ||
113 | + cryp.dst = (caddr_t) out; | ||
114 | + cryp.auth_src = state->aad; | ||
115 | + cryp.auth_len = state->aad_len; | ||
116 | + | ||
117 | + cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; | ||
118 | + | ||
119 | + if (ctx->cipher->iv_len) { | ||
120 | + cryp.iv = (caddr_t) ctx->iv; | ||
121 | + if (!ctx->encrypt) { | ||
122 | + iiv = in + len - ctx->cipher->iv_len; | ||
123 | + memcpy(save_iv, iiv, ctx->cipher->iv_len); | ||
124 | + } | ||
125 | + } else | ||
126 | + cryp.iv = NULL; | ||
127 | + | ||
128 | + if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { | ||
129 | + /* XXX need better errror handling | ||
130 | + * this can fail for a number of different reasons. | ||
131 | + */ | ||
132 | + return (0); | ||
133 | + } | ||
134 | + | ||
135 | + if (ctx->cipher->iv_len) { | ||
136 | + if (ctx->encrypt) | ||
137 | + iiv = out + len - ctx->cipher->iv_len; | ||
138 | + else | ||
139 | + iiv = save_iv; | ||
140 | + memcpy(ctx->iv, iiv, ctx->cipher->iv_len); | ||
141 | + } | ||
142 | + return (1); | ||
143 | +} | ||
144 | + | ||
145 | + | ||
146 | static int | ||
147 | cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
148 | const unsigned char *iv, int enc) | ||
149 | @@ -452,6 +521,45 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
150 | return (1); | ||
151 | } | ||
152 | |||
153 | +/* Save the encryption key provided by upper layers. | ||
154 | + * | ||
155 | + * This function is called by EVP_CipherInit_ex to initialize the algorithm's | ||
156 | + * extra data. We can't do much here because the mac key is not available. | ||
157 | + * The next call should/will be to cryptodev_cbc_hmac_sha1_ctrl with parameter | ||
158 | + * EVP_CTRL_AEAD_SET_MAC_KEY, to set the hmac key. There we call CIOCGSESSION | ||
159 | + * with both the crypto and hmac keys. | ||
160 | + */ | ||
161 | +static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx, | ||
162 | + const unsigned char *key, const unsigned char *iv, int enc) | ||
163 | +{ | ||
164 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
165 | + struct session_op *sess = &state->d_sess; | ||
166 | + int cipher = -1, i; | ||
167 | + | ||
168 | + for (i = 0; ciphers[i].id; i++) | ||
169 | + if (ctx->cipher->nid == ciphers[i].nid && | ||
170 | + ctx->cipher->iv_len <= ciphers[i].ivmax && | ||
171 | + ctx->key_len == ciphers[i].keylen) { | ||
172 | + cipher = ciphers[i].id; | ||
173 | + break; | ||
174 | + } | ||
175 | + | ||
176 | + if (!ciphers[i].id) { | ||
177 | + state->d_fd = -1; | ||
178 | + return (0); | ||
179 | + } | ||
180 | + | ||
181 | + memset(sess, 0, sizeof(struct session_op)); | ||
182 | + | ||
183 | + sess->key = (caddr_t)key; | ||
184 | + sess->keylen = ctx->key_len; | ||
185 | + sess->cipher = cipher; | ||
186 | + | ||
187 | + /* for whatever reason, (1) means success */ | ||
188 | + return (1); | ||
189 | +} | ||
190 | + | ||
191 | + | ||
192 | /* | ||
193 | * free anything we allocated earlier when initting a | ||
194 | * session, and close the session. | ||
195 | @@ -488,6 +596,63 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx) | ||
196 | return (ret); | ||
197 | } | ||
198 | |||
199 | +static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
200 | + void *ptr) | ||
201 | +{ | ||
202 | + switch (type) { | ||
203 | + case EVP_CTRL_AEAD_SET_MAC_KEY: | ||
204 | + { | ||
205 | + /* TODO: what happens with hmac keys larger than 64 bytes? */ | ||
206 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
207 | + struct session_op *sess = &state->d_sess; | ||
208 | + | ||
209 | + if ((state->d_fd = get_dev_crypto()) < 0) | ||
210 | + return (0); | ||
211 | + | ||
212 | + /* the rest should have been set in cryptodev_init_aead_key */ | ||
213 | + sess->mackey = ptr; | ||
214 | + sess->mackeylen = arg; | ||
215 | + | ||
216 | + if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { | ||
217 | + put_dev_crypto(state->d_fd); | ||
218 | + state->d_fd = -1; | ||
219 | + return (0); | ||
220 | + } | ||
221 | + return (1); | ||
222 | + } | ||
223 | + case EVP_CTRL_AEAD_TLS1_AAD: | ||
224 | + { | ||
225 | + /* ptr points to the associated data buffer of 13 bytes */ | ||
226 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
227 | + unsigned char *p = ptr; | ||
228 | + unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; | ||
229 | + unsigned int maclen, padlen; | ||
230 | + unsigned int bs = ctx->cipher->block_size; | ||
231 | + | ||
232 | + state->aad = ptr; | ||
233 | + state->aad_len = arg; | ||
234 | + state->len = cryptlen; | ||
235 | + | ||
236 | + /* TODO: this should be an extension of EVP_CIPHER struct */ | ||
237 | + switch (ctx->cipher->nid) { | ||
238 | + case NID_aes_128_cbc_hmac_sha1: | ||
239 | + case NID_aes_256_cbc_hmac_sha1: | ||
240 | + maclen = SHA_DIGEST_LENGTH; | ||
241 | + } | ||
242 | + | ||
243 | + /* space required for encryption (not only TLS padding) */ | ||
244 | + padlen = maclen; | ||
245 | + if (ctx->encrypt) { | ||
246 | + cryptlen += maclen; | ||
247 | + padlen += bs - (cryptlen % bs); | ||
248 | + } | ||
249 | + return padlen; | ||
250 | + } | ||
251 | + default: | ||
252 | + return -1; | ||
253 | + } | ||
254 | +} | ||
255 | + | ||
256 | /* | ||
257 | * libcrypto EVP stuff - this is how we get wired to EVP so the engine | ||
258 | * gets called when libcrypto requests a cipher NID. | ||
259 | @@ -600,6 +765,33 @@ const EVP_CIPHER cryptodev_aes_256_cbc = { | ||
260 | NULL | ||
261 | }; | ||
262 | |||
263 | +const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { | ||
264 | + NID_aes_128_cbc_hmac_sha1, | ||
265 | + 16, 16, 16, | ||
266 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
267 | + cryptodev_init_aead_key, | ||
268 | + cryptodev_aead_cipher, | ||
269 | + cryptodev_cleanup, | ||
270 | + sizeof(struct dev_crypto_state), | ||
271 | + EVP_CIPHER_set_asn1_iv, | ||
272 | + EVP_CIPHER_get_asn1_iv, | ||
273 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
274 | + NULL | ||
275 | +}; | ||
276 | + | ||
277 | +const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { | ||
278 | + NID_aes_256_cbc_hmac_sha1, | ||
279 | + 16, 32, 16, | ||
280 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
281 | + cryptodev_init_aead_key, | ||
282 | + cryptodev_aead_cipher, | ||
283 | + cryptodev_cleanup, | ||
284 | + sizeof(struct dev_crypto_state), | ||
285 | + EVP_CIPHER_set_asn1_iv, | ||
286 | + EVP_CIPHER_get_asn1_iv, | ||
287 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
288 | + NULL | ||
289 | +}; | ||
290 | /* | ||
291 | * Registered by the ENGINE when used to find out how to deal with | ||
292 | * a particular NID in the ENGINE. this says what we'll do at the | ||
293 | @@ -637,6 +829,12 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
294 | case NID_aes_256_cbc: | ||
295 | *cipher = &cryptodev_aes_256_cbc; | ||
296 | break; | ||
297 | + case NID_aes_128_cbc_hmac_sha1: | ||
298 | + *cipher = &cryptodev_aes_128_cbc_hmac_sha1; | ||
299 | + break; | ||
300 | + case NID_aes_256_cbc_hmac_sha1: | ||
301 | + *cipher = &cryptodev_aes_256_cbc_hmac_sha1; | ||
302 | + break; | ||
303 | default: | ||
304 | *cipher = NULL; | ||
305 | break; | ||
306 | @@ -1384,6 +1582,8 @@ ENGINE_load_cryptodev(void) | ||
307 | } | ||
308 | put_dev_crypto(fd); | ||
309 | |||
310 | + EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); | ||
311 | + EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); | ||
312 | if (!ENGINE_set_id(engine, "cryptodev") || | ||
313 | !ENGINE_set_name(engine, "BSD cryptodev engine") || | ||
314 | !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || | ||
315 | -- | ||
316 | 2.3.5 | ||
317 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch b/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch new file mode 100644 index 00000000..f0d97e9a --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0003-cryptodev-fix-algorithm-registration.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 084fa469a8fef530d71a0870364df1c7997f6465 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 31 Jul 2014 14:06:19 +0300 | ||
4 | Subject: [PATCH 03/26] cryptodev: fix algorithm registration | ||
5 | |||
6 | Cryptodev specific algorithms must register only if available in kernel. | ||
7 | |||
8 | Change-Id: Iec5af8f4f3138357e4b96f2ec1627278134e4808 | ||
9 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
10 | Reviewed-on: http://git.am.freescale.net:8181/15326 | ||
11 | Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> | ||
12 | Reviewed-on: http://git.am.freescale.net:8181/17224 | ||
13 | --- | ||
14 | crypto/engine/eng_cryptodev.c | 20 +++++++++++++++++--- | ||
15 | 1 file changed, 17 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
18 | index 7588a28..e3eb98b 100644 | ||
19 | --- a/crypto/engine/eng_cryptodev.c | ||
20 | +++ b/crypto/engine/eng_cryptodev.c | ||
21 | @@ -133,6 +133,8 @@ static int cryptodev_dh_compute_key(unsigned char *key, | ||
22 | static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, | ||
23 | void (*f)(void)); | ||
24 | void ENGINE_load_cryptodev(void); | ||
25 | +const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1; | ||
26 | +const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; | ||
27 | |||
28 | static const ENGINE_CMD_DEFN cryptodev_defns[] = { | ||
29 | { 0, NULL, NULL, 0 } | ||
30 | @@ -342,7 +344,21 @@ get_cryptodev_digests(const int **cnids) | ||
31 | static int | ||
32 | cryptodev_usable_ciphers(const int **nids) | ||
33 | { | ||
34 | - return (get_cryptodev_ciphers(nids)); | ||
35 | + int i, count; | ||
36 | + | ||
37 | + count = get_cryptodev_ciphers(nids); | ||
38 | + /* add ciphers specific to cryptodev if found in kernel */ | ||
39 | + for(i = 0; i < count; i++) { | ||
40 | + switch (*(*nids + i)) { | ||
41 | + case NID_aes_128_cbc_hmac_sha1: | ||
42 | + EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); | ||
43 | + break; | ||
44 | + case NID_aes_256_cbc_hmac_sha1: | ||
45 | + EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); | ||
46 | + break; | ||
47 | + } | ||
48 | + } | ||
49 | + return count; | ||
50 | } | ||
51 | |||
52 | static int | ||
53 | @@ -1582,8 +1598,6 @@ ENGINE_load_cryptodev(void) | ||
54 | } | ||
55 | put_dev_crypto(fd); | ||
56 | |||
57 | - EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); | ||
58 | - EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); | ||
59 | if (!ENGINE_set_id(engine, "cryptodev") || | ||
60 | !ENGINE_set_name(engine, "BSD cryptodev engine") || | ||
61 | !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || | ||
62 | -- | ||
63 | 2.3.5 | ||
64 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch b/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch new file mode 100644 index 00000000..2d722d8a --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 7d770f0324498d1fa78300cc5cecc8c1dcd3b788 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andy Polyakov <appro@openssl.org> | ||
3 | Date: Sun, 21 Oct 2012 18:19:41 +0000 | ||
4 | Subject: [PATCH 04/26] linux-pcc: make it more robust and recognize | ||
5 | KERNEL_BITS variable. | ||
6 | |||
7 | (cherry picked from commit 78c3e20579d3baa159c8b51b59d415b6e521614b) | ||
8 | |||
9 | Change-Id: I769c466f052305681ab54a1b6545d94c7fbf5a9d | ||
10 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
11 | --- | ||
12 | config | 19 +++++++++++++------ | ||
13 | crypto/ppccap.c | 7 +++++++ | ||
14 | 2 files changed, 20 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/config b/config | ||
17 | index 41fa2a6..f37b9e6 100755 | ||
18 | --- a/config | ||
19 | +++ b/config | ||
20 | @@ -587,13 +587,20 @@ case "$GUESSOS" in | ||
21 | fi | ||
22 | ;; | ||
23 | ppc64-*-linux2) | ||
24 | - echo "WARNING! If you wish to build 64-bit library, then you have to" | ||
25 | - echo " invoke './Configure linux-ppc64' *manually*." | ||
26 | - if [ "$TEST" = "false" -a -t 1 ]; then | ||
27 | - echo " You have about 5 seconds to press Ctrl-C to abort." | ||
28 | - (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 | ||
29 | + if [ -z "$KERNEL_BITS" ]; then | ||
30 | + echo "WARNING! If you wish to build 64-bit library, then you have to" | ||
31 | + echo " invoke './Configure linux-ppc64' *manually*." | ||
32 | + if [ "$TEST" = "false" -a -t 1 ]; then | ||
33 | + echo " You have about 5 seconds to press Ctrl-C to abort." | ||
34 | + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 | ||
35 | + fi | ||
36 | + fi | ||
37 | + if [ "$KERNEL_BITS" = "64" ]; then | ||
38 | + OUT="linux-ppc64" | ||
39 | + else | ||
40 | + OUT="linux-ppc" | ||
41 | + (echo "__LP64__" | gcc -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null) || options="$options -m32" | ||
42 | fi | ||
43 | - OUT="linux-ppc" | ||
44 | ;; | ||
45 | ppc-*-linux2) OUT="linux-ppc" ;; | ||
46 | ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;; | ||
47 | diff --git a/crypto/ppccap.c b/crypto/ppccap.c | ||
48 | index f71ba66..531f1b3 100644 | ||
49 | --- a/crypto/ppccap.c | ||
50 | +++ b/crypto/ppccap.c | ||
51 | @@ -4,6 +4,9 @@ | ||
52 | #include <setjmp.h> | ||
53 | #include <signal.h> | ||
54 | #include <unistd.h> | ||
55 | +#ifdef __linux | ||
56 | +#include <sys/utsname.h> | ||
57 | +#endif | ||
58 | #include <crypto.h> | ||
59 | #include <openssl/bn.h> | ||
60 | |||
61 | @@ -102,6 +105,10 @@ void OPENSSL_cpuid_setup(void) | ||
62 | |||
63 | if (sizeof(size_t)==4) | ||
64 | { | ||
65 | +#ifdef __linux | ||
66 | + struct utsname uts; | ||
67 | + if (uname(&uts)==0 && strcmp(uts.machine,"ppc64")==0) | ||
68 | +#endif | ||
69 | if (sigsetjmp(ill_jmp,1) == 0) | ||
70 | { | ||
71 | OPENSSL_ppc64_probe(); | ||
72 | -- | ||
73 | 2.3.5 | ||
74 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch b/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch new file mode 100644 index 00000000..c9ff5aa8 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0005-ECC-Support-header-for-Cryptodev-Engine.patch | |||
@@ -0,0 +1,318 @@ | |||
1 | From 15abbcd740eafbf2a46b5da24be76acf4982743d Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Tue, 11 Mar 2014 05:56:54 +0545 | ||
4 | Subject: [PATCH 05/26] ECC Support header for Cryptodev Engine | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
9 | --- | ||
10 | crypto/engine/eng_cryptodev_ec.h | 296 +++++++++++++++++++++++++++++++++++++++ | ||
11 | 1 file changed, 296 insertions(+) | ||
12 | create mode 100644 crypto/engine/eng_cryptodev_ec.h | ||
13 | |||
14 | diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h | ||
15 | new file mode 100644 | ||
16 | index 0000000..77aee71 | ||
17 | --- /dev/null | ||
18 | +++ b/crypto/engine/eng_cryptodev_ec.h | ||
19 | @@ -0,0 +1,296 @@ | ||
20 | +/* | ||
21 | + * Copyright (C) 2012 Freescale Semiconductor, Inc. | ||
22 | + * | ||
23 | + * Redistribution and use in source and binary forms, with or without | ||
24 | + * modification, are permitted provided that the following conditions | ||
25 | + * are met: | ||
26 | + * 1. Redistributions of source code must retain the above copyright | ||
27 | + * notice, this list of conditions and the following disclaimer. | ||
28 | + * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | + * notice, this list of conditions and the following disclaimer in the | ||
30 | + * documentation and/or other materials provided with the distribution. | ||
31 | + * | ||
32 | + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
33 | + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
34 | + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
35 | + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
36 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
37 | + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
38 | + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
39 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
40 | + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
41 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
42 | + */ | ||
43 | +#ifndef __ENG_EC_H | ||
44 | +#define __ENG_EC_H | ||
45 | + | ||
46 | +#define SPCF_CPARAM_INIT(X,...) \ | ||
47 | +static unsigned char X##_c[] = {__VA_ARGS__} \ | ||
48 | + | ||
49 | +#define SPCF_FREE_BN(X) do { if(X) { BN_clear_free(X); X = NULL; } } while (0) | ||
50 | + | ||
51 | +#define SPCF_COPY_CPARAMS(NIDBUF) \ | ||
52 | + do { \ | ||
53 | + memcpy (buf, NIDBUF, buf_len); \ | ||
54 | + } while (0) | ||
55 | + | ||
56 | +#define SPCF_CPARAM_CASE(X) \ | ||
57 | + case NID_##X: \ | ||
58 | + SPCF_COPY_CPARAMS(X##_c); \ | ||
59 | + break | ||
60 | + | ||
61 | +SPCF_CPARAM_INIT(sect113r1, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, 0xEC, 0x76, | ||
62 | + 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); | ||
63 | +SPCF_CPARAM_INIT(sect113r2, 0x00, 0x54, 0xD9, 0xF0, 0x39, 0x57, 0x17, 0x4A, | ||
64 | + 0x32, 0x32, 0x91, 0x67, 0xD7, 0xFE, 0x71); | ||
65 | +SPCF_CPARAM_INIT(sect131r1, 0x03, 0xDB, 0x89, 0xB4, 0x05, 0xE4, 0x91, 0x16, | ||
66 | + 0x0E, 0x3B, 0x2F, 0x07, 0xB0, 0xCE, 0x20, 0xB3, 0x7E); | ||
67 | +SPCF_CPARAM_INIT(sect131r2, 0x07, 0xCB, 0xB9, 0x92, 0x0D, 0x71, 0xA4, 0x8E, | ||
68 | + 0x09, 0x9C, 0x38, 0xD7, 0x1D, 0xA6, 0x49, 0x0E, 0xB1); | ||
69 | +SPCF_CPARAM_INIT(sect163k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
70 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
71 | + 0x00, 0x00, 0x01); | ||
72 | +SPCF_CPARAM_INIT(sect163r1, 0x05, 0xED, 0x40, 0x3E, 0xD5, 0x8E, 0xB4, 0x5B, | ||
73 | + 0x1C, 0xCE, 0xCA, 0x0F, 0x4F, 0x61, 0x65, 0x55, 0x49, 0x86, | ||
74 | + 0x1B, 0xE0, 0x52); | ||
75 | +SPCF_CPARAM_INIT(sect163r2, 0x07, 0x2C, 0x4E, 0x1E, 0xF7, 0xCB, 0x2F, 0x3A, | ||
76 | + 0x03, 0x5D, 0x33, 0x10, 0x42, 0x94, 0x15, 0x96, 0x09, 0x13, | ||
77 | + 0x8B, 0xB4, 0x04); | ||
78 | +SPCF_CPARAM_INIT(sect193r1, 0x01, 0x67, 0xB3, 0x5E, 0xB4, 0x31, 0x3F, 0x26, | ||
79 | + 0x3D, 0x0F, 0x7A, 0x3D, 0x50, 0x36, 0xF0, 0xA0, 0xA3, 0xC9, | ||
80 | + 0x80, 0xD4, 0x0E, 0x5A, 0x05, 0x3E, 0xD2); | ||
81 | +SPCF_CPARAM_INIT(sect193r2, 0x00, 0x69, 0x89, 0xFE, 0x6B, 0xFE, 0x30, 0xED, | ||
82 | + 0xDC, 0x32, 0x44, 0x26, 0x9F, 0x3A, 0xAD, 0x18, 0xD6, 0x6C, | ||
83 | + 0xF3, 0xDB, 0x3E, 0x33, 0x02, 0xFA, 0xA8); | ||
84 | +SPCF_CPARAM_INIT(sect233k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
85 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
86 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
87 | + 0x00, 0x01); | ||
88 | +SPCF_CPARAM_INIT(sect233r1, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, 0xDF, 0xF1, | ||
89 | + 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, 0xCE, 0x35, | ||
90 | + 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, 0xC0, 0xF2, | ||
91 | + 0x68, 0x6C); | ||
92 | +SPCF_CPARAM_INIT(sect239k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
93 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
94 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
95 | + 0x00, 0x01); | ||
96 | +SPCF_CPARAM_INIT(sect283k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
97 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
98 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
99 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); | ||
100 | +SPCF_CPARAM_INIT(sect283r1, 0x03, 0xD8, 0xC9, 0x3D, 0x3B, 0x0E, 0xA8, 0x1D, | ||
101 | + 0x92, 0x94, 0x03, 0x4D, 0x7E, 0xE3, 0x13, 0x5D, 0x0A, 0xC5, | ||
102 | + 0xFC, 0x8D, 0x9C, 0xB0, 0x27, 0x6F, 0x72, 0x11, 0xF8, 0x80, | ||
103 | + 0xF0, 0xD8, 0x1C, 0xA4, 0xC6, 0xE8, 0x7B, 0x38); | ||
104 | +SPCF_CPARAM_INIT(sect409k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
105 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
106 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
107 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
108 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
109 | + 0x00, 0x00, 0x00, 0x01); | ||
110 | +SPCF_CPARAM_INIT(sect409r1, 0x01, 0x49, 0xB8, 0xB7, 0xBE, 0xBD, 0x9B, 0x63, | ||
111 | + 0x65, 0x3E, 0xF1, 0xCD, 0x8C, 0x6A, 0x5D, 0xD1, 0x05, 0xA2, | ||
112 | + 0xAA, 0xAC, 0x36, 0xFE, 0x2E, 0xAE, 0x43, 0xCF, 0x28, 0xCE, | ||
113 | + 0x1C, 0xB7, 0xC8, 0x30, 0xC1, 0xEC, 0xDB, 0xFA, 0x41, 0x3A, | ||
114 | + 0xB0, 0x7F, 0xE3, 0x5A, 0x57, 0x81, 0x1A, 0xE4, 0xF8, 0x8D, | ||
115 | + 0x30, 0xAC, 0x63, 0xFB); | ||
116 | +SPCF_CPARAM_INIT(sect571k1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
117 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
118 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
119 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
120 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
121 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
122 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
123 | + 0x00, 0x00, 0x00, 0x01); | ||
124 | +SPCF_CPARAM_INIT(sect571r1, 0x06, 0x39, 0x5D, 0xB2, 0x2A, 0xB5, 0x94, 0xB1, | ||
125 | + 0x86, 0x8C, 0xED, 0x95, 0x25, 0x78, 0xB6, 0x53, 0x9F, 0xAB, | ||
126 | + 0xA6, 0x94, 0x06, 0xD9, 0xB2, 0x98, 0x61, 0x23, 0xA1, 0x85, | ||
127 | + 0xC8, 0x58, 0x32, 0xE2, 0x5F, 0xD5, 0xB6, 0x38, 0x33, 0xD5, | ||
128 | + 0x14, 0x42, 0xAB, 0xF1, 0xA9, 0xC0, 0x5F, 0xF0, 0xEC, 0xBD, | ||
129 | + 0x88, 0xD7, 0xF7, 0x79, 0x97, 0xF4, 0xDC, 0x91, 0x56, 0xAA, | ||
130 | + 0xF1, 0xCE, 0x08, 0x16, 0x46, 0x86, 0xDD, 0xFF, 0x75, 0x11, | ||
131 | + 0x6F, 0xBC, 0x9A, 0x7A); | ||
132 | +SPCF_CPARAM_INIT(X9_62_c2pnb163v1, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, 0x1F, | ||
133 | + 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, 0x81, | ||
134 | + 0xE7, 0xEA, 0x26, 0xEC); | ||
135 | +SPCF_CPARAM_INIT(X9_62_c2pnb163v2, 0x04, 0x35, 0xC0, 0x19, 0x66, 0x0E, 0x01, | ||
136 | + 0x01, 0xBA, 0x87, 0x0C, 0xA3, 0x9F, 0xD9, 0xA7, 0x76, 0x86, | ||
137 | + 0x50, 0x9D, 0x28, 0x13); | ||
138 | +SPCF_CPARAM_INIT(X9_62_c2pnb163v3, 0x06, 0x55, 0xC4, 0x54, 0xE4, 0x1E, 0x38, | ||
139 | + 0x0C, 0x7A, 0x60, 0xB6, 0x67, 0x9A, 0x5B, 0x7A, 0x3F, 0x3A, | ||
140 | + 0xF6, 0x8E, 0x22, 0xC5); | ||
141 | +SPCF_CPARAM_INIT(X9_62_c2pnb176v1, 0x00, 0x69, 0xF7, 0xDA, 0x36, 0x19, 0xA7, | ||
142 | + 0x42, 0xA3, 0x82, 0xFF, 0x05, 0x08, 0x8F, 0xD3, 0x99, 0x42, | ||
143 | + 0xCA, 0x0F, 0x1D, 0x90, 0xB6, 0x5B); | ||
144 | +SPCF_CPARAM_INIT(X9_62_c2tnb191v1, 0x4C, 0x45, 0x25, 0xAB, 0x0B, 0x68, 0x4A, | ||
145 | + 0x64, 0x44, 0x62, 0x0A, 0x86, 0x45, 0xEF, 0x54, 0x6D, 0x54, | ||
146 | + 0x69, 0x39, 0x68, 0xC2, 0xAE, 0x84, 0xAC); | ||
147 | +SPCF_CPARAM_INIT(X9_62_c2tnb191v2, 0x03, 0x7C, 0x8F, 0x57, 0xA2, 0x25, 0xC7, | ||
148 | + 0xB3, 0xD4, 0xED, 0xD5, 0x88, 0x0F, 0x38, 0x0A, 0xCC, 0x55, | ||
149 | + 0x74, 0xEC, 0xB3, 0x6C, 0x9F, 0x51, 0x21); | ||
150 | +SPCF_CPARAM_INIT(X9_62_c2tnb191v3, 0x37, 0x39, 0xFF, 0x98, 0xB4, 0xD1, 0x69, | ||
151 | + 0x3E, 0xCF, 0x52, 0x7A, 0x98, 0x51, 0xED, 0xCF, 0x99, 0x9D, | ||
152 | + 0x9E, 0x75, 0x05, 0x43, 0x33, 0x43, 0x24); | ||
153 | +SPCF_CPARAM_INIT(X9_62_c2pnb208w1, 0x00, 0xDB, 0x05, 0x3C, 0x41, 0x76, 0xCC, | ||
154 | + 0x1D, 0xA1, 0x27, 0x85, 0x2C, 0xA6, 0xD9, 0x88, 0xBE, 0x1A, | ||
155 | + 0xCC, 0xD1, 0x5B, 0x2A, 0xC1, 0xC1, 0x07, 0x42, 0x57, 0x34); | ||
156 | +SPCF_CPARAM_INIT(X9_62_c2tnb239v1, 0x24, 0x59, 0xFC, 0xF4, 0x51, 0x7B, 0xC5, | ||
157 | + 0xA6, 0xB9, 0x9B, 0xE5, 0xC6, 0xC5, 0x62, 0x85, 0xC0, 0x21, | ||
158 | + 0xFE, 0x32, 0xEE, 0x2B, 0x6F, 0x1C, 0x22, 0xEA, 0x5B, 0xE1, | ||
159 | + 0xB8, 0x4B, 0x93); | ||
160 | +SPCF_CPARAM_INIT(X9_62_c2tnb239v2, 0x64, 0x98, 0x84, 0x19, 0x3B, 0x56, 0x2D, | ||
161 | + 0x4A, 0x50, 0xB4, 0xFA, 0x56, 0x34, 0xE0, 0x34, 0x41, 0x3F, | ||
162 | + 0x94, 0xC4, 0x59, 0xDA, 0x7C, 0xDB, 0x16, 0x64, 0x9D, 0xDD, | ||
163 | + 0xF7, 0xE6, 0x0A); | ||
164 | +SPCF_CPARAM_INIT(X9_62_c2tnb239v3, 0x32, 0x63, 0x2E, 0x65, 0x2B, 0xEE, 0x91, | ||
165 | + 0xC2, 0xE4, 0xA2, 0xF5, 0x42, 0xA3, 0x2D, 0x67, 0xA8, 0xB5, | ||
166 | + 0xB4, 0x5F, 0x21, 0xA0, 0x81, 0x02, 0xFB, 0x1F, 0x2A, 0xFB, | ||
167 | + 0xB6, 0xAC, 0xDA); | ||
168 | +SPCF_CPARAM_INIT(X9_62_c2pnb272w1, 0x00, 0xDA, 0x7B, 0x60, 0x28, 0xF4, 0xC8, | ||
169 | + 0x09, 0xA0, 0xB9, 0x78, 0x81, 0xC3, 0xA5, 0x7E, 0x4D, 0x71, | ||
170 | + 0x81, 0x34, 0xD1, 0x3F, 0xEC, 0xE0, 0x90, 0x85, 0x8A, 0xC3, | ||
171 | + 0x1A, 0xE2, 0xDC, 0x2E, 0xDF, 0x8E, 0x3C, 0x8B); | ||
172 | +SPCF_CPARAM_INIT(X9_62_c2pnb304w1, 0x00, 0x3C, 0x67, 0xB4, 0x07, 0xC6, 0xF3, | ||
173 | + 0x3F, 0x81, 0x0B, 0x17, 0xDC, 0x16, 0xE2, 0x14, 0x8A, 0x2C, | ||
174 | + 0x9C, 0xE2, 0x9D, 0x56, 0x05, 0x23, 0x69, 0x6A, 0x55, 0x93, | ||
175 | + 0x8A, 0x15, 0x40, 0x81, 0xE3, 0xE3, 0xAE, 0xFB, 0xCE, 0x45, | ||
176 | + 0x70, 0xC9); | ||
177 | +SPCF_CPARAM_INIT(X9_62_c2tnb359v1, 0x22, 0x39, 0xAA, 0x58, 0x4A, 0xC5, 0x9A, | ||
178 | + 0xF9, 0x61, 0xD0, 0xFA, 0x2D, 0x52, 0x85, 0xB6, 0xFD, 0xF7, | ||
179 | + 0x34, 0x9B, 0xC6, 0x0E, 0x91, 0xE3, 0x20, 0xF4, 0x71, 0x64, | ||
180 | + 0xCE, 0x11, 0xF5, 0x18, 0xEF, 0xB4, 0xC0, 0x8B, 0x9B, 0xDA, | ||
181 | + 0x99, 0x9A, 0x8A, 0x37, 0xF8, 0x2A, 0x22, 0x61); | ||
182 | +SPCF_CPARAM_INIT(X9_62_c2pnb368w1, 0x00, 0xC0, 0x6C, 0xCF, 0x42, 0x89, 0x3A, | ||
183 | + 0x8A, 0xAA, 0x00, 0x1E, 0x0B, 0xC0, 0xD2, 0xA2, 0x27, 0x66, | ||
184 | + 0xEF, 0x3E, 0x41, 0x88, 0x7C, 0xC6, 0x77, 0x6F, 0x4A, 0x04, | ||
185 | + 0x1E, 0xE4, 0x45, 0x14, 0xB2, 0x0A, 0xFC, 0x4E, 0x5C, 0x30, | ||
186 | + 0x40, 0x60, 0x06, 0x5B, 0xC8, 0xD6, 0xCF, 0x04, 0xD3, 0x25); | ||
187 | +SPCF_CPARAM_INIT(X9_62_c2tnb431r1, 0x64, 0xF5, 0xBB, 0xE9, 0xBB, 0x31, 0x66, | ||
188 | + 0xA3, 0xA0, 0x2F, 0x2F, 0x22, 0xBF, 0x05, 0xD9, 0xF7, 0xDA, | ||
189 | + 0x43, 0xEE, 0x70, 0xC1, 0x79, 0x03, 0x15, 0x2B, 0x70, 0xA0, | ||
190 | + 0xB4, 0x25, 0x9B, 0xD2, 0xFC, 0xB2, 0x20, 0x3B, 0x7F, 0xB8, | ||
191 | + 0xD3, 0x39, 0x4E, 0x20, 0xEB, 0x0E, 0xA9, 0x84, 0xDD, 0xB1, | ||
192 | + 0xE1, 0xF1, 0x4C, 0x67, 0xB1, 0x36, 0x2B); | ||
193 | +SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
194 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); | ||
195 | +SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
196 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
197 | + 0x00, 0x00, 0x00, 0x00, 0x01); | ||
198 | +SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls4, 0x01, 0x73, 0xE8, 0x34, 0xAF, 0x28, | ||
199 | + 0xEC, 0x76, 0xCB, 0x83, 0xBD, 0x8D, 0xFE, 0xB2, 0xD5); | ||
200 | +SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls5, 0x04, 0x53, 0xE1, 0xE4, 0xB7, 0x29, | ||
201 | + 0x1F, 0x5C, 0x2D, 0x53, 0xCE, 0x18, 0x48, 0x3F, 0x00, 0x70, | ||
202 | + 0x81, 0xE7, 0xEA, 0x26, 0xEC); | ||
203 | +SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
204 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
205 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
206 | + 0x00, 0x00, 0x00, 0x01); | ||
207 | +SPCF_CPARAM_INIT(wap_wsg_idm_ecid_wtls11, 0x00, 0x07, 0xD5, 0xEF, 0x43, 0x89, | ||
208 | + 0xDF, 0xF1, 0x1E, 0xCD, 0xBA, 0x39, 0xC3, 0x09, 0x70, 0xD3, | ||
209 | + 0xCE, 0x35, 0xCE, 0xBB, 0xA5, 0x84, 0x73, 0xF6, 0x4B, 0x4D, | ||
210 | + 0xC0, 0xF2, 0x68, 0x6C); | ||
211 | +/* Oakley curve #3 over 155 bit binary filed */ | ||
212 | +SPCF_CPARAM_INIT(ipsec3, 0x00, 0x31, 0x10, 0x00, 0x00, 0x02, 0x23, 0xA0, 0x00, | ||
213 | + 0xC4, 0x47, 0x40, 0x00, 0x08, 0x8E, 0x80, 0x00, 0x11, 0x1D, | ||
214 | + 0x1D); | ||
215 | +/* Oakley curve #4 over 185 bit binary filed */ | ||
216 | +SPCF_CPARAM_INIT(ipsec4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, | ||
217 | + 0x01, 0x80, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x63, 0x80, | ||
218 | + 0x30, 0x00, 0x1C, 0x00, 0x09); | ||
219 | + | ||
220 | +static inline int | ||
221 | +eng_ec_get_cparam(int nid, unsigned char *buf, unsigned int buf_len) | ||
222 | +{ | ||
223 | + int ret = 0; | ||
224 | + switch (nid) { | ||
225 | + SPCF_CPARAM_CASE(sect113r1); | ||
226 | + SPCF_CPARAM_CASE(sect113r2); | ||
227 | + SPCF_CPARAM_CASE(sect131r1); | ||
228 | + SPCF_CPARAM_CASE(sect131r2); | ||
229 | + SPCF_CPARAM_CASE(sect163k1); | ||
230 | + SPCF_CPARAM_CASE(sect163r1); | ||
231 | + SPCF_CPARAM_CASE(sect163r2); | ||
232 | + SPCF_CPARAM_CASE(sect193r1); | ||
233 | + SPCF_CPARAM_CASE(sect193r2); | ||
234 | + SPCF_CPARAM_CASE(sect233k1); | ||
235 | + SPCF_CPARAM_CASE(sect233r1); | ||
236 | + SPCF_CPARAM_CASE(sect239k1); | ||
237 | + SPCF_CPARAM_CASE(sect283k1); | ||
238 | + SPCF_CPARAM_CASE(sect283r1); | ||
239 | + SPCF_CPARAM_CASE(sect409k1); | ||
240 | + SPCF_CPARAM_CASE(sect409r1); | ||
241 | + SPCF_CPARAM_CASE(sect571k1); | ||
242 | + SPCF_CPARAM_CASE(sect571r1); | ||
243 | + SPCF_CPARAM_CASE(X9_62_c2pnb163v1); | ||
244 | + SPCF_CPARAM_CASE(X9_62_c2pnb163v2); | ||
245 | + SPCF_CPARAM_CASE(X9_62_c2pnb163v3); | ||
246 | + SPCF_CPARAM_CASE(X9_62_c2pnb176v1); | ||
247 | + SPCF_CPARAM_CASE(X9_62_c2tnb191v1); | ||
248 | + SPCF_CPARAM_CASE(X9_62_c2tnb191v2); | ||
249 | + SPCF_CPARAM_CASE(X9_62_c2tnb191v3); | ||
250 | + SPCF_CPARAM_CASE(X9_62_c2pnb208w1); | ||
251 | + SPCF_CPARAM_CASE(X9_62_c2tnb239v1); | ||
252 | + SPCF_CPARAM_CASE(X9_62_c2tnb239v2); | ||
253 | + SPCF_CPARAM_CASE(X9_62_c2tnb239v3); | ||
254 | + SPCF_CPARAM_CASE(X9_62_c2pnb272w1); | ||
255 | + SPCF_CPARAM_CASE(X9_62_c2pnb304w1); | ||
256 | + SPCF_CPARAM_CASE(X9_62_c2tnb359v1); | ||
257 | + SPCF_CPARAM_CASE(X9_62_c2pnb368w1); | ||
258 | + SPCF_CPARAM_CASE(X9_62_c2tnb431r1); | ||
259 | + SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls1); | ||
260 | + SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls3); | ||
261 | + SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls4); | ||
262 | + SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls5); | ||
263 | + SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls10); | ||
264 | + SPCF_CPARAM_CASE(wap_wsg_idm_ecid_wtls11); | ||
265 | + /* Oakley curve #3 over 155 bit binary filed */ | ||
266 | + SPCF_CPARAM_CASE(ipsec3); | ||
267 | + /* Oakley curve #4 over 185 bit binary filed */ | ||
268 | + SPCF_CPARAM_CASE(ipsec4); | ||
269 | + default: | ||
270 | + ret = -EINVAL; | ||
271 | + break; | ||
272 | + } | ||
273 | + return ret; | ||
274 | +} | ||
275 | + | ||
276 | +/* Copies the curve points to a flat buffer with appropriate padding */ | ||
277 | +static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, | ||
278 | + int xy_len, int crv_len) | ||
279 | +{ | ||
280 | + unsigned char *xy = NULL; | ||
281 | + int len1 = 0, len2 = 0; | ||
282 | + | ||
283 | + len1 = BN_num_bytes(x); | ||
284 | + len2 = BN_num_bytes(y); | ||
285 | + | ||
286 | + if (!(xy = malloc(xy_len))) { | ||
287 | + return NULL; | ||
288 | + } | ||
289 | + | ||
290 | + memset(xy, 0, xy_len); | ||
291 | + | ||
292 | + if (len1 < crv_len) { | ||
293 | + if (!BN_is_zero(x)) | ||
294 | + BN_bn2bin(x, xy + (crv_len - len1)); | ||
295 | + } else { | ||
296 | + BN_bn2bin(x, xy); | ||
297 | + } | ||
298 | + | ||
299 | + if (len2 < crv_len) { | ||
300 | + if (!BN_is_zero(y)) | ||
301 | + BN_bn2bin(y, xy+crv_len+(crv_len-len2)); | ||
302 | + } else { | ||
303 | + BN_bn2bin(y, xy+crv_len); | ||
304 | + } | ||
305 | + | ||
306 | + return xy; | ||
307 | +} | ||
308 | + | ||
309 | +enum curve_t { | ||
310 | + DISCRETE_LOG, | ||
311 | + ECC_PRIME, | ||
312 | + ECC_BINARY, | ||
313 | + MAX_ECC_TYPE | ||
314 | +}; | ||
315 | +#endif | ||
316 | -- | ||
317 | 2.3.5 | ||
318 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch b/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch new file mode 100644 index 00000000..01c268b6 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0006-Fixed-private-key-support-for-DH.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 39a9e609290a8a1163a721915bcde0c7cf8f92f7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Tue, 11 Mar 2014 05:57:47 +0545 | ||
4 | Subject: [PATCH 06/26] Fixed private key support for DH | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
9 | --- | ||
10 | crypto/dh/dh_ameth.c | 7 +++++++ | ||
11 | 1 file changed, 7 insertions(+) | ||
12 | |||
13 | diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c | ||
14 | index 02ec2d4..ed32004 100644 | ||
15 | --- a/crypto/dh/dh_ameth.c | ||
16 | +++ b/crypto/dh/dh_ameth.c | ||
17 | @@ -422,6 +422,13 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | ||
18 | if (to->pkey.dh->g != NULL) | ||
19 | BN_free(to->pkey.dh->g); | ||
20 | to->pkey.dh->g=a; | ||
21 | + if ((a=BN_dup(from->pkey.dh->q)) != NULL) { | ||
22 | + if (to->pkey.dh->q != NULL) | ||
23 | + BN_free(to->pkey.dh->q); | ||
24 | + to->pkey.dh->q=a; | ||
25 | + } | ||
26 | + | ||
27 | + to->pkey.dh->length = from->pkey.dh->length; | ||
28 | |||
29 | return 1; | ||
30 | } | ||
31 | -- | ||
32 | 2.3.5 | ||
33 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch b/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch new file mode 100644 index 00000000..12fcd7df --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0007-Fixed-private-key-support-for-DH.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 8322e4157bf49d992b5b9e460f2c0785865dd1c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Thu, 20 Mar 2014 19:55:51 -0500 | ||
4 | Subject: [PATCH 07/26] Fixed private key support for DH | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Required Length of the DH result is not returned in dh method in openssl | ||
9 | |||
10 | Tested-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
11 | --- | ||
12 | crypto/dh/dh_ameth.c | 7 ------- | ||
13 | 1 file changed, 7 deletions(-) | ||
14 | |||
15 | diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c | ||
16 | index ed32004..02ec2d4 100644 | ||
17 | --- a/crypto/dh/dh_ameth.c | ||
18 | +++ b/crypto/dh/dh_ameth.c | ||
19 | @@ -422,13 +422,6 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | ||
20 | if (to->pkey.dh->g != NULL) | ||
21 | BN_free(to->pkey.dh->g); | ||
22 | to->pkey.dh->g=a; | ||
23 | - if ((a=BN_dup(from->pkey.dh->q)) != NULL) { | ||
24 | - if (to->pkey.dh->q != NULL) | ||
25 | - BN_free(to->pkey.dh->q); | ||
26 | - to->pkey.dh->q=a; | ||
27 | - } | ||
28 | - | ||
29 | - to->pkey.dh->length = from->pkey.dh->length; | ||
30 | |||
31 | return 1; | ||
32 | } | ||
33 | -- | ||
34 | 2.3.5 | ||
35 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch b/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch new file mode 100644 index 00000000..8c8b1f22 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0008-Initial-support-for-PKC-in-cryptodev-engine.patch | |||
@@ -0,0 +1,1564 @@ | |||
1 | From 107a10d45db0f2e58482f698add04ed9183f7268 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Tue, 11 Mar 2014 06:29:52 +0545 | ||
4 | Subject: [PATCH 08/26] Initial support for PKC in cryptodev engine | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
9 | --- | ||
10 | crypto/engine/eng_cryptodev.c | 1343 ++++++++++++++++++++++++++++++++++++----- | ||
11 | 1 file changed, 1183 insertions(+), 160 deletions(-) | ||
12 | |||
13 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
14 | index e3eb98b..7ee314b 100644 | ||
15 | --- a/crypto/engine/eng_cryptodev.c | ||
16 | +++ b/crypto/engine/eng_cryptodev.c | ||
17 | @@ -54,11 +54,14 @@ ENGINE_load_cryptodev(void) | ||
18 | #else | ||
19 | |||
20 | #include <sys/types.h> | ||
21 | -#include <crypto/cryptodev.h> | ||
22 | #include <crypto/dh/dh.h> | ||
23 | #include <crypto/dsa/dsa.h> | ||
24 | #include <crypto/err/err.h> | ||
25 | #include <crypto/rsa/rsa.h> | ||
26 | +#include <crypto/ecdsa/ecs_locl.h> | ||
27 | +#include <crypto/ecdh/ech_locl.h> | ||
28 | +#include <crypto/ec/ec_lcl.h> | ||
29 | +#include <crypto/ec/ec.h> | ||
30 | #include <sys/ioctl.h> | ||
31 | #include <errno.h> | ||
32 | #include <stdio.h> | ||
33 | @@ -68,6 +71,8 @@ ENGINE_load_cryptodev(void) | ||
34 | #include <syslog.h> | ||
35 | #include <errno.h> | ||
36 | #include <string.h> | ||
37 | +#include "eng_cryptodev_ec.h" | ||
38 | +#include <crypto/cryptodev.h> | ||
39 | |||
40 | struct dev_crypto_state { | ||
41 | struct session_op d_sess; | ||
42 | @@ -116,18 +121,10 @@ static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, | ||
43 | static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, | ||
44 | RSA *rsa, BN_CTX *ctx); | ||
45 | static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); | ||
46 | -static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, | ||
47 | - const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
48 | -static int cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, | ||
49 | - BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, | ||
50 | - BN_CTX *ctx, BN_MONT_CTX *mont); | ||
51 | static DSA_SIG *cryptodev_dsa_do_sign(const unsigned char *dgst, | ||
52 | int dlen, DSA *dsa); | ||
53 | static int cryptodev_dsa_verify(const unsigned char *dgst, int dgst_len, | ||
54 | DSA_SIG *sig, DSA *dsa); | ||
55 | -static int cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, | ||
56 | - const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
57 | - BN_MONT_CTX *m_ctx); | ||
58 | static int cryptodev_dh_compute_key(unsigned char *key, | ||
59 | const BIGNUM *pub_key, DH *dh); | ||
60 | static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, | ||
61 | @@ -136,6 +133,102 @@ void ENGINE_load_cryptodev(void); | ||
62 | const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1; | ||
63 | const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; | ||
64 | |||
65 | +inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) | ||
66 | +{ | ||
67 | + int len; | ||
68 | + unsigned char *p; | ||
69 | + | ||
70 | + len = BN_num_bytes(bn); | ||
71 | + | ||
72 | + if (!len) | ||
73 | + return -1; | ||
74 | + | ||
75 | + p = malloc(len); | ||
76 | + if (!p) | ||
77 | + return -1; | ||
78 | + | ||
79 | + BN_bn2bin(bn,p); | ||
80 | + | ||
81 | + *bin = p; | ||
82 | + *bin_len = len; | ||
83 | + | ||
84 | + return 0; | ||
85 | +} | ||
86 | + | ||
87 | +inline int spcf_bn2bin_ex(BIGNUM *bn, unsigned char **bin, int *bin_len) | ||
88 | +{ | ||
89 | + int len; | ||
90 | + unsigned char *p; | ||
91 | + | ||
92 | + len = BN_num_bytes(bn); | ||
93 | + | ||
94 | + if (!len) | ||
95 | + return -1; | ||
96 | + | ||
97 | + if (len < *bin_len) | ||
98 | + p = malloc(*bin_len); | ||
99 | + else | ||
100 | + p = malloc(len); | ||
101 | + | ||
102 | + if (!p) | ||
103 | + return -ENOMEM; | ||
104 | + | ||
105 | + if (len < *bin_len) { | ||
106 | + /* place padding */ | ||
107 | + memset(p, 0, (*bin_len - len)); | ||
108 | + BN_bn2bin(bn,p+(*bin_len-len)); | ||
109 | + } else { | ||
110 | + BN_bn2bin(bn,p); | ||
111 | + } | ||
112 | + | ||
113 | + *bin = p; | ||
114 | + if (len >= *bin_len) | ||
115 | + *bin_len = len; | ||
116 | + | ||
117 | + return 0; | ||
118 | +} | ||
119 | + | ||
120 | +/** | ||
121 | + * Convert an ECC F2m 'b' parameter into the 'c' parameter. | ||
122 | + *Inputs: | ||
123 | + * q, the curve's modulus | ||
124 | + * b, the curve's b parameter | ||
125 | + * (a bignum for b, a buffer for c) | ||
126 | + * Output: | ||
127 | + * c, written into bin, right-adjusted to fill q_len bytes. | ||
128 | + */ | ||
129 | +static int | ||
130 | +eng_ec_compute_cparam(const BIGNUM* b, const BIGNUM* q, | ||
131 | + unsigned char **bin, int *bin_len) | ||
132 | +{ | ||
133 | + BIGNUM* c = BN_new(); | ||
134 | + BIGNUM* exp = BN_new(); | ||
135 | + BN_CTX *ctx = BN_CTX_new(); | ||
136 | + int m = BN_num_bits(q) - 1; | ||
137 | + int ok = 0; | ||
138 | + | ||
139 | + if (!c || !exp || !ctx || *bin) | ||
140 | + goto err; | ||
141 | + | ||
142 | + /* | ||
143 | + * We have to compute c, where b = c^4, i.e., the fourth root of b. | ||
144 | + * The equation for c is c = b^(2^(m-2)) | ||
145 | + * Compute exp = 2^(m-2) | ||
146 | + * (1 << x) == 2^x | ||
147 | + * and then compute c = b^exp | ||
148 | + */ | ||
149 | + BN_lshift(exp, BN_value_one(), m-2); | ||
150 | + BN_GF2m_mod_exp(c, b, exp, q, ctx); | ||
151 | + /* Store c */ | ||
152 | + spcf_bn2bin_ex(c, bin, bin_len); | ||
153 | + ok = 1; | ||
154 | +err: | ||
155 | + if (ctx) BN_CTX_free(ctx); | ||
156 | + if (c) BN_free(c); | ||
157 | + if (exp) BN_free(exp); | ||
158 | + return ok; | ||
159 | +} | ||
160 | + | ||
161 | static const ENGINE_CMD_DEFN cryptodev_defns[] = { | ||
162 | { 0, NULL, NULL, 0 } | ||
163 | }; | ||
164 | @@ -1139,7 +1232,6 @@ cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, | ||
165 | static int | ||
166 | bn2crparam(const BIGNUM *a, struct crparam *crp) | ||
167 | { | ||
168 | - int i, j, k; | ||
169 | ssize_t bytes, bits; | ||
170 | u_char *b; | ||
171 | |||
172 | @@ -1156,15 +1248,7 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) | ||
173 | |||
174 | crp->crp_p = (caddr_t) b; | ||
175 | crp->crp_nbits = bits; | ||
176 | - | ||
177 | - for (i = 0, j = 0; i < a->top; i++) { | ||
178 | - for (k = 0; k < BN_BITS2 / 8; k++) { | ||
179 | - if ((j + k) >= bytes) | ||
180 | - return (0); | ||
181 | - b[j + k] = a->d[i] >> (k * 8); | ||
182 | - } | ||
183 | - j += BN_BITS2 / 8; | ||
184 | - } | ||
185 | + BN_bn2bin(a, crp->crp_p); | ||
186 | return (0); | ||
187 | } | ||
188 | |||
189 | @@ -1172,22 +1256,14 @@ bn2crparam(const BIGNUM *a, struct crparam *crp) | ||
190 | static int | ||
191 | crparam2bn(struct crparam *crp, BIGNUM *a) | ||
192 | { | ||
193 | - u_int8_t *pd; | ||
194 | - int i, bytes; | ||
195 | + int bytes; | ||
196 | |||
197 | bytes = (crp->crp_nbits + 7) / 8; | ||
198 | |||
199 | if (bytes == 0) | ||
200 | return (-1); | ||
201 | |||
202 | - if ((pd = (u_int8_t *) malloc(bytes)) == NULL) | ||
203 | - return (-1); | ||
204 | - | ||
205 | - for (i = 0; i < bytes; i++) | ||
206 | - pd[i] = crp->crp_p[bytes - i - 1]; | ||
207 | - | ||
208 | - BN_bin2bn(pd, bytes, a); | ||
209 | - free(pd); | ||
210 | + BN_bin2bn(crp->crp_p, bytes, a); | ||
211 | |||
212 | return (0); | ||
213 | } | ||
214 | @@ -1235,6 +1311,32 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) | ||
215 | return (ret); | ||
216 | } | ||
217 | |||
218 | +/* Close an opened instance of cryptodev engine */ | ||
219 | +void cryptodev_close_instance(void *handle) | ||
220 | +{ | ||
221 | + int fd; | ||
222 | + | ||
223 | + if (handle) { | ||
224 | + fd = *(int *)handle; | ||
225 | + close(fd); | ||
226 | + free(handle); | ||
227 | + } | ||
228 | +} | ||
229 | + | ||
230 | +/* Create an instance of cryptodev for asynchronous interface */ | ||
231 | +void *cryptodev_init_instance(void) | ||
232 | +{ | ||
233 | + int *fd = malloc(sizeof(int)); | ||
234 | + | ||
235 | + if (fd) { | ||
236 | + if ((*fd = open("/dev/crypto", O_RDWR, 0)) == -1) { | ||
237 | + free(fd); | ||
238 | + return NULL; | ||
239 | + } | ||
240 | + } | ||
241 | + return fd; | ||
242 | +} | ||
243 | + | ||
244 | static int | ||
245 | cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
246 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) | ||
247 | @@ -1250,9 +1352,9 @@ cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
248 | return (ret); | ||
249 | } | ||
250 | |||
251 | - memset(&kop, 0, sizeof kop); | ||
252 | kop.crk_op = CRK_MOD_EXP; | ||
253 | - | ||
254 | + kop.crk_oparams = 0; | ||
255 | + kop.crk_status = 0; | ||
256 | /* inputs: a^p % m */ | ||
257 | if (bn2crparam(a, &kop.crk_param[0])) | ||
258 | goto err; | ||
259 | @@ -1293,28 +1395,38 @@ static int | ||
260 | cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) | ||
261 | { | ||
262 | struct crypt_kop kop; | ||
263 | - int ret = 1; | ||
264 | + int ret = 1, f_len, p_len, q_len; | ||
265 | + unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; | ||
266 | |||
267 | if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) { | ||
268 | /* XXX 0 means failure?? */ | ||
269 | return (0); | ||
270 | } | ||
271 | |||
272 | - memset(&kop, 0, sizeof kop); | ||
273 | + kop.crk_oparams = 0; | ||
274 | + kop.crk_status = 0; | ||
275 | kop.crk_op = CRK_MOD_EXP_CRT; | ||
276 | + f_len = BN_num_bytes(rsa->n); | ||
277 | + spcf_bn2bin_ex(I, &f, &f_len); | ||
278 | + spcf_bn2bin(rsa->p, &p, &p_len); | ||
279 | + spcf_bn2bin(rsa->q, &q, &q_len); | ||
280 | + spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); | ||
281 | + spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); | ||
282 | + spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); | ||
283 | /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ | ||
284 | - if (bn2crparam(rsa->p, &kop.crk_param[0])) | ||
285 | - goto err; | ||
286 | - if (bn2crparam(rsa->q, &kop.crk_param[1])) | ||
287 | - goto err; | ||
288 | - if (bn2crparam(I, &kop.crk_param[2])) | ||
289 | - goto err; | ||
290 | - if (bn2crparam(rsa->dmp1, &kop.crk_param[3])) | ||
291 | - goto err; | ||
292 | - if (bn2crparam(rsa->dmq1, &kop.crk_param[4])) | ||
293 | - goto err; | ||
294 | - if (bn2crparam(rsa->iqmp, &kop.crk_param[5])) | ||
295 | - goto err; | ||
296 | + kop.crk_param[0].crp_p = p; | ||
297 | + kop.crk_param[0].crp_nbits = p_len * 8; | ||
298 | + kop.crk_param[1].crp_p = q; | ||
299 | + kop.crk_param[1].crp_nbits = q_len * 8; | ||
300 | + kop.crk_param[2].crp_p = f; | ||
301 | + kop.crk_param[2].crp_nbits = f_len * 8; | ||
302 | + kop.crk_param[3].crp_p = dp; | ||
303 | + kop.crk_param[3].crp_nbits = p_len * 8; | ||
304 | + /* dq must of length q, rest all of length p*/ | ||
305 | + kop.crk_param[4].crp_p = dq; | ||
306 | + kop.crk_param[4].crp_nbits = q_len * 8; | ||
307 | + kop.crk_param[5].crp_p = c; | ||
308 | + kop.crk_param[5].crp_nbits = p_len * 8; | ||
309 | kop.crk_iparams = 6; | ||
310 | |||
311 | if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL)) { | ||
312 | @@ -1350,90 +1462,117 @@ static RSA_METHOD cryptodev_rsa = { | ||
313 | NULL /* rsa_verify */ | ||
314 | }; | ||
315 | |||
316 | -static int | ||
317 | -cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
318 | - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
319 | -{ | ||
320 | - return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); | ||
321 | -} | ||
322 | - | ||
323 | -static int | ||
324 | -cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, | ||
325 | - BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, | ||
326 | - BN_CTX *ctx, BN_MONT_CTX *mont) | ||
327 | +static DSA_SIG * | ||
328 | +cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | ||
329 | { | ||
330 | - BIGNUM t2; | ||
331 | - int ret = 0; | ||
332 | - | ||
333 | - BN_init(&t2); | ||
334 | - | ||
335 | - /* v = ( g^u1 * y^u2 mod p ) mod q */ | ||
336 | - /* let t1 = g ^ u1 mod p */ | ||
337 | - ret = 0; | ||
338 | + struct crypt_kop kop; | ||
339 | + BIGNUM *c = NULL, *d = NULL; | ||
340 | + DSA_SIG *dsaret = NULL; | ||
341 | + int q_len = 0, r_len = 0, g_len = 0; | ||
342 | + int priv_key_len = 0, ret; | ||
343 | + unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; | ||
344 | |||
345 | - if (!dsa->meth->bn_mod_exp(dsa,t1,dsa->g,u1,dsa->p,ctx,mont)) | ||
346 | + memset(&kop, 0, sizeof kop); | ||
347 | + if ((c = BN_new()) == NULL) { | ||
348 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
349 | goto err; | ||
350 | + } | ||
351 | |||
352 | - /* let t2 = y ^ u2 mod p */ | ||
353 | - if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) | ||
354 | + if ((d = BN_new()) == NULL) { | ||
355 | + BN_free(c); | ||
356 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
357 | goto err; | ||
358 | - /* let u1 = t1 * t2 mod p */ | ||
359 | - if (!BN_mod_mul(u1,t1,&t2,dsa->p,ctx)) | ||
360 | + } | ||
361 | + | ||
362 | + if (spcf_bn2bin(dsa->p, &q, &q_len)) { | ||
363 | + DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | ||
364 | goto err; | ||
365 | + } | ||
366 | |||
367 | - BN_copy(t1,u1); | ||
368 | + /* Get order of the field of private keys into plain buffer */ | ||
369 | + if (spcf_bn2bin (dsa->q, &r, &r_len)) { | ||
370 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
371 | + goto err; | ||
372 | + } | ||
373 | |||
374 | - ret = 1; | ||
375 | -err: | ||
376 | - BN_free(&t2); | ||
377 | - return(ret); | ||
378 | -} | ||
379 | + /* sanity test */ | ||
380 | + if (dlen > r_len) { | ||
381 | + DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | ||
382 | + goto err; | ||
383 | + } | ||
384 | |||
385 | -static DSA_SIG * | ||
386 | -cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | ||
387 | -{ | ||
388 | - struct crypt_kop kop; | ||
389 | - BIGNUM *r = NULL, *s = NULL; | ||
390 | - DSA_SIG *dsaret = NULL; | ||
391 | + g_len = q_len; | ||
392 | + /** | ||
393 | + * Get generator into a plain buffer. If length is less than | ||
394 | + * q_len then add leading padding bytes. | ||
395 | + */ | ||
396 | + if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { | ||
397 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
398 | + goto err; | ||
399 | + } | ||
400 | |||
401 | - if ((r = BN_new()) == NULL) | ||
402 | + priv_key_len = r_len; | ||
403 | + /** | ||
404 | + * Get private key into a plain buffer. If length is less than | ||
405 | + * r_len then add leading padding bytes. | ||
406 | + */ | ||
407 | + if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { | ||
408 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
409 | goto err; | ||
410 | - if ((s = BN_new()) == NULL) { | ||
411 | - BN_free(r); | ||
412 | + } | ||
413 | + | ||
414 | + /* Allocate memory to store hash. */ | ||
415 | + f = OPENSSL_malloc (r_len); | ||
416 | + if (!f) { | ||
417 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
418 | goto err; | ||
419 | } | ||
420 | |||
421 | - memset(&kop, 0, sizeof kop); | ||
422 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
423 | + if (dlen < r_len) | ||
424 | + memset(f, 0, r_len - dlen); | ||
425 | + | ||
426 | + /* Skip leading bytes if dgst_len < r_len */ | ||
427 | + memcpy(f + r_len - dlen, dgst, dlen); | ||
428 | + | ||
429 | kop.crk_op = CRK_DSA_SIGN; | ||
430 | |||
431 | /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
432 | - kop.crk_param[0].crp_p = (caddr_t)dgst; | ||
433 | - kop.crk_param[0].crp_nbits = dlen * 8; | ||
434 | - if (bn2crparam(dsa->p, &kop.crk_param[1])) | ||
435 | - goto err; | ||
436 | - if (bn2crparam(dsa->q, &kop.crk_param[2])) | ||
437 | - goto err; | ||
438 | - if (bn2crparam(dsa->g, &kop.crk_param[3])) | ||
439 | - goto err; | ||
440 | - if (bn2crparam(dsa->priv_key, &kop.crk_param[4])) | ||
441 | - goto err; | ||
442 | + kop.crk_param[0].crp_p = (void*)f; | ||
443 | + kop.crk_param[0].crp_nbits = r_len * 8; | ||
444 | + kop.crk_param[1].crp_p = (void*)q; | ||
445 | + kop.crk_param[1].crp_nbits = q_len * 8; | ||
446 | + kop.crk_param[2].crp_p = (void*)r; | ||
447 | + kop.crk_param[2].crp_nbits = r_len * 8; | ||
448 | + kop.crk_param[3].crp_p = (void*)g; | ||
449 | + kop.crk_param[3].crp_nbits = g_len * 8; | ||
450 | + kop.crk_param[4].crp_p = (void*)priv_key; | ||
451 | + kop.crk_param[4].crp_nbits = priv_key_len * 8; | ||
452 | kop.crk_iparams = 5; | ||
453 | |||
454 | - if (cryptodev_asym(&kop, BN_num_bytes(dsa->q), r, | ||
455 | - BN_num_bytes(dsa->q), s) == 0) { | ||
456 | - dsaret = DSA_SIG_new(); | ||
457 | - dsaret->r = r; | ||
458 | - dsaret->s = s; | ||
459 | - } else { | ||
460 | - const DSA_METHOD *meth = DSA_OpenSSL(); | ||
461 | - BN_free(r); | ||
462 | - BN_free(s); | ||
463 | - dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); | ||
464 | + ret = cryptodev_asym(&kop, r_len, c, r_len, d); | ||
465 | + | ||
466 | + if (ret) { | ||
467 | + DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DECODE_ERROR); | ||
468 | + goto err; | ||
469 | } | ||
470 | -err: | ||
471 | - kop.crk_param[0].crp_p = NULL; | ||
472 | + | ||
473 | + dsaret = DSA_SIG_new(); | ||
474 | + dsaret->r = c; | ||
475 | + dsaret->s = d; | ||
476 | + | ||
477 | zapparams(&kop); | ||
478 | return (dsaret); | ||
479 | +err: | ||
480 | + { | ||
481 | + const DSA_METHOD *meth = DSA_OpenSSL(); | ||
482 | + if (c) | ||
483 | + BN_free(c); | ||
484 | + if (d) | ||
485 | + BN_free(d); | ||
486 | + dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); | ||
487 | + return (dsaret); | ||
488 | + } | ||
489 | } | ||
490 | |||
491 | static int | ||
492 | @@ -1441,42 +1580,179 @@ cryptodev_dsa_verify(const unsigned char *dgst, int dlen, | ||
493 | DSA_SIG *sig, DSA *dsa) | ||
494 | { | ||
495 | struct crypt_kop kop; | ||
496 | - int dsaret = 1; | ||
497 | + int dsaret = 1, q_len = 0, r_len = 0, g_len = 0; | ||
498 | + int w_len = 0 ,c_len = 0, d_len = 0, ret = -1; | ||
499 | + unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; | ||
500 | + unsigned char * c = NULL, * d = NULL, *f = NULL; | ||
501 | |||
502 | memset(&kop, 0, sizeof kop); | ||
503 | kop.crk_op = CRK_DSA_VERIFY; | ||
504 | |||
505 | - /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ | ||
506 | - kop.crk_param[0].crp_p = (caddr_t)dgst; | ||
507 | - kop.crk_param[0].crp_nbits = dlen * 8; | ||
508 | - if (bn2crparam(dsa->p, &kop.crk_param[1])) | ||
509 | + if (spcf_bn2bin(dsa->p, &q, &q_len)) { | ||
510 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
511 | + return ret; | ||
512 | + } | ||
513 | + | ||
514 | + /* Get Order of field of private keys */ | ||
515 | + if (spcf_bn2bin(dsa->q, &r, &r_len)) { | ||
516 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
517 | goto err; | ||
518 | - if (bn2crparam(dsa->q, &kop.crk_param[2])) | ||
519 | + } | ||
520 | + | ||
521 | + g_len = q_len; | ||
522 | + /** | ||
523 | + * Get generator into a plain buffer. If length is less than | ||
524 | + * q_len then add leading padding bytes. | ||
525 | + */ | ||
526 | + if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { | ||
527 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
528 | goto err; | ||
529 | - if (bn2crparam(dsa->g, &kop.crk_param[3])) | ||
530 | + } | ||
531 | + w_len = q_len; | ||
532 | + /** | ||
533 | + * Get public key into a plain buffer. If length is less than | ||
534 | + * q_len then add leading padding bytes. | ||
535 | + */ | ||
536 | + if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { | ||
537 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
538 | + goto err; | ||
539 | + } | ||
540 | + /** | ||
541 | + * Get the 1st part of signature into a flat buffer with | ||
542 | + * appropriate padding | ||
543 | + */ | ||
544 | + c_len = r_len; | ||
545 | + | ||
546 | + if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { | ||
547 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
548 | goto err; | ||
549 | - if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) | ||
550 | + } | ||
551 | + | ||
552 | + /** | ||
553 | + * Get the 2nd part of signature into a flat buffer with | ||
554 | + * appropriate padding | ||
555 | + */ | ||
556 | + d_len = r_len; | ||
557 | + | ||
558 | + if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { | ||
559 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
560 | goto err; | ||
561 | - if (bn2crparam(sig->r, &kop.crk_param[5])) | ||
562 | + } | ||
563 | + | ||
564 | + | ||
565 | + /* Sanity test */ | ||
566 | + if (dlen > r_len) { | ||
567 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
568 | goto err; | ||
569 | - if (bn2crparam(sig->s, &kop.crk_param[6])) | ||
570 | + } | ||
571 | + | ||
572 | + /* Allocate memory to store hash. */ | ||
573 | + f = OPENSSL_malloc (r_len); | ||
574 | + if (!f) { | ||
575 | + DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
576 | goto err; | ||
577 | + } | ||
578 | + | ||
579 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
580 | + if (dlen < r_len) | ||
581 | + memset(f, 0, r_len - dlen); | ||
582 | + | ||
583 | + /* Skip leading bytes if dgst_len < r_len */ | ||
584 | + memcpy(f + r_len - dlen, dgst, dlen); | ||
585 | + | ||
586 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ | ||
587 | + kop.crk_param[0].crp_p = (void*)f; | ||
588 | + kop.crk_param[0].crp_nbits = r_len * 8; | ||
589 | + kop.crk_param[1].crp_p = q; | ||
590 | + kop.crk_param[1].crp_nbits = q_len * 8; | ||
591 | + kop.crk_param[2].crp_p = r; | ||
592 | + kop.crk_param[2].crp_nbits = r_len * 8; | ||
593 | + kop.crk_param[3].crp_p = g; | ||
594 | + kop.crk_param[3].crp_nbits = g_len * 8; | ||
595 | + kop.crk_param[4].crp_p = w; | ||
596 | + kop.crk_param[4].crp_nbits = w_len * 8; | ||
597 | + kop.crk_param[5].crp_p = c; | ||
598 | + kop.crk_param[5].crp_nbits = c_len * 8; | ||
599 | + kop.crk_param[6].crp_p = d; | ||
600 | + kop.crk_param[6].crp_nbits = d_len * 8; | ||
601 | kop.crk_iparams = 7; | ||
602 | |||
603 | - if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { | ||
604 | -/*OCF success value is 0, if not zero, change dsaret to fail*/ | ||
605 | - if(0 != kop.crk_status) dsaret = 0; | ||
606 | - } else { | ||
607 | - const DSA_METHOD *meth = DSA_OpenSSL(); | ||
608 | + if ((cryptodev_asym(&kop, 0, NULL, 0, NULL))) { | ||
609 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); | ||
610 | + goto err; | ||
611 | + } | ||
612 | |||
613 | - dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); | ||
614 | + /*OCF success value is 0, if not zero, change dsaret to fail*/ | ||
615 | + if(0 != kop.crk_status) { | ||
616 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, DSA_R_DECODE_ERROR); | ||
617 | + goto err; | ||
618 | } | ||
619 | -err: | ||
620 | - kop.crk_param[0].crp_p = NULL; | ||
621 | + | ||
622 | zapparams(&kop); | ||
623 | return (dsaret); | ||
624 | +err: | ||
625 | + { | ||
626 | + const DSA_METHOD *meth = DSA_OpenSSL(); | ||
627 | + | ||
628 | + dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); | ||
629 | + } | ||
630 | + return dsaret; | ||
631 | } | ||
632 | |||
633 | +/* Cryptodev DSA Key Gen routine */ | ||
634 | +static int cryptodev_dsa_keygen(DSA *dsa) | ||
635 | +{ | ||
636 | + struct crypt_kop kop; | ||
637 | + int ret = 1, g_len; | ||
638 | + unsigned char *g = NULL; | ||
639 | + | ||
640 | + if (dsa->priv_key == NULL) { | ||
641 | + if ((dsa->priv_key=BN_new()) == NULL) | ||
642 | + goto sw_try; | ||
643 | + } | ||
644 | + | ||
645 | + if (dsa->pub_key == NULL) { | ||
646 | + if ((dsa->pub_key=BN_new()) == NULL) | ||
647 | + goto sw_try; | ||
648 | + } | ||
649 | + | ||
650 | + g_len = BN_num_bytes(dsa->p); | ||
651 | + /** | ||
652 | + * Get generator into a plain buffer. If length is less than | ||
653 | + * p_len then add leading padding bytes. | ||
654 | + */ | ||
655 | + if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { | ||
656 | + DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
657 | + goto sw_try; | ||
658 | + } | ||
659 | + | ||
660 | + memset(&kop, 0, sizeof kop); | ||
661 | + | ||
662 | + kop.crk_op = CRK_DSA_GENERATE_KEY; | ||
663 | + if (bn2crparam(dsa->p, &kop.crk_param[0])) | ||
664 | + goto sw_try; | ||
665 | + if (bn2crparam(dsa->q, &kop.crk_param[1])) | ||
666 | + goto sw_try; | ||
667 | + kop.crk_param[2].crp_p = g; | ||
668 | + kop.crk_param[2].crp_nbits = g_len * 8; | ||
669 | + kop.crk_iparams = 3; | ||
670 | + | ||
671 | + /* pub_key is or prime length while priv key is of length of order */ | ||
672 | + if (cryptodev_asym(&kop, BN_num_bytes(dsa->p), dsa->pub_key, | ||
673 | + BN_num_bytes(dsa->q), dsa->priv_key)) | ||
674 | + goto sw_try; | ||
675 | + | ||
676 | + return ret; | ||
677 | +sw_try: | ||
678 | + { | ||
679 | + const DSA_METHOD *meth = DSA_OpenSSL(); | ||
680 | + ret = (meth->dsa_keygen)(dsa); | ||
681 | + } | ||
682 | + return ret; | ||
683 | +} | ||
684 | + | ||
685 | + | ||
686 | + | ||
687 | static DSA_METHOD cryptodev_dsa = { | ||
688 | "cryptodev DSA method", | ||
689 | NULL, | ||
690 | @@ -1490,12 +1766,543 @@ static DSA_METHOD cryptodev_dsa = { | ||
691 | NULL /* app_data */ | ||
692 | }; | ||
693 | |||
694 | -static int | ||
695 | -cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, | ||
696 | - const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
697 | - BN_MONT_CTX *m_ctx) | ||
698 | +static ECDSA_METHOD cryptodev_ecdsa = { | ||
699 | + "cryptodev ECDSA method", | ||
700 | + NULL, | ||
701 | + NULL, /* ecdsa_sign_setup */ | ||
702 | + NULL, | ||
703 | + NULL, | ||
704 | + 0, /* flags */ | ||
705 | + NULL /* app_data */ | ||
706 | +}; | ||
707 | + | ||
708 | +typedef enum ec_curve_s | ||
709 | +{ | ||
710 | + EC_PRIME, | ||
711 | + EC_BINARY | ||
712 | +} ec_curve_t; | ||
713 | + | ||
714 | +/* ENGINE handler for ECDSA Sign */ | ||
715 | +static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, | ||
716 | + int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) | ||
717 | { | ||
718 | - return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); | ||
719 | + BIGNUM *m = NULL, *p = NULL, *a = NULL; | ||
720 | + BIGNUM *b = NULL, *x = NULL, *y = NULL; | ||
721 | + BN_CTX *ctx = NULL; | ||
722 | + ECDSA_SIG *ret = NULL; | ||
723 | + ECDSA_DATA *ecdsa = NULL; | ||
724 | + unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; | ||
725 | + unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; | ||
726 | + int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; | ||
727 | + int g_len = 0, d_len = 0, ab_len = 0; | ||
728 | + const BIGNUM *order = NULL, *priv_key=NULL; | ||
729 | + const EC_GROUP *group = NULL; | ||
730 | + struct crypt_kop kop; | ||
731 | + ec_curve_t ec_crv = EC_PRIME; | ||
732 | + | ||
733 | + memset(&kop, 0, sizeof(kop)); | ||
734 | + ecdsa = ecdsa_check(eckey); | ||
735 | + if (!ecdsa) { | ||
736 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
737 | + return NULL; | ||
738 | + } | ||
739 | + | ||
740 | + group = EC_KEY_get0_group(eckey); | ||
741 | + priv_key = EC_KEY_get0_private_key(eckey); | ||
742 | + | ||
743 | + if (!group || !priv_key) { | ||
744 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
745 | + return NULL; | ||
746 | + } | ||
747 | + | ||
748 | + if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || | ||
749 | + (a = BN_new()) == NULL || (b = BN_new()) == NULL || | ||
750 | + (p = BN_new()) == NULL || (x = BN_new()) == NULL || | ||
751 | + (y = BN_new()) == NULL) { | ||
752 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
753 | + goto err; | ||
754 | + } | ||
755 | + | ||
756 | + order = &group->order; | ||
757 | + if (!order || BN_is_zero(order)) { | ||
758 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); | ||
759 | + goto err; | ||
760 | + } | ||
761 | + | ||
762 | + i = BN_num_bits(order); | ||
763 | + /* Need to truncate digest if it is too long: first truncate whole | ||
764 | + bytes */ | ||
765 | + if (8 * dgst_len > i) | ||
766 | + dgst_len = (i + 7)/8; | ||
767 | + | ||
768 | + if (!BN_bin2bn(dgst, dgst_len, m)) { | ||
769 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
770 | + goto err; | ||
771 | + } | ||
772 | + | ||
773 | + /* If still too long truncate remaining bits with a shift */ | ||
774 | + if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { | ||
775 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
776 | + goto err; | ||
777 | + } | ||
778 | + | ||
779 | + /* copy the truncated bits into plain buffer */ | ||
780 | + if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { | ||
781 | + fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); | ||
782 | + goto err; | ||
783 | + } | ||
784 | + | ||
785 | + ret = ECDSA_SIG_new(); | ||
786 | + if (!ret) { | ||
787 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
788 | + goto err; | ||
789 | + } | ||
790 | + | ||
791 | + /* check if this is prime or binary EC request */ | ||
792 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { | ||
793 | + ec_crv = EC_PRIME; | ||
794 | + /* get the generator point pair */ | ||
795 | + if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), | ||
796 | + x, y,ctx)) { | ||
797 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
798 | + goto err; | ||
799 | + } | ||
800 | + | ||
801 | + /* get the ECC curve parameters */ | ||
802 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { | ||
803 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
804 | + goto err; | ||
805 | + } | ||
806 | + } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { | ||
807 | + ec_crv = EC_BINARY; | ||
808 | + /* get the ECC curve parameters */ | ||
809 | + if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { | ||
810 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
811 | + goto err; | ||
812 | + } | ||
813 | + | ||
814 | + /* get the generator point pair */ | ||
815 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
816 | + EC_GROUP_get0_generator(group), x, y,ctx)) { | ||
817 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
818 | + goto err; | ||
819 | + } | ||
820 | + } else { | ||
821 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
822 | + goto err; | ||
823 | + } | ||
824 | + | ||
825 | + if (spcf_bn2bin(order, &r, &r_len)) { | ||
826 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
827 | + goto err; | ||
828 | + } | ||
829 | + | ||
830 | + if (spcf_bn2bin(p, &q, &q_len)) { | ||
831 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
832 | + goto err; | ||
833 | + } | ||
834 | + | ||
835 | + priv_key_len = r_len; | ||
836 | + | ||
837 | + /** | ||
838 | + * If BN_num_bytes of priv_key returns less then r_len then | ||
839 | + * add padding bytes before the key | ||
840 | + */ | ||
841 | + if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { | ||
842 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
843 | + goto err; | ||
844 | + } | ||
845 | + | ||
846 | + /* Generation of ECC curve parameters */ | ||
847 | + ab_len = 2*q_len; | ||
848 | + ab = eng_copy_curve_points(a, b, ab_len, q_len); | ||
849 | + if (!ab) { | ||
850 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
851 | + goto err; | ||
852 | + } | ||
853 | + | ||
854 | + if (ec_crv == EC_BINARY) { | ||
855 | + if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) | ||
856 | + { | ||
857 | + unsigned char *c_temp = NULL; | ||
858 | + int c_temp_len = q_len; | ||
859 | + if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) | ||
860 | + memcpy(ab+q_len, c_temp, q_len); | ||
861 | + else | ||
862 | + goto err; | ||
863 | + } | ||
864 | + kop.curve_type = ECC_BINARY; | ||
865 | + } | ||
866 | + | ||
867 | + /* Calculation of Generator point */ | ||
868 | + g_len = 2*q_len; | ||
869 | + g_xy = eng_copy_curve_points(x, y, g_len, q_len); | ||
870 | + if (!g_xy) { | ||
871 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
872 | + goto err; | ||
873 | + } | ||
874 | + | ||
875 | + /* Memory allocation for first part of digital signature */ | ||
876 | + c = malloc(r_len); | ||
877 | + if (!c) { | ||
878 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
879 | + goto err; | ||
880 | + } | ||
881 | + | ||
882 | + d_len = r_len; | ||
883 | + | ||
884 | + /* Memory allocation for second part of digital signature */ | ||
885 | + d = malloc(d_len); | ||
886 | + if (!d) { | ||
887 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
888 | + goto err; | ||
889 | + } | ||
890 | + | ||
891 | + /* memory for message representative */ | ||
892 | + f = malloc(r_len); | ||
893 | + if (!f) { | ||
894 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
895 | + goto err; | ||
896 | + } | ||
897 | + | ||
898 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
899 | + memset(f, 0, r_len - dgst_len); | ||
900 | + | ||
901 | + /* Skip leading bytes if dgst_len < r_len */ | ||
902 | + memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); | ||
903 | + | ||
904 | + dgst_len += r_len - dgst_len; | ||
905 | + kop.crk_op = CRK_DSA_SIGN; | ||
906 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
907 | + kop.crk_param[0].crp_p = f; | ||
908 | + kop.crk_param[0].crp_nbits = dgst_len * 8; | ||
909 | + kop.crk_param[1].crp_p = q; | ||
910 | + kop.crk_param[1].crp_nbits = q_len * 8; | ||
911 | + kop.crk_param[2].crp_p = r; | ||
912 | + kop.crk_param[2].crp_nbits = r_len * 8; | ||
913 | + kop.crk_param[3].crp_p = g_xy; | ||
914 | + kop.crk_param[3].crp_nbits = g_len * 8; | ||
915 | + kop.crk_param[4].crp_p = s; | ||
916 | + kop.crk_param[4].crp_nbits = priv_key_len * 8; | ||
917 | + kop.crk_param[5].crp_p = ab; | ||
918 | + kop.crk_param[5].crp_nbits = ab_len * 8; | ||
919 | + kop.crk_iparams = 6; | ||
920 | + kop.crk_param[6].crp_p = c; | ||
921 | + kop.crk_param[6].crp_nbits = d_len * 8; | ||
922 | + kop.crk_param[7].crp_p = d; | ||
923 | + kop.crk_param[7].crp_nbits = d_len * 8; | ||
924 | + kop.crk_oparams = 2; | ||
925 | + | ||
926 | + if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { | ||
927 | + /* Check if ret->r and s needs to allocated */ | ||
928 | + crparam2bn(&kop.crk_param[6], ret->r); | ||
929 | + crparam2bn(&kop.crk_param[7], ret->s); | ||
930 | + } else { | ||
931 | + const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
932 | + ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); | ||
933 | + } | ||
934 | + kop.crk_param[0].crp_p = NULL; | ||
935 | + zapparams(&kop); | ||
936 | +err: | ||
937 | + if (!ret) { | ||
938 | + ECDSA_SIG_free(ret); | ||
939 | + ret = NULL; | ||
940 | + } | ||
941 | + return ret; | ||
942 | +} | ||
943 | + | ||
944 | +static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, | ||
945 | + ECDSA_SIG *sig, EC_KEY *eckey) | ||
946 | +{ | ||
947 | + BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; | ||
948 | + BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; | ||
949 | + BN_CTX *ctx = NULL; | ||
950 | + ECDSA_DATA *ecdsa = NULL; | ||
951 | + unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; | ||
952 | + unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; | ||
953 | + int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; | ||
954 | + int d_len = 0, ab_len = 0, ret = -1; | ||
955 | + const EC_POINT *pub_key = NULL; | ||
956 | + const BIGNUM *order = NULL; | ||
957 | + const EC_GROUP *group=NULL; | ||
958 | + ec_curve_t ec_crv = EC_PRIME; | ||
959 | + struct crypt_kop kop; | ||
960 | + | ||
961 | + memset(&kop, 0, sizeof kop); | ||
962 | + ecdsa = ecdsa_check(eckey); | ||
963 | + if (!ecdsa) { | ||
964 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); | ||
965 | + return ret; | ||
966 | + } | ||
967 | + | ||
968 | + group = EC_KEY_get0_group(eckey); | ||
969 | + pub_key = EC_KEY_get0_public_key(eckey); | ||
970 | + | ||
971 | + if (!group || !pub_key) { | ||
972 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); | ||
973 | + return ret; | ||
974 | + } | ||
975 | + | ||
976 | + if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || | ||
977 | + (a = BN_new()) == NULL || (b = BN_new()) == NULL || | ||
978 | + (p = BN_new()) == NULL || (x = BN_new()) == NULL || | ||
979 | + (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || | ||
980 | + (w_y = BN_new()) == NULL) { | ||
981 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
982 | + goto err; | ||
983 | + } | ||
984 | + | ||
985 | + order = &group->order; | ||
986 | + if (!order || BN_is_zero(order)) { | ||
987 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); | ||
988 | + goto err; | ||
989 | + } | ||
990 | + | ||
991 | + i = BN_num_bits(order); | ||
992 | + /* Need to truncate digest if it is too long: first truncate whole | ||
993 | + * bytes */ | ||
994 | + if (8 * dgst_len > i) | ||
995 | + dgst_len = (i + 7)/8; | ||
996 | + | ||
997 | + if (!BN_bin2bn(dgst, dgst_len, m)) { | ||
998 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); | ||
999 | + goto err; | ||
1000 | + } | ||
1001 | + | ||
1002 | + /* If still too long truncate remaining bits with a shift */ | ||
1003 | + if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { | ||
1004 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); | ||
1005 | + goto err; | ||
1006 | + } | ||
1007 | + /* copy the truncated bits into plain buffer */ | ||
1008 | + if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { | ||
1009 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1010 | + goto err; | ||
1011 | + } | ||
1012 | + | ||
1013 | + /* check if this is prime or binary EC request */ | ||
1014 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { | ||
1015 | + ec_crv = EC_PRIME; | ||
1016 | + | ||
1017 | + /* get the generator point pair */ | ||
1018 | + if (!EC_POINT_get_affine_coordinates_GFp (group, | ||
1019 | + EC_GROUP_get0_generator(group), x, y,ctx)) { | ||
1020 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1021 | + goto err; | ||
1022 | + } | ||
1023 | + | ||
1024 | + /* get the public key pair for prime curve */ | ||
1025 | + if (!EC_POINT_get_affine_coordinates_GFp (group, | ||
1026 | + pub_key, w_x, w_y,ctx)) { | ||
1027 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1028 | + goto err; | ||
1029 | + } | ||
1030 | + | ||
1031 | + /* get the ECC curve parameters */ | ||
1032 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { | ||
1033 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1034 | + goto err; | ||
1035 | + } | ||
1036 | + } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ | ||
1037 | + ec_crv = EC_BINARY; | ||
1038 | + /* get the ECC curve parameters */ | ||
1039 | + if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { | ||
1040 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1041 | + goto err; | ||
1042 | + } | ||
1043 | + | ||
1044 | + /* get the generator point pair */ | ||
1045 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1046 | + EC_GROUP_get0_generator(group),x, y,ctx)) { | ||
1047 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1048 | + goto err; | ||
1049 | + } | ||
1050 | + | ||
1051 | + /* get the public key pair for binary curve */ | ||
1052 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1053 | + pub_key, w_x, w_y,ctx)) { | ||
1054 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1055 | + goto err; | ||
1056 | + } | ||
1057 | + }else { | ||
1058 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1059 | + goto err; | ||
1060 | + } | ||
1061 | + | ||
1062 | + /* Get the order of the subgroup of private keys */ | ||
1063 | + if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { | ||
1064 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1065 | + goto err; | ||
1066 | + } | ||
1067 | + | ||
1068 | + /* Get the irreducible polynomial that creates the field */ | ||
1069 | + if (spcf_bn2bin(p, &q, &q_len)) { | ||
1070 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1071 | + goto err; | ||
1072 | + } | ||
1073 | + | ||
1074 | + /* Get the public key into a flat buffer with appropriate padding */ | ||
1075 | + pub_key_len = 2 * q_len; | ||
1076 | + | ||
1077 | + w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); | ||
1078 | + if (!w_xy) { | ||
1079 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1080 | + goto err; | ||
1081 | + } | ||
1082 | + | ||
1083 | + /* Generation of ECC curve parameters */ | ||
1084 | + ab_len = 2*q_len; | ||
1085 | + | ||
1086 | + ab = eng_copy_curve_points (a, b, ab_len, q_len); | ||
1087 | + if (!ab) { | ||
1088 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1089 | + goto err; | ||
1090 | + } | ||
1091 | + | ||
1092 | + if (ec_crv == EC_BINARY) { | ||
1093 | + /* copy b' i.e c(b), instead of only b */ | ||
1094 | + if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) | ||
1095 | + { | ||
1096 | + unsigned char *c_temp = NULL; | ||
1097 | + int c_temp_len = q_len; | ||
1098 | + if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) | ||
1099 | + memcpy(ab+q_len, c_temp, q_len); | ||
1100 | + else | ||
1101 | + goto err; | ||
1102 | + } | ||
1103 | + kop.curve_type = ECC_BINARY; | ||
1104 | + } | ||
1105 | + | ||
1106 | + /* Calculation of Generator point */ | ||
1107 | + g_len = 2 * q_len; | ||
1108 | + | ||
1109 | + g_xy = eng_copy_curve_points (x, y, g_len, q_len); | ||
1110 | + if (!g_xy) { | ||
1111 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1112 | + goto err; | ||
1113 | + } | ||
1114 | + | ||
1115 | + /** | ||
1116 | + * Get the 1st part of signature into a flat buffer with | ||
1117 | + * appropriate padding | ||
1118 | + */ | ||
1119 | + if (BN_num_bytes(sig->r) < r_len) | ||
1120 | + c_len = r_len; | ||
1121 | + | ||
1122 | + if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { | ||
1123 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1124 | + goto err; | ||
1125 | + } | ||
1126 | + | ||
1127 | + /** | ||
1128 | + * Get the 2nd part of signature into a flat buffer with | ||
1129 | + * appropriate padding | ||
1130 | + */ | ||
1131 | + if (BN_num_bytes(sig->s) < r_len) | ||
1132 | + d_len = r_len; | ||
1133 | + | ||
1134 | + if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { | ||
1135 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1136 | + goto err; | ||
1137 | + } | ||
1138 | + | ||
1139 | + /* memory for message representative */ | ||
1140 | + f = malloc(r_len); | ||
1141 | + if (!f) { | ||
1142 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1143 | + goto err; | ||
1144 | + } | ||
1145 | + | ||
1146 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
1147 | + memset(f, 0, r_len-dgst_len); | ||
1148 | + | ||
1149 | + /* Skip leading bytes if dgst_len < r_len */ | ||
1150 | + memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); | ||
1151 | + dgst_len += r_len-dgst_len; | ||
1152 | + kop.crk_op = CRK_DSA_VERIFY; | ||
1153 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
1154 | + kop.crk_param[0].crp_p = f; | ||
1155 | + kop.crk_param[0].crp_nbits = dgst_len * 8; | ||
1156 | + kop.crk_param[1].crp_p = q; | ||
1157 | + kop.crk_param[1].crp_nbits = q_len * 8; | ||
1158 | + kop.crk_param[2].crp_p = r; | ||
1159 | + kop.crk_param[2].crp_nbits = r_len * 8; | ||
1160 | + kop.crk_param[3].crp_p = g_xy; | ||
1161 | + kop.crk_param[3].crp_nbits = g_len * 8; | ||
1162 | + kop.crk_param[4].crp_p = w_xy; | ||
1163 | + kop.crk_param[4].crp_nbits = pub_key_len * 8; | ||
1164 | + kop.crk_param[5].crp_p = ab; | ||
1165 | + kop.crk_param[5].crp_nbits = ab_len * 8; | ||
1166 | + kop.crk_param[6].crp_p = c; | ||
1167 | + kop.crk_param[6].crp_nbits = d_len * 8; | ||
1168 | + kop.crk_param[7].crp_p = d; | ||
1169 | + kop.crk_param[7].crp_nbits = d_len * 8; | ||
1170 | + kop.crk_iparams = 8; | ||
1171 | + | ||
1172 | + if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { | ||
1173 | + /*OCF success value is 0, if not zero, change ret to fail*/ | ||
1174 | + if(0 == kop.crk_status) | ||
1175 | + ret = 1; | ||
1176 | + } else { | ||
1177 | + const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
1178 | + | ||
1179 | + ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); | ||
1180 | + } | ||
1181 | + kop.crk_param[0].crp_p = NULL; | ||
1182 | + zapparams(&kop); | ||
1183 | + | ||
1184 | +err: | ||
1185 | + return ret; | ||
1186 | +} | ||
1187 | + | ||
1188 | +static int cryptodev_dh_keygen(DH *dh) | ||
1189 | +{ | ||
1190 | + struct crypt_kop kop; | ||
1191 | + int ret = 1, g_len; | ||
1192 | + unsigned char *g = NULL; | ||
1193 | + | ||
1194 | + if (dh->priv_key == NULL) { | ||
1195 | + if ((dh->priv_key=BN_new()) == NULL) | ||
1196 | + goto sw_try; | ||
1197 | + } | ||
1198 | + | ||
1199 | + if (dh->pub_key == NULL) { | ||
1200 | + if ((dh->pub_key=BN_new()) == NULL) | ||
1201 | + goto sw_try; | ||
1202 | + } | ||
1203 | + | ||
1204 | + g_len = BN_num_bytes(dh->p); | ||
1205 | + /** | ||
1206 | + * Get generator into a plain buffer. If length is less than | ||
1207 | + * q_len then add leading padding bytes. | ||
1208 | + */ | ||
1209 | + if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { | ||
1210 | + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
1211 | + goto sw_try; | ||
1212 | + } | ||
1213 | + | ||
1214 | + memset(&kop, 0, sizeof kop); | ||
1215 | + kop.crk_op = CRK_DH_GENERATE_KEY; | ||
1216 | + if (bn2crparam(dh->p, &kop.crk_param[0])) | ||
1217 | + goto sw_try; | ||
1218 | + if (bn2crparam(dh->q, &kop.crk_param[1])) | ||
1219 | + goto sw_try; | ||
1220 | + kop.crk_param[2].crp_p = g; | ||
1221 | + kop.crk_param[2].crp_nbits = g_len * 8; | ||
1222 | + kop.crk_iparams = 3; | ||
1223 | + | ||
1224 | + /* pub_key is or prime length while priv key is of length of order */ | ||
1225 | + if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, | ||
1226 | + BN_num_bytes(dh->q), dh->priv_key)) | ||
1227 | + goto sw_try; | ||
1228 | + | ||
1229 | + return ret; | ||
1230 | +sw_try: | ||
1231 | + { | ||
1232 | + const DH_METHOD *meth = DH_OpenSSL(); | ||
1233 | + ret = (meth->generate_key)(dh); | ||
1234 | + } | ||
1235 | + return ret; | ||
1236 | } | ||
1237 | |||
1238 | static int | ||
1239 | @@ -1503,43 +2310,234 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) | ||
1240 | { | ||
1241 | struct crypt_kop kop; | ||
1242 | int dhret = 1; | ||
1243 | - int fd, keylen; | ||
1244 | + int fd, p_len; | ||
1245 | + BIGNUM *temp = NULL; | ||
1246 | + unsigned char *padded_pub_key = NULL, *p = NULL; | ||
1247 | + | ||
1248 | + if ((fd = get_asym_dev_crypto()) < 0) | ||
1249 | + goto sw_try; | ||
1250 | + | ||
1251 | + memset(&kop, 0, sizeof kop); | ||
1252 | + kop.crk_op = CRK_DH_COMPUTE_KEY; | ||
1253 | + /* inputs: dh->priv_key pub_key dh->p key */ | ||
1254 | + spcf_bn2bin(dh->p, &p, &p_len); | ||
1255 | + spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); | ||
1256 | + if (bn2crparam(dh->priv_key, &kop.crk_param[0])) | ||
1257 | + goto sw_try; | ||
1258 | + | ||
1259 | + kop.crk_param[1].crp_p = padded_pub_key; | ||
1260 | + kop.crk_param[1].crp_nbits = p_len * 8; | ||
1261 | + kop.crk_param[2].crp_p = p; | ||
1262 | + kop.crk_param[2].crp_nbits = p_len * 8; | ||
1263 | + kop.crk_iparams = 3; | ||
1264 | + kop.crk_param[3].crp_p = (void*) key; | ||
1265 | + kop.crk_param[3].crp_nbits = p_len * 8; | ||
1266 | + kop.crk_oparams = 1; | ||
1267 | + dhret = p_len; | ||
1268 | + | ||
1269 | + if (ioctl(fd, CIOCKEY, &kop)) | ||
1270 | + goto sw_try; | ||
1271 | |||
1272 | - if ((fd = get_asym_dev_crypto()) < 0) { | ||
1273 | + if ((temp = BN_new())) { | ||
1274 | + if (!BN_bin2bn(key, p_len, temp)) { | ||
1275 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
1276 | + goto sw_try; | ||
1277 | + } | ||
1278 | + if (dhret > BN_num_bytes(temp)) | ||
1279 | + dhret=BN_bn2bin(temp,key); | ||
1280 | + BN_free(temp); | ||
1281 | + } | ||
1282 | + | ||
1283 | + kop.crk_param[3].crp_p = NULL; | ||
1284 | + zapparams(&kop); | ||
1285 | + return (dhret); | ||
1286 | +sw_try: | ||
1287 | + { | ||
1288 | const DH_METHOD *meth = DH_OpenSSL(); | ||
1289 | |||
1290 | - return ((meth->compute_key)(key, pub_key, dh)); | ||
1291 | + dhret = (meth->compute_key)(key, pub_key, dh); | ||
1292 | } | ||
1293 | + return (dhret); | ||
1294 | +} | ||
1295 | |||
1296 | - keylen = BN_num_bits(dh->p); | ||
1297 | +int cryptodev_ecdh_compute_key(void *out, size_t outlen, | ||
1298 | + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, | ||
1299 | + void *out, size_t *outlen)) | ||
1300 | +{ | ||
1301 | + ec_curve_t ec_crv = EC_PRIME; | ||
1302 | + unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; | ||
1303 | + BIGNUM * w_x = NULL, *w_y = NULL; | ||
1304 | + int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; | ||
1305 | + BIGNUM * p = NULL, *a = NULL, *b = NULL; | ||
1306 | + BN_CTX *ctx; | ||
1307 | + EC_POINT *tmp=NULL; | ||
1308 | + BIGNUM *x=NULL, *y=NULL; | ||
1309 | + const BIGNUM *priv_key; | ||
1310 | + const EC_GROUP* group = NULL; | ||
1311 | + int ret = -1; | ||
1312 | + size_t buflen, len; | ||
1313 | + struct crypt_kop kop; | ||
1314 | |||
1315 | memset(&kop, 0, sizeof kop); | ||
1316 | - kop.crk_op = CRK_DH_COMPUTE_KEY; | ||
1317 | |||
1318 | - /* inputs: dh->priv_key pub_key dh->p key */ | ||
1319 | - if (bn2crparam(dh->priv_key, &kop.crk_param[0])) | ||
1320 | + if ((ctx = BN_CTX_new()) == NULL) goto err; | ||
1321 | + BN_CTX_start(ctx); | ||
1322 | + x = BN_CTX_get(ctx); | ||
1323 | + y = BN_CTX_get(ctx); | ||
1324 | + p = BN_CTX_get(ctx); | ||
1325 | + a = BN_CTX_get(ctx); | ||
1326 | + b = BN_CTX_get(ctx); | ||
1327 | + w_x = BN_CTX_get(ctx); | ||
1328 | + w_y = BN_CTX_get(ctx); | ||
1329 | + | ||
1330 | + if (!x || !y || !p || !a || !b || !w_x || !w_y) { | ||
1331 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); | ||
1332 | goto err; | ||
1333 | - if (bn2crparam(pub_key, &kop.crk_param[1])) | ||
1334 | + } | ||
1335 | + | ||
1336 | + priv_key = EC_KEY_get0_private_key(ecdh); | ||
1337 | + if (priv_key == NULL) { | ||
1338 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); | ||
1339 | goto err; | ||
1340 | - if (bn2crparam(dh->p, &kop.crk_param[2])) | ||
1341 | + } | ||
1342 | + | ||
1343 | + group = EC_KEY_get0_group(ecdh); | ||
1344 | + if ((tmp=EC_POINT_new(group)) == NULL) { | ||
1345 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); | ||
1346 | goto err; | ||
1347 | - kop.crk_iparams = 3; | ||
1348 | + } | ||
1349 | |||
1350 | - kop.crk_param[3].crp_p = (caddr_t) key; | ||
1351 | - kop.crk_param[3].crp_nbits = keylen * 8; | ||
1352 | - kop.crk_oparams = 1; | ||
1353 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == | ||
1354 | + NID_X9_62_prime_field) { | ||
1355 | + ec_crv = EC_PRIME; | ||
1356 | |||
1357 | - if (ioctl(fd, CIOCKEY, &kop) == -1) { | ||
1358 | - const DH_METHOD *meth = DH_OpenSSL(); | ||
1359 | + if (!EC_POINT_get_affine_coordinates_GFp(group, | ||
1360 | + EC_GROUP_get0_generator(group), x, y, ctx)) { | ||
1361 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); | ||
1362 | + goto err; | ||
1363 | + } | ||
1364 | |||
1365 | - dhret = (meth->compute_key)(key, pub_key, dh); | ||
1366 | + /* get the ECC curve parameters */ | ||
1367 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { | ||
1368 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1369 | + goto err; | ||
1370 | + } | ||
1371 | + | ||
1372 | + /* get the public key pair for prime curve */ | ||
1373 | + if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { | ||
1374 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1375 | + goto err; | ||
1376 | + } | ||
1377 | + } else { | ||
1378 | + ec_crv = EC_BINARY; | ||
1379 | + | ||
1380 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1381 | + EC_GROUP_get0_generator(group), x, y, ctx)) { | ||
1382 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); | ||
1383 | + goto err; | ||
1384 | + } | ||
1385 | + | ||
1386 | + /* get the ECC curve parameters */ | ||
1387 | + if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { | ||
1388 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1389 | + goto err; | ||
1390 | + } | ||
1391 | + | ||
1392 | + /* get the public key pair for binary curve */ | ||
1393 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1394 | + pub_key, w_x, w_y,ctx)) { | ||
1395 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1396 | + goto err; | ||
1397 | + } | ||
1398 | + } | ||
1399 | + | ||
1400 | + /* irreducible polynomial that creates the field */ | ||
1401 | + if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { | ||
1402 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1403 | + goto err; | ||
1404 | + } | ||
1405 | + | ||
1406 | + /* Get the irreducible polynomial that creates the field */ | ||
1407 | + if (spcf_bn2bin(p, &q, &q_len)) { | ||
1408 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1409 | + goto err; | ||
1410 | } | ||
1411 | + | ||
1412 | + /* Get the public key into a flat buffer with appropriate padding */ | ||
1413 | + pub_key_len = 2 * q_len; | ||
1414 | + w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); | ||
1415 | + if (!w_xy) { | ||
1416 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1417 | + goto err; | ||
1418 | + } | ||
1419 | + | ||
1420 | + /* Generation of ECC curve parameters */ | ||
1421 | + ab_len = 2*q_len; | ||
1422 | + ab = eng_copy_curve_points (a, b, ab_len, q_len); | ||
1423 | + if (!ab) { | ||
1424 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1425 | + goto err; | ||
1426 | + } | ||
1427 | + | ||
1428 | + if (ec_crv == EC_BINARY) { | ||
1429 | + /* copy b' i.e c(b), instead of only b */ | ||
1430 | + if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) | ||
1431 | + { | ||
1432 | + unsigned char *c_temp = NULL; | ||
1433 | + int c_temp_len = q_len; | ||
1434 | + if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) | ||
1435 | + memcpy(ab+q_len, c_temp, q_len); | ||
1436 | + else | ||
1437 | + goto err; | ||
1438 | + } | ||
1439 | + kop.curve_type = ECC_BINARY; | ||
1440 | + } else | ||
1441 | + kop.curve_type = ECC_PRIME; | ||
1442 | + | ||
1443 | + priv_key_len = r_len; | ||
1444 | + | ||
1445 | + /* | ||
1446 | + * If BN_num_bytes of priv_key returns less then r_len then | ||
1447 | + * add padding bytes before the key | ||
1448 | + */ | ||
1449 | + if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { | ||
1450 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1451 | + goto err; | ||
1452 | + } | ||
1453 | + | ||
1454 | + buflen = (EC_GROUP_get_degree(group) + 7)/8; | ||
1455 | + len = BN_num_bytes(x); | ||
1456 | + if (len > buflen || q_len < buflen) { | ||
1457 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_INTERNAL_ERROR); | ||
1458 | + goto err; | ||
1459 | + } | ||
1460 | + | ||
1461 | + kop.crk_op = CRK_DH_COMPUTE_KEY; | ||
1462 | + kop.crk_param[0].crp_p = (void*) s; | ||
1463 | + kop.crk_param[0].crp_nbits = priv_key_len*8; | ||
1464 | + kop.crk_param[1].crp_p = (void*) w_xy; | ||
1465 | + kop.crk_param[1].crp_nbits = pub_key_len*8; | ||
1466 | + kop.crk_param[2].crp_p = (void*) q; | ||
1467 | + kop.crk_param[2].crp_nbits = q_len*8; | ||
1468 | + kop.crk_param[3].crp_p = (void*) ab; | ||
1469 | + kop.crk_param[3].crp_nbits = ab_len*8; | ||
1470 | + kop.crk_iparams = 4; | ||
1471 | + kop.crk_param[4].crp_p = (void*) out; | ||
1472 | + kop.crk_param[4].crp_nbits = q_len*8; | ||
1473 | + kop.crk_oparams = 1; | ||
1474 | + ret = q_len; | ||
1475 | + if (cryptodev_asym(&kop, 0, NULL, 0, NULL)) { | ||
1476 | + const ECDH_METHOD *meth = ECDH_OpenSSL(); | ||
1477 | + ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); | ||
1478 | + } else | ||
1479 | + ret = q_len; | ||
1480 | err: | ||
1481 | - kop.crk_param[3].crp_p = NULL; | ||
1482 | + kop.crk_param[4].crp_p = NULL; | ||
1483 | zapparams(&kop); | ||
1484 | - return (dhret); | ||
1485 | + return ret; | ||
1486 | } | ||
1487 | |||
1488 | + | ||
1489 | static DH_METHOD cryptodev_dh = { | ||
1490 | "cryptodev DH method", | ||
1491 | NULL, /* cryptodev_dh_generate_key */ | ||
1492 | @@ -1551,6 +2549,14 @@ static DH_METHOD cryptodev_dh = { | ||
1493 | NULL /* app_data */ | ||
1494 | }; | ||
1495 | |||
1496 | +static ECDH_METHOD cryptodev_ecdh = { | ||
1497 | + "cryptodev ECDH method", | ||
1498 | + NULL, /* cryptodev_ecdh_compute_key */ | ||
1499 | + NULL, | ||
1500 | + 0, /* flags */ | ||
1501 | + NULL /* app_data */ | ||
1502 | +}; | ||
1503 | + | ||
1504 | /* | ||
1505 | * ctrl right now is just a wrapper that doesn't do much | ||
1506 | * but I expect we'll want some options soon. | ||
1507 | @@ -1634,25 +2640,42 @@ ENGINE_load_cryptodev(void) | ||
1508 | memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); | ||
1509 | if (cryptodev_asymfeat & CRF_DSA_SIGN) | ||
1510 | cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; | ||
1511 | - if (cryptodev_asymfeat & CRF_MOD_EXP) { | ||
1512 | - cryptodev_dsa.bn_mod_exp = cryptodev_dsa_bn_mod_exp; | ||
1513 | - cryptodev_dsa.dsa_mod_exp = cryptodev_dsa_dsa_mod_exp; | ||
1514 | - } | ||
1515 | if (cryptodev_asymfeat & CRF_DSA_VERIFY) | ||
1516 | cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; | ||
1517 | + if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) | ||
1518 | + cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; | ||
1519 | } | ||
1520 | |||
1521 | if (ENGINE_set_DH(engine, &cryptodev_dh)){ | ||
1522 | const DH_METHOD *dh_meth = DH_OpenSSL(); | ||
1523 | + memcpy(&cryptodev_dh, dh_meth, sizeof(DH_METHOD)); | ||
1524 | + if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { | ||
1525 | + cryptodev_dh.compute_key = | ||
1526 | + cryptodev_dh_compute_key; | ||
1527 | + } | ||
1528 | + if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { | ||
1529 | + cryptodev_dh.generate_key = | ||
1530 | + cryptodev_dh_keygen; | ||
1531 | + } | ||
1532 | + } | ||
1533 | |||
1534 | - cryptodev_dh.generate_key = dh_meth->generate_key; | ||
1535 | - cryptodev_dh.compute_key = dh_meth->compute_key; | ||
1536 | - cryptodev_dh.bn_mod_exp = dh_meth->bn_mod_exp; | ||
1537 | - if (cryptodev_asymfeat & CRF_MOD_EXP) { | ||
1538 | - cryptodev_dh.bn_mod_exp = cryptodev_mod_exp_dh; | ||
1539 | - if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) | ||
1540 | - cryptodev_dh.compute_key = | ||
1541 | - cryptodev_dh_compute_key; | ||
1542 | + if (ENGINE_set_ECDSA(engine, &cryptodev_ecdsa)) { | ||
1543 | + const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
1544 | + memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); | ||
1545 | + if (cryptodev_asymfeat & CRF_DSA_SIGN) { | ||
1546 | + cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; | ||
1547 | + } | ||
1548 | + if (cryptodev_asymfeat & CRF_DSA_VERIFY) { | ||
1549 | + cryptodev_ecdsa.ecdsa_do_verify = | ||
1550 | + cryptodev_ecdsa_verify; | ||
1551 | + } | ||
1552 | + } | ||
1553 | + | ||
1554 | + if (ENGINE_set_ECDH(engine, &cryptodev_ecdh)) { | ||
1555 | + const ECDH_METHOD *ecdh_meth = ECDH_OpenSSL(); | ||
1556 | + memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); | ||
1557 | + if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { | ||
1558 | + cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; | ||
1559 | } | ||
1560 | } | ||
1561 | |||
1562 | -- | ||
1563 | 2.3.5 | ||
1564 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch b/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch new file mode 100644 index 00000000..0fb01821 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0009-Added-hwrng-dev-file-as-source-of-RNG.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 81c4c62a4f5f5542843381bfb34e39a6171d5cdd Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Tue, 11 Mar 2014 06:42:59 +0545 | ||
4 | Subject: [PATCH 09/26] Added hwrng dev file as source of RNG | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
9 | --- | ||
10 | e_os.h | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/e_os.h b/e_os.h | ||
14 | index 6a0aad1..57c0563 100644 | ||
15 | --- a/e_os.h | ||
16 | +++ b/e_os.h | ||
17 | @@ -79,7 +79,7 @@ extern "C" { | ||
18 | #ifndef DEVRANDOM | ||
19 | /* set this to a comma-separated list of 'random' device files to try out. | ||
20 | * My default, we will try to read at least one of these files */ | ||
21 | -#define DEVRANDOM "/dev/urandom","/dev/random","/dev/srandom" | ||
22 | +#define DEVRANDOM "/dev/hwrng","/dev/urandom","/dev/random","/dev/srandom" | ||
23 | #endif | ||
24 | #ifndef DEVRANDOM_EGD | ||
25 | /* set this to a comma-seperated list of 'egd' sockets to try out. These | ||
26 | -- | ||
27 | 2.3.5 | ||
28 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch b/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch new file mode 100644 index 00000000..0f889c0f --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch | |||
@@ -0,0 +1,2039 @@ | |||
1 | From a933e6341fd8989bdd82f8a5446b6f04aa00eef9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Tue, 11 Mar 2014 07:14:30 +0545 | ||
4 | Subject: [PATCH 10/26] Asynchronous interface added for PKC cryptodev | ||
5 | interface | ||
6 | |||
7 | Upstream-status: Pending | ||
8 | |||
9 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
10 | --- | ||
11 | crypto/crypto.h | 16 + | ||
12 | crypto/dh/dh.h | 4 +- | ||
13 | crypto/dsa/dsa.h | 5 + | ||
14 | crypto/ecdh/ech_locl.h | 3 + | ||
15 | crypto/ecdsa/ecs_locl.h | 5 + | ||
16 | crypto/engine/eng_cryptodev.c | 1578 +++++++++++++++++++++++++++++++++++++---- | ||
17 | crypto/engine/eng_int.h | 24 +- | ||
18 | crypto/engine/eng_lib.c | 46 ++ | ||
19 | crypto/engine/engine.h | 24 + | ||
20 | crypto/rsa/rsa.h | 23 + | ||
21 | 10 files changed, 1582 insertions(+), 146 deletions(-) | ||
22 | |||
23 | diff --git a/crypto/crypto.h b/crypto/crypto.h | ||
24 | index f92fc51..ce12731 100644 | ||
25 | --- a/crypto/crypto.h | ||
26 | +++ b/crypto/crypto.h | ||
27 | @@ -605,6 +605,22 @@ void ERR_load_CRYPTO_strings(void); | ||
28 | #define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 | ||
29 | #define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK 100 | ||
30 | |||
31 | +/* Additions for Asynchronous PKC Infrastructure */ | ||
32 | +struct pkc_cookie_s { | ||
33 | + void *cookie; /* To be filled by openssl library primitive method function caller */ | ||
34 | + void *eng_cookie; /* To be filled by Engine */ | ||
35 | + /* | ||
36 | + * Callback handler to be provided by caller. Ensure to pass a | ||
37 | + * handler which takes the crypto operation to completion. | ||
38 | + * cookie: Container cookie from library | ||
39 | + * status: Status of the crypto Job completion. | ||
40 | + * 0: Job handled without any issue | ||
41 | + * -EINVAL: Parameters Invalid | ||
42 | + */ | ||
43 | + void (*pkc_callback)(struct pkc_cookie_s *cookie, int status); | ||
44 | + void *eng_handle; | ||
45 | +}; | ||
46 | + | ||
47 | #ifdef __cplusplus | ||
48 | } | ||
49 | #endif | ||
50 | diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h | ||
51 | index ea59e61..20ffad2 100644 | ||
52 | --- a/crypto/dh/dh.h | ||
53 | +++ b/crypto/dh/dh.h | ||
54 | @@ -118,7 +118,9 @@ struct dh_method | ||
55 | int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a, | ||
56 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
57 | BN_MONT_CTX *m_ctx); /* Can be null */ | ||
58 | - | ||
59 | + int (*compute_key_async)(unsigned char *key,const BIGNUM *pub_key,DH *dh, | ||
60 | + struct pkc_cookie_s *cookie); | ||
61 | + int (*generate_key_async)(DH *dh, struct pkc_cookie_s *cookie); | ||
62 | int (*init)(DH *dh); | ||
63 | int (*finish)(DH *dh); | ||
64 | int flags; | ||
65 | diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h | ||
66 | index a6f6d0b..b04a029 100644 | ||
67 | --- a/crypto/dsa/dsa.h | ||
68 | +++ b/crypto/dsa/dsa.h | ||
69 | @@ -140,6 +140,10 @@ struct dsa_method | ||
70 | int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
71 | const BIGNUM *m, BN_CTX *ctx, | ||
72 | BN_MONT_CTX *m_ctx); /* Can be null */ | ||
73 | + int (*dsa_do_sign_async)(const unsigned char *dgst, int dlen, DSA *dsa, | ||
74 | + DSA_SIG *sig, struct pkc_cookie_s *cookie); | ||
75 | + int (*dsa_do_verify_async)(const unsigned char *dgst, int dgst_len, | ||
76 | + DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie); | ||
77 | int (*init)(DSA *dsa); | ||
78 | int (*finish)(DSA *dsa); | ||
79 | int flags; | ||
80 | @@ -151,6 +155,7 @@ struct dsa_method | ||
81 | BN_GENCB *cb); | ||
82 | /* If this is non-NULL, it is used to generate DSA keys */ | ||
83 | int (*dsa_keygen)(DSA *dsa); | ||
84 | + int (*dsa_keygen_async)(DSA *dsa, struct pkc_cookie_s *cookie); | ||
85 | }; | ||
86 | |||
87 | struct dsa_st | ||
88 | diff --git a/crypto/ecdh/ech_locl.h b/crypto/ecdh/ech_locl.h | ||
89 | index f6cad6a..adce6b3 100644 | ||
90 | --- a/crypto/ecdh/ech_locl.h | ||
91 | +++ b/crypto/ecdh/ech_locl.h | ||
92 | @@ -67,6 +67,9 @@ struct ecdh_method | ||
93 | const char *name; | ||
94 | int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, | ||
95 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); | ||
96 | + int (*compute_key_async)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, | ||
97 | + void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen), | ||
98 | + struct pkc_cookie_s *cookie); | ||
99 | #if 0 | ||
100 | int (*init)(EC_KEY *eckey); | ||
101 | int (*finish)(EC_KEY *eckey); | ||
102 | diff --git a/crypto/ecdsa/ecs_locl.h b/crypto/ecdsa/ecs_locl.h | ||
103 | index cb3be13..eb0ebe0 100644 | ||
104 | --- a/crypto/ecdsa/ecs_locl.h | ||
105 | +++ b/crypto/ecdsa/ecs_locl.h | ||
106 | @@ -74,6 +74,11 @@ struct ecdsa_method | ||
107 | BIGNUM **r); | ||
108 | int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, | ||
109 | const ECDSA_SIG *sig, EC_KEY *eckey); | ||
110 | + int (*ecdsa_do_sign_async)(const unsigned char *dgst, int dgst_len, | ||
111 | + const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey, | ||
112 | + ECDSA_SIG *sig, struct pkc_cookie_s *cookie); | ||
113 | + int (*ecdsa_do_verify_async)(const unsigned char *dgst, int dgst_len, | ||
114 | + const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie); | ||
115 | #if 0 | ||
116 | int (*init)(EC_KEY *eckey); | ||
117 | int (*finish)(EC_KEY *eckey); | ||
118 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
119 | index 7ee314b..9f2416e 100644 | ||
120 | --- a/crypto/engine/eng_cryptodev.c | ||
121 | +++ b/crypto/engine/eng_cryptodev.c | ||
122 | @@ -1281,6 +1281,56 @@ zapparams(struct crypt_kop *kop) | ||
123 | } | ||
124 | } | ||
125 | |||
126 | +/* Any PKC request has at max 2 output parameters and they are stored here to | ||
127 | +be used while copying in the check availability */ | ||
128 | +struct cryptodev_cookie_s { | ||
129 | + BIGNUM *r; | ||
130 | + struct crparam r_param; | ||
131 | + BIGNUM *s; | ||
132 | + struct crparam s_param; | ||
133 | + struct crypt_kop *kop; | ||
134 | +}; | ||
135 | + | ||
136 | +static int | ||
137 | +cryptodev_asym_async(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, | ||
138 | + BIGNUM *s) | ||
139 | +{ | ||
140 | + int fd; | ||
141 | + struct pkc_cookie_s *cookie = kop->cookie; | ||
142 | + struct cryptodev_cookie_s *eng_cookie; | ||
143 | + | ||
144 | + fd = *(int *)cookie->eng_handle; | ||
145 | + | ||
146 | + eng_cookie = malloc(sizeof(struct cryptodev_cookie_s)); | ||
147 | + | ||
148 | + if (eng_cookie) { | ||
149 | + memset(eng_cookie, 0, sizeof(struct cryptodev_cookie_s)); | ||
150 | + if (r) { | ||
151 | + kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); | ||
152 | + if (!kop->crk_param[kop->crk_iparams].crp_p) | ||
153 | + return -ENOMEM; | ||
154 | + kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; | ||
155 | + kop->crk_oparams++; | ||
156 | + eng_cookie->r = r; | ||
157 | + eng_cookie->r_param = kop->crk_param[kop->crk_iparams]; | ||
158 | + } | ||
159 | + if (s) { | ||
160 | + kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); | ||
161 | + if (!kop->crk_param[kop->crk_iparams+1].crp_p) | ||
162 | + return -ENOMEM; | ||
163 | + kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; | ||
164 | + kop->crk_oparams++; | ||
165 | + eng_cookie->s = s; | ||
166 | + eng_cookie->s_param = kop->crk_param[kop->crk_iparams + 1]; | ||
167 | + } | ||
168 | + } else | ||
169 | + return -ENOMEM; | ||
170 | + | ||
171 | + eng_cookie->kop = kop; | ||
172 | + cookie->eng_cookie = eng_cookie; | ||
173 | + return ioctl(fd, CIOCASYMASYNCRYPT, kop); | ||
174 | +} | ||
175 | + | ||
176 | static int | ||
177 | cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) | ||
178 | { | ||
179 | @@ -1337,6 +1387,44 @@ void *cryptodev_init_instance(void) | ||
180 | return fd; | ||
181 | } | ||
182 | |||
183 | +#include <poll.h> | ||
184 | + | ||
185 | +/* Return 0 on success and 1 on failure */ | ||
186 | +int cryptodev_check_availability(void *eng_handle) | ||
187 | +{ | ||
188 | + int fd = *(int *)eng_handle; | ||
189 | + struct pkc_cookie_list_s cookie_list; | ||
190 | + struct pkc_cookie_s *cookie; | ||
191 | + int i; | ||
192 | + | ||
193 | + /* FETCH COOKIE returns number of cookies extracted */ | ||
194 | + if (ioctl(fd, CIOCASYMFETCHCOOKIE, &cookie_list) <= 0) | ||
195 | + return 1; | ||
196 | + | ||
197 | + for (i = 0; i < cookie_list.cookie_available; i++) { | ||
198 | + cookie = cookie_list.cookie[i]; | ||
199 | + if (cookie) { | ||
200 | + struct cryptodev_cookie_s *eng_cookie = cookie->eng_cookie; | ||
201 | + if (eng_cookie) { | ||
202 | + struct crypt_kop *kop = eng_cookie->kop; | ||
203 | + | ||
204 | + if (eng_cookie->r) | ||
205 | + crparam2bn(&eng_cookie->r_param, eng_cookie->r); | ||
206 | + if (eng_cookie->s) | ||
207 | + crparam2bn(&eng_cookie->s_param, eng_cookie->s); | ||
208 | + if (kop->crk_op == CRK_DH_COMPUTE_KEY) | ||
209 | + kop->crk_oparams = 0; | ||
210 | + | ||
211 | + zapparams(eng_cookie->kop); | ||
212 | + free(eng_cookie->kop); | ||
213 | + free (eng_cookie); | ||
214 | + } | ||
215 | + cookie->pkc_callback(cookie, cookie_list.status[i]); | ||
216 | + } | ||
217 | + } | ||
218 | + return 0; | ||
219 | +} | ||
220 | + | ||
221 | static int | ||
222 | cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
223 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) | ||
224 | @@ -1382,6 +1470,63 @@ err: | ||
225 | } | ||
226 | |||
227 | static int | ||
228 | +cryptodev_bn_mod_exp_async(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
229 | + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont, struct pkc_cookie_s *cookie) | ||
230 | +{ | ||
231 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
232 | + int ret = 1; | ||
233 | + | ||
234 | + /* Currently, we know we can do mod exp iff we can do any | ||
235 | + * asymmetric operations at all. | ||
236 | + */ | ||
237 | + if (cryptodev_asymfeat == 0 || !kop) { | ||
238 | + ret = BN_mod_exp(r, a, p, m, ctx); | ||
239 | + return (ret); | ||
240 | + } | ||
241 | + | ||
242 | + kop->crk_oparams = 0; | ||
243 | + kop->crk_status = 0; | ||
244 | + kop->crk_op = CRK_MOD_EXP; | ||
245 | + kop->cookie = cookie; | ||
246 | + /* inputs: a^p % m */ | ||
247 | + if (bn2crparam(a, &kop->crk_param[0])) | ||
248 | + goto err; | ||
249 | + if (bn2crparam(p, &kop->crk_param[1])) | ||
250 | + goto err; | ||
251 | + if (bn2crparam(m, &kop->crk_param[2])) | ||
252 | + goto err; | ||
253 | + | ||
254 | + kop->crk_iparams = 3; | ||
255 | + if (cryptodev_asym_async(kop, BN_num_bytes(m), r, 0, NULL)) | ||
256 | + goto err; | ||
257 | + | ||
258 | + return ret; | ||
259 | +err: | ||
260 | + { | ||
261 | + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); | ||
262 | + | ||
263 | + if (kop) | ||
264 | + free(kop); | ||
265 | + ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); | ||
266 | + if (ret) | ||
267 | + /* Call the completion handler immediately */ | ||
268 | + cookie->pkc_callback(cookie, 0); | ||
269 | + } | ||
270 | + return ret; | ||
271 | +} | ||
272 | + | ||
273 | +static int | ||
274 | +cryptodev_rsa_nocrt_mod_exp_async(BIGNUM *r0, const BIGNUM *I, | ||
275 | + RSA *rsa, BN_CTX *ctx, struct pkc_cookie_s *cookie) | ||
276 | +{ | ||
277 | + int r; | ||
278 | + ctx = BN_CTX_new(); | ||
279 | + r = cryptodev_bn_mod_exp_async(r0, I, rsa->d, rsa->n, ctx, NULL, cookie); | ||
280 | + BN_CTX_free(ctx); | ||
281 | + return r; | ||
282 | +} | ||
283 | + | ||
284 | +static int | ||
285 | cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) | ||
286 | { | ||
287 | int r; | ||
288 | @@ -1446,6 +1591,62 @@ err: | ||
289 | return (ret); | ||
290 | } | ||
291 | |||
292 | +static int | ||
293 | +cryptodev_rsa_mod_exp_async(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx, | ||
294 | + struct pkc_cookie_s *cookie) | ||
295 | +{ | ||
296 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
297 | + int ret = 1, f_len, p_len, q_len; | ||
298 | + unsigned char *f = NULL, *p = NULL, *q = NULL, *dp = NULL, *dq = NULL, *c = NULL; | ||
299 | + | ||
300 | + if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp || !kop) { | ||
301 | + return (0); | ||
302 | + } | ||
303 | + | ||
304 | + kop->crk_oparams = 0; | ||
305 | + kop->crk_status = 0; | ||
306 | + kop->crk_op = CRK_MOD_EXP_CRT; | ||
307 | + f_len = BN_num_bytes(rsa->n); | ||
308 | + spcf_bn2bin_ex(I, &f, &f_len); | ||
309 | + spcf_bn2bin(rsa->p, &p, &p_len); | ||
310 | + spcf_bn2bin(rsa->q, &q, &q_len); | ||
311 | + spcf_bn2bin_ex(rsa->dmp1, &dp, &p_len); | ||
312 | + spcf_bn2bin_ex(rsa->iqmp, &c, &p_len); | ||
313 | + spcf_bn2bin_ex(rsa->dmq1, &dq, &q_len); | ||
314 | + /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ | ||
315 | + kop->crk_param[0].crp_p = p; | ||
316 | + kop->crk_param[0].crp_nbits = p_len * 8; | ||
317 | + kop->crk_param[1].crp_p = q; | ||
318 | + kop->crk_param[1].crp_nbits = q_len * 8; | ||
319 | + kop->crk_param[2].crp_p = f; | ||
320 | + kop->crk_param[2].crp_nbits = f_len * 8; | ||
321 | + kop->crk_param[3].crp_p = dp; | ||
322 | + kop->crk_param[3].crp_nbits = p_len * 8; | ||
323 | + /* dq must of length q, rest all of length p*/ | ||
324 | + kop->crk_param[4].crp_p = dq; | ||
325 | + kop->crk_param[4].crp_nbits = q_len * 8; | ||
326 | + kop->crk_param[5].crp_p = c; | ||
327 | + kop->crk_param[5].crp_nbits = p_len * 8; | ||
328 | + kop->crk_iparams = 6; | ||
329 | + kop->cookie = cookie; | ||
330 | + if (cryptodev_asym_async(kop, BN_num_bytes(rsa->n), r0, 0, NULL)) | ||
331 | + goto err; | ||
332 | + | ||
333 | + return ret; | ||
334 | +err: | ||
335 | + { | ||
336 | + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); | ||
337 | + | ||
338 | + if (kop) | ||
339 | + free(kop); | ||
340 | + ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); | ||
341 | + if (ret) | ||
342 | + /* Call user completion handler immediately */ | ||
343 | + cookie->pkc_callback(cookie, 0); | ||
344 | + } | ||
345 | + return (ret); | ||
346 | +} | ||
347 | + | ||
348 | static RSA_METHOD cryptodev_rsa = { | ||
349 | "cryptodev RSA method", | ||
350 | NULL, /* rsa_pub_enc */ | ||
351 | @@ -1454,6 +1655,12 @@ static RSA_METHOD cryptodev_rsa = { | ||
352 | NULL, /* rsa_priv_dec */ | ||
353 | NULL, | ||
354 | NULL, | ||
355 | + NULL, /* rsa_pub_enc */ | ||
356 | + NULL, /* rsa_pub_dec */ | ||
357 | + NULL, /* rsa_priv_enc */ | ||
358 | + NULL, /* rsa_priv_dec */ | ||
359 | + NULL, | ||
360 | + NULL, | ||
361 | NULL, /* init */ | ||
362 | NULL, /* finish */ | ||
363 | 0, /* flags */ | ||
364 | @@ -1751,126 +1958,424 @@ sw_try: | ||
365 | return ret; | ||
366 | } | ||
367 | |||
368 | +/* Cryptodev DSA Key Gen routine */ | ||
369 | +static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) | ||
370 | +{ | ||
371 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
372 | + int ret = 1, g_len; | ||
373 | + unsigned char *g = NULL; | ||
374 | |||
375 | + if (!kop) | ||
376 | + goto sw_try; | ||
377 | |||
378 | -static DSA_METHOD cryptodev_dsa = { | ||
379 | - "cryptodev DSA method", | ||
380 | - NULL, | ||
381 | - NULL, /* dsa_sign_setup */ | ||
382 | - NULL, | ||
383 | - NULL, /* dsa_mod_exp */ | ||
384 | - NULL, | ||
385 | - NULL, /* init */ | ||
386 | - NULL, /* finish */ | ||
387 | - 0, /* flags */ | ||
388 | - NULL /* app_data */ | ||
389 | -}; | ||
390 | + if (dsa->priv_key == NULL) { | ||
391 | + if ((dsa->priv_key=BN_new()) == NULL) | ||
392 | + goto sw_try; | ||
393 | + } | ||
394 | |||
395 | -static ECDSA_METHOD cryptodev_ecdsa = { | ||
396 | - "cryptodev ECDSA method", | ||
397 | - NULL, | ||
398 | - NULL, /* ecdsa_sign_setup */ | ||
399 | - NULL, | ||
400 | - NULL, | ||
401 | - 0, /* flags */ | ||
402 | - NULL /* app_data */ | ||
403 | -}; | ||
404 | + if (dsa->pub_key == NULL) { | ||
405 | + if ((dsa->pub_key=BN_new()) == NULL) | ||
406 | + goto sw_try; | ||
407 | + } | ||
408 | |||
409 | -typedef enum ec_curve_s | ||
410 | -{ | ||
411 | - EC_PRIME, | ||
412 | - EC_BINARY | ||
413 | -} ec_curve_t; | ||
414 | + g_len = BN_num_bytes(dsa->p); | ||
415 | + /** | ||
416 | + * Get generator into a plain buffer. If length is less than | ||
417 | + * q_len then add leading padding bytes. | ||
418 | + */ | ||
419 | + if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { | ||
420 | + DSAerr(DSA_F_DSA_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
421 | + goto sw_try; | ||
422 | + } | ||
423 | |||
424 | -/* ENGINE handler for ECDSA Sign */ | ||
425 | -static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, | ||
426 | - int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) | ||
427 | -{ | ||
428 | - BIGNUM *m = NULL, *p = NULL, *a = NULL; | ||
429 | - BIGNUM *b = NULL, *x = NULL, *y = NULL; | ||
430 | - BN_CTX *ctx = NULL; | ||
431 | - ECDSA_SIG *ret = NULL; | ||
432 | - ECDSA_DATA *ecdsa = NULL; | ||
433 | - unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; | ||
434 | - unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; | ||
435 | - int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; | ||
436 | - int g_len = 0, d_len = 0, ab_len = 0; | ||
437 | - const BIGNUM *order = NULL, *priv_key=NULL; | ||
438 | - const EC_GROUP *group = NULL; | ||
439 | - struct crypt_kop kop; | ||
440 | - ec_curve_t ec_crv = EC_PRIME; | ||
441 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
442 | + kop->crk_op = CRK_DSA_GENERATE_KEY; | ||
443 | + if (bn2crparam(dsa->p, &kop->crk_param[0])) | ||
444 | + goto sw_try; | ||
445 | + if (bn2crparam(dsa->q, &kop->crk_param[1])) | ||
446 | + goto sw_try; | ||
447 | + kop->crk_param[2].crp_p = g; | ||
448 | + kop->crk_param[2].crp_nbits = g_len * 8; | ||
449 | + kop->crk_iparams = 3; | ||
450 | + kop->cookie = cookie; | ||
451 | |||
452 | - memset(&kop, 0, sizeof(kop)); | ||
453 | - ecdsa = ecdsa_check(eckey); | ||
454 | - if (!ecdsa) { | ||
455 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
456 | - return NULL; | ||
457 | + /* pub_key is or prime length while priv key is of length of order */ | ||
458 | + if (cryptodev_asym_async(kop, BN_num_bytes(dsa->p), dsa->pub_key, | ||
459 | + BN_num_bytes(dsa->q), dsa->priv_key)) | ||
460 | + goto sw_try; | ||
461 | + | ||
462 | + return ret; | ||
463 | +sw_try: | ||
464 | + { | ||
465 | + const DSA_METHOD *meth = DSA_OpenSSL(); | ||
466 | + | ||
467 | + if (kop) | ||
468 | + free(kop); | ||
469 | + ret = (meth->dsa_keygen)(dsa); | ||
470 | + cookie->pkc_callback(cookie, 0); | ||
471 | } | ||
472 | + return ret; | ||
473 | +} | ||
474 | |||
475 | - group = EC_KEY_get0_group(eckey); | ||
476 | - priv_key = EC_KEY_get0_private_key(eckey); | ||
477 | +static int | ||
478 | +cryptodev_dsa_do_sign_async(const unsigned char *dgst, int dlen, DSA *dsa, | ||
479 | + DSA_SIG *sig, struct pkc_cookie_s *cookie) | ||
480 | +{ | ||
481 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
482 | + DSA_SIG *dsaret = NULL; | ||
483 | + int q_len = 0, r_len = 0, g_len = 0; | ||
484 | + int priv_key_len = 0, ret = 1; | ||
485 | + unsigned char *q = NULL, *r = NULL, *g = NULL, *priv_key = NULL, *f = NULL; | ||
486 | |||
487 | - if (!group || !priv_key) { | ||
488 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
489 | - return NULL; | ||
490 | + if (((sig->r = BN_new()) == NULL) || !kop) { | ||
491 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
492 | + goto err; | ||
493 | } | ||
494 | |||
495 | - if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || | ||
496 | - (a = BN_new()) == NULL || (b = BN_new()) == NULL || | ||
497 | - (p = BN_new()) == NULL || (x = BN_new()) == NULL || | ||
498 | - (y = BN_new()) == NULL) { | ||
499 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
500 | + if ((sig->s = BN_new()) == NULL) { | ||
501 | + BN_free(sig->r); | ||
502 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
503 | goto err; | ||
504 | } | ||
505 | |||
506 | - order = &group->order; | ||
507 | - if (!order || BN_is_zero(order)) { | ||
508 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); | ||
509 | + if (spcf_bn2bin(dsa->p, &q, &q_len)) { | ||
510 | + DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | ||
511 | goto err; | ||
512 | } | ||
513 | |||
514 | - i = BN_num_bits(order); | ||
515 | - /* Need to truncate digest if it is too long: first truncate whole | ||
516 | - bytes */ | ||
517 | - if (8 * dgst_len > i) | ||
518 | - dgst_len = (i + 7)/8; | ||
519 | + /* Get order of the field of private keys into plain buffer */ | ||
520 | + if (spcf_bn2bin (dsa->q, &r, &r_len)) { | ||
521 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
522 | + goto err; | ||
523 | + } | ||
524 | |||
525 | - if (!BN_bin2bn(dgst, dgst_len, m)) { | ||
526 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
527 | + /* sanity test */ | ||
528 | + if (dlen > r_len) { | ||
529 | + DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | ||
530 | goto err; | ||
531 | } | ||
532 | |||
533 | - /* If still too long truncate remaining bits with a shift */ | ||
534 | - if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { | ||
535 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
536 | + g_len = q_len; | ||
537 | + /** | ||
538 | + * Get generator into a plain buffer. If length is less than | ||
539 | + * q_len then add leading padding bytes. | ||
540 | + */ | ||
541 | + if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { | ||
542 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
543 | goto err; | ||
544 | } | ||
545 | |||
546 | - /* copy the truncated bits into plain buffer */ | ||
547 | - if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { | ||
548 | - fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); | ||
549 | + priv_key_len = r_len; | ||
550 | + /** | ||
551 | + * Get private key into a plain buffer. If length is less than | ||
552 | + * r_len then add leading padding bytes. | ||
553 | + */ | ||
554 | + if (spcf_bn2bin_ex(dsa->priv_key, &priv_key, &priv_key_len)) { | ||
555 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
556 | goto err; | ||
557 | } | ||
558 | |||
559 | - ret = ECDSA_SIG_new(); | ||
560 | - if (!ret) { | ||
561 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
562 | + /* Allocate memory to store hash. */ | ||
563 | + f = OPENSSL_malloc (r_len); | ||
564 | + if (!f) { | ||
565 | + DSAerr(DSA_F_DSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
566 | goto err; | ||
567 | } | ||
568 | |||
569 | - /* check if this is prime or binary EC request */ | ||
570 | - if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { | ||
571 | - ec_crv = EC_PRIME; | ||
572 | - /* get the generator point pair */ | ||
573 | - if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), | ||
574 | - x, y,ctx)) { | ||
575 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
576 | - goto err; | ||
577 | - } | ||
578 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
579 | + if (dlen < r_len) | ||
580 | + memset(f, 0, r_len - dlen); | ||
581 | |||
582 | - /* get the ECC curve parameters */ | ||
583 | - if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { | ||
584 | - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
585 | + /* Skip leading bytes if dgst_len < r_len */ | ||
586 | + memcpy(f + r_len - dlen, dgst, dlen); | ||
587 | + | ||
588 | + dlen = r_len; | ||
589 | + | ||
590 | + memset(kop, 0, sizeof( struct crypt_kop)); | ||
591 | + kop->crk_op = CRK_DSA_SIGN; | ||
592 | + | ||
593 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
594 | + kop->crk_param[0].crp_p = (void*)f; | ||
595 | + kop->crk_param[0].crp_nbits = dlen * 8; | ||
596 | + kop->crk_param[1].crp_p = (void*)q; | ||
597 | + kop->crk_param[1].crp_nbits = q_len * 8; | ||
598 | + kop->crk_param[2].crp_p = (void*)r; | ||
599 | + kop->crk_param[2].crp_nbits = r_len * 8; | ||
600 | + kop->crk_param[3].crp_p = (void*)g; | ||
601 | + kop->crk_param[3].crp_nbits = g_len * 8; | ||
602 | + kop->crk_param[4].crp_p = (void*)priv_key; | ||
603 | + kop->crk_param[4].crp_nbits = priv_key_len * 8; | ||
604 | + kop->crk_iparams = 5; | ||
605 | + kop->cookie = cookie; | ||
606 | + | ||
607 | + if (cryptodev_asym_async(kop, r_len, sig->r, r_len, sig->s)) | ||
608 | + goto err; | ||
609 | + | ||
610 | + return ret; | ||
611 | +err: | ||
612 | + { | ||
613 | + const DSA_METHOD *meth = DSA_OpenSSL(); | ||
614 | + | ||
615 | + if (kop) | ||
616 | + free(kop); | ||
617 | + BN_free(sig->r); | ||
618 | + BN_free(sig->s); | ||
619 | + dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); | ||
620 | + sig->r = dsaret->r; | ||
621 | + sig->s = dsaret->s; | ||
622 | + /* Call user callback immediately */ | ||
623 | + cookie->pkc_callback(cookie, 0); | ||
624 | + ret = dsaret; | ||
625 | + } | ||
626 | + return ret; | ||
627 | +} | ||
628 | + | ||
629 | +static int | ||
630 | +cryptodev_dsa_verify_async(const unsigned char *dgst, int dlen, | ||
631 | + DSA_SIG *sig, DSA *dsa, struct pkc_cookie_s *cookie) | ||
632 | +{ | ||
633 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
634 | + int q_len = 0, r_len = 0, g_len = 0; | ||
635 | + int w_len = 0 ,c_len = 0, d_len = 0, ret = 1; | ||
636 | + unsigned char * q = NULL, * r = NULL, * w = NULL, * g = NULL; | ||
637 | + unsigned char *c = NULL, * d = NULL, *f = NULL; | ||
638 | + | ||
639 | + if (!kop) | ||
640 | + goto err; | ||
641 | + | ||
642 | + if (spcf_bn2bin(dsa->p, &q, &q_len)) { | ||
643 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
644 | + return ret; | ||
645 | + } | ||
646 | + | ||
647 | + /* Get Order of field of private keys */ | ||
648 | + if (spcf_bn2bin(dsa->q, &r, &r_len)) { | ||
649 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
650 | + goto err; | ||
651 | + } | ||
652 | + | ||
653 | + g_len = q_len; | ||
654 | + /** | ||
655 | + * Get generator into a plain buffer. If length is less than | ||
656 | + * q_len then add leading padding bytes. | ||
657 | + */ | ||
658 | + if (spcf_bn2bin_ex(dsa->g, &g, &g_len)) { | ||
659 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
660 | + goto err; | ||
661 | + } | ||
662 | + w_len = q_len; | ||
663 | + /** | ||
664 | + * Get public key into a plain buffer. If length is less than | ||
665 | + * q_len then add leading padding bytes. | ||
666 | + */ | ||
667 | + if (spcf_bn2bin_ex(dsa->pub_key, &w, &w_len)) { | ||
668 | + DSAerr(DSA_F_DSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
669 | + goto err; | ||
670 | + } | ||
671 | + /** | ||
672 | + * Get the 1st part of signature into a flat buffer with | ||
673 | + * appropriate padding | ||
674 | + */ | ||
675 | + c_len = r_len; | ||
676 | + | ||
677 | + if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { | ||
678 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
679 | + goto err; | ||
680 | + } | ||
681 | + | ||
682 | + /** | ||
683 | + * Get the 2nd part of signature into a flat buffer with | ||
684 | + * appropriate padding | ||
685 | + */ | ||
686 | + d_len = r_len; | ||
687 | + | ||
688 | + if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { | ||
689 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
690 | + goto err; | ||
691 | + } | ||
692 | + | ||
693 | + | ||
694 | + /* Sanity test */ | ||
695 | + if (dlen > r_len) { | ||
696 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
697 | + goto err; | ||
698 | + } | ||
699 | + | ||
700 | + /* Allocate memory to store hash. */ | ||
701 | + f = OPENSSL_malloc (r_len); | ||
702 | + if (!f) { | ||
703 | + DSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
704 | + goto err; | ||
705 | + } | ||
706 | + | ||
707 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
708 | + if (dlen < r_len) | ||
709 | + memset(f, 0, r_len - dlen); | ||
710 | + | ||
711 | + /* Skip leading bytes if dgst_len < r_len */ | ||
712 | + memcpy(f + r_len - dlen, dgst, dlen); | ||
713 | + | ||
714 | + dlen = r_len; | ||
715 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
716 | + | ||
717 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ | ||
718 | + kop->crk_param[0].crp_p = (void*)f; | ||
719 | + kop->crk_param[0].crp_nbits = dlen * 8; | ||
720 | + kop->crk_param[1].crp_p = q; | ||
721 | + kop->crk_param[1].crp_nbits = q_len * 8; | ||
722 | + kop->crk_param[2].crp_p = r; | ||
723 | + kop->crk_param[2].crp_nbits = r_len * 8; | ||
724 | + kop->crk_param[3].crp_p = g; | ||
725 | + kop->crk_param[3].crp_nbits = g_len * 8; | ||
726 | + kop->crk_param[4].crp_p = w; | ||
727 | + kop->crk_param[4].crp_nbits = w_len * 8; | ||
728 | + kop->crk_param[5].crp_p = c; | ||
729 | + kop->crk_param[5].crp_nbits = c_len * 8; | ||
730 | + kop->crk_param[6].crp_p = d; | ||
731 | + kop->crk_param[6].crp_nbits = d_len * 8; | ||
732 | + kop->crk_iparams = 7; | ||
733 | + kop->crk_op = CRK_DSA_VERIFY; | ||
734 | + kop->cookie = cookie; | ||
735 | + if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) | ||
736 | + goto err; | ||
737 | + | ||
738 | + return ret; | ||
739 | +err: | ||
740 | + { | ||
741 | + const DSA_METHOD *meth = DSA_OpenSSL(); | ||
742 | + | ||
743 | + if (kop) | ||
744 | + free(kop); | ||
745 | + | ||
746 | + ret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); | ||
747 | + cookie->pkc_callback(cookie, 0); | ||
748 | + } | ||
749 | + return ret; | ||
750 | +} | ||
751 | + | ||
752 | +static DSA_METHOD cryptodev_dsa = { | ||
753 | + "cryptodev DSA method", | ||
754 | + NULL, | ||
755 | + NULL, /* dsa_sign_setup */ | ||
756 | + NULL, | ||
757 | + NULL, /* dsa_mod_exp */ | ||
758 | + NULL, | ||
759 | + NULL, | ||
760 | + NULL, | ||
761 | + NULL, | ||
762 | + NULL, /* init */ | ||
763 | + NULL, /* finish */ | ||
764 | + 0, /* flags */ | ||
765 | + NULL /* app_data */ | ||
766 | +}; | ||
767 | + | ||
768 | +static ECDSA_METHOD cryptodev_ecdsa = { | ||
769 | + "cryptodev ECDSA method", | ||
770 | + NULL, | ||
771 | + NULL, /* ecdsa_sign_setup */ | ||
772 | + NULL, | ||
773 | + NULL, | ||
774 | + NULL, | ||
775 | + NULL, | ||
776 | + 0, /* flags */ | ||
777 | + NULL /* app_data */ | ||
778 | +}; | ||
779 | + | ||
780 | +typedef enum ec_curve_s | ||
781 | +{ | ||
782 | + EC_PRIME, | ||
783 | + EC_BINARY | ||
784 | +} ec_curve_t; | ||
785 | + | ||
786 | +/* ENGINE handler for ECDSA Sign */ | ||
787 | +static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, | ||
788 | + int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) | ||
789 | +{ | ||
790 | + BIGNUM *m = NULL, *p = NULL, *a = NULL; | ||
791 | + BIGNUM *b = NULL, *x = NULL, *y = NULL; | ||
792 | + BN_CTX *ctx = NULL; | ||
793 | + ECDSA_SIG *ret = NULL; | ||
794 | + ECDSA_DATA *ecdsa = NULL; | ||
795 | + unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; | ||
796 | + unsigned char * s = NULL, *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; | ||
797 | + int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; | ||
798 | + int g_len = 0, d_len = 0, ab_len = 0; | ||
799 | + const BIGNUM *order = NULL, *priv_key=NULL; | ||
800 | + const EC_GROUP *group = NULL; | ||
801 | + struct crypt_kop kop; | ||
802 | + ec_curve_t ec_crv = EC_PRIME; | ||
803 | + | ||
804 | + memset(&kop, 0, sizeof(kop)); | ||
805 | + ecdsa = ecdsa_check(eckey); | ||
806 | + if (!ecdsa) { | ||
807 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
808 | + return NULL; | ||
809 | + } | ||
810 | + | ||
811 | + group = EC_KEY_get0_group(eckey); | ||
812 | + priv_key = EC_KEY_get0_private_key(eckey); | ||
813 | + | ||
814 | + if (!group || !priv_key) { | ||
815 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
816 | + return NULL; | ||
817 | + } | ||
818 | + | ||
819 | + if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || | ||
820 | + (a = BN_new()) == NULL || (b = BN_new()) == NULL || | ||
821 | + (p = BN_new()) == NULL || (x = BN_new()) == NULL || | ||
822 | + (y = BN_new()) == NULL) { | ||
823 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
824 | + goto err; | ||
825 | + } | ||
826 | + | ||
827 | + order = &group->order; | ||
828 | + if (!order || BN_is_zero(order)) { | ||
829 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); | ||
830 | + goto err; | ||
831 | + } | ||
832 | + | ||
833 | + i = BN_num_bits(order); | ||
834 | + /* Need to truncate digest if it is too long: first truncate whole | ||
835 | + bytes */ | ||
836 | + if (8 * dgst_len > i) | ||
837 | + dgst_len = (i + 7)/8; | ||
838 | + | ||
839 | + if (!BN_bin2bn(dgst, dgst_len, m)) { | ||
840 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
841 | + goto err; | ||
842 | + } | ||
843 | + | ||
844 | + /* If still too long truncate remaining bits with a shift */ | ||
845 | + if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { | ||
846 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
847 | + goto err; | ||
848 | + } | ||
849 | + | ||
850 | + /* copy the truncated bits into plain buffer */ | ||
851 | + if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { | ||
852 | + fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); | ||
853 | + goto err; | ||
854 | + } | ||
855 | + | ||
856 | + ret = ECDSA_SIG_new(); | ||
857 | + if (!ret) { | ||
858 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
859 | + goto err; | ||
860 | + } | ||
861 | + | ||
862 | + /* check if this is prime or binary EC request */ | ||
863 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { | ||
864 | + ec_crv = EC_PRIME; | ||
865 | + /* get the generator point pair */ | ||
866 | + if (!EC_POINT_get_affine_coordinates_GFp (group, EC_GROUP_get0_generator(group), | ||
867 | + x, y,ctx)) { | ||
868 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
869 | + goto err; | ||
870 | + } | ||
871 | + | ||
872 | + /* get the ECC curve parameters */ | ||
873 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { | ||
874 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
875 | goto err; | ||
876 | } | ||
877 | } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { | ||
878 | @@ -2195,63 +2700,581 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, | ||
879 | } | ||
880 | |||
881 | /** | ||
882 | - * Get the 2nd part of signature into a flat buffer with | ||
883 | - * appropriate padding | ||
884 | + * Get the 2nd part of signature into a flat buffer with | ||
885 | + * appropriate padding | ||
886 | + */ | ||
887 | + if (BN_num_bytes(sig->s) < r_len) | ||
888 | + d_len = r_len; | ||
889 | + | ||
890 | + if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { | ||
891 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
892 | + goto err; | ||
893 | + } | ||
894 | + | ||
895 | + /* memory for message representative */ | ||
896 | + f = malloc(r_len); | ||
897 | + if (!f) { | ||
898 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
899 | + goto err; | ||
900 | + } | ||
901 | + | ||
902 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
903 | + memset(f, 0, r_len-dgst_len); | ||
904 | + | ||
905 | + /* Skip leading bytes if dgst_len < r_len */ | ||
906 | + memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); | ||
907 | + dgst_len += r_len-dgst_len; | ||
908 | + kop.crk_op = CRK_DSA_VERIFY; | ||
909 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
910 | + kop.crk_param[0].crp_p = f; | ||
911 | + kop.crk_param[0].crp_nbits = dgst_len * 8; | ||
912 | + kop.crk_param[1].crp_p = q; | ||
913 | + kop.crk_param[1].crp_nbits = q_len * 8; | ||
914 | + kop.crk_param[2].crp_p = r; | ||
915 | + kop.crk_param[2].crp_nbits = r_len * 8; | ||
916 | + kop.crk_param[3].crp_p = g_xy; | ||
917 | + kop.crk_param[3].crp_nbits = g_len * 8; | ||
918 | + kop.crk_param[4].crp_p = w_xy; | ||
919 | + kop.crk_param[4].crp_nbits = pub_key_len * 8; | ||
920 | + kop.crk_param[5].crp_p = ab; | ||
921 | + kop.crk_param[5].crp_nbits = ab_len * 8; | ||
922 | + kop.crk_param[6].crp_p = c; | ||
923 | + kop.crk_param[6].crp_nbits = d_len * 8; | ||
924 | + kop.crk_param[7].crp_p = d; | ||
925 | + kop.crk_param[7].crp_nbits = d_len * 8; | ||
926 | + kop.crk_iparams = 8; | ||
927 | + | ||
928 | + if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { | ||
929 | + /*OCF success value is 0, if not zero, change ret to fail*/ | ||
930 | + if(0 == kop.crk_status) | ||
931 | + ret = 1; | ||
932 | + } else { | ||
933 | + const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
934 | + | ||
935 | + ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); | ||
936 | + } | ||
937 | + kop.crk_param[0].crp_p = NULL; | ||
938 | + zapparams(&kop); | ||
939 | + | ||
940 | +err: | ||
941 | + return ret; | ||
942 | +} | ||
943 | + | ||
944 | +static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, | ||
945 | + int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey, | ||
946 | + ECDSA_SIG *sig, struct pkc_cookie_s *cookie) | ||
947 | +{ | ||
948 | + BIGNUM *m = NULL, *p = NULL, *a = NULL; | ||
949 | + BIGNUM *b = NULL, *x = NULL, *y = NULL; | ||
950 | + BN_CTX *ctx = NULL; | ||
951 | + ECDSA_SIG *sig_ret = NULL; | ||
952 | + ECDSA_DATA *ecdsa = NULL; | ||
953 | + unsigned char * q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL; | ||
954 | + unsigned char * s = NULL, *f = NULL, *tmp_dgst = NULL; | ||
955 | + int i = 0, q_len = 0, priv_key_len = 0, r_len = 0; | ||
956 | + int g_len = 0, ab_len = 0, ret = 1; | ||
957 | + const BIGNUM *order = NULL, *priv_key=NULL; | ||
958 | + const EC_GROUP *group = NULL; | ||
959 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
960 | + ec_curve_t ec_crv = EC_PRIME; | ||
961 | + | ||
962 | + if (!(sig->r = BN_new()) || !kop) | ||
963 | + goto err; | ||
964 | + if ((sig->s = BN_new()) == NULL) { | ||
965 | + BN_free(r); | ||
966 | + goto err; | ||
967 | + } | ||
968 | + | ||
969 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
970 | + ecdsa = ecdsa_check(eckey); | ||
971 | + if (!ecdsa) { | ||
972 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
973 | + goto err; | ||
974 | + } | ||
975 | + | ||
976 | + group = EC_KEY_get0_group(eckey); | ||
977 | + priv_key = EC_KEY_get0_private_key(eckey); | ||
978 | + | ||
979 | + if (!group || !priv_key) { | ||
980 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); | ||
981 | + goto err; | ||
982 | + } | ||
983 | + | ||
984 | + if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || | ||
985 | + (a = BN_new()) == NULL || (b = BN_new()) == NULL || | ||
986 | + (p = BN_new()) == NULL || (x = BN_new()) == NULL || | ||
987 | + (y = BN_new()) == NULL) { | ||
988 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
989 | + goto err; | ||
990 | + } | ||
991 | + | ||
992 | + order = &group->order; | ||
993 | + if (!order || BN_is_zero(order)) { | ||
994 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_MISSING_PARAMETERS); | ||
995 | + goto err; | ||
996 | + } | ||
997 | + | ||
998 | + i = BN_num_bits(order); | ||
999 | + /* Need to truncate digest if it is too long: first truncate whole | ||
1000 | + bytes */ | ||
1001 | + if (8 * dgst_len > i) | ||
1002 | + dgst_len = (i + 7)/8; | ||
1003 | + | ||
1004 | + if (!BN_bin2bn(dgst, dgst_len, m)) { | ||
1005 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
1006 | + goto err; | ||
1007 | + } | ||
1008 | + | ||
1009 | + /* If still too long truncate remaining bits with a shift */ | ||
1010 | + if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { | ||
1011 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); | ||
1012 | + goto err; | ||
1013 | + } | ||
1014 | + | ||
1015 | + /* copy the truncated bits into plain buffer */ | ||
1016 | + if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { | ||
1017 | + fprintf(stderr, "%s:%d: OPENSSL_malloc failec\n", __FUNCTION__, __LINE__); | ||
1018 | + goto err; | ||
1019 | + } | ||
1020 | + | ||
1021 | + /* check if this is prime or binary EC request */ | ||
1022 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) | ||
1023 | + == NID_X9_62_prime_field) { | ||
1024 | + ec_crv = EC_PRIME; | ||
1025 | + /* get the generator point pair */ | ||
1026 | + if (!EC_POINT_get_affine_coordinates_GFp (group, | ||
1027 | + EC_GROUP_get0_generator(group), x, y,ctx)) { | ||
1028 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1029 | + goto err; | ||
1030 | + } | ||
1031 | + | ||
1032 | + /* get the ECC curve parameters */ | ||
1033 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b , ctx)) { | ||
1034 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1035 | + goto err; | ||
1036 | + } | ||
1037 | + } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field) { | ||
1038 | + ec_crv = EC_BINARY; | ||
1039 | + /* get the ECC curve parameters */ | ||
1040 | + if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { | ||
1041 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1042 | + goto err; | ||
1043 | + } | ||
1044 | + | ||
1045 | + /* get the generator point pair */ | ||
1046 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1047 | + EC_GROUP_get0_generator(group), x, y,ctx)) { | ||
1048 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1049 | + goto err; | ||
1050 | + } | ||
1051 | + } else { | ||
1052 | + printf("Unsupported Curve\n"); | ||
1053 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1054 | + goto err; | ||
1055 | + } | ||
1056 | + | ||
1057 | + if (spcf_bn2bin(order, &r, &r_len)) { | ||
1058 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1059 | + goto err; | ||
1060 | + } | ||
1061 | + | ||
1062 | + if (spcf_bn2bin(p, &q, &q_len)) { | ||
1063 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1064 | + goto err; | ||
1065 | + } | ||
1066 | + | ||
1067 | + priv_key_len = r_len; | ||
1068 | + | ||
1069 | + /** | ||
1070 | + * If BN_num_bytes of priv_key returns less then r_len then | ||
1071 | + * add padding bytes before the key | ||
1072 | + */ | ||
1073 | + if (spcf_bn2bin_ex(priv_key, &s, &priv_key_len)) { | ||
1074 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1075 | + goto err; | ||
1076 | + } | ||
1077 | + | ||
1078 | + /* Generation of ECC curve parameters */ | ||
1079 | + ab_len = 2*q_len; | ||
1080 | + ab = eng_copy_curve_points(a, b, ab_len, q_len); | ||
1081 | + if (!ab) { | ||
1082 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1083 | + goto err; | ||
1084 | + } | ||
1085 | + | ||
1086 | + if (ec_crv == EC_BINARY) { | ||
1087 | + if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) | ||
1088 | + { | ||
1089 | + unsigned char *c_temp = NULL; | ||
1090 | + int c_temp_len = q_len; | ||
1091 | + if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) | ||
1092 | + memcpy(ab+q_len, c_temp, q_len); | ||
1093 | + else | ||
1094 | + goto err; | ||
1095 | + } | ||
1096 | + kop->curve_type = ECC_BINARY; | ||
1097 | + } | ||
1098 | + | ||
1099 | + /* Calculation of Generator point */ | ||
1100 | + g_len = 2*q_len; | ||
1101 | + g_xy = eng_copy_curve_points(x, y, g_len, q_len); | ||
1102 | + if (!g_xy) { | ||
1103 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1104 | + goto err; | ||
1105 | + } | ||
1106 | + | ||
1107 | + /* memory for message representative */ | ||
1108 | + f = malloc(r_len); | ||
1109 | + if (!f) { | ||
1110 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1111 | + goto err; | ||
1112 | + } | ||
1113 | + | ||
1114 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
1115 | + memset(f, 0, r_len - dgst_len); | ||
1116 | + | ||
1117 | + /* Skip leading bytes if dgst_len < r_len */ | ||
1118 | + memcpy(f + r_len - dgst_len, tmp_dgst, dgst_len); | ||
1119 | + | ||
1120 | + dgst_len += r_len - dgst_len; | ||
1121 | + | ||
1122 | + kop->crk_op = CRK_DSA_SIGN; | ||
1123 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
1124 | + kop->crk_param[0].crp_p = f; | ||
1125 | + kop->crk_param[0].crp_nbits = dgst_len * 8; | ||
1126 | + kop->crk_param[1].crp_p = q; | ||
1127 | + kop->crk_param[1].crp_nbits = q_len * 8; | ||
1128 | + kop->crk_param[2].crp_p = r; | ||
1129 | + kop->crk_param[2].crp_nbits = r_len * 8; | ||
1130 | + kop->crk_param[3].crp_p = g_xy; | ||
1131 | + kop->crk_param[3].crp_nbits = g_len * 8; | ||
1132 | + kop->crk_param[4].crp_p = s; | ||
1133 | + kop->crk_param[4].crp_nbits = priv_key_len * 8; | ||
1134 | + kop->crk_param[5].crp_p = ab; | ||
1135 | + kop->crk_param[5].crp_nbits = ab_len * 8; | ||
1136 | + kop->crk_iparams = 6; | ||
1137 | + kop->cookie = cookie; | ||
1138 | + | ||
1139 | + if (cryptodev_asym_async(kop, r_len, sig->r , r_len, sig->s)) | ||
1140 | + goto err; | ||
1141 | + | ||
1142 | + return ret; | ||
1143 | +err: | ||
1144 | + { | ||
1145 | + const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
1146 | + BN_free(sig->r); | ||
1147 | + BN_free(sig->s); | ||
1148 | + if (kop) | ||
1149 | + free(kop); | ||
1150 | + sig_ret = (meth->ecdsa_do_sign)(dgst, dgst_len, in_kinv, in_r, eckey); | ||
1151 | + sig->r = sig_ret->r; | ||
1152 | + sig->s = sig_ret->s; | ||
1153 | + cookie->pkc_callback(cookie, 0); | ||
1154 | + } | ||
1155 | + return ret; | ||
1156 | +} | ||
1157 | + | ||
1158 | +static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, | ||
1159 | + const ECDSA_SIG *sig, EC_KEY *eckey, struct pkc_cookie_s *cookie) | ||
1160 | +{ | ||
1161 | + BIGNUM *m = NULL, *p = NULL, *a = NULL, *b = NULL; | ||
1162 | + BIGNUM *x = NULL, *y = NULL, *w_x = NULL, *w_y = NULL; | ||
1163 | + BN_CTX *ctx = NULL; | ||
1164 | + ECDSA_DATA *ecdsa = NULL; | ||
1165 | + unsigned char *q = NULL, *r = NULL, *ab = NULL, *g_xy = NULL, *w_xy = NULL; | ||
1166 | + unsigned char *c = NULL, *d = NULL, *f = NULL, *tmp_dgst = NULL; | ||
1167 | + int i = 0, q_len = 0, pub_key_len = 0, r_len = 0, c_len = 0, g_len = 0; | ||
1168 | + int d_len = 0, ab_len = 0, ret = 1; | ||
1169 | + const EC_POINT *pub_key = NULL; | ||
1170 | + const BIGNUM *order = NULL; | ||
1171 | + const EC_GROUP *group=NULL; | ||
1172 | + ec_curve_t ec_crv = EC_PRIME; | ||
1173 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
1174 | + | ||
1175 | + if (!kop) | ||
1176 | + goto err; | ||
1177 | + | ||
1178 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
1179 | + ecdsa = ecdsa_check(eckey); | ||
1180 | + if (!ecdsa) { | ||
1181 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); | ||
1182 | + goto err; | ||
1183 | + } | ||
1184 | + | ||
1185 | + group = EC_KEY_get0_group(eckey); | ||
1186 | + pub_key = EC_KEY_get0_public_key(eckey); | ||
1187 | + | ||
1188 | + if (!group || !pub_key) { | ||
1189 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER); | ||
1190 | + goto err; | ||
1191 | + } | ||
1192 | + | ||
1193 | + if ((ctx = BN_CTX_new()) == NULL || (m = BN_new()) == NULL || | ||
1194 | + (a = BN_new()) == NULL || (b = BN_new()) == NULL || | ||
1195 | + (p = BN_new()) == NULL || (x = BN_new()) == NULL || | ||
1196 | + (y = BN_new()) == NULL || (w_x = BN_new()) == NULL || | ||
1197 | + (w_y = BN_new()) == NULL) { | ||
1198 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1199 | + goto err; | ||
1200 | + } | ||
1201 | + | ||
1202 | + order = &group->order; | ||
1203 | + if (!order || BN_is_zero(order)) { | ||
1204 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); | ||
1205 | + goto err; | ||
1206 | + } | ||
1207 | + | ||
1208 | + i = BN_num_bits(order); | ||
1209 | + /* Need to truncate digest if it is too long: first truncate whole | ||
1210 | + * bytes */ | ||
1211 | + if (8 * dgst_len > i) | ||
1212 | + dgst_len = (i + 7)/8; | ||
1213 | + | ||
1214 | + if (!BN_bin2bn(dgst, dgst_len, m)) { | ||
1215 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); | ||
1216 | + goto err; | ||
1217 | + } | ||
1218 | + | ||
1219 | + /* If still too long truncate remaining bits with a shift */ | ||
1220 | + if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) { | ||
1221 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); | ||
1222 | + goto err; | ||
1223 | + } | ||
1224 | + /* copy the truncated bits into plain buffer */ | ||
1225 | + if (spcf_bn2bin(m, &tmp_dgst, &dgst_len)) { | ||
1226 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1227 | + goto err; | ||
1228 | + } | ||
1229 | + | ||
1230 | + /* check if this is prime or binary EC request */ | ||
1231 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field) { | ||
1232 | + ec_crv = EC_PRIME; | ||
1233 | + | ||
1234 | + /* get the generator point pair */ | ||
1235 | + if (!EC_POINT_get_affine_coordinates_GFp (group, | ||
1236 | + EC_GROUP_get0_generator(group), x, y,ctx)) { | ||
1237 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1238 | + goto err; | ||
1239 | + } | ||
1240 | + | ||
1241 | + /* get the public key pair for prime curve */ | ||
1242 | + if (!EC_POINT_get_affine_coordinates_GFp (group, | ||
1243 | + pub_key, w_x, w_y,ctx)) { | ||
1244 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1245 | + goto err; | ||
1246 | + } | ||
1247 | + | ||
1248 | + /* get the ECC curve parameters */ | ||
1249 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { | ||
1250 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1251 | + goto err; | ||
1252 | + } | ||
1253 | + } else if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_characteristic_two_field){ | ||
1254 | + ec_crv = EC_BINARY; | ||
1255 | + /* get the ECC curve parameters */ | ||
1256 | + if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { | ||
1257 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1258 | + goto err; | ||
1259 | + } | ||
1260 | + | ||
1261 | + /* get the generator point pair */ | ||
1262 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1263 | + EC_GROUP_get0_generator(group),x, y,ctx)) { | ||
1264 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1265 | + goto err; | ||
1266 | + } | ||
1267 | + | ||
1268 | + /* get the public key pair for binary curve */ | ||
1269 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1270 | + pub_key, w_x, w_y,ctx)) { | ||
1271 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1272 | + goto err; | ||
1273 | + } | ||
1274 | + }else { | ||
1275 | + printf("Unsupported Curve\n"); | ||
1276 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); | ||
1277 | + goto err; | ||
1278 | + } | ||
1279 | + | ||
1280 | + /* Get the order of the subgroup of private keys */ | ||
1281 | + if (spcf_bn2bin((BIGNUM*)order, &r, &r_len)) { | ||
1282 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1283 | + goto err; | ||
1284 | + } | ||
1285 | + | ||
1286 | + /* Get the irreducible polynomial that creates the field */ | ||
1287 | + if (spcf_bn2bin(p, &q, &q_len)) { | ||
1288 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1289 | + goto err; | ||
1290 | + } | ||
1291 | + | ||
1292 | + /* Get the public key into a flat buffer with appropriate padding */ | ||
1293 | + pub_key_len = 2 * q_len; | ||
1294 | + | ||
1295 | + w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); | ||
1296 | + if (!w_xy) { | ||
1297 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1298 | + goto err; | ||
1299 | + } | ||
1300 | + | ||
1301 | + /* Generation of ECC curve parameters */ | ||
1302 | + ab_len = 2*q_len; | ||
1303 | + | ||
1304 | + ab = eng_copy_curve_points (a, b, ab_len, q_len); | ||
1305 | + if (!ab) { | ||
1306 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1307 | + goto err; | ||
1308 | + } | ||
1309 | + | ||
1310 | + if (ec_crv == EC_BINARY) { | ||
1311 | + /* copy b' i.e c(b), instead of only b */ | ||
1312 | + eng_ec_get_cparam (EC_GROUP_get_curve_name(group), | ||
1313 | + ab+q_len, q_len); | ||
1314 | + kop->curve_type = ECC_BINARY; | ||
1315 | + } | ||
1316 | + | ||
1317 | + /* Calculation of Generator point */ | ||
1318 | + g_len = 2 * q_len; | ||
1319 | + | ||
1320 | + g_xy = eng_copy_curve_points (x, y, g_len, q_len); | ||
1321 | + if (!g_xy) { | ||
1322 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1323 | + goto err; | ||
1324 | + } | ||
1325 | + | ||
1326 | + /** | ||
1327 | + * Get the 1st part of signature into a flat buffer with | ||
1328 | + * appropriate padding | ||
1329 | + */ | ||
1330 | + if (BN_num_bytes(sig->r) < r_len) | ||
1331 | + c_len = r_len; | ||
1332 | + | ||
1333 | + if (spcf_bn2bin_ex(sig->r, &c, &c_len)) { | ||
1334 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1335 | + goto err; | ||
1336 | + } | ||
1337 | + | ||
1338 | + /** | ||
1339 | + * Get the 2nd part of signature into a flat buffer with | ||
1340 | + * appropriate padding | ||
1341 | + */ | ||
1342 | + if (BN_num_bytes(sig->s) < r_len) | ||
1343 | + d_len = r_len; | ||
1344 | + | ||
1345 | + if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { | ||
1346 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1347 | + goto err; | ||
1348 | + } | ||
1349 | + | ||
1350 | + /* memory for message representative */ | ||
1351 | + f = malloc(r_len); | ||
1352 | + if (!f) { | ||
1353 | + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1354 | + goto err; | ||
1355 | + } | ||
1356 | + | ||
1357 | + /* Add padding, since SEC expects hash to of size r_len */ | ||
1358 | + memset(f, 0, r_len-dgst_len); | ||
1359 | + | ||
1360 | + /* Skip leading bytes if dgst_len < r_len */ | ||
1361 | + memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); | ||
1362 | + | ||
1363 | + dgst_len += r_len-dgst_len; | ||
1364 | + | ||
1365 | + kop->crk_op = CRK_DSA_VERIFY; | ||
1366 | + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
1367 | + kop->crk_param[0].crp_p = f; | ||
1368 | + kop->crk_param[0].crp_nbits = dgst_len * 8; | ||
1369 | + kop->crk_param[1].crp_p = q; | ||
1370 | + kop->crk_param[1].crp_nbits = q_len * 8; | ||
1371 | + kop->crk_param[2].crp_p = r; | ||
1372 | + kop->crk_param[2].crp_nbits = r_len * 8; | ||
1373 | + kop->crk_param[3].crp_p = g_xy; | ||
1374 | + kop->crk_param[3].crp_nbits = g_len * 8; | ||
1375 | + kop->crk_param[4].crp_p = w_xy; | ||
1376 | + kop->crk_param[4].crp_nbits = pub_key_len * 8; | ||
1377 | + kop->crk_param[5].crp_p = ab; | ||
1378 | + kop->crk_param[5].crp_nbits = ab_len * 8; | ||
1379 | + kop->crk_param[6].crp_p = c; | ||
1380 | + kop->crk_param[6].crp_nbits = d_len * 8; | ||
1381 | + kop->crk_param[7].crp_p = d; | ||
1382 | + kop->crk_param[7].crp_nbits = d_len * 8; | ||
1383 | + kop->crk_iparams = 8; | ||
1384 | + kop->cookie = cookie; | ||
1385 | + | ||
1386 | + if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) | ||
1387 | + goto err; | ||
1388 | + | ||
1389 | + return ret; | ||
1390 | +err: | ||
1391 | + { | ||
1392 | + const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
1393 | + | ||
1394 | + if (kop) | ||
1395 | + free(kop); | ||
1396 | + ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); | ||
1397 | + cookie->pkc_callback(cookie, 0); | ||
1398 | + } | ||
1399 | + | ||
1400 | + return ret; | ||
1401 | +} | ||
1402 | + | ||
1403 | +/* Cryptodev DH Key Gen routine */ | ||
1404 | +static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) | ||
1405 | +{ | ||
1406 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
1407 | + int ret = 1, g_len; | ||
1408 | + unsigned char *g = NULL; | ||
1409 | + | ||
1410 | + if (!kop) | ||
1411 | + goto sw_try; | ||
1412 | + | ||
1413 | + if (dh->priv_key == NULL) { | ||
1414 | + if ((dh->priv_key=BN_new()) == NULL) | ||
1415 | + goto sw_try; | ||
1416 | + } | ||
1417 | + | ||
1418 | + if (dh->pub_key == NULL) { | ||
1419 | + if ((dh->pub_key=BN_new()) == NULL) | ||
1420 | + goto sw_try; | ||
1421 | + } | ||
1422 | + | ||
1423 | + g_len = BN_num_bytes(dh->p); | ||
1424 | + /** | ||
1425 | + * Get generator into a plain buffer. If length is less than | ||
1426 | + * q_len then add leading padding bytes. | ||
1427 | */ | ||
1428 | - if (BN_num_bytes(sig->s) < r_len) | ||
1429 | - d_len = r_len; | ||
1430 | - | ||
1431 | - if (spcf_bn2bin_ex(sig->s, &d, &d_len)) { | ||
1432 | - ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1433 | - goto err; | ||
1434 | - } | ||
1435 | - | ||
1436 | - /* memory for message representative */ | ||
1437 | - f = malloc(r_len); | ||
1438 | - if (!f) { | ||
1439 | - ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); | ||
1440 | - goto err; | ||
1441 | + if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { | ||
1442 | + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
1443 | + goto sw_try; | ||
1444 | } | ||
1445 | |||
1446 | - /* Add padding, since SEC expects hash to of size r_len */ | ||
1447 | - memset(f, 0, r_len-dgst_len); | ||
1448 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
1449 | + kop->crk_op = CRK_DH_GENERATE_KEY; | ||
1450 | + if (bn2crparam(dh->p, &kop->crk_param[0])) | ||
1451 | + goto sw_try; | ||
1452 | + if (bn2crparam(dh->q, &kop->crk_param[1])) | ||
1453 | + goto sw_try; | ||
1454 | + kop->crk_param[2].crp_p = g; | ||
1455 | + kop->crk_param[2].crp_nbits = g_len * 8; | ||
1456 | + kop->crk_iparams = 3; | ||
1457 | + kop->cookie = cookie; | ||
1458 | |||
1459 | - /* Skip leading bytes if dgst_len < r_len */ | ||
1460 | - memcpy(f + r_len-dgst_len, tmp_dgst, dgst_len); | ||
1461 | - dgst_len += r_len-dgst_len; | ||
1462 | - kop.crk_op = CRK_DSA_VERIFY; | ||
1463 | - /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
1464 | - kop.crk_param[0].crp_p = f; | ||
1465 | - kop.crk_param[0].crp_nbits = dgst_len * 8; | ||
1466 | - kop.crk_param[1].crp_p = q; | ||
1467 | - kop.crk_param[1].crp_nbits = q_len * 8; | ||
1468 | - kop.crk_param[2].crp_p = r; | ||
1469 | - kop.crk_param[2].crp_nbits = r_len * 8; | ||
1470 | - kop.crk_param[3].crp_p = g_xy; | ||
1471 | - kop.crk_param[3].crp_nbits = g_len * 8; | ||
1472 | - kop.crk_param[4].crp_p = w_xy; | ||
1473 | - kop.crk_param[4].crp_nbits = pub_key_len * 8; | ||
1474 | - kop.crk_param[5].crp_p = ab; | ||
1475 | - kop.crk_param[5].crp_nbits = ab_len * 8; | ||
1476 | - kop.crk_param[6].crp_p = c; | ||
1477 | - kop.crk_param[6].crp_nbits = d_len * 8; | ||
1478 | - kop.crk_param[7].crp_p = d; | ||
1479 | - kop.crk_param[7].crp_nbits = d_len * 8; | ||
1480 | - kop.crk_iparams = 8; | ||
1481 | + /* pub_key is or prime length while priv key is of length of order */ | ||
1482 | + if (cryptodev_asym_async(kop, BN_num_bytes(dh->p), dh->pub_key, | ||
1483 | + BN_num_bytes(dh->q), dh->priv_key)) | ||
1484 | + goto sw_try; | ||
1485 | |||
1486 | - if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { | ||
1487 | - /*OCF success value is 0, if not zero, change ret to fail*/ | ||
1488 | - if(0 == kop.crk_status) | ||
1489 | - ret = 1; | ||
1490 | - } else { | ||
1491 | - const ECDSA_METHOD *meth = ECDSA_OpenSSL(); | ||
1492 | + return ret; | ||
1493 | +sw_try: | ||
1494 | + { | ||
1495 | + const DH_METHOD *meth = DH_OpenSSL(); | ||
1496 | |||
1497 | - ret = (meth->ecdsa_do_verify)(dgst, dgst_len, sig, eckey); | ||
1498 | + if (kop) | ||
1499 | + free(kop); | ||
1500 | + ret = (meth->generate_key)(dh); | ||
1501 | + cookie->pkc_callback(cookie, 0); | ||
1502 | } | ||
1503 | - kop.crk_param[0].crp_p = NULL; | ||
1504 | - zapparams(&kop); | ||
1505 | - | ||
1506 | -err: | ||
1507 | return ret; | ||
1508 | } | ||
1509 | |||
1510 | @@ -2360,6 +3383,54 @@ sw_try: | ||
1511 | return (dhret); | ||
1512 | } | ||
1513 | |||
1514 | +/* Return Length if successful and 0 on failure */ | ||
1515 | +static int | ||
1516 | +cryptodev_dh_compute_key_async(unsigned char *key, const BIGNUM *pub_key, | ||
1517 | + DH *dh, struct pkc_cookie_s *cookie) | ||
1518 | +{ | ||
1519 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
1520 | + int ret = 1; | ||
1521 | + int fd, p_len; | ||
1522 | + unsigned char *padded_pub_key = NULL, *p = NULL; | ||
1523 | + | ||
1524 | + fd = *(int *)cookie->eng_handle; | ||
1525 | + | ||
1526 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
1527 | + kop->crk_op = CRK_DH_COMPUTE_KEY; | ||
1528 | + /* inputs: dh->priv_key pub_key dh->p key */ | ||
1529 | + spcf_bn2bin(dh->p, &p, &p_len); | ||
1530 | + spcf_bn2bin_ex(pub_key, &padded_pub_key, &p_len); | ||
1531 | + | ||
1532 | + if (bn2crparam(dh->priv_key, &kop->crk_param[0])) | ||
1533 | + goto err; | ||
1534 | + kop->crk_param[1].crp_p = padded_pub_key; | ||
1535 | + kop->crk_param[1].crp_nbits = p_len * 8; | ||
1536 | + kop->crk_param[2].crp_p = p; | ||
1537 | + kop->crk_param[2].crp_nbits = p_len * 8; | ||
1538 | + kop->crk_iparams = 3; | ||
1539 | + | ||
1540 | + kop->cookie = cookie; | ||
1541 | + kop->crk_param[3].crp_p = (void*) key; | ||
1542 | + kop->crk_param[3].crp_nbits = p_len * 8; | ||
1543 | + kop->crk_oparams = 1; | ||
1544 | + | ||
1545 | + if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) | ||
1546 | + goto err; | ||
1547 | + | ||
1548 | + return p_len; | ||
1549 | +err: | ||
1550 | + { | ||
1551 | + const DH_METHOD *meth = DH_OpenSSL(); | ||
1552 | + | ||
1553 | + if (kop) | ||
1554 | + free(kop); | ||
1555 | + ret = (meth->compute_key)(key, pub_key, dh); | ||
1556 | + /* Call user cookie handler */ | ||
1557 | + cookie->pkc_callback(cookie, 0); | ||
1558 | + } | ||
1559 | + return (ret); | ||
1560 | +} | ||
1561 | + | ||
1562 | int cryptodev_ecdh_compute_key(void *out, size_t outlen, | ||
1563 | const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, | ||
1564 | void *out, size_t *outlen)) | ||
1565 | @@ -2537,6 +3608,190 @@ err: | ||
1566 | return ret; | ||
1567 | } | ||
1568 | |||
1569 | +int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, | ||
1570 | + const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, | ||
1571 | + void *out, size_t *outlen), struct pkc_cookie_s *cookie) | ||
1572 | +{ | ||
1573 | + ec_curve_t ec_crv = EC_PRIME; | ||
1574 | + unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; | ||
1575 | + BIGNUM * w_x = NULL, *w_y = NULL; | ||
1576 | + int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; | ||
1577 | + BIGNUM * p = NULL, *a = NULL, *b = NULL; | ||
1578 | + BN_CTX *ctx; | ||
1579 | + EC_POINT *tmp=NULL; | ||
1580 | + BIGNUM *x=NULL, *y=NULL; | ||
1581 | + const BIGNUM *priv_key; | ||
1582 | + const EC_GROUP* group = NULL; | ||
1583 | + int ret = 1; | ||
1584 | + size_t buflen, len; | ||
1585 | + struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
1586 | + | ||
1587 | + if (!(ctx = BN_CTX_new()) || !kop) | ||
1588 | + goto err; | ||
1589 | + | ||
1590 | + memset(kop, 0, sizeof(struct crypt_kop)); | ||
1591 | + | ||
1592 | + BN_CTX_start(ctx); | ||
1593 | + x = BN_CTX_get(ctx); | ||
1594 | + y = BN_CTX_get(ctx); | ||
1595 | + p = BN_CTX_get(ctx); | ||
1596 | + a = BN_CTX_get(ctx); | ||
1597 | + b = BN_CTX_get(ctx); | ||
1598 | + w_x = BN_CTX_get(ctx); | ||
1599 | + w_y = BN_CTX_get(ctx); | ||
1600 | + | ||
1601 | + if (!x || !y || !p || !a || !b || !w_x || !w_y) { | ||
1602 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); | ||
1603 | + goto err; | ||
1604 | + } | ||
1605 | + | ||
1606 | + priv_key = EC_KEY_get0_private_key(ecdh); | ||
1607 | + if (priv_key == NULL) { | ||
1608 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_NO_PRIVATE_VALUE); | ||
1609 | + goto err; | ||
1610 | + } | ||
1611 | + | ||
1612 | + group = EC_KEY_get0_group(ecdh); | ||
1613 | + if ((tmp=EC_POINT_new(group)) == NULL) { | ||
1614 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); | ||
1615 | + goto err; | ||
1616 | + } | ||
1617 | + | ||
1618 | + if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == | ||
1619 | + NID_X9_62_prime_field) { | ||
1620 | + ec_crv = EC_PRIME; | ||
1621 | + | ||
1622 | + if (!EC_POINT_get_affine_coordinates_GFp(group, | ||
1623 | + EC_GROUP_get0_generator(group), x, y, ctx)) { | ||
1624 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); | ||
1625 | + goto err; | ||
1626 | + } | ||
1627 | + | ||
1628 | + /* get the ECC curve parameters */ | ||
1629 | + if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) { | ||
1630 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1631 | + goto err; | ||
1632 | + } | ||
1633 | + | ||
1634 | + /* get the public key pair for prime curve */ | ||
1635 | + if (!EC_POINT_get_affine_coordinates_GFp (group, pub_key, w_x, w_y,ctx)) { | ||
1636 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1637 | + goto err; | ||
1638 | + } | ||
1639 | + } else { | ||
1640 | + ec_crv = EC_BINARY; | ||
1641 | + | ||
1642 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1643 | + EC_GROUP_get0_generator(group), x, y, ctx)) { | ||
1644 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ECDH_R_POINT_ARITHMETIC_FAILURE); | ||
1645 | + goto err; | ||
1646 | + } | ||
1647 | + | ||
1648 | + /* get the ECC curve parameters */ | ||
1649 | + if (!EC_GROUP_get_curve_GF2m(group, p, a, b , ctx)) { | ||
1650 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1651 | + goto err; | ||
1652 | + } | ||
1653 | + | ||
1654 | + /* get the public key pair for binary curve */ | ||
1655 | + if (!EC_POINT_get_affine_coordinates_GF2m(group, | ||
1656 | + pub_key, w_x, w_y,ctx)) { | ||
1657 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); | ||
1658 | + goto err; | ||
1659 | + } | ||
1660 | + } | ||
1661 | + | ||
1662 | + /* irreducible polynomial that creates the field */ | ||
1663 | + if (spcf_bn2bin((BIGNUM*)&group->order, &r, &r_len)) { | ||
1664 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1665 | + goto err; | ||
1666 | + } | ||
1667 | + | ||
1668 | + /* Get the irreducible polynomial that creates the field */ | ||
1669 | + if (spcf_bn2bin(p, &q, &q_len)) { | ||
1670 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1671 | + goto err; | ||
1672 | + } | ||
1673 | + | ||
1674 | + /* Get the public key into a flat buffer with appropriate padding */ | ||
1675 | + pub_key_len = 2 * q_len; | ||
1676 | + w_xy = eng_copy_curve_points (w_x, w_y, pub_key_len, q_len); | ||
1677 | + if (!w_xy) { | ||
1678 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1679 | + goto err; | ||
1680 | + } | ||
1681 | + | ||
1682 | + /* Generation of ECC curve parameters */ | ||
1683 | + ab_len = 2*q_len; | ||
1684 | + ab = eng_copy_curve_points (a, b, ab_len, q_len); | ||
1685 | + if (!ab) { | ||
1686 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); | ||
1687 | + goto err; | ||
1688 | + } | ||
1689 | + | ||
1690 | + if (ec_crv == EC_BINARY) { | ||
1691 | + /* copy b' i.e c(b), instead of only b */ | ||
1692 | + if (eng_ec_get_cparam(EC_GROUP_get_curve_name(group), ab+q_len, q_len)) | ||
1693 | + { | ||
1694 | + unsigned char *c_temp = NULL; | ||
1695 | + int c_temp_len = q_len; | ||
1696 | + if (eng_ec_compute_cparam(b, p, &c_temp, &c_temp_len)) | ||
1697 | + memcpy(ab+q_len, c_temp, q_len); | ||
1698 | + else | ||
1699 | + goto err; | ||
1700 | + } | ||
1701 | + kop->curve_type = ECC_BINARY; | ||
1702 | + } else | ||
1703 | + kop->curve_type = ECC_PRIME; | ||
1704 | + | ||
1705 | + priv_key_len = r_len; | ||
1706 | + | ||
1707 | + /* | ||
1708 | + * If BN_num_bytes of priv_key returns less then r_len then | ||
1709 | + * add padding bytes before the key | ||
1710 | + */ | ||
1711 | + if (spcf_bn2bin_ex((BIGNUM *)priv_key, &s, &priv_key_len)) { | ||
1712 | + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); | ||
1713 | + goto err; | ||
1714 | + } | ||
1715 | + | ||
1716 | + buflen = (EC_GROUP_get_degree(group) + 7)/8; | ||
1717 | + len = BN_num_bytes(x); | ||
1718 | + if (len > buflen || q_len < buflen) { | ||
1719 | + ECDHerr(ECDH_F_ECDH_COMPUTE_KEY, ERR_R_INTERNAL_ERROR); | ||
1720 | + goto err; | ||
1721 | + } | ||
1722 | + | ||
1723 | + kop->crk_op = CRK_DH_COMPUTE_KEY; | ||
1724 | + kop->crk_param[0].crp_p = (void *) s; | ||
1725 | + kop->crk_param[0].crp_nbits = priv_key_len*8; | ||
1726 | + kop->crk_param[1].crp_p = (void *) w_xy; | ||
1727 | + kop->crk_param[1].crp_nbits = pub_key_len*8; | ||
1728 | + kop->crk_param[2].crp_p = (void *) q; | ||
1729 | + kop->crk_param[2].crp_nbits = q_len*8; | ||
1730 | + kop->crk_param[3].crp_p = (void *) ab; | ||
1731 | + kop->crk_param[3].crp_nbits = ab_len*8; | ||
1732 | + kop->crk_iparams = 4; | ||
1733 | + kop->crk_param[4].crp_p = (void *) out; | ||
1734 | + kop->crk_param[4].crp_nbits = q_len*8; | ||
1735 | + kop->crk_oparams = 1; | ||
1736 | + kop->cookie = cookie; | ||
1737 | + if (cryptodev_asym_async(kop, 0, NULL, 0, NULL)) | ||
1738 | + goto err; | ||
1739 | + | ||
1740 | + return q_len; | ||
1741 | +err: | ||
1742 | + { | ||
1743 | + const ECDH_METHOD *meth = ECDH_OpenSSL(); | ||
1744 | + | ||
1745 | + if (kop) | ||
1746 | + free(kop); | ||
1747 | + ret = (meth->compute_key)(out, outlen, pub_key, ecdh, KDF); | ||
1748 | + /* Call user cookie handler */ | ||
1749 | + cookie->pkc_callback(cookie, 0); | ||
1750 | + } | ||
1751 | + return ret; | ||
1752 | +} | ||
1753 | |||
1754 | static DH_METHOD cryptodev_dh = { | ||
1755 | "cryptodev DH method", | ||
1756 | @@ -2545,6 +3800,8 @@ static DH_METHOD cryptodev_dh = { | ||
1757 | NULL, | ||
1758 | NULL, | ||
1759 | NULL, | ||
1760 | + NULL, | ||
1761 | + NULL, | ||
1762 | 0, /* flags */ | ||
1763 | NULL /* app_data */ | ||
1764 | }; | ||
1765 | @@ -2553,6 +3810,7 @@ static ECDH_METHOD cryptodev_ecdh = { | ||
1766 | "cryptodev ECDH method", | ||
1767 | NULL, /* cryptodev_ecdh_compute_key */ | ||
1768 | NULL, | ||
1769 | + NULL, | ||
1770 | 0, /* flags */ | ||
1771 | NULL /* app_data */ | ||
1772 | }; | ||
1773 | @@ -2625,12 +3883,19 @@ ENGINE_load_cryptodev(void) | ||
1774 | cryptodev_rsa.rsa_priv_dec = rsa_meth->rsa_priv_dec; | ||
1775 | if (cryptodev_asymfeat & CRF_MOD_EXP) { | ||
1776 | cryptodev_rsa.bn_mod_exp = cryptodev_bn_mod_exp; | ||
1777 | - if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) | ||
1778 | + cryptodev_rsa.bn_mod_exp_async = | ||
1779 | + cryptodev_bn_mod_exp_async; | ||
1780 | + if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) { | ||
1781 | cryptodev_rsa.rsa_mod_exp = | ||
1782 | cryptodev_rsa_mod_exp; | ||
1783 | - else | ||
1784 | + cryptodev_rsa.rsa_mod_exp_async = | ||
1785 | + cryptodev_rsa_mod_exp_async; | ||
1786 | + } else { | ||
1787 | cryptodev_rsa.rsa_mod_exp = | ||
1788 | cryptodev_rsa_nocrt_mod_exp; | ||
1789 | + cryptodev_rsa.rsa_mod_exp_async = | ||
1790 | + cryptodev_rsa_nocrt_mod_exp_async; | ||
1791 | + } | ||
1792 | } | ||
1793 | } | ||
1794 | |||
1795 | @@ -2638,12 +3903,21 @@ ENGINE_load_cryptodev(void) | ||
1796 | const DSA_METHOD *meth = DSA_OpenSSL(); | ||
1797 | |||
1798 | memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); | ||
1799 | - if (cryptodev_asymfeat & CRF_DSA_SIGN) | ||
1800 | + if (cryptodev_asymfeat & CRF_DSA_SIGN) { | ||
1801 | cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; | ||
1802 | - if (cryptodev_asymfeat & CRF_DSA_VERIFY) | ||
1803 | + cryptodev_dsa.dsa_do_sign_async = | ||
1804 | + cryptodev_dsa_do_sign_async; | ||
1805 | + } | ||
1806 | + if (cryptodev_asymfeat & CRF_DSA_VERIFY) { | ||
1807 | cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; | ||
1808 | - if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) | ||
1809 | + cryptodev_dsa.dsa_do_verify_async = | ||
1810 | + cryptodev_dsa_verify_async; | ||
1811 | + } | ||
1812 | + if (cryptodev_asymfeat & CRF_DSA_GENERATE_KEY) { | ||
1813 | cryptodev_dsa.dsa_keygen = cryptodev_dsa_keygen; | ||
1814 | + cryptodev_dsa.dsa_keygen_async = | ||
1815 | + cryptodev_dsa_keygen_async; | ||
1816 | + } | ||
1817 | } | ||
1818 | |||
1819 | if (ENGINE_set_DH(engine, &cryptodev_dh)){ | ||
1820 | @@ -2652,10 +3926,15 @@ ENGINE_load_cryptodev(void) | ||
1821 | if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { | ||
1822 | cryptodev_dh.compute_key = | ||
1823 | cryptodev_dh_compute_key; | ||
1824 | + cryptodev_dh.compute_key_async = | ||
1825 | + cryptodev_dh_compute_key_async; | ||
1826 | } | ||
1827 | if (cryptodev_asymfeat & CRF_DH_GENERATE_KEY) { | ||
1828 | cryptodev_dh.generate_key = | ||
1829 | cryptodev_dh_keygen; | ||
1830 | + cryptodev_dh.generate_key_async = | ||
1831 | + cryptodev_dh_keygen_async; | ||
1832 | + | ||
1833 | } | ||
1834 | } | ||
1835 | |||
1836 | @@ -2664,10 +3943,14 @@ ENGINE_load_cryptodev(void) | ||
1837 | memcpy(&cryptodev_ecdsa, meth, sizeof(ECDSA_METHOD)); | ||
1838 | if (cryptodev_asymfeat & CRF_DSA_SIGN) { | ||
1839 | cryptodev_ecdsa.ecdsa_do_sign = cryptodev_ecdsa_do_sign; | ||
1840 | + cryptodev_ecdsa.ecdsa_do_sign_async = | ||
1841 | + cryptodev_ecdsa_do_sign_async; | ||
1842 | } | ||
1843 | if (cryptodev_asymfeat & CRF_DSA_VERIFY) { | ||
1844 | cryptodev_ecdsa.ecdsa_do_verify = | ||
1845 | cryptodev_ecdsa_verify; | ||
1846 | + cryptodev_ecdsa.ecdsa_do_verify_async = | ||
1847 | + cryptodev_ecdsa_verify_async; | ||
1848 | } | ||
1849 | } | ||
1850 | |||
1851 | @@ -2676,9 +3959,16 @@ ENGINE_load_cryptodev(void) | ||
1852 | memcpy(&cryptodev_ecdh, ecdh_meth, sizeof(ECDH_METHOD)); | ||
1853 | if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) { | ||
1854 | cryptodev_ecdh.compute_key = cryptodev_ecdh_compute_key; | ||
1855 | + cryptodev_ecdh.compute_key_async = | ||
1856 | + cryptodev_ecdh_compute_key_async; | ||
1857 | } | ||
1858 | } | ||
1859 | |||
1860 | + ENGINE_set_check_pkc_availability(engine, cryptodev_check_availability); | ||
1861 | + ENGINE_set_close_instance(engine, cryptodev_close_instance); | ||
1862 | + ENGINE_set_init_instance(engine, cryptodev_init_instance); | ||
1863 | + ENGINE_set_async_map(engine, ENGINE_ALLPKC_ASYNC); | ||
1864 | + | ||
1865 | ENGINE_add(engine); | ||
1866 | ENGINE_free(engine); | ||
1867 | ERR_clear_error(); | ||
1868 | diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h | ||
1869 | index 451ef8f..8fc3077 100644 | ||
1870 | --- a/crypto/engine/eng_int.h | ||
1871 | +++ b/crypto/engine/eng_int.h | ||
1872 | @@ -181,7 +181,29 @@ struct engine_st | ||
1873 | ENGINE_LOAD_KEY_PTR load_pubkey; | ||
1874 | |||
1875 | ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; | ||
1876 | - | ||
1877 | + /* | ||
1878 | + * Instantiate Engine handle to be passed in check_pkc_availability | ||
1879 | + * Ensure that Engine is instantiated before any pkc asynchronous call. | ||
1880 | + */ | ||
1881 | + void *(*engine_init_instance)(void); | ||
1882 | + /* | ||
1883 | + * Instantiated Engine handle will be closed with this call. | ||
1884 | + * Ensure that no pkc asynchronous call is made after this call | ||
1885 | + */ | ||
1886 | + void (*engine_close_instance)(void *handle); | ||
1887 | + /* | ||
1888 | + * Check availability will extract the data from kernel. | ||
1889 | + * eng_handle: This is the Engine handle corresponds to which | ||
1890 | + * the cookies needs to be polled. | ||
1891 | + * return 0 if cookie available else 1 | ||
1892 | + */ | ||
1893 | + int (*check_pkc_availability)(void *eng_handle); | ||
1894 | + /* | ||
1895 | + * The following map is used to check if the engine supports asynchronous implementation | ||
1896 | + * ENGINE_ASYNC_FLAG* for available bitmap. Any application checking for asynchronous | ||
1897 | + * implementation need to check this features using "int ENGINE_get_async_map(engine *)"; | ||
1898 | + */ | ||
1899 | + int async_map; | ||
1900 | const ENGINE_CMD_DEFN *cmd_defns; | ||
1901 | int flags; | ||
1902 | /* reference count on the structure itself */ | ||
1903 | diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c | ||
1904 | index 18a6664..6fa621c 100644 | ||
1905 | --- a/crypto/engine/eng_lib.c | ||
1906 | +++ b/crypto/engine/eng_lib.c | ||
1907 | @@ -98,7 +98,11 @@ void engine_set_all_null(ENGINE *e) | ||
1908 | e->ctrl = NULL; | ||
1909 | e->load_privkey = NULL; | ||
1910 | e->load_pubkey = NULL; | ||
1911 | + e->check_pkc_availability = NULL; | ||
1912 | + e->engine_init_instance = NULL; | ||
1913 | + e->engine_close_instance = NULL; | ||
1914 | e->cmd_defns = NULL; | ||
1915 | + e->async_map = 0; | ||
1916 | e->flags = 0; | ||
1917 | } | ||
1918 | |||
1919 | @@ -233,6 +237,48 @@ int ENGINE_set_id(ENGINE *e, const char *id) | ||
1920 | return 1; | ||
1921 | } | ||
1922 | |||
1923 | +void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)) | ||
1924 | + { | ||
1925 | + e->engine_init_instance = engine_init_instance; | ||
1926 | + } | ||
1927 | + | ||
1928 | +void ENGINE_set_close_instance(ENGINE *e, | ||
1929 | + void (*engine_close_instance)(void *)) | ||
1930 | + { | ||
1931 | + e->engine_close_instance = engine_close_instance; | ||
1932 | + } | ||
1933 | + | ||
1934 | +void ENGINE_set_async_map(ENGINE *e, int async_map) | ||
1935 | + { | ||
1936 | + e->async_map = async_map; | ||
1937 | + } | ||
1938 | + | ||
1939 | +void *ENGINE_init_instance(ENGINE *e) | ||
1940 | + { | ||
1941 | + return e->engine_init_instance(); | ||
1942 | + } | ||
1943 | + | ||
1944 | +void ENGINE_close_instance(ENGINE *e, void *eng_handle) | ||
1945 | + { | ||
1946 | + e->engine_close_instance(eng_handle); | ||
1947 | + } | ||
1948 | + | ||
1949 | +int ENGINE_get_async_map(ENGINE *e) | ||
1950 | + { | ||
1951 | + return e->async_map; | ||
1952 | + } | ||
1953 | + | ||
1954 | +void ENGINE_set_check_pkc_availability(ENGINE *e, | ||
1955 | + int (*check_pkc_availability)(void *eng_handle)) | ||
1956 | + { | ||
1957 | + e->check_pkc_availability = check_pkc_availability; | ||
1958 | + } | ||
1959 | + | ||
1960 | +int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle) | ||
1961 | + { | ||
1962 | + return e->check_pkc_availability(eng_handle); | ||
1963 | + } | ||
1964 | + | ||
1965 | int ENGINE_set_name(ENGINE *e, const char *name) | ||
1966 | { | ||
1967 | if(name == NULL) | ||
1968 | diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h | ||
1969 | index 237a6c9..ccff86a 100644 | ||
1970 | --- a/crypto/engine/engine.h | ||
1971 | +++ b/crypto/engine/engine.h | ||
1972 | @@ -473,6 +473,30 @@ ENGINE *ENGINE_new(void); | ||
1973 | int ENGINE_free(ENGINE *e); | ||
1974 | int ENGINE_up_ref(ENGINE *e); | ||
1975 | int ENGINE_set_id(ENGINE *e, const char *id); | ||
1976 | +void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)); | ||
1977 | +void ENGINE_set_close_instance(ENGINE *e, | ||
1978 | + void (*engine_free_instance)(void *)); | ||
1979 | +/* | ||
1980 | + * Following FLAGS are bitmap store in async_map to set asynchronous interface capability | ||
1981 | + *of the engine | ||
1982 | + */ | ||
1983 | +#define ENGINE_RSA_ASYNC 0x0001 | ||
1984 | +#define ENGINE_DSA_ASYNC 0x0002 | ||
1985 | +#define ENGINE_DH_ASYNC 0x0004 | ||
1986 | +#define ENGINE_ECDSA_ASYNC 0x0008 | ||
1987 | +#define ENGINE_ECDH_ASYNC 0x0010 | ||
1988 | +#define ENGINE_ALLPKC_ASYNC 0x001F | ||
1989 | +/* Engine implementation will set the bitmap based on above flags using following API */ | ||
1990 | +void ENGINE_set_async_map(ENGINE *e, int async_map); | ||
1991 | + /* Application need to check the bitmap based on above flags using following API | ||
1992 | + * to confirm asynchronous methods supported | ||
1993 | + */ | ||
1994 | +int ENGINE_get_async_map(ENGINE *e); | ||
1995 | +void *ENGINE_init_instance(ENGINE *e); | ||
1996 | +void ENGINE_close_instance(ENGINE *e, void *eng_handle); | ||
1997 | +void ENGINE_set_check_pkc_availability(ENGINE *e, | ||
1998 | + int (*check_pkc_availability)(void *eng_handle)); | ||
1999 | +int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle); | ||
2000 | int ENGINE_set_name(ENGINE *e, const char *name); | ||
2001 | int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); | ||
2002 | int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); | ||
2003 | diff --git a/crypto/rsa/rsa.h b/crypto/rsa/rsa.h | ||
2004 | index 5f269e5..6ef1b15 100644 | ||
2005 | --- a/crypto/rsa/rsa.h | ||
2006 | +++ b/crypto/rsa/rsa.h | ||
2007 | @@ -101,6 +101,29 @@ struct rsa_meth_st | ||
2008 | int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
2009 | const BIGNUM *m, BN_CTX *ctx, | ||
2010 | BN_MONT_CTX *m_ctx); /* Can be null */ | ||
2011 | + /* | ||
2012 | + * Cookie in the following _async variant must be allocated before | ||
2013 | + * submission and can be freed once its corresponding callback | ||
2014 | + * handler is called | ||
2015 | + */ | ||
2016 | + int (*rsa_pub_enc_asyn)(int flen,const unsigned char *from, | ||
2017 | + unsigned char *to, RSA *rsa, int padding, | ||
2018 | + struct pkc_cookie_s *cookie); | ||
2019 | + int (*rsa_pub_dec_async)(int flen,const unsigned char *from, | ||
2020 | + unsigned char *to, RSA *rsa, int padding, | ||
2021 | + struct pkc_cookie_s *cookie); | ||
2022 | + int (*rsa_priv_enc_async)(int flen,const unsigned char *from, | ||
2023 | + unsigned char *to, RSA *rsa, int padding, | ||
2024 | + struct pkc_cookie_s *cookie); | ||
2025 | + int (*rsa_priv_dec_async)(int flen,const unsigned char *from, | ||
2026 | + unsigned char *to, RSA *rsa, int padding, | ||
2027 | + struct pkc_cookie_s *cookie); | ||
2028 | + int (*rsa_mod_exp_async)(BIGNUM *r0, const BIGNUM *I, RSA *rsa, | ||
2029 | + BN_CTX *ctx, struct pkc_cookie_s *cookie); | ||
2030 | + int (*bn_mod_exp_async)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
2031 | + const BIGNUM *m, BN_CTX *ctx, | ||
2032 | + BN_MONT_CTX *m_ctx, struct pkc_cookie_s *cookie); | ||
2033 | + | ||
2034 | int (*init)(RSA *rsa); /* called at new */ | ||
2035 | int (*finish)(RSA *rsa); /* called at free */ | ||
2036 | int flags; /* RSA_METHOD_FLAG_* things */ | ||
2037 | -- | ||
2038 | 2.3.5 | ||
2039 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch b/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch new file mode 100644 index 00000000..244d230e --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch | |||
@@ -0,0 +1,153 @@ | |||
1 | From e4fc051f8ae1c093b25ca346c2ec351ff3b700d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hou Zhiqiang <B48286@freescale.com> | ||
3 | Date: Wed, 2 Apr 2014 16:10:43 +0800 | ||
4 | Subject: [PATCH 11/26] Add RSA keygen operation and support gendsa command | ||
5 | with hardware engine | ||
6 | |||
7 | Upstream-status: Pending | ||
8 | |||
9 | Signed-off-by: Hou Zhiqiang <B48286@freescale.com> | ||
10 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
11 | --- | ||
12 | crypto/engine/eng_cryptodev.c | 118 ++++++++++++++++++++++++++++++++++++++++++ | ||
13 | 1 file changed, 118 insertions(+) | ||
14 | |||
15 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
16 | index 9f2416e..b2919a8 100644 | ||
17 | --- a/crypto/engine/eng_cryptodev.c | ||
18 | +++ b/crypto/engine/eng_cryptodev.c | ||
19 | @@ -1906,6 +1906,121 @@ err: | ||
20 | return dsaret; | ||
21 | } | ||
22 | |||
23 | +/* Cryptodev RSA Key Gen routine */ | ||
24 | +static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
25 | +{ | ||
26 | + struct crypt_kop kop; | ||
27 | + int ret, fd; | ||
28 | + int p_len, q_len; | ||
29 | + int i; | ||
30 | + | ||
31 | + if ((fd = get_asym_dev_crypto()) < 0) | ||
32 | + return fd; | ||
33 | + | ||
34 | + if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; | ||
35 | + if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; | ||
36 | + if(!rsa->e && ((rsa->e=BN_new()) == NULL)) goto err; | ||
37 | + if(!rsa->p && ((rsa->p=BN_new()) == NULL)) goto err; | ||
38 | + if(!rsa->q && ((rsa->q=BN_new()) == NULL)) goto err; | ||
39 | + if(!rsa->dmp1 && ((rsa->dmp1=BN_new()) == NULL)) goto err; | ||
40 | + if(!rsa->dmq1 && ((rsa->dmq1=BN_new()) == NULL)) goto err; | ||
41 | + if(!rsa->iqmp && ((rsa->iqmp=BN_new()) == NULL)) goto err; | ||
42 | + | ||
43 | + BN_copy(rsa->e, e); | ||
44 | + | ||
45 | + p_len = (bits+1) / (2 * 8); | ||
46 | + q_len = (bits - p_len * 8) / 8; | ||
47 | + memset(&kop, 0, sizeof kop); | ||
48 | + kop.crk_op = CRK_RSA_GENERATE_KEY; | ||
49 | + | ||
50 | + /* p length */ | ||
51 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); | ||
52 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
53 | + goto err; | ||
54 | + kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; | ||
55 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); | ||
56 | + kop.crk_iparams++; | ||
57 | + kop.crk_oparams++; | ||
58 | + /* q length */ | ||
59 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); | ||
60 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
61 | + goto err; | ||
62 | + kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; | ||
63 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); | ||
64 | + kop.crk_iparams++; | ||
65 | + kop.crk_oparams++; | ||
66 | + /* n length */ | ||
67 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); | ||
68 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
69 | + goto err; | ||
70 | + kop.crk_param[kop.crk_iparams].crp_nbits = bits; | ||
71 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0x00, p_len + q_len + 1); | ||
72 | + kop.crk_iparams++; | ||
73 | + kop.crk_oparams++; | ||
74 | + /* d length */ | ||
75 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + q_len + 1, sizeof(char)); | ||
76 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
77 | + goto err; | ||
78 | + kop.crk_param[kop.crk_iparams].crp_nbits = bits; | ||
79 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + q_len + 1); | ||
80 | + kop.crk_iparams++; | ||
81 | + kop.crk_oparams++; | ||
82 | + /* dp1 length */ | ||
83 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); | ||
84 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
85 | + goto err; | ||
86 | + kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; | ||
87 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); | ||
88 | + kop.crk_iparams++; | ||
89 | + kop.crk_oparams++; | ||
90 | + /* dq1 length */ | ||
91 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); | ||
92 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
93 | + goto err; | ||
94 | + kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; | ||
95 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); | ||
96 | + kop.crk_iparams++; | ||
97 | + kop.crk_oparams++; | ||
98 | + /* i length */ | ||
99 | + kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); | ||
100 | + if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
101 | + goto err; | ||
102 | + kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; | ||
103 | + memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); | ||
104 | + kop.crk_iparams++; | ||
105 | + kop.crk_oparams++; | ||
106 | + | ||
107 | + if (ioctl(fd, CIOCKEY, &kop) == 0) { | ||
108 | + BN_bin2bn(kop.crk_param[0].crp_p, | ||
109 | + p_len, rsa->p); | ||
110 | + BN_bin2bn(kop.crk_param[1].crp_p, | ||
111 | + q_len, rsa->q); | ||
112 | + BN_bin2bn(kop.crk_param[2].crp_p, | ||
113 | + bits / 8, rsa->n); | ||
114 | + BN_bin2bn(kop.crk_param[3].crp_p, | ||
115 | + bits / 8, rsa->d); | ||
116 | + BN_bin2bn(kop.crk_param[4].crp_p, | ||
117 | + p_len, rsa->dmp1); | ||
118 | + BN_bin2bn(kop.crk_param[5].crp_p, | ||
119 | + q_len, rsa->dmq1); | ||
120 | + BN_bin2bn(kop.crk_param[6].crp_p, | ||
121 | + p_len, rsa->iqmp); | ||
122 | + return 1; | ||
123 | + } | ||
124 | +sw_try: | ||
125 | + { | ||
126 | + const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); | ||
127 | + ret = (meth->rsa_keygen)(rsa, bits, e, cb); | ||
128 | + } | ||
129 | + return ret; | ||
130 | + | ||
131 | +err: | ||
132 | + for (i = 0; i < CRK_MAXPARAM; i++) | ||
133 | + free(kop.crk_param[i].crp_p); | ||
134 | + return 0; | ||
135 | + | ||
136 | +} | ||
137 | + | ||
138 | /* Cryptodev DSA Key Gen routine */ | ||
139 | static int cryptodev_dsa_keygen(DSA *dsa) | ||
140 | { | ||
141 | @@ -3896,6 +4011,9 @@ ENGINE_load_cryptodev(void) | ||
142 | cryptodev_rsa.rsa_mod_exp_async = | ||
143 | cryptodev_rsa_nocrt_mod_exp_async; | ||
144 | } | ||
145 | + if (cryptodev_asymfeat & CRF_RSA_GENERATE_KEY) | ||
146 | + cryptodev_rsa.rsa_keygen = | ||
147 | + cryptodev_rsa_keygen; | ||
148 | } | ||
149 | } | ||
150 | |||
151 | -- | ||
152 | 2.3.5 | ||
153 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch b/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch new file mode 100644 index 00000000..7f907da4 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0012-RSA-Keygen-Fix.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From ac777f046da7151386d667391362ecb553ceee90 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Wed, 16 Apr 2014 22:53:04 +0545 | ||
4 | Subject: [PATCH 12/26] RSA Keygen Fix | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | If Kernel driver doesn't support RSA Keygen or same returns | ||
9 | error handling the keygen operation, the keygen is gracefully | ||
10 | handled by software supported rsa_keygen handler | ||
11 | |||
12 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
13 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
14 | --- | ||
15 | crypto/engine/eng_cryptodev.c | 12 +++++++----- | ||
16 | 1 file changed, 7 insertions(+), 5 deletions(-) | ||
17 | |||
18 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
19 | index b2919a8..ed5f20f 100644 | ||
20 | --- a/crypto/engine/eng_cryptodev.c | ||
21 | +++ b/crypto/engine/eng_cryptodev.c | ||
22 | @@ -1915,7 +1915,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
23 | int i; | ||
24 | |||
25 | if ((fd = get_asym_dev_crypto()) < 0) | ||
26 | - return fd; | ||
27 | + goto sw_try; | ||
28 | |||
29 | if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; | ||
30 | if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err; | ||
31 | @@ -1936,7 +1936,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
32 | /* p length */ | ||
33 | kop.crk_param[kop.crk_iparams].crp_p = calloc(p_len + 1, sizeof(char)); | ||
34 | if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
35 | - goto err; | ||
36 | + goto sw_try; | ||
37 | kop.crk_param[kop.crk_iparams].crp_nbits = p_len * 8; | ||
38 | memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, p_len + 1); | ||
39 | kop.crk_iparams++; | ||
40 | @@ -1944,7 +1944,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
41 | /* q length */ | ||
42 | kop.crk_param[kop.crk_iparams].crp_p = calloc(q_len + 1, sizeof(char)); | ||
43 | if (!kop.crk_param[kop.crk_iparams].crp_p) | ||
44 | - goto err; | ||
45 | + goto sw_try; | ||
46 | kop.crk_param[kop.crk_iparams].crp_nbits = q_len * 8; | ||
47 | memset(kop.crk_param[kop.crk_iparams].crp_p, 0xff, q_len + 1); | ||
48 | kop.crk_iparams++; | ||
49 | @@ -2009,8 +2009,10 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
50 | } | ||
51 | sw_try: | ||
52 | { | ||
53 | - const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); | ||
54 | - ret = (meth->rsa_keygen)(rsa, bits, e, cb); | ||
55 | + const RSA_METHOD *meth = rsa->meth; | ||
56 | + rsa->meth = RSA_PKCS1_SSLeay(); | ||
57 | + ret = RSA_generate_key_ex(rsa, bits, e, cb); | ||
58 | + rsa->meth = meth; | ||
59 | } | ||
60 | return ret; | ||
61 | |||
62 | -- | ||
63 | 2.3.5 | ||
64 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch b/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch new file mode 100644 index 00000000..c9d8ace8 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0013-Removed-local-copy-of-curve_t-type.patch | |||
@@ -0,0 +1,164 @@ | |||
1 | From 6aaa306cdf878250d7b6eaf30978de313653886b Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Thu, 17 Apr 2014 06:57:59 +0545 | ||
4 | Subject: [PATCH 13/26] Removed local copy of curve_t type | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
9 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
10 | --- | ||
11 | crypto/engine/eng_cryptodev.c | 34 ++++++++++++++-------------------- | ||
12 | crypto/engine/eng_cryptodev_ec.h | 7 ------- | ||
13 | 2 files changed, 14 insertions(+), 27 deletions(-) | ||
14 | |||
15 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
16 | index ed5f20f..5d883fa 100644 | ||
17 | --- a/crypto/engine/eng_cryptodev.c | ||
18 | +++ b/crypto/engine/eng_cryptodev.c | ||
19 | @@ -2398,12 +2398,6 @@ static ECDSA_METHOD cryptodev_ecdsa = { | ||
20 | NULL /* app_data */ | ||
21 | }; | ||
22 | |||
23 | -typedef enum ec_curve_s | ||
24 | -{ | ||
25 | - EC_PRIME, | ||
26 | - EC_BINARY | ||
27 | -} ec_curve_t; | ||
28 | - | ||
29 | /* ENGINE handler for ECDSA Sign */ | ||
30 | static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, | ||
31 | int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey) | ||
32 | @@ -2420,7 +2414,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, | ||
33 | const BIGNUM *order = NULL, *priv_key=NULL; | ||
34 | const EC_GROUP *group = NULL; | ||
35 | struct crypt_kop kop; | ||
36 | - ec_curve_t ec_crv = EC_PRIME; | ||
37 | + enum ec_curve_t ec_crv = EC_PRIME; | ||
38 | |||
39 | memset(&kop, 0, sizeof(kop)); | ||
40 | ecdsa = ecdsa_check(eckey); | ||
41 | @@ -2553,7 +2547,7 @@ static ECDSA_SIG *cryptodev_ecdsa_do_sign( const unsigned char *dgst, | ||
42 | else | ||
43 | goto err; | ||
44 | } | ||
45 | - kop.curve_type = ECC_BINARY; | ||
46 | + kop.curve_type = EC_BINARY; | ||
47 | } | ||
48 | |||
49 | /* Calculation of Generator point */ | ||
50 | @@ -2647,7 +2641,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, | ||
51 | const EC_POINT *pub_key = NULL; | ||
52 | const BIGNUM *order = NULL; | ||
53 | const EC_GROUP *group=NULL; | ||
54 | - ec_curve_t ec_crv = EC_PRIME; | ||
55 | + enum ec_curve_t ec_crv = EC_PRIME; | ||
56 | struct crypt_kop kop; | ||
57 | |||
58 | memset(&kop, 0, sizeof kop); | ||
59 | @@ -2792,7 +2786,7 @@ static int cryptodev_ecdsa_verify(const unsigned char *dgst, int dgst_len, | ||
60 | else | ||
61 | goto err; | ||
62 | } | ||
63 | - kop.curve_type = ECC_BINARY; | ||
64 | + kop.curve_type = EC_BINARY; | ||
65 | } | ||
66 | |||
67 | /* Calculation of Generator point */ | ||
68 | @@ -2893,7 +2887,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, | ||
69 | const BIGNUM *order = NULL, *priv_key=NULL; | ||
70 | const EC_GROUP *group = NULL; | ||
71 | struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
72 | - ec_curve_t ec_crv = EC_PRIME; | ||
73 | + enum ec_curve_t ec_crv = EC_PRIME; | ||
74 | |||
75 | if (!(sig->r = BN_new()) || !kop) | ||
76 | goto err; | ||
77 | @@ -3029,7 +3023,7 @@ static int cryptodev_ecdsa_do_sign_async( const unsigned char *dgst, | ||
78 | else | ||
79 | goto err; | ||
80 | } | ||
81 | - kop->curve_type = ECC_BINARY; | ||
82 | + kop->curve_type = EC_BINARY; | ||
83 | } | ||
84 | |||
85 | /* Calculation of Generator point */ | ||
86 | @@ -3105,7 +3099,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, | ||
87 | const EC_POINT *pub_key = NULL; | ||
88 | const BIGNUM *order = NULL; | ||
89 | const EC_GROUP *group=NULL; | ||
90 | - ec_curve_t ec_crv = EC_PRIME; | ||
91 | + enum ec_curve_t ec_crv = EC_PRIME; | ||
92 | struct crypt_kop *kop = malloc(sizeof(struct crypt_kop)); | ||
93 | |||
94 | if (!kop) | ||
95 | @@ -3247,7 +3241,7 @@ static int cryptodev_ecdsa_verify_async(const unsigned char *dgst, int dgst_len, | ||
96 | /* copy b' i.e c(b), instead of only b */ | ||
97 | eng_ec_get_cparam (EC_GROUP_get_curve_name(group), | ||
98 | ab+q_len, q_len); | ||
99 | - kop->curve_type = ECC_BINARY; | ||
100 | + kop->curve_type = EC_BINARY; | ||
101 | } | ||
102 | |||
103 | /* Calculation of Generator point */ | ||
104 | @@ -3552,7 +3546,7 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, | ||
105 | const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, | ||
106 | void *out, size_t *outlen)) | ||
107 | { | ||
108 | - ec_curve_t ec_crv = EC_PRIME; | ||
109 | + enum ec_curve_t ec_crv = EC_PRIME; | ||
110 | unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; | ||
111 | BIGNUM * w_x = NULL, *w_y = NULL; | ||
112 | int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; | ||
113 | @@ -3678,9 +3672,9 @@ int cryptodev_ecdh_compute_key(void *out, size_t outlen, | ||
114 | else | ||
115 | goto err; | ||
116 | } | ||
117 | - kop.curve_type = ECC_BINARY; | ||
118 | + kop.curve_type = EC_BINARY; | ||
119 | } else | ||
120 | - kop.curve_type = ECC_PRIME; | ||
121 | + kop.curve_type = EC_PRIME; | ||
122 | |||
123 | priv_key_len = r_len; | ||
124 | |||
125 | @@ -3729,7 +3723,7 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, | ||
126 | const EC_POINT *pub_key, EC_KEY *ecdh, void *(*KDF)(const void *in, size_t inlen, | ||
127 | void *out, size_t *outlen), struct pkc_cookie_s *cookie) | ||
128 | { | ||
129 | - ec_curve_t ec_crv = EC_PRIME; | ||
130 | + enum ec_curve_t ec_crv = EC_PRIME; | ||
131 | unsigned char * q = NULL, *w_xy = NULL, *ab = NULL, *s = NULL, *r = NULL; | ||
132 | BIGNUM * w_x = NULL, *w_y = NULL; | ||
133 | int q_len = 0, ab_len = 0, pub_key_len = 0, r_len = 0, priv_key_len = 0; | ||
134 | @@ -3857,9 +3851,9 @@ int cryptodev_ecdh_compute_key_async(void *out, size_t outlen, | ||
135 | else | ||
136 | goto err; | ||
137 | } | ||
138 | - kop->curve_type = ECC_BINARY; | ||
139 | + kop->curve_type = EC_BINARY; | ||
140 | } else | ||
141 | - kop->curve_type = ECC_PRIME; | ||
142 | + kop->curve_type = EC_PRIME; | ||
143 | |||
144 | priv_key_len = r_len; | ||
145 | |||
146 | diff --git a/crypto/engine/eng_cryptodev_ec.h b/crypto/engine/eng_cryptodev_ec.h | ||
147 | index 77aee71..a4b8da5 100644 | ||
148 | --- a/crypto/engine/eng_cryptodev_ec.h | ||
149 | +++ b/crypto/engine/eng_cryptodev_ec.h | ||
150 | @@ -286,11 +286,4 @@ static inline unsigned char *eng_copy_curve_points(BIGNUM * x, BIGNUM * y, | ||
151 | |||
152 | return xy; | ||
153 | } | ||
154 | - | ||
155 | -enum curve_t { | ||
156 | - DISCRETE_LOG, | ||
157 | - ECC_PRIME, | ||
158 | - ECC_BINARY, | ||
159 | - MAX_ECC_TYPE | ||
160 | -}; | ||
161 | #endif | ||
162 | -- | ||
163 | 2.3.5 | ||
164 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch b/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch new file mode 100644 index 00000000..198bed70 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0014-Modulus-parameter-is-not-populated-by-dhparams.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 14623ca9e417ccef1ad3f4138acfac0ebe682f1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Tue, 22 Apr 2014 22:58:33 +0545 | ||
4 | Subject: [PATCH 14/26] Modulus parameter is not populated by dhparams | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | When dhparams are created, modulus parameter required for | ||
9 | private key generation is not populated. So, falling back | ||
10 | to software for proper population of modulus parameters followed | ||
11 | by private key generation | ||
12 | |||
13 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
14 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
15 | --- | ||
16 | crypto/engine/eng_cryptodev.c | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
20 | index 5d883fa..6d69336 100644 | ||
21 | --- a/crypto/engine/eng_cryptodev.c | ||
22 | +++ b/crypto/engine/eng_cryptodev.c | ||
23 | @@ -3364,7 +3364,7 @@ static int cryptodev_dh_keygen_async(DH *dh, struct pkc_cookie_s *cookie) | ||
24 | kop->crk_op = CRK_DH_GENERATE_KEY; | ||
25 | if (bn2crparam(dh->p, &kop->crk_param[0])) | ||
26 | goto sw_try; | ||
27 | - if (bn2crparam(dh->q, &kop->crk_param[1])) | ||
28 | + if (!dh->q || bn2crparam(dh->q, &kop->crk_param[1])) | ||
29 | goto sw_try; | ||
30 | kop->crk_param[2].crp_p = g; | ||
31 | kop->crk_param[2].crp_nbits = g_len * 8; | ||
32 | @@ -3419,7 +3419,7 @@ static int cryptodev_dh_keygen(DH *dh) | ||
33 | kop.crk_op = CRK_DH_GENERATE_KEY; | ||
34 | if (bn2crparam(dh->p, &kop.crk_param[0])) | ||
35 | goto sw_try; | ||
36 | - if (bn2crparam(dh->q, &kop.crk_param[1])) | ||
37 | + if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) | ||
38 | goto sw_try; | ||
39 | kop.crk_param[2].crp_p = g; | ||
40 | kop.crk_param[2].crp_nbits = g_len * 8; | ||
41 | -- | ||
42 | 2.3.5 | ||
43 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch b/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch new file mode 100644 index 00000000..59330a1e --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0015-SW-Backoff-mechanism-for-dsa-keygen.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 10be401a33e6ebcc325d6747914c70595cd53d0a Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Thu, 24 Apr 2014 00:35:34 +0545 | ||
4 | Subject: [PATCH 15/26] SW Backoff mechanism for dsa keygen | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | DSA Keygen is not handled in default openssl dsa method. Due to | ||
9 | same null function pointer in SW DSA method, the backoff for dsa | ||
10 | keygen gives segmentation fault. | ||
11 | |||
12 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
13 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
14 | --- | ||
15 | crypto/engine/eng_cryptodev.c | 12 ++++++++---- | ||
16 | 1 file changed, 8 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
19 | index 6d69336..dab8fea 100644 | ||
20 | --- a/crypto/engine/eng_cryptodev.c | ||
21 | +++ b/crypto/engine/eng_cryptodev.c | ||
22 | @@ -2069,8 +2069,10 @@ static int cryptodev_dsa_keygen(DSA *dsa) | ||
23 | return ret; | ||
24 | sw_try: | ||
25 | { | ||
26 | - const DSA_METHOD *meth = DSA_OpenSSL(); | ||
27 | - ret = (meth->dsa_keygen)(dsa); | ||
28 | + const DSA_METHOD *meth = dsa->meth; | ||
29 | + dsa->meth = DSA_OpenSSL(); | ||
30 | + ret = DSA_generate_key(dsa); | ||
31 | + dsa->meth = meth; | ||
32 | } | ||
33 | return ret; | ||
34 | } | ||
35 | @@ -2124,11 +2126,13 @@ static int cryptodev_dsa_keygen_async(DSA *dsa, struct pkc_cookie_s *cookie) | ||
36 | return ret; | ||
37 | sw_try: | ||
38 | { | ||
39 | - const DSA_METHOD *meth = DSA_OpenSSL(); | ||
40 | + const DSA_METHOD *meth = dsa->meth; | ||
41 | |||
42 | + dsa->meth = DSA_OpenSSL(); | ||
43 | if (kop) | ||
44 | free(kop); | ||
45 | - ret = (meth->dsa_keygen)(dsa); | ||
46 | + ret = DSA_generate_key(dsa); | ||
47 | + dsa->meth = meth; | ||
48 | cookie->pkc_callback(cookie, 0); | ||
49 | } | ||
50 | return ret; | ||
51 | -- | ||
52 | 2.3.5 | ||
53 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch b/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch new file mode 100644 index 00000000..8923cb63 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0016-Fixed-DH-keygen-pair-generator.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | From d2c868c6370bcc0d0a254e641907da2cdf992d62 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
3 | Date: Thu, 1 May 2014 06:35:45 +0545 | ||
4 | Subject: [PATCH 16/26] Fixed DH keygen pair generator | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Wrong Padding results into keygen length error | ||
9 | |||
10 | Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> | ||
11 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
12 | --- | ||
13 | crypto/engine/eng_cryptodev.c | 50 ++++++++++++++++++++++++++++--------------- | ||
14 | 1 file changed, 33 insertions(+), 17 deletions(-) | ||
15 | |||
16 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
17 | index dab8fea..13d924f 100644 | ||
18 | --- a/crypto/engine/eng_cryptodev.c | ||
19 | +++ b/crypto/engine/eng_cryptodev.c | ||
20 | @@ -3396,44 +3396,60 @@ sw_try: | ||
21 | static int cryptodev_dh_keygen(DH *dh) | ||
22 | { | ||
23 | struct crypt_kop kop; | ||
24 | - int ret = 1, g_len; | ||
25 | - unsigned char *g = NULL; | ||
26 | + int ret = 1, q_len = 0; | ||
27 | + unsigned char *q = NULL, *g = NULL, *s = NULL, *w = NULL; | ||
28 | + BIGNUM *pub_key = NULL, *priv_key = NULL; | ||
29 | + int generate_new_key = 1; | ||
30 | |||
31 | - if (dh->priv_key == NULL) { | ||
32 | - if ((dh->priv_key=BN_new()) == NULL) | ||
33 | - goto sw_try; | ||
34 | - } | ||
35 | + if (dh->priv_key) | ||
36 | + priv_key = dh->priv_key; | ||
37 | |||
38 | - if (dh->pub_key == NULL) { | ||
39 | - if ((dh->pub_key=BN_new()) == NULL) | ||
40 | - goto sw_try; | ||
41 | - } | ||
42 | + if (dh->pub_key) | ||
43 | + pub_key = dh->pub_key; | ||
44 | |||
45 | - g_len = BN_num_bytes(dh->p); | ||
46 | + q_len = BN_num_bytes(dh->p); | ||
47 | /** | ||
48 | * Get generator into a plain buffer. If length is less than | ||
49 | * q_len then add leading padding bytes. | ||
50 | */ | ||
51 | - if (spcf_bn2bin_ex(dh->g, &g, &g_len)) { | ||
52 | + if (spcf_bn2bin_ex(dh->g, &g, &q_len)) { | ||
53 | + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
54 | + goto sw_try; | ||
55 | + } | ||
56 | + | ||
57 | + if (spcf_bn2bin_ex(dh->p, &q, &q_len)) { | ||
58 | DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
59 | goto sw_try; | ||
60 | } | ||
61 | |||
62 | memset(&kop, 0, sizeof kop); | ||
63 | kop.crk_op = CRK_DH_GENERATE_KEY; | ||
64 | - if (bn2crparam(dh->p, &kop.crk_param[0])) | ||
65 | - goto sw_try; | ||
66 | + kop.crk_param[0].crp_p = q; | ||
67 | + kop.crk_param[0].crp_nbits = q_len * 8; | ||
68 | if (!dh->q || bn2crparam(dh->q, &kop.crk_param[1])) | ||
69 | goto sw_try; | ||
70 | kop.crk_param[2].crp_p = g; | ||
71 | - kop.crk_param[2].crp_nbits = g_len * 8; | ||
72 | + kop.crk_param[2].crp_nbits = q_len * 8; | ||
73 | kop.crk_iparams = 3; | ||
74 | |||
75 | + s = OPENSSL_malloc (q_len); | ||
76 | + if (!s) { | ||
77 | + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
78 | + goto sw_try; | ||
79 | + } | ||
80 | + | ||
81 | + w = OPENSSL_malloc (q_len); | ||
82 | + if (!w) { | ||
83 | + DSAerr(DH_F_DH_GENERATE_KEY, ERR_R_MALLOC_FAILURE); | ||
84 | + goto sw_try; | ||
85 | + } | ||
86 | + | ||
87 | /* pub_key is or prime length while priv key is of length of order */ | ||
88 | - if (cryptodev_asym(&kop, BN_num_bytes(dh->p), dh->pub_key, | ||
89 | - BN_num_bytes(dh->q), dh->priv_key)) | ||
90 | + if (cryptodev_asym(&kop, q_len, w, q_len, s)) | ||
91 | goto sw_try; | ||
92 | |||
93 | + dh->pub_key = BN_bin2bn(w, q_len, pub_key); | ||
94 | + dh->pub_key = BN_bin2bn(s, q_len, priv_key); | ||
95 | return ret; | ||
96 | sw_try: | ||
97 | { | ||
98 | -- | ||
99 | 2.3.5 | ||
100 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch b/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch new file mode 100644 index 00000000..bd9e61ac --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch | |||
@@ -0,0 +1,309 @@ | |||
1 | From 11b55103463bac614e00d74e9f196ec4ec6bade1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Mon, 16 Jun 2014 14:06:21 +0300 | ||
4 | Subject: [PATCH 17/26] cryptodev: add support for aes-gcm algorithm offloading | ||
5 | |||
6 | Change-Id: I3b77dc5ef8b8f707309549244a02852d95b36168 | ||
7 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
8 | Reviewed-on: http://git.am.freescale.net:8181/17226 | ||
9 | --- | ||
10 | apps/speed.c | 6 +- | ||
11 | crypto/engine/eng_cryptodev.c | 229 +++++++++++++++++++++++++++++++++++++++++- | ||
12 | 2 files changed, 233 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/apps/speed.c b/apps/speed.c | ||
15 | index 9886ca3..099dede 100644 | ||
16 | --- a/apps/speed.c | ||
17 | +++ b/apps/speed.c | ||
18 | @@ -224,7 +224,11 @@ | ||
19 | #endif | ||
20 | |||
21 | #undef BUFSIZE | ||
22 | -#define BUFSIZE ((long)1024*8+1) | ||
23 | +/* The buffer overhead allows GCM tag at the end of the encrypted data. This | ||
24 | + avoids buffer overflows from cryptodev since Linux kernel GCM | ||
25 | + implementation allways adds the tag - unlike e_aes.c:aes_gcm_cipher() | ||
26 | + which doesn't */ | ||
27 | +#define BUFSIZE ((long)1024*8 + EVP_GCM_TLS_TAG_LEN) | ||
28 | int run=0; | ||
29 | |||
30 | static int mr=0; | ||
31 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
32 | index 13d924f..4493490 100644 | ||
33 | --- a/crypto/engine/eng_cryptodev.c | ||
34 | +++ b/crypto/engine/eng_cryptodev.c | ||
35 | @@ -78,8 +78,10 @@ struct dev_crypto_state { | ||
36 | struct session_op d_sess; | ||
37 | int d_fd; | ||
38 | unsigned char *aad; | ||
39 | - unsigned int aad_len; | ||
40 | + int aad_len; | ||
41 | unsigned int len; | ||
42 | + unsigned char *iv; | ||
43 | + int ivlen; | ||
44 | |||
45 | #ifdef USE_CRYPTODEV_DIGESTS | ||
46 | char dummy_mac_key[HASH_MAX_LEN]; | ||
47 | @@ -251,6 +253,7 @@ static struct { | ||
48 | { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, | ||
49 | { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
50 | { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
51 | + { CRYPTO_AES_GCM, NID_aes_128_gcm, 16, 16, 0}, | ||
52 | { 0, NID_undef, 0, 0, 0}, | ||
53 | }; | ||
54 | |||
55 | @@ -271,6 +274,19 @@ static struct { | ||
56 | }; | ||
57 | #endif | ||
58 | |||
59 | +/* increment counter (64-bit int) by 1 */ | ||
60 | +static void ctr64_inc(unsigned char *counter) { | ||
61 | + int n=8; | ||
62 | + unsigned char c; | ||
63 | + | ||
64 | + do { | ||
65 | + --n; | ||
66 | + c = counter[n]; | ||
67 | + ++c; | ||
68 | + counter[n] = c; | ||
69 | + if (c) return; | ||
70 | + } while (n); | ||
71 | +} | ||
72 | /* | ||
73 | * Return a fd if /dev/crypto seems usable, 0 otherwise. | ||
74 | */ | ||
75 | @@ -762,6 +778,197 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
76 | } | ||
77 | } | ||
78 | |||
79 | +static int cryptodev_init_gcm_key(EVP_CIPHER_CTX *ctx, | ||
80 | + const unsigned char *key, const unsigned char *iv, int enc) | ||
81 | +{ | ||
82 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
83 | + struct session_op *sess = &state->d_sess; | ||
84 | + int cipher = -1, i; | ||
85 | + if (!iv && !key) | ||
86 | + return 1; | ||
87 | + | ||
88 | + if (iv) | ||
89 | + memcpy(ctx->iv, iv, ctx->cipher->iv_len); | ||
90 | + | ||
91 | + for (i = 0; ciphers[i].id; i++) | ||
92 | + if (ctx->cipher->nid == ciphers[i].nid && | ||
93 | + ctx->cipher->iv_len <= ciphers[i].ivmax && | ||
94 | + ctx->key_len == ciphers[i].keylen) { | ||
95 | + cipher = ciphers[i].id; | ||
96 | + break; | ||
97 | + } | ||
98 | + | ||
99 | + if (!ciphers[i].id) { | ||
100 | + state->d_fd = -1; | ||
101 | + return 0; | ||
102 | + } | ||
103 | + | ||
104 | + memset(sess, 0, sizeof(struct session_op)); | ||
105 | + | ||
106 | + if ((state->d_fd = get_dev_crypto()) < 0) | ||
107 | + return 0; | ||
108 | + | ||
109 | + sess->key = (unsigned char *) key; | ||
110 | + sess->keylen = ctx->key_len; | ||
111 | + sess->cipher = cipher; | ||
112 | + | ||
113 | + if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { | ||
114 | + put_dev_crypto(state->d_fd); | ||
115 | + state->d_fd = -1; | ||
116 | + return 0; | ||
117 | + } | ||
118 | + return 1; | ||
119 | +} | ||
120 | + | ||
121 | +static int cryptodev_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
122 | + const unsigned char *in, size_t len) | ||
123 | +{ | ||
124 | + struct crypt_auth_op cryp = {0}; | ||
125 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
126 | + struct session_op *sess = &state->d_sess; | ||
127 | + int rv = len; | ||
128 | + | ||
129 | + if (EVP_CIPHER_CTX_ctrl(ctx, ctx->encrypt ? | ||
130 | + EVP_CTRL_GCM_IV_GEN : EVP_CTRL_GCM_SET_IV_INV, | ||
131 | + EVP_GCM_TLS_EXPLICIT_IV_LEN, out) <= 0) | ||
132 | + return 0; | ||
133 | + | ||
134 | + in += EVP_GCM_TLS_EXPLICIT_IV_LEN; | ||
135 | + out += EVP_GCM_TLS_EXPLICIT_IV_LEN; | ||
136 | + len -= EVP_GCM_TLS_EXPLICIT_IV_LEN; | ||
137 | + | ||
138 | + if (ctx->encrypt) { | ||
139 | + len -= EVP_GCM_TLS_TAG_LEN; | ||
140 | + } | ||
141 | + cryp.ses = sess->ses; | ||
142 | + cryp.len = len; | ||
143 | + cryp.src = (unsigned char*) in; | ||
144 | + cryp.dst = out; | ||
145 | + cryp.auth_src = state->aad; | ||
146 | + cryp.auth_len = state->aad_len; | ||
147 | + cryp.iv = ctx->iv; | ||
148 | + cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; | ||
149 | + | ||
150 | + if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { | ||
151 | + return 0; | ||
152 | + } | ||
153 | + | ||
154 | + if (ctx->encrypt) | ||
155 | + ctr64_inc(state->iv + state->ivlen - 8); | ||
156 | + else | ||
157 | + rv = len - EVP_GCM_TLS_TAG_LEN; | ||
158 | + | ||
159 | + return rv; | ||
160 | +} | ||
161 | + | ||
162 | +static int cryptodev_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
163 | + const unsigned char *in, size_t len) | ||
164 | +{ | ||
165 | + struct crypt_auth_op cryp; | ||
166 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
167 | + struct session_op *sess = &state->d_sess; | ||
168 | + | ||
169 | + if (state->d_fd < 0) | ||
170 | + return 0; | ||
171 | + | ||
172 | + if ((len % ctx->cipher->block_size) != 0) | ||
173 | + return 0; | ||
174 | + | ||
175 | + if (state->aad_len >= 0) | ||
176 | + return cryptodev_gcm_tls_cipher(ctx, out, in, len); | ||
177 | + | ||
178 | + memset(&cryp, 0, sizeof(cryp)); | ||
179 | + | ||
180 | + cryp.ses = sess->ses; | ||
181 | + cryp.len = len; | ||
182 | + cryp.src = (unsigned char*) in; | ||
183 | + cryp.dst = out; | ||
184 | + cryp.auth_src = NULL; | ||
185 | + cryp.auth_len = 0; | ||
186 | + cryp.iv = ctx->iv; | ||
187 | + cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; | ||
188 | + | ||
189 | + if (ioctl(state->d_fd, CIOCAUTHCRYPT, &cryp) == -1) { | ||
190 | + return 0; | ||
191 | + } | ||
192 | + | ||
193 | + return len; | ||
194 | +} | ||
195 | + | ||
196 | +static int cryptodev_gcm_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
197 | + void *ptr) | ||
198 | +{ | ||
199 | + struct dev_crypto_state *state = ctx->cipher_data; | ||
200 | + switch (type) { | ||
201 | + case EVP_CTRL_INIT: | ||
202 | + { | ||
203 | + state->ivlen = ctx->cipher->iv_len; | ||
204 | + state->iv = ctx->iv; | ||
205 | + state->aad_len = -1; | ||
206 | + return 1; | ||
207 | + } | ||
208 | + case EVP_CTRL_GCM_SET_IV_FIXED: | ||
209 | + { | ||
210 | + /* Special case: -1 length restores whole IV */ | ||
211 | + if (arg == -1) | ||
212 | + { | ||
213 | + memcpy(state->iv, ptr, state->ivlen); | ||
214 | + return 1; | ||
215 | + } | ||
216 | + /* Fixed field must be at least 4 bytes and invocation field | ||
217 | + * at least 8. | ||
218 | + */ | ||
219 | + if ((arg < 4) || (state->ivlen - arg) < 8) | ||
220 | + return 0; | ||
221 | + if (arg) | ||
222 | + memcpy(state->iv, ptr, arg); | ||
223 | + if (ctx->encrypt && | ||
224 | + RAND_bytes(state->iv + arg, state->ivlen - arg) <= 0) | ||
225 | + return 0; | ||
226 | + return 1; | ||
227 | + } | ||
228 | + case EVP_CTRL_AEAD_TLS1_AAD: | ||
229 | + { | ||
230 | + unsigned int len; | ||
231 | + if (arg != 13) | ||
232 | + return 0; | ||
233 | + | ||
234 | + memcpy(ctx->buf, ptr, arg); | ||
235 | + len=ctx->buf[arg-2] << 8 | ctx->buf[arg-1]; | ||
236 | + | ||
237 | + /* Correct length for explicit IV */ | ||
238 | + len -= EVP_GCM_TLS_EXPLICIT_IV_LEN; | ||
239 | + | ||
240 | + /* If decrypting correct for tag too */ | ||
241 | + if (!ctx->encrypt) | ||
242 | + len -= EVP_GCM_TLS_TAG_LEN; | ||
243 | + | ||
244 | + ctx->buf[arg-2] = len >> 8; | ||
245 | + ctx->buf[arg-1] = len & 0xff; | ||
246 | + | ||
247 | + state->aad = ctx->buf; | ||
248 | + state->aad_len = arg; | ||
249 | + state->len = len; | ||
250 | + | ||
251 | + /* Extra padding: tag appended to record */ | ||
252 | + return EVP_GCM_TLS_TAG_LEN; | ||
253 | + } | ||
254 | + case EVP_CTRL_GCM_SET_IV_INV: | ||
255 | + { | ||
256 | + if (ctx->encrypt) | ||
257 | + return 0; | ||
258 | + memcpy(state->iv + state->ivlen - arg, ptr, arg); | ||
259 | + return 1; | ||
260 | + } | ||
261 | + case EVP_CTRL_GCM_IV_GEN: | ||
262 | + if (arg <= 0 || arg > state->ivlen) | ||
263 | + arg = state->ivlen; | ||
264 | + memcpy(ptr, state->iv + state->ivlen - arg, arg); | ||
265 | + return 1; | ||
266 | + default: | ||
267 | + return -1; | ||
268 | + } | ||
269 | +} | ||
270 | /* | ||
271 | * libcrypto EVP stuff - this is how we get wired to EVP so the engine | ||
272 | * gets called when libcrypto requests a cipher NID. | ||
273 | @@ -901,6 +1108,23 @@ const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { | ||
274 | cryptodev_cbc_hmac_sha1_ctrl, | ||
275 | NULL | ||
276 | }; | ||
277 | + | ||
278 | +const EVP_CIPHER cryptodev_aes_128_gcm = { | ||
279 | + NID_aes_128_gcm, | ||
280 | + 1, 16, 12, | ||
281 | + EVP_CIPH_GCM_MODE | EVP_CIPH_FLAG_AEAD_CIPHER | EVP_CIPH_FLAG_DEFAULT_ASN1 \ | ||
282 | + | EVP_CIPH_CUSTOM_IV | EVP_CIPH_FLAG_CUSTOM_CIPHER \ | ||
283 | + | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT, | ||
284 | + cryptodev_init_gcm_key, | ||
285 | + cryptodev_gcm_cipher, | ||
286 | + cryptodev_cleanup, | ||
287 | + sizeof(struct dev_crypto_state), | ||
288 | + EVP_CIPHER_set_asn1_iv, | ||
289 | + EVP_CIPHER_get_asn1_iv, | ||
290 | + cryptodev_gcm_ctrl, | ||
291 | + NULL | ||
292 | +}; | ||
293 | + | ||
294 | /* | ||
295 | * Registered by the ENGINE when used to find out how to deal with | ||
296 | * a particular NID in the ENGINE. this says what we'll do at the | ||
297 | @@ -944,6 +1168,9 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
298 | case NID_aes_256_cbc_hmac_sha1: | ||
299 | *cipher = &cryptodev_aes_256_cbc_hmac_sha1; | ||
300 | break; | ||
301 | + case NID_aes_128_gcm: | ||
302 | + *cipher = &cryptodev_aes_128_gcm; | ||
303 | + break; | ||
304 | default: | ||
305 | *cipher = NULL; | ||
306 | break; | ||
307 | -- | ||
308 | 2.3.5 | ||
309 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0018-eng_cryptodev-extend-TLS-offload-with-3des_cbc_hmac_.patch b/recipes-connectivity/openssl/openssl-fsl/0018-eng_cryptodev-extend-TLS-offload-with-3des_cbc_hmac_.patch new file mode 100644 index 00000000..1118a6fc --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0018-eng_cryptodev-extend-TLS-offload-with-3des_cbc_hmac_.patch | |||
@@ -0,0 +1,193 @@ | |||
1 | From 21e3ca4ec77f9258aa4001f07faac1c4942b48b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
3 | Date: Fri, 9 May 2014 17:54:06 +0300 | ||
4 | Subject: [PATCH 18/26] eng_cryptodev: extend TLS offload with | ||
5 | 3des_cbc_hmac_sha1 | ||
6 | |||
7 | Both obj_mac.h and obj_dat.h were generated using the scripts | ||
8 | from crypto/objects: | ||
9 | |||
10 | $ cd crypto/objects | ||
11 | $ perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
12 | $ perl obj_dat.pl obj_mac.h obj_dat.h | ||
13 | |||
14 | Change-Id: I94f13cdd09df67e33e6acd3c00aab47cb358ac46 | ||
15 | Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
16 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
17 | Reviewed-on: http://git.am.freescale.net:8181/34001 | ||
18 | --- | ||
19 | crypto/engine/eng_cryptodev.c | 24 ++++++++++++++++++++++++ | ||
20 | crypto/objects/obj_dat.h | 10 +++++++--- | ||
21 | crypto/objects/obj_mac.h | 4 ++++ | ||
22 | crypto/objects/obj_mac.num | 1 + | ||
23 | crypto/objects/objects.txt | 1 + | ||
24 | ssl/ssl_ciph.c | 4 ++++ | ||
25 | 6 files changed, 41 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
28 | index 79b2678..299e84b 100644 | ||
29 | --- a/crypto/engine/eng_cryptodev.c | ||
30 | +++ b/crypto/engine/eng_cryptodev.c | ||
31 | @@ -135,6 +135,7 @@ static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, | ||
32 | void ENGINE_load_cryptodev(void); | ||
33 | const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1; | ||
34 | const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; | ||
35 | +const EVP_CIPHER cryptodev_3des_cbc_hmac_sha1; | ||
36 | |||
37 | inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) | ||
38 | { | ||
39 | @@ -252,6 +253,7 @@ static struct { | ||
40 | { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, 0}, | ||
41 | { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, 0}, | ||
42 | { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, 0}, | ||
43 | + { CRYPTO_TLS10_3DES_CBC_HMAC_SHA1, NID_des_ede3_cbc_hmac_sha1, 8, 24, 20}, | ||
44 | { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
45 | { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
46 | { CRYPTO_AES_GCM, NID_aes_128_gcm, 16, 16, 0}, | ||
47 | @@ -466,6 +468,9 @@ cryptodev_usable_ciphers(const int **nids) | ||
48 | case NID_aes_256_cbc_hmac_sha1: | ||
49 | EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); | ||
50 | break; | ||
51 | + case NID_des_ede3_cbc_hmac_sha1: | ||
52 | + EVP_add_cipher(&cryptodev_3des_cbc_hmac_sha1); | ||
53 | + break; | ||
54 | } | ||
55 | } | ||
56 | return count; | ||
57 | @@ -571,6 +576,7 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
58 | switch (ctx->cipher->nid) { | ||
59 | case NID_aes_128_cbc_hmac_sha1: | ||
60 | case NID_aes_256_cbc_hmac_sha1: | ||
61 | + case NID_des_ede3_cbc_hmac_sha1: | ||
62 | cryp.flags = COP_FLAG_AEAD_TLS_TYPE; | ||
63 | } | ||
64 | cryp.ses = sess->ses; | ||
65 | @@ -763,6 +769,7 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
66 | switch (ctx->cipher->nid) { | ||
67 | case NID_aes_128_cbc_hmac_sha1: | ||
68 | case NID_aes_256_cbc_hmac_sha1: | ||
69 | + case NID_des_ede3_cbc_hmac_sha1: | ||
70 | maclen = SHA_DIGEST_LENGTH; | ||
71 | } | ||
72 | |||
73 | @@ -1082,6 +1089,20 @@ const EVP_CIPHER cryptodev_aes_256_cbc = { | ||
74 | NULL | ||
75 | }; | ||
76 | |||
77 | +const EVP_CIPHER cryptodev_3des_cbc_hmac_sha1 = { | ||
78 | + NID_des_ede3_cbc_hmac_sha1, | ||
79 | + 8, 24, 8, | ||
80 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
81 | + cryptodev_init_aead_key, | ||
82 | + cryptodev_aead_cipher, | ||
83 | + cryptodev_cleanup, | ||
84 | + sizeof(struct dev_crypto_state), | ||
85 | + EVP_CIPHER_set_asn1_iv, | ||
86 | + EVP_CIPHER_get_asn1_iv, | ||
87 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
88 | + NULL | ||
89 | +}; | ||
90 | + | ||
91 | const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1 = { | ||
92 | NID_aes_128_cbc_hmac_sha1, | ||
93 | 16, 16, 16, | ||
94 | @@ -1163,6 +1184,9 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
95 | case NID_aes_256_cbc: | ||
96 | *cipher = &cryptodev_aes_256_cbc; | ||
97 | break; | ||
98 | + case NID_des_ede3_cbc_hmac_sha1: | ||
99 | + *cipher = &cryptodev_3des_cbc_hmac_sha1; | ||
100 | + break; | ||
101 | case NID_aes_128_cbc_hmac_sha1: | ||
102 | *cipher = &cryptodev_aes_128_cbc_hmac_sha1; | ||
103 | break; | ||
104 | diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h | ||
105 | index bc69665..9f2267a 100644 | ||
106 | --- a/crypto/objects/obj_dat.h | ||
107 | +++ b/crypto/objects/obj_dat.h | ||
108 | @@ -62,9 +62,9 @@ | ||
109 | * [including the GNU Public Licence.] | ||
110 | */ | ||
111 | |||
112 | -#define NUM_NID 920 | ||
113 | -#define NUM_SN 913 | ||
114 | -#define NUM_LN 913 | ||
115 | +#define NUM_NID 921 | ||
116 | +#define NUM_SN 914 | ||
117 | +#define NUM_LN 914 | ||
118 | #define NUM_OBJ 857 | ||
119 | |||
120 | static const unsigned char lvalues[5974]={ | ||
121 | @@ -2399,6 +2399,8 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={ | ||
122 | {"AES-256-CBC-HMAC-SHA1","aes-256-cbc-hmac-sha1", | ||
123 | NID_aes_256_cbc_hmac_sha1,0,NULL,0}, | ||
124 | {"RSAES-OAEP","rsaesOaep",NID_rsaesOaep,9,&(lvalues[5964]),0}, | ||
125 | +{"DES-EDE3-CBC-HMAC-SHA1","des-ede3-cbc-hmac-sha1", | ||
126 | + NID_des_ede3_cbc_hmac_sha1,0,NULL,0}, | ||
127 | }; | ||
128 | |||
129 | static const unsigned int sn_objs[NUM_SN]={ | ||
130 | @@ -2474,6 +2476,7 @@ static const unsigned int sn_objs[NUM_SN]={ | ||
131 | 62, /* "DES-EDE-OFB" */ | ||
132 | 33, /* "DES-EDE3" */ | ||
133 | 44, /* "DES-EDE3-CBC" */ | ||
134 | +920, /* "DES-EDE3-CBC-HMAC-SHA1" */ | ||
135 | 61, /* "DES-EDE3-CFB" */ | ||
136 | 658, /* "DES-EDE3-CFB1" */ | ||
137 | 659, /* "DES-EDE3-CFB8" */ | ||
138 | @@ -3585,6 +3588,7 @@ static const unsigned int ln_objs[NUM_LN]={ | ||
139 | 62, /* "des-ede-ofb" */ | ||
140 | 33, /* "des-ede3" */ | ||
141 | 44, /* "des-ede3-cbc" */ | ||
142 | +920, /* "des-ede3-cbc-hmac-sha1" */ | ||
143 | 61, /* "des-ede3-cfb" */ | ||
144 | 658, /* "des-ede3-cfb1" */ | ||
145 | 659, /* "des-ede3-cfb8" */ | ||
146 | diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h | ||
147 | index b5ea7cd..8751902 100644 | ||
148 | --- a/crypto/objects/obj_mac.h | ||
149 | +++ b/crypto/objects/obj_mac.h | ||
150 | @@ -4030,3 +4030,7 @@ | ||
151 | #define LN_aes_256_cbc_hmac_sha1 "aes-256-cbc-hmac-sha1" | ||
152 | #define NID_aes_256_cbc_hmac_sha1 918 | ||
153 | |||
154 | +#define SN_des_ede3_cbc_hmac_sha1 "DES-EDE3-CBC-HMAC-SHA1" | ||
155 | +#define LN_des_ede3_cbc_hmac_sha1 "des-ede3-cbc-hmac-sha1" | ||
156 | +#define NID_des_ede3_cbc_hmac_sha1 920 | ||
157 | + | ||
158 | diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num | ||
159 | index 1d0a7c8..9d44bb5 100644 | ||
160 | --- a/crypto/objects/obj_mac.num | ||
161 | +++ b/crypto/objects/obj_mac.num | ||
162 | @@ -917,3 +917,4 @@ aes_128_cbc_hmac_sha1 916 | ||
163 | aes_192_cbc_hmac_sha1 917 | ||
164 | aes_256_cbc_hmac_sha1 918 | ||
165 | rsaesOaep 919 | ||
166 | +des_ede3_cbc_hmac_sha1 920 | ||
167 | diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt | ||
168 | index d3bfad7..90d2fc5 100644 | ||
169 | --- a/crypto/objects/objects.txt | ||
170 | +++ b/crypto/objects/objects.txt | ||
171 | @@ -1290,3 +1290,4 @@ kisa 1 6 : SEED-OFB : seed-ofb | ||
172 | : AES-128-CBC-HMAC-SHA1 : aes-128-cbc-hmac-sha1 | ||
173 | : AES-192-CBC-HMAC-SHA1 : aes-192-cbc-hmac-sha1 | ||
174 | : AES-256-CBC-HMAC-SHA1 : aes-256-cbc-hmac-sha1 | ||
175 | + : DES-EDE3-CBC-HMAC-SHA1 : des-ede3-cbc-hmac-sha1 | ||
176 | diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c | ||
177 | index 8188ff5..310fe76 100644 | ||
178 | --- a/ssl/ssl_ciph.c | ||
179 | +++ b/ssl/ssl_ciph.c | ||
180 | @@ -639,6 +639,10 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, | ||
181 | c->algorithm_mac == SSL_SHA1 && | ||
182 | (evp=EVP_get_cipherbyname("AES-256-CBC-HMAC-SHA1"))) | ||
183 | *enc = evp, *md = NULL; | ||
184 | + else if (c->algorithm_enc == SSL_3DES && | ||
185 | + c->algorithm_mac == SSL_SHA1 && | ||
186 | + (evp = EVP_get_cipherbyname("DES-EDE3-CBC-HMAC-SHA1"))) | ||
187 | + *enc = evp, *md = NULL; | ||
188 | return(1); | ||
189 | } | ||
190 | else | ||
191 | -- | ||
192 | 2.3.5 | ||
193 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0019-eng_cryptodev-add-support-for-TLSv1.1-record-offload.patch b/recipes-connectivity/openssl/openssl-fsl/0019-eng_cryptodev-add-support-for-TLSv1.1-record-offload.patch new file mode 100644 index 00000000..988d79ea --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0019-eng_cryptodev-add-support-for-TLSv1.1-record-offload.patch | |||
@@ -0,0 +1,355 @@ | |||
1 | From 1de2b740a3bdcd8e98abb5f4e176d46fd817b932 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
3 | Date: Tue, 31 Mar 2015 16:30:17 +0300 | ||
4 | Subject: [PATCH 19/26] eng_cryptodev: add support for TLSv1.1 record offload | ||
5 | |||
6 | Supported cipher suites: | ||
7 | - 3des-ede-cbc-sha | ||
8 | - aes-128-cbc-hmac-sha | ||
9 | - aes-256-cbc-hmac-sha | ||
10 | |||
11 | Requires TLS patches on cryptodev and TLS algorithm support in Linux | ||
12 | kernel driver. | ||
13 | |||
14 | Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
15 | Change-Id: Id414f36a528de3f476b72688cf85714787d7ccae | ||
16 | Reviewed-on: http://git.am.freescale.net:8181/34002 | ||
17 | Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
18 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
19 | --- | ||
20 | crypto/engine/eng_cryptodev.c | 101 ++++++++++++++++++++++++++++++++++++++---- | ||
21 | crypto/objects/obj_dat.h | 18 ++++++-- | ||
22 | crypto/objects/obj_mac.h | 12 +++++ | ||
23 | crypto/objects/obj_mac.num | 3 ++ | ||
24 | crypto/objects/objects.txt | 3 ++ | ||
25 | ssl/ssl_ciph.c | 26 +++++++++-- | ||
26 | 6 files changed, 148 insertions(+), 15 deletions(-) | ||
27 | |||
28 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
29 | index 299e84b..f71ab27 100644 | ||
30 | --- a/crypto/engine/eng_cryptodev.c | ||
31 | +++ b/crypto/engine/eng_cryptodev.c | ||
32 | @@ -66,6 +66,7 @@ ENGINE_load_cryptodev(void) | ||
33 | #include <sys/ioctl.h> | ||
34 | #include <errno.h> | ||
35 | #include <stdio.h> | ||
36 | +#include <stdbool.h> | ||
37 | #include <unistd.h> | ||
38 | #include <fcntl.h> | ||
39 | #include <stdarg.h> | ||
40 | @@ -133,9 +134,12 @@ static int cryptodev_dh_compute_key(unsigned char *key, | ||
41 | static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, | ||
42 | void (*f)(void)); | ||
43 | void ENGINE_load_cryptodev(void); | ||
44 | +const EVP_CIPHER cryptodev_3des_cbc_hmac_sha1; | ||
45 | const EVP_CIPHER cryptodev_aes_128_cbc_hmac_sha1; | ||
46 | const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; | ||
47 | -const EVP_CIPHER cryptodev_3des_cbc_hmac_sha1; | ||
48 | +const EVP_CIPHER cryptodev_tls11_3des_cbc_hmac_sha1; | ||
49 | +const EVP_CIPHER cryptodev_tls11_aes_128_cbc_hmac_sha1; | ||
50 | +const EVP_CIPHER cryptodev_tls11_aes_256_cbc_hmac_sha1; | ||
51 | |||
52 | inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) | ||
53 | { | ||
54 | @@ -256,6 +260,9 @@ static struct { | ||
55 | { CRYPTO_TLS10_3DES_CBC_HMAC_SHA1, NID_des_ede3_cbc_hmac_sha1, 8, 24, 20}, | ||
56 | { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
57 | { CRYPTO_TLS10_AES_CBC_HMAC_SHA1, NID_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
58 | + { CRYPTO_TLS11_3DES_CBC_HMAC_SHA1, NID_tls11_des_ede3_cbc_hmac_sha1, 8, 24, 20}, | ||
59 | + { CRYPTO_TLS11_AES_CBC_HMAC_SHA1, NID_tls11_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
60 | + { CRYPTO_TLS11_AES_CBC_HMAC_SHA1, NID_tls11_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
61 | { CRYPTO_AES_GCM, NID_aes_128_gcm, 16, 16, 0}, | ||
62 | { 0, NID_undef, 0, 0, 0}, | ||
63 | }; | ||
64 | @@ -462,14 +469,23 @@ cryptodev_usable_ciphers(const int **nids) | ||
65 | /* add ciphers specific to cryptodev if found in kernel */ | ||
66 | for(i = 0; i < count; i++) { | ||
67 | switch (*(*nids + i)) { | ||
68 | + case NID_des_ede3_cbc_hmac_sha1: | ||
69 | + EVP_add_cipher(&cryptodev_3des_cbc_hmac_sha1); | ||
70 | + break; | ||
71 | case NID_aes_128_cbc_hmac_sha1: | ||
72 | EVP_add_cipher(&cryptodev_aes_128_cbc_hmac_sha1); | ||
73 | break; | ||
74 | case NID_aes_256_cbc_hmac_sha1: | ||
75 | EVP_add_cipher(&cryptodev_aes_256_cbc_hmac_sha1); | ||
76 | break; | ||
77 | - case NID_des_ede3_cbc_hmac_sha1: | ||
78 | - EVP_add_cipher(&cryptodev_3des_cbc_hmac_sha1); | ||
79 | + case NID_tls11_des_ede3_cbc_hmac_sha1: | ||
80 | + EVP_add_cipher(&cryptodev_tls11_3des_cbc_hmac_sha1); | ||
81 | + break; | ||
82 | + case NID_tls11_aes_128_cbc_hmac_sha1: | ||
83 | + EVP_add_cipher(&cryptodev_tls11_aes_128_cbc_hmac_sha1); | ||
84 | + break; | ||
85 | + case NID_tls11_aes_256_cbc_hmac_sha1: | ||
86 | + EVP_add_cipher(&cryptodev_tls11_aes_256_cbc_hmac_sha1); | ||
87 | break; | ||
88 | } | ||
89 | } | ||
90 | @@ -574,9 +590,12 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
91 | |||
92 | /* TODO: make a seamless integration with cryptodev flags */ | ||
93 | switch (ctx->cipher->nid) { | ||
94 | + case NID_des_ede3_cbc_hmac_sha1: | ||
95 | case NID_aes_128_cbc_hmac_sha1: | ||
96 | case NID_aes_256_cbc_hmac_sha1: | ||
97 | - case NID_des_ede3_cbc_hmac_sha1: | ||
98 | + case NID_tls11_des_ede3_cbc_hmac_sha1: | ||
99 | + case NID_tls11_aes_128_cbc_hmac_sha1: | ||
100 | + case NID_tls11_aes_256_cbc_hmac_sha1: | ||
101 | cryp.flags = COP_FLAG_AEAD_TLS_TYPE; | ||
102 | } | ||
103 | cryp.ses = sess->ses; | ||
104 | @@ -758,8 +777,9 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
105 | struct dev_crypto_state *state = ctx->cipher_data; | ||
106 | unsigned char *p = ptr; | ||
107 | unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; | ||
108 | - unsigned int maclen, padlen; | ||
109 | + unsigned int maclen, padlen, len; | ||
110 | unsigned int bs = ctx->cipher->block_size; | ||
111 | + bool aad_needs_fix = false; | ||
112 | |||
113 | state->aad = ptr; | ||
114 | state->aad_len = arg; | ||
115 | @@ -767,10 +787,24 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
116 | |||
117 | /* TODO: this should be an extension of EVP_CIPHER struct */ | ||
118 | switch (ctx->cipher->nid) { | ||
119 | + case NID_des_ede3_cbc_hmac_sha1: | ||
120 | case NID_aes_128_cbc_hmac_sha1: | ||
121 | case NID_aes_256_cbc_hmac_sha1: | ||
122 | - case NID_des_ede3_cbc_hmac_sha1: | ||
123 | maclen = SHA_DIGEST_LENGTH; | ||
124 | + break; | ||
125 | + case NID_tls11_des_ede3_cbc_hmac_sha1: | ||
126 | + case NID_tls11_aes_128_cbc_hmac_sha1: | ||
127 | + case NID_tls11_aes_256_cbc_hmac_sha1: | ||
128 | + maclen = SHA_DIGEST_LENGTH; | ||
129 | + aad_needs_fix = true; | ||
130 | + break; | ||
131 | + } | ||
132 | + | ||
133 | + /* Correct length for AAD Length field */ | ||
134 | + if (ctx->encrypt && aad_needs_fix) { | ||
135 | + len = cryptlen - bs; | ||
136 | + p[arg-2] = len >> 8; | ||
137 | + p[arg-1] = len & 0xff; | ||
138 | } | ||
139 | |||
140 | /* space required for encryption (not only TLS padding) */ | ||
141 | @@ -1131,6 +1165,48 @@ const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1 = { | ||
142 | NULL | ||
143 | }; | ||
144 | |||
145 | +const EVP_CIPHER cryptodev_tls11_3des_cbc_hmac_sha1 = { | ||
146 | + NID_tls11_des_ede3_cbc_hmac_sha1, | ||
147 | + 8, 24, 8, | ||
148 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
149 | + cryptodev_init_aead_key, | ||
150 | + cryptodev_aead_cipher, | ||
151 | + cryptodev_cleanup, | ||
152 | + sizeof(struct dev_crypto_state), | ||
153 | + EVP_CIPHER_set_asn1_iv, | ||
154 | + EVP_CIPHER_get_asn1_iv, | ||
155 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
156 | + NULL | ||
157 | +}; | ||
158 | + | ||
159 | +const EVP_CIPHER cryptodev_tls11_aes_128_cbc_hmac_sha1 = { | ||
160 | + NID_tls11_aes_128_cbc_hmac_sha1, | ||
161 | + 16, 16, 16, | ||
162 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
163 | + cryptodev_init_aead_key, | ||
164 | + cryptodev_aead_cipher, | ||
165 | + cryptodev_cleanup, | ||
166 | + sizeof(struct dev_crypto_state), | ||
167 | + EVP_CIPHER_set_asn1_iv, | ||
168 | + EVP_CIPHER_get_asn1_iv, | ||
169 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
170 | + NULL | ||
171 | +}; | ||
172 | + | ||
173 | +const EVP_CIPHER cryptodev_tls11_aes_256_cbc_hmac_sha1 = { | ||
174 | + NID_tls11_aes_256_cbc_hmac_sha1, | ||
175 | + 16, 32, 16, | ||
176 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
177 | + cryptodev_init_aead_key, | ||
178 | + cryptodev_aead_cipher, | ||
179 | + cryptodev_cleanup, | ||
180 | + sizeof(struct dev_crypto_state), | ||
181 | + EVP_CIPHER_set_asn1_iv, | ||
182 | + EVP_CIPHER_get_asn1_iv, | ||
183 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
184 | + NULL | ||
185 | +}; | ||
186 | + | ||
187 | const EVP_CIPHER cryptodev_aes_128_gcm = { | ||
188 | NID_aes_128_gcm, | ||
189 | 1, 16, 12, | ||
190 | @@ -1184,6 +1260,9 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
191 | case NID_aes_256_cbc: | ||
192 | *cipher = &cryptodev_aes_256_cbc; | ||
193 | break; | ||
194 | + case NID_aes_128_gcm: | ||
195 | + *cipher = &cryptodev_aes_128_gcm; | ||
196 | + break; | ||
197 | case NID_des_ede3_cbc_hmac_sha1: | ||
198 | *cipher = &cryptodev_3des_cbc_hmac_sha1; | ||
199 | break; | ||
200 | @@ -1193,8 +1272,14 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
201 | case NID_aes_256_cbc_hmac_sha1: | ||
202 | *cipher = &cryptodev_aes_256_cbc_hmac_sha1; | ||
203 | break; | ||
204 | - case NID_aes_128_gcm: | ||
205 | - *cipher = &cryptodev_aes_128_gcm; | ||
206 | + case NID_tls11_des_ede3_cbc_hmac_sha1: | ||
207 | + *cipher = &cryptodev_tls11_3des_cbc_hmac_sha1; | ||
208 | + break; | ||
209 | + case NID_tls11_aes_128_cbc_hmac_sha1: | ||
210 | + *cipher = &cryptodev_tls11_aes_128_cbc_hmac_sha1; | ||
211 | + break; | ||
212 | + case NID_tls11_aes_256_cbc_hmac_sha1: | ||
213 | + *cipher = &cryptodev_tls11_aes_256_cbc_hmac_sha1; | ||
214 | break; | ||
215 | default: | ||
216 | *cipher = NULL; | ||
217 | diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h | ||
218 | index 9f2267a..dc89b0a 100644 | ||
219 | --- a/crypto/objects/obj_dat.h | ||
220 | +++ b/crypto/objects/obj_dat.h | ||
221 | @@ -62,9 +62,9 @@ | ||
222 | * [including the GNU Public Licence.] | ||
223 | */ | ||
224 | |||
225 | -#define NUM_NID 921 | ||
226 | -#define NUM_SN 914 | ||
227 | -#define NUM_LN 914 | ||
228 | +#define NUM_NID 924 | ||
229 | +#define NUM_SN 917 | ||
230 | +#define NUM_LN 917 | ||
231 | #define NUM_OBJ 857 | ||
232 | |||
233 | static const unsigned char lvalues[5974]={ | ||
234 | @@ -2401,6 +2401,12 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={ | ||
235 | {"RSAES-OAEP","rsaesOaep",NID_rsaesOaep,9,&(lvalues[5964]),0}, | ||
236 | {"DES-EDE3-CBC-HMAC-SHA1","des-ede3-cbc-hmac-sha1", | ||
237 | NID_des_ede3_cbc_hmac_sha1,0,NULL,0}, | ||
238 | +{"TLS11-DES-EDE3-CBC-HMAC-SHA1","tls11-des-ede3-cbc-hmac-sha1", | ||
239 | + NID_tls11_des_ede3_cbc_hmac_sha1,0,NULL,0}, | ||
240 | +{"TLS11-AES-128-CBC-HMAC-SHA1","tls11-aes-128-cbc-hmac-sha1", | ||
241 | + NID_tls11_aes_128_cbc_hmac_sha1,0,NULL,0}, | ||
242 | +{"TLS11-AES-256-CBC-HMAC-SHA1","tls11-aes-256-cbc-hmac-sha1", | ||
243 | + NID_tls11_aes_256_cbc_hmac_sha1,0,NULL,0}, | ||
244 | }; | ||
245 | |||
246 | static const unsigned int sn_objs[NUM_SN]={ | ||
247 | @@ -2586,6 +2592,9 @@ static const unsigned int sn_objs[NUM_SN]={ | ||
248 | 100, /* "SN" */ | ||
249 | 16, /* "ST" */ | ||
250 | 143, /* "SXNetID" */ | ||
251 | +922, /* "TLS11-AES-128-CBC-HMAC-SHA1" */ | ||
252 | +923, /* "TLS11-AES-256-CBC-HMAC-SHA1" */ | ||
253 | +921, /* "TLS11-DES-EDE3-CBC-HMAC-SHA1" */ | ||
254 | 458, /* "UID" */ | ||
255 | 0, /* "UNDEF" */ | ||
256 | 11, /* "X500" */ | ||
257 | @@ -4205,6 +4214,9 @@ static const unsigned int ln_objs[NUM_LN]={ | ||
258 | 459, /* "textEncodedORAddress" */ | ||
259 | 293, /* "textNotice" */ | ||
260 | 106, /* "title" */ | ||
261 | +922, /* "tls11-aes-128-cbc-hmac-sha1" */ | ||
262 | +923, /* "tls11-aes-256-cbc-hmac-sha1" */ | ||
263 | +921, /* "tls11-des-ede3-cbc-hmac-sha1" */ | ||
264 | 682, /* "tpBasis" */ | ||
265 | 436, /* "ucl" */ | ||
266 | 0, /* "undefined" */ | ||
267 | diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h | ||
268 | index 8751902..f181890 100644 | ||
269 | --- a/crypto/objects/obj_mac.h | ||
270 | +++ b/crypto/objects/obj_mac.h | ||
271 | @@ -4034,3 +4034,15 @@ | ||
272 | #define LN_des_ede3_cbc_hmac_sha1 "des-ede3-cbc-hmac-sha1" | ||
273 | #define NID_des_ede3_cbc_hmac_sha1 920 | ||
274 | |||
275 | +#define SN_tls11_des_ede3_cbc_hmac_sha1 "TLS11-DES-EDE3-CBC-HMAC-SHA1" | ||
276 | +#define LN_tls11_des_ede3_cbc_hmac_sha1 "tls11-des-ede3-cbc-hmac-sha1" | ||
277 | +#define NID_tls11_des_ede3_cbc_hmac_sha1 921 | ||
278 | + | ||
279 | +#define SN_tls11_aes_128_cbc_hmac_sha1 "TLS11-AES-128-CBC-HMAC-SHA1" | ||
280 | +#define LN_tls11_aes_128_cbc_hmac_sha1 "tls11-aes-128-cbc-hmac-sha1" | ||
281 | +#define NID_tls11_aes_128_cbc_hmac_sha1 922 | ||
282 | + | ||
283 | +#define SN_tls11_aes_256_cbc_hmac_sha1 "TLS11-AES-256-CBC-HMAC-SHA1" | ||
284 | +#define LN_tls11_aes_256_cbc_hmac_sha1 "tls11-aes-256-cbc-hmac-sha1" | ||
285 | +#define NID_tls11_aes_256_cbc_hmac_sha1 923 | ||
286 | + | ||
287 | diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num | ||
288 | index 9d44bb5..a02b58c 100644 | ||
289 | --- a/crypto/objects/obj_mac.num | ||
290 | +++ b/crypto/objects/obj_mac.num | ||
291 | @@ -918,3 +918,6 @@ aes_192_cbc_hmac_sha1 917 | ||
292 | aes_256_cbc_hmac_sha1 918 | ||
293 | rsaesOaep 919 | ||
294 | des_ede3_cbc_hmac_sha1 920 | ||
295 | +tls11_des_ede3_cbc_hmac_sha1 921 | ||
296 | +tls11_aes_128_cbc_hmac_sha1 922 | ||
297 | +tls11_aes_256_cbc_hmac_sha1 923 | ||
298 | diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt | ||
299 | index 90d2fc5..1973658 100644 | ||
300 | --- a/crypto/objects/objects.txt | ||
301 | +++ b/crypto/objects/objects.txt | ||
302 | @@ -1291,3 +1291,6 @@ kisa 1 6 : SEED-OFB : seed-ofb | ||
303 | : AES-192-CBC-HMAC-SHA1 : aes-192-cbc-hmac-sha1 | ||
304 | : AES-256-CBC-HMAC-SHA1 : aes-256-cbc-hmac-sha1 | ||
305 | : DES-EDE3-CBC-HMAC-SHA1 : des-ede3-cbc-hmac-sha1 | ||
306 | + : TLS11-DES-EDE3-CBC-HMAC-SHA1 : tls11-des-ede3-cbc-hmac-sha1 | ||
307 | + : TLS11-AES-128-CBC-HMAC-SHA1 : tls11-aes-128-cbc-hmac-sha1 | ||
308 | + : TLS11-AES-256-CBC-HMAC-SHA1 : tls11-aes-256-cbc-hmac-sha1 | ||
309 | diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c | ||
310 | index 310fe76..0408986 100644 | ||
311 | --- a/ssl/ssl_ciph.c | ||
312 | +++ b/ssl/ssl_ciph.c | ||
313 | @@ -631,17 +631,35 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, | ||
314 | c->algorithm_mac == SSL_MD5 && | ||
315 | (evp=EVP_get_cipherbyname("RC4-HMAC-MD5"))) | ||
316 | *enc = evp, *md = NULL; | ||
317 | - else if (c->algorithm_enc == SSL_AES128 && | ||
318 | + else if (s->ssl_version == TLS1_VERSION && | ||
319 | + c->algorithm_enc == SSL_3DES && | ||
320 | + c->algorithm_mac == SSL_SHA1 && | ||
321 | + (evp=EVP_get_cipherbyname("DES-EDE3-CBC-HMAC-SHA1"))) | ||
322 | + *enc = evp, *md = NULL; | ||
323 | + else if (s->ssl_version == TLS1_VERSION && | ||
324 | + c->algorithm_enc == SSL_AES128 && | ||
325 | c->algorithm_mac == SSL_SHA1 && | ||
326 | (evp=EVP_get_cipherbyname("AES-128-CBC-HMAC-SHA1"))) | ||
327 | *enc = evp, *md = NULL; | ||
328 | - else if (c->algorithm_enc == SSL_AES256 && | ||
329 | + else if (s->ssl_version == TLS1_VERSION && | ||
330 | + c->algorithm_enc == SSL_AES256 && | ||
331 | c->algorithm_mac == SSL_SHA1 && | ||
332 | (evp=EVP_get_cipherbyname("AES-256-CBC-HMAC-SHA1"))) | ||
333 | *enc = evp, *md = NULL; | ||
334 | - else if (c->algorithm_enc == SSL_3DES && | ||
335 | + else if (s->ssl_version == TLS1_1_VERSION && | ||
336 | + c->algorithm_enc == SSL_3DES && | ||
337 | + c->algorithm_mac == SSL_SHA1 && | ||
338 | + (evp=EVP_get_cipherbyname("TLS11-DES-EDE3-CBC-HMAC-SHA1"))) | ||
339 | + *enc = evp, *md = NULL; | ||
340 | + else if (s->ssl_version == TLS1_1_VERSION && | ||
341 | + c->algorithm_enc == SSL_AES128 && | ||
342 | + c->algorithm_mac == SSL_SHA1 && | ||
343 | + (evp=EVP_get_cipherbyname("TLS11-AES-128-CBC-HMAC-SHA1"))) | ||
344 | + *enc = evp, *md = NULL; | ||
345 | + else if (s->ssl_version == TLS1_1_VERSION && | ||
346 | + c->algorithm_enc == SSL_AES256 && | ||
347 | c->algorithm_mac == SSL_SHA1 && | ||
348 | - (evp = EVP_get_cipherbyname("DES-EDE3-CBC-HMAC-SHA1"))) | ||
349 | + (evp=EVP_get_cipherbyname("TLS11-AES-256-CBC-HMAC-SHA1"))) | ||
350 | *enc = evp, *md = NULL; | ||
351 | return(1); | ||
352 | } | ||
353 | -- | ||
354 | 2.3.5 | ||
355 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0020-eng_cryptodev-add-support-for-TLSv1.2-record-offload.patch b/recipes-connectivity/openssl/openssl-fsl/0020-eng_cryptodev-add-support-for-TLSv1.2-record-offload.patch new file mode 100644 index 00000000..7370c496 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0020-eng_cryptodev-add-support-for-TLSv1.2-record-offload.patch | |||
@@ -0,0 +1,359 @@ | |||
1 | From a58703e6601fcfcfe69fdb3e7152ed76b40d67e9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
3 | Date: Tue, 31 Mar 2015 16:32:35 +0300 | ||
4 | Subject: [PATCH 20/26] eng_cryptodev: add support for TLSv1.2 record offload | ||
5 | |||
6 | Supported cipher suites: | ||
7 | - 3des-ede-cbc-sha | ||
8 | - aes-128-cbc-hmac-sha | ||
9 | - aes-256-cbc-hmac-sha | ||
10 | - aes-128-cbc-hmac-sha256 | ||
11 | - aes-256-cbc-hmac-sha256 | ||
12 | |||
13 | Requires TLS patches on cryptodev and TLS algorithm support in Linux | ||
14 | kernel driver. | ||
15 | |||
16 | Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
17 | Change-Id: I0ac6953dd62e2655a59d8f3eaefd012b7ecebf55 | ||
18 | Reviewed-on: http://git.am.freescale.net:8181/34003 | ||
19 | Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
20 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
21 | --- | ||
22 | crypto/engine/eng_cryptodev.c | 123 ++++++++++++++++++++++++++++++++++++++++++ | ||
23 | crypto/objects/obj_dat.h | 26 +++++++-- | ||
24 | crypto/objects/obj_mac.h | 20 +++++++ | ||
25 | crypto/objects/obj_mac.num | 5 ++ | ||
26 | crypto/objects/objects.txt | 5 ++ | ||
27 | ssl/ssl_ciph.c | 25 +++++++++ | ||
28 | 6 files changed, 201 insertions(+), 3 deletions(-) | ||
29 | |||
30 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
31 | index f71ab27..fa5fe1b 100644 | ||
32 | --- a/crypto/engine/eng_cryptodev.c | ||
33 | +++ b/crypto/engine/eng_cryptodev.c | ||
34 | @@ -140,6 +140,11 @@ const EVP_CIPHER cryptodev_aes_256_cbc_hmac_sha1; | ||
35 | const EVP_CIPHER cryptodev_tls11_3des_cbc_hmac_sha1; | ||
36 | const EVP_CIPHER cryptodev_tls11_aes_128_cbc_hmac_sha1; | ||
37 | const EVP_CIPHER cryptodev_tls11_aes_256_cbc_hmac_sha1; | ||
38 | +const EVP_CIPHER cryptodev_tls12_3des_cbc_hmac_sha1; | ||
39 | +const EVP_CIPHER cryptodev_tls12_aes_128_cbc_hmac_sha1; | ||
40 | +const EVP_CIPHER cryptodev_tls12_aes_256_cbc_hmac_sha1; | ||
41 | +const EVP_CIPHER cryptodev_tls12_aes_128_cbc_hmac_sha256; | ||
42 | +const EVP_CIPHER cryptodev_tls12_aes_256_cbc_hmac_sha256; | ||
43 | |||
44 | inline int spcf_bn2bin(BIGNUM *bn, unsigned char **bin, int *bin_len) | ||
45 | { | ||
46 | @@ -263,6 +268,11 @@ static struct { | ||
47 | { CRYPTO_TLS11_3DES_CBC_HMAC_SHA1, NID_tls11_des_ede3_cbc_hmac_sha1, 8, 24, 20}, | ||
48 | { CRYPTO_TLS11_AES_CBC_HMAC_SHA1, NID_tls11_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
49 | { CRYPTO_TLS11_AES_CBC_HMAC_SHA1, NID_tls11_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
50 | + { CRYPTO_TLS12_3DES_CBC_HMAC_SHA1, NID_tls12_des_ede3_cbc_hmac_sha1, 8, 24, 20}, | ||
51 | + { CRYPTO_TLS12_AES_CBC_HMAC_SHA1, NID_tls12_aes_128_cbc_hmac_sha1, 16, 16, 20}, | ||
52 | + { CRYPTO_TLS12_AES_CBC_HMAC_SHA1, NID_tls12_aes_256_cbc_hmac_sha1, 16, 32, 20}, | ||
53 | + { CRYPTO_TLS12_AES_CBC_HMAC_SHA256, NID_tls12_aes_128_cbc_hmac_sha256, 16, 16, 32}, | ||
54 | + { CRYPTO_TLS12_AES_CBC_HMAC_SHA256, NID_tls12_aes_256_cbc_hmac_sha256, 16, 32, 32}, | ||
55 | { CRYPTO_AES_GCM, NID_aes_128_gcm, 16, 16, 0}, | ||
56 | { 0, NID_undef, 0, 0, 0}, | ||
57 | }; | ||
58 | @@ -487,6 +497,21 @@ cryptodev_usable_ciphers(const int **nids) | ||
59 | case NID_tls11_aes_256_cbc_hmac_sha1: | ||
60 | EVP_add_cipher(&cryptodev_tls11_aes_256_cbc_hmac_sha1); | ||
61 | break; | ||
62 | + case NID_tls12_des_ede3_cbc_hmac_sha1: | ||
63 | + EVP_add_cipher(&cryptodev_tls12_3des_cbc_hmac_sha1); | ||
64 | + break; | ||
65 | + case NID_tls12_aes_128_cbc_hmac_sha1: | ||
66 | + EVP_add_cipher(&cryptodev_tls12_aes_128_cbc_hmac_sha1); | ||
67 | + break; | ||
68 | + case NID_tls12_aes_256_cbc_hmac_sha1: | ||
69 | + EVP_add_cipher(&cryptodev_tls12_aes_256_cbc_hmac_sha1); | ||
70 | + break; | ||
71 | + case NID_tls12_aes_128_cbc_hmac_sha256: | ||
72 | + EVP_add_cipher(&cryptodev_tls12_aes_128_cbc_hmac_sha256); | ||
73 | + break; | ||
74 | + case NID_tls12_aes_256_cbc_hmac_sha256: | ||
75 | + EVP_add_cipher(&cryptodev_tls12_aes_256_cbc_hmac_sha256); | ||
76 | + break; | ||
77 | } | ||
78 | } | ||
79 | return count; | ||
80 | @@ -596,6 +621,11 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
81 | case NID_tls11_des_ede3_cbc_hmac_sha1: | ||
82 | case NID_tls11_aes_128_cbc_hmac_sha1: | ||
83 | case NID_tls11_aes_256_cbc_hmac_sha1: | ||
84 | + case NID_tls12_des_ede3_cbc_hmac_sha1: | ||
85 | + case NID_tls12_aes_128_cbc_hmac_sha1: | ||
86 | + case NID_tls12_aes_256_cbc_hmac_sha1: | ||
87 | + case NID_tls12_aes_128_cbc_hmac_sha256: | ||
88 | + case NID_tls12_aes_256_cbc_hmac_sha256: | ||
89 | cryp.flags = COP_FLAG_AEAD_TLS_TYPE; | ||
90 | } | ||
91 | cryp.ses = sess->ses; | ||
92 | @@ -795,9 +825,17 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, | ||
93 | case NID_tls11_des_ede3_cbc_hmac_sha1: | ||
94 | case NID_tls11_aes_128_cbc_hmac_sha1: | ||
95 | case NID_tls11_aes_256_cbc_hmac_sha1: | ||
96 | + case NID_tls12_des_ede3_cbc_hmac_sha1: | ||
97 | + case NID_tls12_aes_128_cbc_hmac_sha1: | ||
98 | + case NID_tls12_aes_256_cbc_hmac_sha1: | ||
99 | maclen = SHA_DIGEST_LENGTH; | ||
100 | aad_needs_fix = true; | ||
101 | break; | ||
102 | + case NID_tls12_aes_128_cbc_hmac_sha256: | ||
103 | + case NID_tls12_aes_256_cbc_hmac_sha256: | ||
104 | + maclen = SHA256_DIGEST_LENGTH; | ||
105 | + aad_needs_fix = true; | ||
106 | + break; | ||
107 | } | ||
108 | |||
109 | /* Correct length for AAD Length field */ | ||
110 | @@ -1207,6 +1245,76 @@ const EVP_CIPHER cryptodev_tls11_aes_256_cbc_hmac_sha1 = { | ||
111 | NULL | ||
112 | }; | ||
113 | |||
114 | +const EVP_CIPHER cryptodev_tls12_3des_cbc_hmac_sha1 = { | ||
115 | + NID_tls12_des_ede3_cbc_hmac_sha1, | ||
116 | + 8, 24, 8, | ||
117 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
118 | + cryptodev_init_aead_key, | ||
119 | + cryptodev_aead_cipher, | ||
120 | + cryptodev_cleanup, | ||
121 | + sizeof(struct dev_crypto_state), | ||
122 | + EVP_CIPHER_set_asn1_iv, | ||
123 | + EVP_CIPHER_get_asn1_iv, | ||
124 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
125 | + NULL | ||
126 | +}; | ||
127 | + | ||
128 | +const EVP_CIPHER cryptodev_tls12_aes_128_cbc_hmac_sha1 = { | ||
129 | + NID_tls12_aes_128_cbc_hmac_sha1, | ||
130 | + 16, 16, 16, | ||
131 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
132 | + cryptodev_init_aead_key, | ||
133 | + cryptodev_aead_cipher, | ||
134 | + cryptodev_cleanup, | ||
135 | + sizeof(struct dev_crypto_state), | ||
136 | + EVP_CIPHER_set_asn1_iv, | ||
137 | + EVP_CIPHER_get_asn1_iv, | ||
138 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
139 | + NULL | ||
140 | +}; | ||
141 | + | ||
142 | +const EVP_CIPHER cryptodev_tls12_aes_256_cbc_hmac_sha1 = { | ||
143 | + NID_tls12_aes_256_cbc_hmac_sha1, | ||
144 | + 16, 32, 16, | ||
145 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
146 | + cryptodev_init_aead_key, | ||
147 | + cryptodev_aead_cipher, | ||
148 | + cryptodev_cleanup, | ||
149 | + sizeof(struct dev_crypto_state), | ||
150 | + EVP_CIPHER_set_asn1_iv, | ||
151 | + EVP_CIPHER_get_asn1_iv, | ||
152 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
153 | + NULL | ||
154 | +}; | ||
155 | + | ||
156 | +const EVP_CIPHER cryptodev_tls12_aes_128_cbc_hmac_sha256 = { | ||
157 | + NID_tls12_aes_128_cbc_hmac_sha256, | ||
158 | + 16, 16, 16, | ||
159 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
160 | + cryptodev_init_aead_key, | ||
161 | + cryptodev_aead_cipher, | ||
162 | + cryptodev_cleanup, | ||
163 | + sizeof(struct dev_crypto_state), | ||
164 | + EVP_CIPHER_set_asn1_iv, | ||
165 | + EVP_CIPHER_get_asn1_iv, | ||
166 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
167 | + NULL | ||
168 | +}; | ||
169 | + | ||
170 | +const EVP_CIPHER cryptodev_tls12_aes_256_cbc_hmac_sha256 = { | ||
171 | + NID_tls12_aes_256_cbc_hmac_sha256, | ||
172 | + 16, 32, 16, | ||
173 | + EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, | ||
174 | + cryptodev_init_aead_key, | ||
175 | + cryptodev_aead_cipher, | ||
176 | + cryptodev_cleanup, | ||
177 | + sizeof(struct dev_crypto_state), | ||
178 | + EVP_CIPHER_set_asn1_iv, | ||
179 | + EVP_CIPHER_get_asn1_iv, | ||
180 | + cryptodev_cbc_hmac_sha1_ctrl, | ||
181 | + NULL | ||
182 | +}; | ||
183 | + | ||
184 | const EVP_CIPHER cryptodev_aes_128_gcm = { | ||
185 | NID_aes_128_gcm, | ||
186 | 1, 16, 12, | ||
187 | @@ -1281,6 +1389,21 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
188 | case NID_tls11_aes_256_cbc_hmac_sha1: | ||
189 | *cipher = &cryptodev_tls11_aes_256_cbc_hmac_sha1; | ||
190 | break; | ||
191 | + case NID_tls12_des_ede3_cbc_hmac_sha1: | ||
192 | + *cipher = &cryptodev_tls12_3des_cbc_hmac_sha1; | ||
193 | + break; | ||
194 | + case NID_tls12_aes_128_cbc_hmac_sha1: | ||
195 | + *cipher = &cryptodev_tls12_aes_128_cbc_hmac_sha1; | ||
196 | + break; | ||
197 | + case NID_tls12_aes_256_cbc_hmac_sha1: | ||
198 | + *cipher = &cryptodev_tls12_aes_256_cbc_hmac_sha1; | ||
199 | + break; | ||
200 | + case NID_tls12_aes_128_cbc_hmac_sha256: | ||
201 | + *cipher = &cryptodev_tls12_aes_128_cbc_hmac_sha256; | ||
202 | + break; | ||
203 | + case NID_tls12_aes_256_cbc_hmac_sha256: | ||
204 | + *cipher = &cryptodev_tls12_aes_256_cbc_hmac_sha256; | ||
205 | + break; | ||
206 | default: | ||
207 | *cipher = NULL; | ||
208 | break; | ||
209 | diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h | ||
210 | index dc89b0a..dfe19da 100644 | ||
211 | --- a/crypto/objects/obj_dat.h | ||
212 | +++ b/crypto/objects/obj_dat.h | ||
213 | @@ -62,9 +62,9 @@ | ||
214 | * [including the GNU Public Licence.] | ||
215 | */ | ||
216 | |||
217 | -#define NUM_NID 924 | ||
218 | -#define NUM_SN 917 | ||
219 | -#define NUM_LN 917 | ||
220 | +#define NUM_NID 929 | ||
221 | +#define NUM_SN 922 | ||
222 | +#define NUM_LN 922 | ||
223 | #define NUM_OBJ 857 | ||
224 | |||
225 | static const unsigned char lvalues[5974]={ | ||
226 | @@ -2407,6 +2407,16 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={ | ||
227 | NID_tls11_aes_128_cbc_hmac_sha1,0,NULL,0}, | ||
228 | {"TLS11-AES-256-CBC-HMAC-SHA1","tls11-aes-256-cbc-hmac-sha1", | ||
229 | NID_tls11_aes_256_cbc_hmac_sha1,0,NULL,0}, | ||
230 | +{"TLS12-DES-EDE3-CBC-HMAC-SHA1","tls12-des-ede3-cbc-hmac-sha1", | ||
231 | + NID_tls12_des_ede3_cbc_hmac_sha1,0,NULL,0}, | ||
232 | +{"TLS12-AES-128-CBC-HMAC-SHA1","tls12-aes-128-cbc-hmac-sha1", | ||
233 | + NID_tls12_aes_128_cbc_hmac_sha1,0,NULL,0}, | ||
234 | +{"TLS12-AES-256-CBC-HMAC-SHA1","tls12-aes-256-cbc-hmac-sha1", | ||
235 | + NID_tls12_aes_256_cbc_hmac_sha1,0,NULL,0}, | ||
236 | +{"TLS12-AES-128-CBC-HMAC-SHA256","tls12-aes-128-cbc-hmac-sha256", | ||
237 | + NID_tls12_aes_128_cbc_hmac_sha256,0,NULL,0}, | ||
238 | +{"TLS12-AES-256-CBC-HMAC-SHA256","tls12-aes-256-cbc-hmac-sha256", | ||
239 | + NID_tls12_aes_256_cbc_hmac_sha256,0,NULL,0}, | ||
240 | }; | ||
241 | |||
242 | static const unsigned int sn_objs[NUM_SN]={ | ||
243 | @@ -2595,6 +2605,11 @@ static const unsigned int sn_objs[NUM_SN]={ | ||
244 | 922, /* "TLS11-AES-128-CBC-HMAC-SHA1" */ | ||
245 | 923, /* "TLS11-AES-256-CBC-HMAC-SHA1" */ | ||
246 | 921, /* "TLS11-DES-EDE3-CBC-HMAC-SHA1" */ | ||
247 | +925, /* "TLS12-AES-128-CBC-HMAC-SHA1" */ | ||
248 | +927, /* "TLS12-AES-128-CBC-HMAC-SHA256" */ | ||
249 | +926, /* "TLS12-AES-256-CBC-HMAC-SHA1" */ | ||
250 | +928, /* "TLS12-AES-256-CBC-HMAC-SHA256" */ | ||
251 | +924, /* "TLS12-DES-EDE3-CBC-HMAC-SHA1" */ | ||
252 | 458, /* "UID" */ | ||
253 | 0, /* "UNDEF" */ | ||
254 | 11, /* "X500" */ | ||
255 | @@ -4217,6 +4232,11 @@ static const unsigned int ln_objs[NUM_LN]={ | ||
256 | 922, /* "tls11-aes-128-cbc-hmac-sha1" */ | ||
257 | 923, /* "tls11-aes-256-cbc-hmac-sha1" */ | ||
258 | 921, /* "tls11-des-ede3-cbc-hmac-sha1" */ | ||
259 | +925, /* "tls12-aes-128-cbc-hmac-sha1" */ | ||
260 | +927, /* "tls12-aes-128-cbc-hmac-sha256" */ | ||
261 | +926, /* "tls12-aes-256-cbc-hmac-sha1" */ | ||
262 | +928, /* "tls12-aes-256-cbc-hmac-sha256" */ | ||
263 | +924, /* "tls12-des-ede3-cbc-hmac-sha1" */ | ||
264 | 682, /* "tpBasis" */ | ||
265 | 436, /* "ucl" */ | ||
266 | 0, /* "undefined" */ | ||
267 | diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h | ||
268 | index f181890..5af125e 100644 | ||
269 | --- a/crypto/objects/obj_mac.h | ||
270 | +++ b/crypto/objects/obj_mac.h | ||
271 | @@ -4046,3 +4046,23 @@ | ||
272 | #define LN_tls11_aes_256_cbc_hmac_sha1 "tls11-aes-256-cbc-hmac-sha1" | ||
273 | #define NID_tls11_aes_256_cbc_hmac_sha1 923 | ||
274 | |||
275 | +#define SN_tls12_des_ede3_cbc_hmac_sha1 "TLS12-DES-EDE3-CBC-HMAC-SHA1" | ||
276 | +#define LN_tls12_des_ede3_cbc_hmac_sha1 "tls12-des-ede3-cbc-hmac-sha1" | ||
277 | +#define NID_tls12_des_ede3_cbc_hmac_sha1 924 | ||
278 | + | ||
279 | +#define SN_tls12_aes_128_cbc_hmac_sha1 "TLS12-AES-128-CBC-HMAC-SHA1" | ||
280 | +#define LN_tls12_aes_128_cbc_hmac_sha1 "tls12-aes-128-cbc-hmac-sha1" | ||
281 | +#define NID_tls12_aes_128_cbc_hmac_sha1 925 | ||
282 | + | ||
283 | +#define SN_tls12_aes_256_cbc_hmac_sha1 "TLS12-AES-256-CBC-HMAC-SHA1" | ||
284 | +#define LN_tls12_aes_256_cbc_hmac_sha1 "tls12-aes-256-cbc-hmac-sha1" | ||
285 | +#define NID_tls12_aes_256_cbc_hmac_sha1 926 | ||
286 | + | ||
287 | +#define SN_tls12_aes_128_cbc_hmac_sha256 "TLS12-AES-128-CBC-HMAC-SHA256" | ||
288 | +#define LN_tls12_aes_128_cbc_hmac_sha256 "tls12-aes-128-cbc-hmac-sha256" | ||
289 | +#define NID_tls12_aes_128_cbc_hmac_sha256 927 | ||
290 | + | ||
291 | +#define SN_tls12_aes_256_cbc_hmac_sha256 "TLS12-AES-256-CBC-HMAC-SHA256" | ||
292 | +#define LN_tls12_aes_256_cbc_hmac_sha256 "tls12-aes-256-cbc-hmac-sha256" | ||
293 | +#define NID_tls12_aes_256_cbc_hmac_sha256 928 | ||
294 | + | ||
295 | diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num | ||
296 | index a02b58c..deeba3a 100644 | ||
297 | --- a/crypto/objects/obj_mac.num | ||
298 | +++ b/crypto/objects/obj_mac.num | ||
299 | @@ -921,3 +921,8 @@ des_ede3_cbc_hmac_sha1 920 | ||
300 | tls11_des_ede3_cbc_hmac_sha1 921 | ||
301 | tls11_aes_128_cbc_hmac_sha1 922 | ||
302 | tls11_aes_256_cbc_hmac_sha1 923 | ||
303 | +tls12_des_ede3_cbc_hmac_sha1 924 | ||
304 | +tls12_aes_128_cbc_hmac_sha1 925 | ||
305 | +tls12_aes_256_cbc_hmac_sha1 926 | ||
306 | +tls12_aes_128_cbc_hmac_sha256 927 | ||
307 | +tls12_aes_256_cbc_hmac_sha256 928 | ||
308 | diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt | ||
309 | index 1973658..6e4ac93 100644 | ||
310 | --- a/crypto/objects/objects.txt | ||
311 | +++ b/crypto/objects/objects.txt | ||
312 | @@ -1294,3 +1294,8 @@ kisa 1 6 : SEED-OFB : seed-ofb | ||
313 | : TLS11-DES-EDE3-CBC-HMAC-SHA1 : tls11-des-ede3-cbc-hmac-sha1 | ||
314 | : TLS11-AES-128-CBC-HMAC-SHA1 : tls11-aes-128-cbc-hmac-sha1 | ||
315 | : TLS11-AES-256-CBC-HMAC-SHA1 : tls11-aes-256-cbc-hmac-sha1 | ||
316 | + : TLS12-DES-EDE3-CBC-HMAC-SHA1 : tls12-des-ede3-cbc-hmac-sha1 | ||
317 | + : TLS12-AES-128-CBC-HMAC-SHA1 : tls12-aes-128-cbc-hmac-sha1 | ||
318 | + : TLS12-AES-256-CBC-HMAC-SHA1 : tls12-aes-256-cbc-hmac-sha1 | ||
319 | + : TLS12-AES-128-CBC-HMAC-SHA256 : tls12-aes-128-cbc-hmac-sha256 | ||
320 | + : TLS12-AES-256-CBC-HMAC-SHA256 : tls12-aes-256-cbc-hmac-sha256 | ||
321 | diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c | ||
322 | index 0408986..77a82f6 100644 | ||
323 | --- a/ssl/ssl_ciph.c | ||
324 | +++ b/ssl/ssl_ciph.c | ||
325 | @@ -661,6 +661,31 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, | ||
326 | c->algorithm_mac == SSL_SHA1 && | ||
327 | (evp=EVP_get_cipherbyname("TLS11-AES-256-CBC-HMAC-SHA1"))) | ||
328 | *enc = evp, *md = NULL; | ||
329 | + else if (s->ssl_version == TLS1_2_VERSION && | ||
330 | + c->algorithm_enc == SSL_3DES && | ||
331 | + c->algorithm_mac == SSL_SHA1 && | ||
332 | + (evp=EVP_get_cipherbyname("TLS12-DES-EDE3-CBC-HMAC-SHA1"))) | ||
333 | + *enc = evp, *md = NULL; | ||
334 | + else if (s->ssl_version == TLS1_2_VERSION && | ||
335 | + c->algorithm_enc == SSL_AES128 && | ||
336 | + c->algorithm_mac == SSL_SHA1 && | ||
337 | + (evp=EVP_get_cipherbyname("TLS12-AES-128-CBC-HMAC-SHA1"))) | ||
338 | + *enc = evp, *md = NULL; | ||
339 | + else if (s->ssl_version == TLS1_2_VERSION && | ||
340 | + c->algorithm_enc == SSL_AES256 && | ||
341 | + c->algorithm_mac == SSL_SHA1 && | ||
342 | + (evp=EVP_get_cipherbyname("TLS12-AES-256-CBC-HMAC-SHA1"))) | ||
343 | + *enc = evp, *md = NULL; | ||
344 | + else if (s->ssl_version == TLS1_2_VERSION && | ||
345 | + c->algorithm_enc == SSL_AES128 && | ||
346 | + c->algorithm_mac == SSL_SHA256 && | ||
347 | + (evp=EVP_get_cipherbyname("TLS12-AES-128-CBC-HMAC-SHA256"))) | ||
348 | + *enc = evp, *md = NULL; | ||
349 | + else if (s->ssl_version == TLS1_2_VERSION && | ||
350 | + c->algorithm_enc == SSL_AES256 && | ||
351 | + c->algorithm_mac == SSL_SHA256 && | ||
352 | + (evp=EVP_get_cipherbyname("TLS12-AES-256-CBC-HMAC-SHA256"))) | ||
353 | + *enc = evp, *md = NULL; | ||
354 | return(1); | ||
355 | } | ||
356 | else | ||
357 | -- | ||
358 | 2.3.5 | ||
359 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch b/recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch new file mode 100644 index 00000000..16cc6882 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0021-cryptodev-drop-redundant-function.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From ea4abc255c6c5feec01cb1e30c6082cfe47860e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 19 Feb 2015 16:11:53 +0200 | ||
4 | Subject: [PATCH 21/26] cryptodev: drop redundant function | ||
5 | |||
6 | get_dev_crypto already caches the result. Another cache in-between is | ||
7 | useless. | ||
8 | |||
9 | Change-Id: Ibd162529d3fb7a561a17f1a707d5d287c1586a3a | ||
10 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
11 | Reviewed-on: http://git.am.freescale.net:8181/34216 | ||
12 | --- | ||
13 | crypto/engine/eng_cryptodev.c | 18 +++--------------- | ||
14 | 1 file changed, 3 insertions(+), 15 deletions(-) | ||
15 | |||
16 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
17 | index fa5fe1b..1ab5551 100644 | ||
18 | --- a/crypto/engine/eng_cryptodev.c | ||
19 | +++ b/crypto/engine/eng_cryptodev.c | ||
20 | @@ -96,7 +96,6 @@ struct dev_crypto_state { | ||
21 | |||
22 | static u_int32_t cryptodev_asymfeat = 0; | ||
23 | |||
24 | -static int get_asym_dev_crypto(void); | ||
25 | static int open_dev_crypto(void); | ||
26 | static int get_dev_crypto(void); | ||
27 | static int get_cryptodev_ciphers(const int **cnids); | ||
28 | @@ -357,17 +356,6 @@ static void put_dev_crypto(int fd) | ||
29 | #endif | ||
30 | } | ||
31 | |||
32 | -/* Caching version for asym operations */ | ||
33 | -static int | ||
34 | -get_asym_dev_crypto(void) | ||
35 | -{ | ||
36 | - static int fd = -1; | ||
37 | - | ||
38 | - if (fd == -1) | ||
39 | - fd = get_dev_crypto(); | ||
40 | - return fd; | ||
41 | -} | ||
42 | - | ||
43 | /* | ||
44 | * Find out what ciphers /dev/crypto will let us have a session for. | ||
45 | * XXX note, that some of these openssl doesn't deal with yet! | ||
46 | @@ -1796,7 +1784,7 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) | ||
47 | { | ||
48 | int fd, ret = -1; | ||
49 | |||
50 | - if ((fd = get_asym_dev_crypto()) < 0) | ||
51 | + if ((fd = get_dev_crypto()) < 0) | ||
52 | return (ret); | ||
53 | |||
54 | if (r) { | ||
55 | @@ -2374,7 +2362,7 @@ static int cryptodev_rsa_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) | ||
56 | int p_len, q_len; | ||
57 | int i; | ||
58 | |||
59 | - if ((fd = get_asym_dev_crypto()) < 0) | ||
60 | + if ((fd = get_dev_crypto()) < 0) | ||
61 | goto sw_try; | ||
62 | |||
63 | if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err; | ||
64 | @@ -3928,7 +3916,7 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) | ||
65 | BIGNUM *temp = NULL; | ||
66 | unsigned char *padded_pub_key = NULL, *p = NULL; | ||
67 | |||
68 | - if ((fd = get_asym_dev_crypto()) < 0) | ||
69 | + if ((fd = get_dev_crypto()) < 0) | ||
70 | goto sw_try; | ||
71 | |||
72 | memset(&kop, 0, sizeof kop); | ||
73 | -- | ||
74 | 2.3.5 | ||
75 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0022-cryptodev-do-not-zero-the-buffer-before-use.patch b/recipes-connectivity/openssl/openssl-fsl/0022-cryptodev-do-not-zero-the-buffer-before-use.patch new file mode 100644 index 00000000..0b2f0f1b --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0022-cryptodev-do-not-zero-the-buffer-before-use.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 75e3e7d600eb72e7374b1ecf5ece7b831bc98ed8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Tue, 17 Feb 2015 13:12:53 +0200 | ||
4 | Subject: [PATCH 22/26] cryptodev: do not zero the buffer before use | ||
5 | |||
6 | - The buffer is just about to be overwritten. Zeroing it before that has | ||
7 | no purpose | ||
8 | |||
9 | Change-Id: I478c31bd2e254561474a7edf5e37980ca04217ce | ||
10 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
11 | Reviewed-on: http://git.am.freescale.net:8181/34217 | ||
12 | --- | ||
13 | crypto/engine/eng_cryptodev.c | 13 ++++--------- | ||
14 | 1 file changed, 4 insertions(+), 9 deletions(-) | ||
15 | |||
16 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
17 | index 1ab5551..dbc5989 100644 | ||
18 | --- a/crypto/engine/eng_cryptodev.c | ||
19 | +++ b/crypto/engine/eng_cryptodev.c | ||
20 | @@ -1681,21 +1681,16 @@ static int | ||
21 | bn2crparam(const BIGNUM *a, struct crparam *crp) | ||
22 | { | ||
23 | ssize_t bytes, bits; | ||
24 | - u_char *b; | ||
25 | - | ||
26 | - crp->crp_p = NULL; | ||
27 | - crp->crp_nbits = 0; | ||
28 | |||
29 | bits = BN_num_bits(a); | ||
30 | bytes = (bits + 7) / 8; | ||
31 | |||
32 | - b = malloc(bytes); | ||
33 | - if (b == NULL) | ||
34 | + crp->crp_nbits = bits; | ||
35 | + crp->crp_p = malloc(bytes); | ||
36 | + | ||
37 | + if (crp->crp_p == NULL) | ||
38 | return (1); | ||
39 | - memset(b, 0, bytes); | ||
40 | |||
41 | - crp->crp_p = (caddr_t) b; | ||
42 | - crp->crp_nbits = bits; | ||
43 | BN_bn2bin(a, crp->crp_p); | ||
44 | return (0); | ||
45 | } | ||
46 | -- | ||
47 | 2.3.5 | ||
48 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0023-cryptodev-clean-up-code-layout.patch b/recipes-connectivity/openssl/openssl-fsl/0023-cryptodev-clean-up-code-layout.patch new file mode 100644 index 00000000..5ff1c5ca --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0023-cryptodev-clean-up-code-layout.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 4453b06b940fc03a0973cfd96f908e46cce61054 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Wed, 18 Feb 2015 10:39:46 +0200 | ||
4 | Subject: [PATCH 23/26] cryptodev: clean-up code layout | ||
5 | |||
6 | This is just a refactoring that uses else branch to check for malloc failures | ||
7 | |||
8 | Change-Id: I6dc157af36d6ec51a4edfc82cf97fae2e7e83628 | ||
9 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
10 | Reviewed-on: http://git.am.freescale.net:8181/34218 | ||
11 | --- | ||
12 | crypto/engine/eng_cryptodev.c | 42 ++++++++++++++++++++---------------------- | ||
13 | 1 file changed, 20 insertions(+), 22 deletions(-) | ||
14 | |||
15 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
16 | index dbc5989..dceb4f5 100644 | ||
17 | --- a/crypto/engine/eng_cryptodev.c | ||
18 | +++ b/crypto/engine/eng_cryptodev.c | ||
19 | @@ -1745,30 +1745,28 @@ cryptodev_asym_async(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, | ||
20 | fd = *(int *)cookie->eng_handle; | ||
21 | |||
22 | eng_cookie = malloc(sizeof(struct cryptodev_cookie_s)); | ||
23 | - | ||
24 | - if (eng_cookie) { | ||
25 | - memset(eng_cookie, 0, sizeof(struct cryptodev_cookie_s)); | ||
26 | - if (r) { | ||
27 | - kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); | ||
28 | - if (!kop->crk_param[kop->crk_iparams].crp_p) | ||
29 | - return -ENOMEM; | ||
30 | - kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; | ||
31 | - kop->crk_oparams++; | ||
32 | - eng_cookie->r = r; | ||
33 | - eng_cookie->r_param = kop->crk_param[kop->crk_iparams]; | ||
34 | - } | ||
35 | - if (s) { | ||
36 | - kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); | ||
37 | - if (!kop->crk_param[kop->crk_iparams+1].crp_p) | ||
38 | - return -ENOMEM; | ||
39 | - kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; | ||
40 | - kop->crk_oparams++; | ||
41 | - eng_cookie->s = s; | ||
42 | - eng_cookie->s_param = kop->crk_param[kop->crk_iparams + 1]; | ||
43 | - } | ||
44 | - } else | ||
45 | + if (!eng_cookie) | ||
46 | return -ENOMEM; | ||
47 | |||
48 | + memset(eng_cookie, 0, sizeof(struct cryptodev_cookie_s)); | ||
49 | + if (r) { | ||
50 | + kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); | ||
51 | + if (!kop->crk_param[kop->crk_iparams].crp_p) | ||
52 | + return -ENOMEM; | ||
53 | + kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; | ||
54 | + kop->crk_oparams++; | ||
55 | + eng_cookie->r = r; | ||
56 | + eng_cookie->r_param = kop->crk_param[kop->crk_iparams]; | ||
57 | + } | ||
58 | + if (s) { | ||
59 | + kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); | ||
60 | + if (!kop->crk_param[kop->crk_iparams+1].crp_p) | ||
61 | + return -ENOMEM; | ||
62 | + kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; | ||
63 | + kop->crk_oparams++; | ||
64 | + eng_cookie->s = s; | ||
65 | + eng_cookie->s_param = kop->crk_param[kop->crk_iparams + 1]; | ||
66 | + } | ||
67 | eng_cookie->kop = kop; | ||
68 | cookie->eng_cookie = eng_cookie; | ||
69 | return ioctl(fd, CIOCASYMASYNCRYPT, kop); | ||
70 | -- | ||
71 | 2.3.5 | ||
72 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0024-cryptodev-do-not-cache-file-descriptor-in-open.patch b/recipes-connectivity/openssl/openssl-fsl/0024-cryptodev-do-not-cache-file-descriptor-in-open.patch new file mode 100644 index 00000000..e798d3e2 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0024-cryptodev-do-not-cache-file-descriptor-in-open.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | From a44701abd995b3db80001d0c5d88e9ead05972c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 19 Feb 2015 16:43:29 +0200 | ||
4 | Subject: [PATCH 24/26] cryptodev: do not cache file descriptor in 'open' | ||
5 | |||
6 | The file descriptor returned by get_dev_crypto is cached after a | ||
7 | successful return. The issue is, it is cached inside 'open_dev_crypto' | ||
8 | which is no longer useful as a general purpose open("/dev/crypto") | ||
9 | function. | ||
10 | |||
11 | This patch is a refactoring that moves the caching operation from | ||
12 | open_dev_crypto to get_dev_crypto and leaves the former as a simpler | ||
13 | function true to its name | ||
14 | |||
15 | Change-Id: I980170969410381973ce75f6679a4a1401738847 | ||
16 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
17 | Reviewed-on: http://git.am.freescale.net:8181/34219 | ||
18 | --- | ||
19 | crypto/engine/eng_cryptodev.c | 50 +++++++++++++++++++++---------------------- | ||
20 | 1 file changed, 24 insertions(+), 26 deletions(-) | ||
21 | |||
22 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
23 | index dceb4f5..b74fc7c 100644 | ||
24 | --- a/crypto/engine/eng_cryptodev.c | ||
25 | +++ b/crypto/engine/eng_cryptodev.c | ||
26 | @@ -306,47 +306,45 @@ static void ctr64_inc(unsigned char *counter) { | ||
27 | if (c) return; | ||
28 | } while (n); | ||
29 | } | ||
30 | -/* | ||
31 | - * Return a fd if /dev/crypto seems usable, 0 otherwise. | ||
32 | - */ | ||
33 | -static int | ||
34 | -open_dev_crypto(void) | ||
35 | + | ||
36 | +static int open_dev_crypto(void) | ||
37 | { | ||
38 | - static int fd = -1; | ||
39 | + int fd; | ||
40 | |||
41 | - if (fd == -1) { | ||
42 | - if ((fd = open("/dev/crypto", O_RDWR, 0)) == -1) | ||
43 | - return (-1); | ||
44 | - /* close on exec */ | ||
45 | - if (fcntl(fd, F_SETFD, 1) == -1) { | ||
46 | - close(fd); | ||
47 | - fd = -1; | ||
48 | - return (-1); | ||
49 | - } | ||
50 | + fd = open("/dev/crypto", O_RDWR, 0); | ||
51 | + if ( fd < 0) | ||
52 | + return -1; | ||
53 | + | ||
54 | + /* close on exec */ | ||
55 | + if (fcntl(fd, F_SETFD, 1) == -1) { | ||
56 | + close(fd); | ||
57 | + return -1; | ||
58 | } | ||
59 | - return (fd); | ||
60 | + | ||
61 | + return fd; | ||
62 | } | ||
63 | |||
64 | -static int | ||
65 | -get_dev_crypto(void) | ||
66 | +static int get_dev_crypto(void) | ||
67 | { | ||
68 | - int fd, retfd; | ||
69 | + static int fd = -1; | ||
70 | + int retfd; | ||
71 | |||
72 | - if ((fd = open_dev_crypto()) == -1) | ||
73 | - return (-1); | ||
74 | -#ifndef CRIOGET_NOT_NEEDED | ||
75 | + if (fd == -1) | ||
76 | + fd = open_dev_crypto(); | ||
77 | +#ifdef CRIOGET_NOT_NEEDED | ||
78 | + return fd; | ||
79 | +#else | ||
80 | + if (fd == -1) | ||
81 | + return -1; | ||
82 | if (ioctl(fd, CRIOGET, &retfd) == -1) | ||
83 | return (-1); | ||
84 | - | ||
85 | /* close on exec */ | ||
86 | if (fcntl(retfd, F_SETFD, 1) == -1) { | ||
87 | close(retfd); | ||
88 | return (-1); | ||
89 | } | ||
90 | -#else | ||
91 | - retfd = fd; | ||
92 | + return retfd; | ||
93 | #endif | ||
94 | - return (retfd); | ||
95 | } | ||
96 | |||
97 | static void put_dev_crypto(int fd) | ||
98 | -- | ||
99 | 2.3.5 | ||
100 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0025-cryptodev-put_dev_crypto-should-be-an-int.patch b/recipes-connectivity/openssl/openssl-fsl/0025-cryptodev-put_dev_crypto-should-be-an-int.patch new file mode 100644 index 00000000..a48dc6a6 --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0025-cryptodev-put_dev_crypto-should-be-an-int.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 84a8007b6e92fe4c2696cc9e330207ee03303a20 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 19 Feb 2015 13:09:32 +0200 | ||
4 | Subject: [PATCH 25/26] cryptodev: put_dev_crypto should be an int | ||
5 | |||
6 | Change-Id: Ie0a83bc07a37132286c098b17ef35d98de74b043 | ||
7 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
8 | Reviewed-on: http://git.am.freescale.net:8181/34220 | ||
9 | --- | ||
10 | crypto/engine/eng_cryptodev.c | 8 +++++--- | ||
11 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
14 | index b74fc7c..c9db27d 100644 | ||
15 | --- a/crypto/engine/eng_cryptodev.c | ||
16 | +++ b/crypto/engine/eng_cryptodev.c | ||
17 | @@ -347,10 +347,12 @@ static int get_dev_crypto(void) | ||
18 | #endif | ||
19 | } | ||
20 | |||
21 | -static void put_dev_crypto(int fd) | ||
22 | +static int put_dev_crypto(int fd) | ||
23 | { | ||
24 | -#ifndef CRIOGET_NOT_NEEDED | ||
25 | - close(fd); | ||
26 | +#ifdef CRIOGET_NOT_NEEDED | ||
27 | + return 0; | ||
28 | +#else | ||
29 | + return close(fd); | ||
30 | #endif | ||
31 | } | ||
32 | |||
33 | -- | ||
34 | 2.3.5 | ||
35 | |||
diff --git a/recipes-connectivity/openssl/openssl-fsl/0026-cryptodev-simplify-cryptodev-pkc-support-code.patch b/recipes-connectivity/openssl/openssl-fsl/0026-cryptodev-simplify-cryptodev-pkc-support-code.patch new file mode 100644 index 00000000..6527ac8f --- /dev/null +++ b/recipes-connectivity/openssl/openssl-fsl/0026-cryptodev-simplify-cryptodev-pkc-support-code.patch | |||
@@ -0,0 +1,250 @@ | |||
1 | From 787539e7720c99785f6c664a7484842bba08f6ed Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@freescale.com> | ||
3 | Date: Thu, 19 Feb 2015 13:39:52 +0200 | ||
4 | Subject: [PATCH 26/26] cryptodev: simplify cryptodev pkc support code | ||
5 | |||
6 | - Engine init returns directly a file descriptor instead of a pointer to one | ||
7 | - Similarly, the Engine close will now just close the file | ||
8 | |||
9 | Change-Id: Ief736d0776c7009dee002204fb1d4ce9d31c8787 | ||
10 | Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
11 | Reviewed-on: http://git.am.freescale.net:8181/34221 | ||
12 | --- | ||
13 | crypto/crypto.h | 2 +- | ||
14 | crypto/engine/eng_cryptodev.c | 35 +++----------------------- | ||
15 | crypto/engine/eng_int.h | 14 +++-------- | ||
16 | crypto/engine/eng_lib.c | 57 +++++++++++++++++++++---------------------- | ||
17 | crypto/engine/engine.h | 13 +++++----- | ||
18 | 5 files changed, 42 insertions(+), 79 deletions(-) | ||
19 | |||
20 | diff --git a/crypto/crypto.h b/crypto/crypto.h | ||
21 | index ce12731..292427e 100644 | ||
22 | --- a/crypto/crypto.h | ||
23 | +++ b/crypto/crypto.h | ||
24 | @@ -618,7 +618,7 @@ struct pkc_cookie_s { | ||
25 | * -EINVAL: Parameters Invalid | ||
26 | */ | ||
27 | void (*pkc_callback)(struct pkc_cookie_s *cookie, int status); | ||
28 | - void *eng_handle; | ||
29 | + int eng_handle; | ||
30 | }; | ||
31 | |||
32 | #ifdef __cplusplus | ||
33 | diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c | ||
34 | index c9db27d..f173bde 100644 | ||
35 | --- a/crypto/engine/eng_cryptodev.c | ||
36 | +++ b/crypto/engine/eng_cryptodev.c | ||
37 | @@ -1742,7 +1742,7 @@ cryptodev_asym_async(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, | ||
38 | struct pkc_cookie_s *cookie = kop->cookie; | ||
39 | struct cryptodev_cookie_s *eng_cookie; | ||
40 | |||
41 | - fd = *(int *)cookie->eng_handle; | ||
42 | + fd = cookie->eng_handle; | ||
43 | |||
44 | eng_cookie = malloc(sizeof(struct cryptodev_cookie_s)); | ||
45 | if (!eng_cookie) | ||
46 | @@ -1802,38 +1802,11 @@ cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) | ||
47 | return (ret); | ||
48 | } | ||
49 | |||
50 | -/* Close an opened instance of cryptodev engine */ | ||
51 | -void cryptodev_close_instance(void *handle) | ||
52 | -{ | ||
53 | - int fd; | ||
54 | - | ||
55 | - if (handle) { | ||
56 | - fd = *(int *)handle; | ||
57 | - close(fd); | ||
58 | - free(handle); | ||
59 | - } | ||
60 | -} | ||
61 | - | ||
62 | -/* Create an instance of cryptodev for asynchronous interface */ | ||
63 | -void *cryptodev_init_instance(void) | ||
64 | -{ | ||
65 | - int *fd = malloc(sizeof(int)); | ||
66 | - | ||
67 | - if (fd) { | ||
68 | - if ((*fd = open("/dev/crypto", O_RDWR, 0)) == -1) { | ||
69 | - free(fd); | ||
70 | - return NULL; | ||
71 | - } | ||
72 | - } | ||
73 | - return fd; | ||
74 | -} | ||
75 | - | ||
76 | #include <poll.h> | ||
77 | |||
78 | /* Return 0 on success and 1 on failure */ | ||
79 | -int cryptodev_check_availability(void *eng_handle) | ||
80 | +int cryptodev_check_availability(int fd) | ||
81 | { | ||
82 | - int fd = *(int *)eng_handle; | ||
83 | struct pkc_cookie_list_s cookie_list; | ||
84 | struct pkc_cookie_s *cookie; | ||
85 | int i; | ||
86 | @@ -4540,8 +4513,8 @@ ENGINE_load_cryptodev(void) | ||
87 | } | ||
88 | |||
89 | ENGINE_set_check_pkc_availability(engine, cryptodev_check_availability); | ||
90 | - ENGINE_set_close_instance(engine, cryptodev_close_instance); | ||
91 | - ENGINE_set_init_instance(engine, cryptodev_init_instance); | ||
92 | + ENGINE_set_close_instance(engine, put_dev_crypto); | ||
93 | + ENGINE_set_open_instance(engine, open_dev_crypto); | ||
94 | ENGINE_set_async_map(engine, ENGINE_ALLPKC_ASYNC); | ||
95 | |||
96 | ENGINE_add(engine); | ||
97 | diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h | ||
98 | index 8fc3077..8fb79c0 100644 | ||
99 | --- a/crypto/engine/eng_int.h | ||
100 | +++ b/crypto/engine/eng_int.h | ||
101 | @@ -181,23 +181,15 @@ struct engine_st | ||
102 | ENGINE_LOAD_KEY_PTR load_pubkey; | ||
103 | |||
104 | ENGINE_SSL_CLIENT_CERT_PTR load_ssl_client_cert; | ||
105 | - /* | ||
106 | - * Instantiate Engine handle to be passed in check_pkc_availability | ||
107 | - * Ensure that Engine is instantiated before any pkc asynchronous call. | ||
108 | - */ | ||
109 | - void *(*engine_init_instance)(void); | ||
110 | - /* | ||
111 | - * Instantiated Engine handle will be closed with this call. | ||
112 | - * Ensure that no pkc asynchronous call is made after this call | ||
113 | - */ | ||
114 | - void (*engine_close_instance)(void *handle); | ||
115 | + int (*engine_open_instance)(void); | ||
116 | + int (*engine_close_instance)(int fd); | ||
117 | /* | ||
118 | * Check availability will extract the data from kernel. | ||
119 | * eng_handle: This is the Engine handle corresponds to which | ||
120 | * the cookies needs to be polled. | ||
121 | * return 0 if cookie available else 1 | ||
122 | */ | ||
123 | - int (*check_pkc_availability)(void *eng_handle); | ||
124 | + int (*check_pkc_availability)(int fd); | ||
125 | /* | ||
126 | * The following map is used to check if the engine supports asynchronous implementation | ||
127 | * ENGINE_ASYNC_FLAG* for available bitmap. Any application checking for asynchronous | ||
128 | diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c | ||
129 | index 6fa621c..6c9471b 100644 | ||
130 | --- a/crypto/engine/eng_lib.c | ||
131 | +++ b/crypto/engine/eng_lib.c | ||
132 | @@ -99,7 +99,7 @@ void engine_set_all_null(ENGINE *e) | ||
133 | e->load_privkey = NULL; | ||
134 | e->load_pubkey = NULL; | ||
135 | e->check_pkc_availability = NULL; | ||
136 | - e->engine_init_instance = NULL; | ||
137 | + e->engine_open_instance = NULL; | ||
138 | e->engine_close_instance = NULL; | ||
139 | e->cmd_defns = NULL; | ||
140 | e->async_map = 0; | ||
141 | @@ -237,47 +237,46 @@ int ENGINE_set_id(ENGINE *e, const char *id) | ||
142 | return 1; | ||
143 | } | ||
144 | |||
145 | -void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)) | ||
146 | - { | ||
147 | - e->engine_init_instance = engine_init_instance; | ||
148 | - } | ||
149 | +void ENGINE_set_open_instance(ENGINE *e, int (*engine_open_instance)(void)) | ||
150 | +{ | ||
151 | + e->engine_open_instance = engine_open_instance; | ||
152 | +} | ||
153 | |||
154 | -void ENGINE_set_close_instance(ENGINE *e, | ||
155 | - void (*engine_close_instance)(void *)) | ||
156 | - { | ||
157 | - e->engine_close_instance = engine_close_instance; | ||
158 | - } | ||
159 | +void ENGINE_set_close_instance(ENGINE *e, int (*engine_close_instance)(int)) | ||
160 | +{ | ||
161 | + e->engine_close_instance = engine_close_instance; | ||
162 | +} | ||
163 | |||
164 | void ENGINE_set_async_map(ENGINE *e, int async_map) | ||
165 | { | ||
166 | e->async_map = async_map; | ||
167 | } | ||
168 | |||
169 | -void *ENGINE_init_instance(ENGINE *e) | ||
170 | - { | ||
171 | - return e->engine_init_instance(); | ||
172 | - } | ||
173 | - | ||
174 | -void ENGINE_close_instance(ENGINE *e, void *eng_handle) | ||
175 | - { | ||
176 | - e->engine_close_instance(eng_handle); | ||
177 | - } | ||
178 | - | ||
179 | int ENGINE_get_async_map(ENGINE *e) | ||
180 | { | ||
181 | return e->async_map; | ||
182 | } | ||
183 | |||
184 | -void ENGINE_set_check_pkc_availability(ENGINE *e, | ||
185 | - int (*check_pkc_availability)(void *eng_handle)) | ||
186 | - { | ||
187 | - e->check_pkc_availability = check_pkc_availability; | ||
188 | - } | ||
189 | +int ENGINE_open_instance(ENGINE *e) | ||
190 | +{ | ||
191 | + return e->engine_open_instance(); | ||
192 | +} | ||
193 | |||
194 | -int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle) | ||
195 | - { | ||
196 | - return e->check_pkc_availability(eng_handle); | ||
197 | - } | ||
198 | +int ENGINE_close_instance(ENGINE *e, int fd) | ||
199 | +{ | ||
200 | + return e->engine_close_instance(fd); | ||
201 | +} | ||
202 | + | ||
203 | +void ENGINE_set_check_pkc_availability(ENGINE *e, | ||
204 | + int (*check_pkc_availability)(int fd)) | ||
205 | +{ | ||
206 | + e->check_pkc_availability = check_pkc_availability; | ||
207 | +} | ||
208 | + | ||
209 | +int ENGINE_check_pkc_availability(ENGINE *e, int fd) | ||
210 | +{ | ||
211 | + return e->check_pkc_availability(fd); | ||
212 | +} | ||
213 | |||
214 | int ENGINE_set_name(ENGINE *e, const char *name) | ||
215 | { | ||
216 | diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h | ||
217 | index ccff86a..3ba3e97 100644 | ||
218 | --- a/crypto/engine/engine.h | ||
219 | +++ b/crypto/engine/engine.h | ||
220 | @@ -473,9 +473,6 @@ ENGINE *ENGINE_new(void); | ||
221 | int ENGINE_free(ENGINE *e); | ||
222 | int ENGINE_up_ref(ENGINE *e); | ||
223 | int ENGINE_set_id(ENGINE *e, const char *id); | ||
224 | -void ENGINE_set_init_instance(ENGINE *e, void *(*engine_init_instance)(void)); | ||
225 | -void ENGINE_set_close_instance(ENGINE *e, | ||
226 | - void (*engine_free_instance)(void *)); | ||
227 | /* | ||
228 | * Following FLAGS are bitmap store in async_map to set asynchronous interface capability | ||
229 | *of the engine | ||
230 | @@ -492,11 +489,13 @@ void ENGINE_set_async_map(ENGINE *e, int async_map); | ||
231 | * to confirm asynchronous methods supported | ||
232 | */ | ||
233 | int ENGINE_get_async_map(ENGINE *e); | ||
234 | -void *ENGINE_init_instance(ENGINE *e); | ||
235 | -void ENGINE_close_instance(ENGINE *e, void *eng_handle); | ||
236 | +int ENGINE_open_instance(ENGINE *e); | ||
237 | +int ENGINE_close_instance(ENGINE *e, int fd); | ||
238 | +void ENGINE_set_init_instance(ENGINE *e, int(*engine_init_instance)(void)); | ||
239 | +void ENGINE_set_close_instance(ENGINE *e, int(*engine_close_instance)(int)); | ||
240 | void ENGINE_set_check_pkc_availability(ENGINE *e, | ||
241 | - int (*check_pkc_availability)(void *eng_handle)); | ||
242 | -int ENGINE_check_pkc_availability(ENGINE *e, void *eng_handle); | ||
243 | + int (*check_pkc_availability)(int fd)); | ||
244 | +int ENGINE_check_pkc_availability(ENGINE *e, int fd); | ||
245 | int ENGINE_set_name(ENGINE *e, const char *name); | ||
246 | int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); | ||
247 | int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); | ||
248 | -- | ||
249 | 2.3.5 | ||
250 | |||
diff --git a/recipes-connectivity/openssl/openssl.inc b/recipes-connectivity/openssl/openssl.inc new file mode 100644 index 00000000..ee02fb79 --- /dev/null +++ b/recipes-connectivity/openssl/openssl.inc | |||
@@ -0,0 +1,173 @@ | |||
1 | SUMMARY = "Secure Socket Layer" | ||
2 | DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." | ||
3 | HOMEPAGE = "http://www.openssl.org/" | ||
4 | BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" | ||
5 | SECTION = "libs/network" | ||
6 | |||
7 | # "openssl | SSLeay" dual license | ||
8 | LICENSE = "openssl" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8" | ||
10 | |||
11 | DEPENDS = "perl-native-runtime" | ||
12 | |||
13 | SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ | ||
14 | " | ||
15 | S = "${WORKDIR}/openssl-${PV}" | ||
16 | |||
17 | PACKAGECONFIG[perl] = ",,," | ||
18 | |||
19 | AR_append = " r" | ||
20 | # Avoid binaries being marked as requiring an executable stack since it | ||
21 | # doesn't(which causes and this causes issues with SELinux | ||
22 | CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ | ||
23 | -DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack" | ||
24 | |||
25 | # -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom | ||
26 | CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}" | ||
27 | CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}" | ||
28 | |||
29 | export DIRS = "crypto ssl apps" | ||
30 | export EX_LIBS = "-lgcc -ldl" | ||
31 | export AS = "${CC} -c" | ||
32 | |||
33 | inherit pkgconfig siteinfo multilib_header | ||
34 | |||
35 | PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf" | ||
36 | FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}" | ||
37 | FILES_libssl = "${libdir}/libssl.so.*" | ||
38 | FILES_${PN} =+ " ${libdir}/ssl/*" | ||
39 | FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash" | ||
40 | RDEPENDS_${PN}-misc = "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" | ||
41 | FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}" | ||
42 | |||
43 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | ||
44 | # package RRECOMMENDS on this package. This will enable the configuration | ||
45 | # file to be installed for both the base openssl package and the libcrypto | ||
46 | # package since the base openssl package depends on the libcrypto package. | ||
47 | FILES_openssl-conf = "${libdir}/ssl/openssl.cnf" | ||
48 | CONFFILES_openssl-conf = "${libdir}/ssl/openssl.cnf" | ||
49 | RRECOMMENDS_libcrypto += "openssl-conf" | ||
50 | |||
51 | do_configure_prepend_darwin () { | ||
52 | sed -i -e '/version-script=openssl\.ld/d' Configure | ||
53 | } | ||
54 | |||
55 | do_configure () { | ||
56 | cd util | ||
57 | perl perlpath.pl ${STAGING_BINDIR_NATIVE} | ||
58 | cd .. | ||
59 | ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/ | ||
60 | |||
61 | os=${HOST_OS} | ||
62 | if [ "x$os" = "xlinux-uclibc" ]; then | ||
63 | os=linux | ||
64 | elif [ "x$os" = "xlinux-uclibceabi" ]; then | ||
65 | os=linux | ||
66 | elif [ "x$os" = "xlinux-uclibcspe" ]; then | ||
67 | os=linux | ||
68 | elif [ "x$os" = "xlinux-gnuspe" ]; then | ||
69 | os=linux | ||
70 | elif [ "x$os" = "xlinux-gnueabi" ]; then | ||
71 | os=linux | ||
72 | fi | ||
73 | target="$os-${HOST_ARCH}" | ||
74 | case $target in | ||
75 | linux-arm) | ||
76 | target=linux-armv4 | ||
77 | ;; | ||
78 | linux-armeb) | ||
79 | target=linux-elf-armeb | ||
80 | ;; | ||
81 | linux-aarch64*) | ||
82 | target=linux-generic64 | ||
83 | ;; | ||
84 | linux-sh3) | ||
85 | target=debian-sh3 | ||
86 | ;; | ||
87 | linux-sh4) | ||
88 | target=debian-sh4 | ||
89 | ;; | ||
90 | linux-i486) | ||
91 | target=debian-i386-i486 | ||
92 | ;; | ||
93 | linux-i586 | linux-viac3) | ||
94 | target=debian-i386-i586 | ||
95 | ;; | ||
96 | linux-i686) | ||
97 | target=debian-i386-i686/cmov | ||
98 | ;; | ||
99 | linux-gnux32-x86_64) | ||
100 | target=linux-x32 | ||
101 | ;; | ||
102 | linux-gnu64-x86_64) | ||
103 | target=linux-x86_64 | ||
104 | ;; | ||
105 | linux-mips) | ||
106 | target=debian-mips | ||
107 | ;; | ||
108 | linux-mipsel) | ||
109 | target=debian-mipsel | ||
110 | ;; | ||
111 | linux-*-mips64) | ||
112 | target=linux-mips | ||
113 | ;; | ||
114 | linux-powerpc) | ||
115 | target=linux-ppc | ||
116 | ;; | ||
117 | linux-powerpc64) | ||
118 | target=linux-ppc64 | ||
119 | ;; | ||
120 | linux-supersparc) | ||
121 | target=linux-sparcv8 | ||
122 | ;; | ||
123 | linux-sparc) | ||
124 | target=linux-sparcv8 | ||
125 | ;; | ||
126 | darwin-i386) | ||
127 | target=darwin-i386-cc | ||
128 | ;; | ||
129 | esac | ||
130 | # inject machine-specific flags | ||
131 | sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure | ||
132 | useprefix=${prefix} | ||
133 | if [ "x$useprefix" = "x" ]; then | ||
134 | useprefix=/ | ||
135 | fi | ||
136 | perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=`basename ${libdir}` $target | ||
137 | } | ||
138 | |||
139 | do_compile () { | ||
140 | oe_runmake | ||
141 | } | ||
142 | |||
143 | do_install () { | ||
144 | oe_runmake INSTALL_PREFIX="${D}" MANDIR="${mandir}" install | ||
145 | |||
146 | oe_libinstall -so libcrypto ${D}${libdir} | ||
147 | oe_libinstall -so libssl ${D}${libdir} | ||
148 | |||
149 | # Moving libcrypto to /lib | ||
150 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then | ||
151 | mkdir -p ${D}/${base_libdir}/ | ||
152 | mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/ | ||
153 | sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc | ||
154 | fi | ||
155 | |||
156 | install -d ${D}${includedir} | ||
157 | cp --dereference -R include/openssl ${D}${includedir} | ||
158 | |||
159 | oe_multilib_header openssl/opensslconf.h | ||
160 | if [ "${@base_contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then | ||
161 | install -m 0755 ${S}/tools/c_rehash ${D}${bindir} | ||
162 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash | ||
163 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl | ||
164 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget | ||
165 | # The c_rehash utility isn't installed by the normal installation process. | ||
166 | else | ||
167 | rm -f ${D}${bindir}/c_rehash | ||
168 | rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget | ||
169 | fi | ||
170 | } | ||
171 | |||
172 | BBCLASSEXTEND = "native nativesdk" | ||
173 | |||
diff --git a/recipes-connectivity/openssl/openssl/configure-targets.patch b/recipes-connectivity/openssl/openssl/configure-targets.patch new file mode 100644 index 00000000..c1f3d087 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/configure-targets.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | The number of colons are important :) | ||
4 | |||
5 | |||
6 | --- | ||
7 | Configure | 16 ++++++++++++++++ | ||
8 | 1 file changed, 16 insertions(+) | ||
9 | |||
10 | --- a/Configure | ||
11 | +++ b/Configure | ||
12 | @@ -403,6 +403,22 @@ my %table=( | ||
13 | "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", | ||
14 | "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", | ||
15 | |||
16 | + # Linux on ARM | ||
17 | +"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
18 | +"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
19 | +"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
20 | +"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
21 | +"linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
22 | +"linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
23 | + | ||
24 | +"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).", | ||
25 | + | ||
26 | +#### Linux on MIPS/MIPS64 | ||
27 | +"linux-mips","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
28 | +"linux-mips64","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
29 | +"linux-mips64el","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -mabi=64 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
30 | +"linux-mipsel","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
31 | + | ||
32 | # Android: linux-* but without -DTERMIO and pointers to headers and libs. | ||
33 | "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
34 | "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch b/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch new file mode 100644 index 00000000..ac1b19b9 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/c_rehash-compat.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001 | ||
4 | From: Ludwig Nussel <ludwig.nussel@suse.de> | ||
5 | Date: Wed, 21 Apr 2010 15:52:10 +0200 | ||
6 | Subject: [PATCH] also create old hash for compatibility | ||
7 | |||
8 | --- | ||
9 | tools/c_rehash.in | 8 +++++++- | ||
10 | 1 files changed, 7 insertions(+), 1 deletions(-) | ||
11 | |||
12 | Index: openssl-1.0.0d/tools/c_rehash.in | ||
13 | =================================================================== | ||
14 | --- openssl-1.0.0d.orig/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000 | ||
15 | +++ openssl-1.0.0d/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000 | ||
16 | @@ -86,6 +86,7 @@ | ||
17 | } | ||
18 | } | ||
19 | link_hash_cert($fname) if($cert); | ||
20 | + link_hash_cert_old($fname) if($cert); | ||
21 | link_hash_crl($fname) if($crl); | ||
22 | } | ||
23 | } | ||
24 | @@ -119,8 +120,9 @@ | ||
25 | |||
26 | sub link_hash_cert { | ||
27 | my $fname = $_[0]; | ||
28 | + my $hashopt = $_[1] || '-subject_hash'; | ||
29 | $fname =~ s/'/'\\''/g; | ||
30 | - my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in "$fname"`; | ||
31 | + my ($hash, $fprint) = `"$openssl" x509 $hashopt -fingerprint -noout -in "$fname"`; | ||
32 | chomp $hash; | ||
33 | chomp $fprint; | ||
34 | $fprint =~ s/^.*=//; | ||
35 | @@ -150,6 +152,10 @@ | ||
36 | $hashlist{$hash} = $fprint; | ||
37 | } | ||
38 | |||
39 | +sub link_hash_cert_old { | ||
40 | + link_hash_cert($_[0], '-subject_hash_old'); | ||
41 | +} | ||
42 | + | ||
43 | # Same as above except for a CRL. CRL links are of the form <hash>.r<n> | ||
44 | |||
45 | sub link_hash_crl { | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/ca.patch b/recipes-connectivity/openssl/openssl/debian/ca.patch new file mode 100644 index 00000000..aba4d429 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/ca.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-0.9.8m/apps/CA.pl.in | ||
4 | =================================================================== | ||
5 | --- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000 | ||
6 | +++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000 | ||
7 | @@ -65,6 +65,7 @@ | ||
8 | foreach (@ARGV) { | ||
9 | if ( /^(-\?|-h|-help)$/ ) { | ||
10 | print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; | ||
11 | + print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; | ||
12 | exit 0; | ||
13 | } elsif (/^-newcert$/) { | ||
14 | # create a certificate | ||
15 | @@ -165,6 +166,7 @@ | ||
16 | } else { | ||
17 | print STDERR "Unknown arg $_\n"; | ||
18 | print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; | ||
19 | + print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; | ||
20 | exit 1; | ||
21 | } | ||
22 | } | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/debian-targets.patch b/recipes-connectivity/openssl/openssl/debian/debian-targets.patch new file mode 100644 index 00000000..8101edf0 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/debian-targets.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.1/Configure | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.1.orig/Configure 2012-03-17 15:37:54.000000000 +0000 | ||
6 | +++ openssl-1.0.1/Configure 2012-03-17 16:13:49.000000000 +0000 | ||
7 | @@ -105,6 +105,10 @@ | ||
8 | |||
9 | my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; | ||
10 | |||
11 | +# There are no separate CFLAGS/CPPFLAGS/LDFLAGS, set everything in CFLAGS | ||
12 | +my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get CPPFLAGS` . `dpkg-buildflags --get LDFLAGS` . "-Wa,--noexecstack -Wall"; | ||
13 | +$debian_cflags =~ s/\n/ /g; | ||
14 | + | ||
15 | my $strict_warnings = 0; | ||
16 | |||
17 | my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; | ||
18 | @@ -338,6 +342,48 @@ | ||
19 | "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so", | ||
20 | "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::-msym:.so", | ||
21 | |||
22 | +# Debian GNU/* (various architectures) | ||
23 | +"debian-alpha","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
24 | +"debian-alpha-ev4","gcc:-DTERMIO ${debian_cflags} -mcpu=ev4::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
25 | +"debian-alpha-ev5","gcc:-DTERMIO ${debian_cflags} -mcpu=ev5::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
26 | +"debian-armeb","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
27 | +"debian-armel","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
28 | +"debian-armhf","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
29 | +"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::", | ||
30 | +"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -fomit-frame-pointer::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
31 | +"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS ${debian_cflags} -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
32 | +"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
33 | +"debian-hppa","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
34 | +"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
35 | +"debian-ia64","gcc:-DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
36 | +"debian-i386","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
37 | +"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i486::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
38 | +"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i586::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
39 | +"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO ${debian_cflags} -march=i686::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
40 | +"debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
41 | +"debian-mips", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
42 | +"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
43 | +"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
44 | +"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
45 | +"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
46 | +"debian-openbsd-alpha","gcc:-DTERMIOS ${debian_cflags}::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
47 | +"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
48 | +"debian-openbsd-mips","gcc:-DL_ENDIAN ${debian_cflags}::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
49 | +"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
50 | +"debian-powerpcspe","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
51 | +"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
52 | +"debian-s390","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
53 | +"debian-s390x","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
54 | +"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
55 | +"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
56 | +"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
57 | +"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
58 | +"debian-m32r","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
59 | +"debian-sparc","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
60 | +"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v8 -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
61 | +"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags} -mcpu=v9 -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
62 | +"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO ${debian_cflags} -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
63 | + | ||
64 | #### | ||
65 | #### Variety of LINUX:-) | ||
66 | #### | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/make-targets.patch b/recipes-connectivity/openssl/openssl/debian/make-targets.patch new file mode 100644 index 00000000..ee0a62c3 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/make-targets.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.1/Makefile.org | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.1.orig/Makefile.org 2012-03-17 09:41:07.000000000 +0000 | ||
6 | +++ openssl-1.0.1/Makefile.org 2012-03-17 09:41:21.000000000 +0000 | ||
7 | @@ -135,7 +135,7 @@ | ||
8 | |||
9 | BASEADDR= | ||
10 | |||
11 | -DIRS= crypto ssl engines apps test tools | ||
12 | +DIRS= crypto ssl engines apps tools | ||
13 | ENGDIRS= ccgost | ||
14 | SHLIBDIRS= crypto ssl | ||
15 | |||
diff --git a/recipes-connectivity/openssl/openssl/debian/man-dir.patch b/recipes-connectivity/openssl/openssl/debian/man-dir.patch new file mode 100644 index 00000000..4085e3b1 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/man-dir.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.0c/Makefile.org | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:27.000000000 +0100 | ||
6 | +++ openssl-1.0.0c/Makefile.org 2010-12-12 16:11:37.000000000 +0100 | ||
7 | @@ -131,7 +131,7 @@ | ||
8 | |||
9 | MAKEFILE= Makefile | ||
10 | |||
11 | -MANDIR=$(OPENSSLDIR)/man | ||
12 | +MANDIR=/usr/share/man | ||
13 | MAN1=1 | ||
14 | MAN3=3 | ||
15 | MANSUFFIX= | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/man-section.patch b/recipes-connectivity/openssl/openssl/debian/man-section.patch new file mode 100644 index 00000000..21c1d1a4 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/man-section.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.0c/Makefile.org | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.0c.orig/Makefile.org 2010-12-12 16:11:37.000000000 +0100 | ||
6 | +++ openssl-1.0.0c/Makefile.org 2010-12-12 16:13:28.000000000 +0100 | ||
7 | @@ -160,7 +160,8 @@ | ||
8 | MANDIR=/usr/share/man | ||
9 | MAN1=1 | ||
10 | MAN3=3 | ||
11 | -MANSUFFIX= | ||
12 | +MANSUFFIX=ssl | ||
13 | +MANSECTION=SSL | ||
14 | HTMLSUFFIX=html | ||
15 | HTMLDIR=$(OPENSSLDIR)/html | ||
16 | SHELL=/bin/sh | ||
17 | @@ -651,7 +652,7 @@ | ||
18 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ | ||
19 | (cd `$(PERL) util/dirname.pl $$i`; \ | ||
20 | sh -c "$$pod2man \ | ||
21 | - --section=$$sec --center=OpenSSL \ | ||
22 | + --section=$${sec}$(MANSECTION) --center=OpenSSL \ | ||
23 | --release=$(VERSION) `basename $$i`") \ | ||
24 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | ||
25 | $(PERL) util/extract-names.pl < $$i | \ | ||
26 | @@ -668,7 +669,7 @@ | ||
27 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ | ||
28 | (cd `$(PERL) util/dirname.pl $$i`; \ | ||
29 | sh -c "$$pod2man \ | ||
30 | - --section=$$sec --center=OpenSSL \ | ||
31 | + --section=$${sec}$(MANSECTION) --center=OpenSSL \ | ||
32 | --release=$(VERSION) `basename $$i`") \ | ||
33 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | ||
34 | $(PERL) util/extract-names.pl < $$i | \ | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/no-rpath.patch b/recipes-connectivity/openssl/openssl/debian/no-rpath.patch new file mode 100644 index 00000000..1ccb3b86 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/no-rpath.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.0c/Makefile.shared | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.0c.orig/Makefile.shared 2010-08-21 13:36:49.000000000 +0200 | ||
6 | +++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:36.000000000 +0100 | ||
7 | @@ -153,7 +153,7 @@ | ||
8 | NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ | ||
9 | SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" | ||
10 | |||
11 | -DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" | ||
12 | +DO_GNU_APP=LDFLAGS="$(CFLAGS)" | ||
13 | |||
14 | #This is rather special. It's a special target with which one can link | ||
15 | #applications without bothering with any features that have anything to | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch b/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch new file mode 100644 index 00000000..cc4408ab --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/no-symbolic.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.0c/Makefile.shared | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.0c.orig/Makefile.shared 2010-12-12 16:13:36.000000000 +0100 | ||
6 | +++ openssl-1.0.0c/Makefile.shared 2010-12-12 16:13:44.000000000 +0100 | ||
7 | @@ -151,7 +151,7 @@ | ||
8 | SHLIB_SUFFIX=; \ | ||
9 | ALLSYMSFLAGS='-Wl,--whole-archive'; \ | ||
10 | NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ | ||
11 | - SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" | ||
12 | + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" | ||
13 | |||
14 | DO_GNU_APP=LDFLAGS="$(CFLAGS)" | ||
15 | |||
diff --git a/recipes-connectivity/openssl/openssl/debian/pic.patch b/recipes-connectivity/openssl/openssl/debian/pic.patch new file mode 100644 index 00000000..bfda3888 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/pic.patch | |||
@@ -0,0 +1,177 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.1c/crypto/des/asm/desboth.pl | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.1c.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200 | ||
6 | +++ openssl-1.0.1c/crypto/des/asm/desboth.pl 2012-07-29 14:15:26.000000000 +0200 | ||
7 | @@ -16,6 +16,11 @@ | ||
8 | |||
9 | &push("edi"); | ||
10 | |||
11 | + &call (&label("pic_point0")); | ||
12 | + &set_label("pic_point0"); | ||
13 | + &blindpop("ebp"); | ||
14 | + &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]"); | ||
15 | + | ||
16 | &comment(""); | ||
17 | &comment("Load the data words"); | ||
18 | &mov($L,&DWP(0,"ebx","",0)); | ||
19 | @@ -47,15 +52,21 @@ | ||
20 | &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); | ||
21 | &mov(&swtmp(1), "eax"); | ||
22 | &mov(&swtmp(0), "ebx"); | ||
23 | - &call("DES_encrypt2"); | ||
24 | + &exch("ebx", "ebp"); | ||
25 | + &call("DES_encrypt2\@PLT"); | ||
26 | + &exch("ebx", "ebp"); | ||
27 | &mov(&swtmp(2), (DWC(($enc)?"0":"1"))); | ||
28 | &mov(&swtmp(1), "edi"); | ||
29 | &mov(&swtmp(0), "ebx"); | ||
30 | - &call("DES_encrypt2"); | ||
31 | + &exch("ebx", "ebp"); | ||
32 | + &call("DES_encrypt2\@PLT"); | ||
33 | + &exch("ebx", "ebp"); | ||
34 | &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); | ||
35 | &mov(&swtmp(1), "esi"); | ||
36 | &mov(&swtmp(0), "ebx"); | ||
37 | - &call("DES_encrypt2"); | ||
38 | + &exch("ebx", "ebp"); | ||
39 | + &call("DES_encrypt2\@PLT"); | ||
40 | + &exch("ebx", "ebp"); | ||
41 | |||
42 | &stack_pop(3); | ||
43 | &mov($L,&DWP(0,"ebx","",0)); | ||
44 | Index: openssl-1.0.1c/crypto/perlasm/cbc.pl | ||
45 | =================================================================== | ||
46 | --- openssl-1.0.1c.orig/crypto/perlasm/cbc.pl 2011-07-13 08:22:46.000000000 +0200 | ||
47 | +++ openssl-1.0.1c/crypto/perlasm/cbc.pl 2012-07-29 14:15:26.000000000 +0200 | ||
48 | @@ -122,7 +122,11 @@ | ||
49 | &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call | ||
50 | &mov(&DWP($data_off+4,"esp","",0), "ebx"); # | ||
51 | |||
52 | - &call($enc_func); | ||
53 | + &call (&label("pic_point0")); | ||
54 | + &set_label("pic_point0"); | ||
55 | + &blindpop("ebx"); | ||
56 | + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]"); | ||
57 | + &call("$enc_func\@PLT"); | ||
58 | |||
59 | &mov("eax", &DWP($data_off,"esp","",0)); | ||
60 | &mov("ebx", &DWP($data_off+4,"esp","",0)); | ||
61 | @@ -185,7 +189,11 @@ | ||
62 | &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call | ||
63 | &mov(&DWP($data_off+4,"esp","",0), "ebx"); # | ||
64 | |||
65 | - &call($enc_func); | ||
66 | + &call (&label("pic_point1")); | ||
67 | + &set_label("pic_point1"); | ||
68 | + &blindpop("ebx"); | ||
69 | + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]"); | ||
70 | + &call("$enc_func\@PLT"); | ||
71 | |||
72 | &mov("eax", &DWP($data_off,"esp","",0)); | ||
73 | &mov("ebx", &DWP($data_off+4,"esp","",0)); | ||
74 | @@ -218,7 +226,11 @@ | ||
75 | &mov(&DWP($data_off,"esp","",0), "eax"); # put back | ||
76 | &mov(&DWP($data_off+4,"esp","",0), "ebx"); # | ||
77 | |||
78 | - &call($dec_func); | ||
79 | + &call (&label("pic_point2")); | ||
80 | + &set_label("pic_point2"); | ||
81 | + &blindpop("ebx"); | ||
82 | + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]"); | ||
83 | + &call("$dec_func\@PLT"); | ||
84 | |||
85 | &mov("eax", &DWP($data_off,"esp","",0)); # get return | ||
86 | &mov("ebx", &DWP($data_off+4,"esp","",0)); # | ||
87 | @@ -261,7 +273,11 @@ | ||
88 | &mov(&DWP($data_off,"esp","",0), "eax"); # put back | ||
89 | &mov(&DWP($data_off+4,"esp","",0), "ebx"); # | ||
90 | |||
91 | - &call($dec_func); | ||
92 | + &call (&label("pic_point3")); | ||
93 | + &set_label("pic_point3"); | ||
94 | + &blindpop("ebx"); | ||
95 | + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]"); | ||
96 | + &call("$dec_func\@PLT"); | ||
97 | |||
98 | &mov("eax", &DWP($data_off,"esp","",0)); # get return | ||
99 | &mov("ebx", &DWP($data_off+4,"esp","",0)); # | ||
100 | Index: openssl-1.0.1c/crypto/perlasm/x86gas.pl | ||
101 | =================================================================== | ||
102 | --- openssl-1.0.1c.orig/crypto/perlasm/x86gas.pl 2011-12-09 20:16:35.000000000 +0100 | ||
103 | +++ openssl-1.0.1c/crypto/perlasm/x86gas.pl 2012-07-29 14:15:26.000000000 +0200 | ||
104 | @@ -161,6 +161,7 @@ | ||
105 | if ($::macosx) { push (@out,"$tmp,2\n"); } | ||
106 | elsif ($::elf) { push (@out,"$tmp,4\n"); } | ||
107 | else { push (@out,"$tmp\n"); } | ||
108 | + if ($::elf) { push (@out,".hidden\tOPENSSL_ia32cap_P\n"); } | ||
109 | } | ||
110 | push(@out,$initseg) if ($initseg); | ||
111 | } | ||
112 | @@ -218,8 +219,23 @@ | ||
113 | elsif ($::elf) | ||
114 | { $initseg.=<<___; | ||
115 | .section .init | ||
116 | +___ | ||
117 | + if ($::pic) | ||
118 | + { $initseg.=<<___; | ||
119 | + pushl %ebx | ||
120 | + call .pic_point0 | ||
121 | +.pic_point0: | ||
122 | + popl %ebx | ||
123 | + addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx | ||
124 | + call $f\@PLT | ||
125 | + popl %ebx | ||
126 | +___ | ||
127 | + } | ||
128 | + else | ||
129 | + { $initseg.=<<___; | ||
130 | call $f | ||
131 | ___ | ||
132 | + } | ||
133 | } | ||
134 | elsif ($::coff) | ||
135 | { $initseg.=<<___; # applies to both Cygwin and Mingw | ||
136 | Index: openssl-1.0.1c/crypto/x86cpuid.pl | ||
137 | =================================================================== | ||
138 | --- openssl-1.0.1c.orig/crypto/x86cpuid.pl 2012-02-28 15:20:34.000000000 +0100 | ||
139 | +++ openssl-1.0.1c/crypto/x86cpuid.pl 2012-07-29 14:15:26.000000000 +0200 | ||
140 | @@ -8,6 +8,8 @@ | ||
141 | |||
142 | for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | ||
143 | |||
144 | +push(@out, ".hidden OPENSSL_ia32cap_P\n"); | ||
145 | + | ||
146 | &function_begin("OPENSSL_ia32_cpuid"); | ||
147 | &xor ("edx","edx"); | ||
148 | &pushf (); | ||
149 | @@ -139,9 +141,7 @@ | ||
150 | &set_label("nocpuid"); | ||
151 | &function_end("OPENSSL_ia32_cpuid"); | ||
152 | |||
153 | -&external_label("OPENSSL_ia32cap_P"); | ||
154 | - | ||
155 | -&function_begin_B("OPENSSL_rdtsc","EXTRN\t_OPENSSL_ia32cap_P:DWORD"); | ||
156 | +&function_begin_B("OPENSSL_rdtsc"); | ||
157 | &xor ("eax","eax"); | ||
158 | &xor ("edx","edx"); | ||
159 | &picmeup("ecx","OPENSSL_ia32cap_P"); | ||
160 | @@ -155,7 +155,7 @@ | ||
161 | # This works in Ring 0 only [read DJGPP+MS-DOS+privileged DPMI host], | ||
162 | # but it's safe to call it on any [supported] 32-bit platform... | ||
163 | # Just check for [non-]zero return value... | ||
164 | -&function_begin_B("OPENSSL_instrument_halt","EXTRN\t_OPENSSL_ia32cap_P:DWORD"); | ||
165 | +&function_begin_B("OPENSSL_instrument_halt"); | ||
166 | &picmeup("ecx","OPENSSL_ia32cap_P"); | ||
167 | &bt (&DWP(0,"ecx"),4); | ||
168 | &jnc (&label("nohalt")); # no TSC | ||
169 | @@ -222,7 +222,7 @@ | ||
170 | &ret (); | ||
171 | &function_end_B("OPENSSL_far_spin"); | ||
172 | |||
173 | -&function_begin_B("OPENSSL_wipe_cpu","EXTRN\t_OPENSSL_ia32cap_P:DWORD"); | ||
174 | +&function_begin_B("OPENSSL_wipe_cpu"); | ||
175 | &xor ("eax","eax"); | ||
176 | &xor ("edx","edx"); | ||
177 | &picmeup("ecx","OPENSSL_ia32cap_P"); | ||
diff --git a/recipes-connectivity/openssl/openssl/debian/version-script.patch b/recipes-connectivity/openssl/openssl/debian/version-script.patch new file mode 100644 index 00000000..ece8b9b4 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/debian/version-script.patch | |||
@@ -0,0 +1,4670 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | Index: openssl-1.0.1d/Configure | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.1d.orig/Configure 2013-02-06 19:41:43.000000000 +0100 | ||
6 | +++ openssl-1.0.1d/Configure 2013-02-06 19:41:43.000000000 +0100 | ||
7 | @@ -1621,6 +1621,8 @@ | ||
8 | } | ||
9 | } | ||
10 | |||
11 | +$shared_ldflag .= " -Wl,--version-script=openssl.ld"; | ||
12 | + | ||
13 | open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; | ||
14 | unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new"; | ||
15 | open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n"; | ||
16 | Index: openssl-1.0.1d/openssl.ld | ||
17 | =================================================================== | ||
18 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
19 | +++ openssl-1.0.1d/openssl.ld 2013-02-06 19:44:25.000000000 +0100 | ||
20 | @@ -0,0 +1,4620 @@ | ||
21 | +OPENSSL_1.0.0 { | ||
22 | + global: | ||
23 | + BIO_f_ssl; | ||
24 | + BIO_new_buffer_ssl_connect; | ||
25 | + BIO_new_ssl; | ||
26 | + BIO_new_ssl_connect; | ||
27 | + BIO_proxy_ssl_copy_session_id; | ||
28 | + BIO_ssl_copy_session_id; | ||
29 | + BIO_ssl_shutdown; | ||
30 | + d2i_SSL_SESSION; | ||
31 | + DTLSv1_client_method; | ||
32 | + DTLSv1_method; | ||
33 | + DTLSv1_server_method; | ||
34 | + ERR_load_SSL_strings; | ||
35 | + i2d_SSL_SESSION; | ||
36 | + kssl_build_principal_2; | ||
37 | + kssl_cget_tkt; | ||
38 | + kssl_check_authent; | ||
39 | + kssl_ctx_free; | ||
40 | + kssl_ctx_new; | ||
41 | + kssl_ctx_setkey; | ||
42 | + kssl_ctx_setprinc; | ||
43 | + kssl_ctx_setstring; | ||
44 | + kssl_ctx_show; | ||
45 | + kssl_err_set; | ||
46 | + kssl_krb5_free_data_contents; | ||
47 | + kssl_sget_tkt; | ||
48 | + kssl_skip_confound; | ||
49 | + kssl_validate_times; | ||
50 | + PEM_read_bio_SSL_SESSION; | ||
51 | + PEM_read_SSL_SESSION; | ||
52 | + PEM_write_bio_SSL_SESSION; | ||
53 | + PEM_write_SSL_SESSION; | ||
54 | + SSL_accept; | ||
55 | + SSL_add_client_CA; | ||
56 | + SSL_add_dir_cert_subjects_to_stack; | ||
57 | + SSL_add_dir_cert_subjs_to_stk; | ||
58 | + SSL_add_file_cert_subjects_to_stack; | ||
59 | + SSL_add_file_cert_subjs_to_stk; | ||
60 | + SSL_alert_desc_string; | ||
61 | + SSL_alert_desc_string_long; | ||
62 | + SSL_alert_type_string; | ||
63 | + SSL_alert_type_string_long; | ||
64 | + SSL_callback_ctrl; | ||
65 | + SSL_check_private_key; | ||
66 | + SSL_CIPHER_description; | ||
67 | + SSL_CIPHER_get_bits; | ||
68 | + SSL_CIPHER_get_name; | ||
69 | + SSL_CIPHER_get_version; | ||
70 | + SSL_clear; | ||
71 | + SSL_COMP_add_compression_method; | ||
72 | + SSL_COMP_get_compression_methods; | ||
73 | + SSL_COMP_get_compress_methods; | ||
74 | + SSL_COMP_get_name; | ||
75 | + SSL_connect; | ||
76 | + SSL_copy_session_id; | ||
77 | + SSL_ctrl; | ||
78 | + SSL_CTX_add_client_CA; | ||
79 | + SSL_CTX_add_session; | ||
80 | + SSL_CTX_callback_ctrl; | ||
81 | + SSL_CTX_check_private_key; | ||
82 | + SSL_CTX_ctrl; | ||
83 | + SSL_CTX_flush_sessions; | ||
84 | + SSL_CTX_free; | ||
85 | + SSL_CTX_get_cert_store; | ||
86 | + SSL_CTX_get_client_CA_list; | ||
87 | + SSL_CTX_get_client_cert_cb; | ||
88 | + SSL_CTX_get_ex_data; | ||
89 | + SSL_CTX_get_ex_new_index; | ||
90 | + SSL_CTX_get_info_callback; | ||
91 | + SSL_CTX_get_quiet_shutdown; | ||
92 | + SSL_CTX_get_timeout; | ||
93 | + SSL_CTX_get_verify_callback; | ||
94 | + SSL_CTX_get_verify_depth; | ||
95 | + SSL_CTX_get_verify_mode; | ||
96 | + SSL_CTX_load_verify_locations; | ||
97 | + SSL_CTX_new; | ||
98 | + SSL_CTX_remove_session; | ||
99 | + SSL_CTX_sess_get_get_cb; | ||
100 | + SSL_CTX_sess_get_new_cb; | ||
101 | + SSL_CTX_sess_get_remove_cb; | ||
102 | + SSL_CTX_sessions; | ||
103 | + SSL_CTX_sess_set_get_cb; | ||
104 | + SSL_CTX_sess_set_new_cb; | ||
105 | + SSL_CTX_sess_set_remove_cb; | ||
106 | + SSL_CTX_set1_param; | ||
107 | + SSL_CTX_set_cert_store; | ||
108 | + SSL_CTX_set_cert_verify_callback; | ||
109 | + SSL_CTX_set_cert_verify_cb; | ||
110 | + SSL_CTX_set_cipher_list; | ||
111 | + SSL_CTX_set_client_CA_list; | ||
112 | + SSL_CTX_set_client_cert_cb; | ||
113 | + SSL_CTX_set_client_cert_engine; | ||
114 | + SSL_CTX_set_cookie_generate_cb; | ||
115 | + SSL_CTX_set_cookie_verify_cb; | ||
116 | + SSL_CTX_set_default_passwd_cb; | ||
117 | + SSL_CTX_set_default_passwd_cb_userdata; | ||
118 | + SSL_CTX_set_default_verify_paths; | ||
119 | + SSL_CTX_set_def_passwd_cb_ud; | ||
120 | + SSL_CTX_set_def_verify_paths; | ||
121 | + SSL_CTX_set_ex_data; | ||
122 | + SSL_CTX_set_generate_session_id; | ||
123 | + SSL_CTX_set_info_callback; | ||
124 | + SSL_CTX_set_msg_callback; | ||
125 | + SSL_CTX_set_psk_client_callback; | ||
126 | + SSL_CTX_set_psk_server_callback; | ||
127 | + SSL_CTX_set_purpose; | ||
128 | + SSL_CTX_set_quiet_shutdown; | ||
129 | + SSL_CTX_set_session_id_context; | ||
130 | + SSL_CTX_set_ssl_version; | ||
131 | + SSL_CTX_set_timeout; | ||
132 | + SSL_CTX_set_tmp_dh_callback; | ||
133 | + SSL_CTX_set_tmp_ecdh_callback; | ||
134 | + SSL_CTX_set_tmp_rsa_callback; | ||
135 | + SSL_CTX_set_trust; | ||
136 | + SSL_CTX_set_verify; | ||
137 | + SSL_CTX_set_verify_depth; | ||
138 | + SSL_CTX_use_cert_chain_file; | ||
139 | + SSL_CTX_use_certificate; | ||
140 | + SSL_CTX_use_certificate_ASN1; | ||
141 | + SSL_CTX_use_certificate_chain_file; | ||
142 | + SSL_CTX_use_certificate_file; | ||
143 | + SSL_CTX_use_PrivateKey; | ||
144 | + SSL_CTX_use_PrivateKey_ASN1; | ||
145 | + SSL_CTX_use_PrivateKey_file; | ||
146 | + SSL_CTX_use_psk_identity_hint; | ||
147 | + SSL_CTX_use_RSAPrivateKey; | ||
148 | + SSL_CTX_use_RSAPrivateKey_ASN1; | ||
149 | + SSL_CTX_use_RSAPrivateKey_file; | ||
150 | + SSL_do_handshake; | ||
151 | + SSL_dup; | ||
152 | + SSL_dup_CA_list; | ||
153 | + SSLeay_add_ssl_algorithms; | ||
154 | + SSL_free; | ||
155 | + SSL_get1_session; | ||
156 | + SSL_get_certificate; | ||
157 | + SSL_get_cipher_list; | ||
158 | + SSL_get_ciphers; | ||
159 | + SSL_get_client_CA_list; | ||
160 | + SSL_get_current_cipher; | ||
161 | + SSL_get_current_compression; | ||
162 | + SSL_get_current_expansion; | ||
163 | + SSL_get_default_timeout; | ||
164 | + SSL_get_error; | ||
165 | + SSL_get_ex_data; | ||
166 | + SSL_get_ex_data_X509_STORE_CTX_idx; | ||
167 | + SSL_get_ex_d_X509_STORE_CTX_idx; | ||
168 | + SSL_get_ex_new_index; | ||
169 | + SSL_get_fd; | ||
170 | + SSL_get_finished; | ||
171 | + SSL_get_info_callback; | ||
172 | + SSL_get_peer_cert_chain; | ||
173 | + SSL_get_peer_certificate; | ||
174 | + SSL_get_peer_finished; | ||
175 | + SSL_get_privatekey; | ||
176 | + SSL_get_psk_identity; | ||
177 | + SSL_get_psk_identity_hint; | ||
178 | + SSL_get_quiet_shutdown; | ||
179 | + SSL_get_rbio; | ||
180 | + SSL_get_read_ahead; | ||
181 | + SSL_get_rfd; | ||
182 | + SSL_get_servername; | ||
183 | + SSL_get_servername_type; | ||
184 | + SSL_get_session; | ||
185 | + SSL_get_shared_ciphers; | ||
186 | + SSL_get_shutdown; | ||
187 | + SSL_get_SSL_CTX; | ||
188 | + SSL_get_ssl_method; | ||
189 | + SSL_get_verify_callback; | ||
190 | + SSL_get_verify_depth; | ||
191 | + SSL_get_verify_mode; | ||
192 | + SSL_get_verify_result; | ||
193 | + SSL_get_version; | ||
194 | + SSL_get_wbio; | ||
195 | + SSL_get_wfd; | ||
196 | + SSL_has_matching_session_id; | ||
197 | + SSL_library_init; | ||
198 | + SSL_load_client_CA_file; | ||
199 | + SSL_load_error_strings; | ||
200 | + SSL_new; | ||
201 | + SSL_peek; | ||
202 | + SSL_pending; | ||
203 | + SSL_read; | ||
204 | + SSL_renegotiate; | ||
205 | + SSL_renegotiate_pending; | ||
206 | + SSL_rstate_string; | ||
207 | + SSL_rstate_string_long; | ||
208 | + SSL_SESSION_cmp; | ||
209 | + SSL_SESSION_free; | ||
210 | + SSL_SESSION_get_ex_data; | ||
211 | + SSL_SESSION_get_ex_new_index; | ||
212 | + SSL_SESSION_get_id; | ||
213 | + SSL_SESSION_get_time; | ||
214 | + SSL_SESSION_get_timeout; | ||
215 | + SSL_SESSION_hash; | ||
216 | + SSL_SESSION_new; | ||
217 | + SSL_SESSION_print; | ||
218 | + SSL_SESSION_print_fp; | ||
219 | + SSL_SESSION_set_ex_data; | ||
220 | + SSL_SESSION_set_time; | ||
221 | + SSL_SESSION_set_timeout; | ||
222 | + SSL_set1_param; | ||
223 | + SSL_set_accept_state; | ||
224 | + SSL_set_bio; | ||
225 | + SSL_set_cipher_list; | ||
226 | + SSL_set_client_CA_list; | ||
227 | + SSL_set_connect_state; | ||
228 | + SSL_set_ex_data; | ||
229 | + SSL_set_fd; | ||
230 | + SSL_set_generate_session_id; | ||
231 | + SSL_set_info_callback; | ||
232 | + SSL_set_msg_callback; | ||
233 | + SSL_set_psk_client_callback; | ||
234 | + SSL_set_psk_server_callback; | ||
235 | + SSL_set_purpose; | ||
236 | + SSL_set_quiet_shutdown; | ||
237 | + SSL_set_read_ahead; | ||
238 | + SSL_set_rfd; | ||
239 | + SSL_set_session; | ||
240 | + SSL_set_session_id_context; | ||
241 | + SSL_set_session_secret_cb; | ||
242 | + SSL_set_session_ticket_ext; | ||
243 | + SSL_set_session_ticket_ext_cb; | ||
244 | + SSL_set_shutdown; | ||
245 | + SSL_set_SSL_CTX; | ||
246 | + SSL_set_ssl_method; | ||
247 | + SSL_set_tmp_dh_callback; | ||
248 | + SSL_set_tmp_ecdh_callback; | ||
249 | + SSL_set_tmp_rsa_callback; | ||
250 | + SSL_set_trust; | ||
251 | + SSL_set_verify; | ||
252 | + SSL_set_verify_depth; | ||
253 | + SSL_set_verify_result; | ||
254 | + SSL_set_wfd; | ||
255 | + SSL_shutdown; | ||
256 | + SSL_state; | ||
257 | + SSL_state_string; | ||
258 | + SSL_state_string_long; | ||
259 | + SSL_use_certificate; | ||
260 | + SSL_use_certificate_ASN1; | ||
261 | + SSL_use_certificate_file; | ||
262 | + SSL_use_PrivateKey; | ||
263 | + SSL_use_PrivateKey_ASN1; | ||
264 | + SSL_use_PrivateKey_file; | ||
265 | + SSL_use_psk_identity_hint; | ||
266 | + SSL_use_RSAPrivateKey; | ||
267 | + SSL_use_RSAPrivateKey_ASN1; | ||
268 | + SSL_use_RSAPrivateKey_file; | ||
269 | + SSLv23_client_method; | ||
270 | + SSLv23_method; | ||
271 | + SSLv23_server_method; | ||
272 | + SSLv2_client_method; | ||
273 | + SSLv2_method; | ||
274 | + SSLv2_server_method; | ||
275 | + SSLv3_client_method; | ||
276 | + SSLv3_method; | ||
277 | + SSLv3_server_method; | ||
278 | + SSL_version; | ||
279 | + SSL_want; | ||
280 | + SSL_write; | ||
281 | + TLSv1_client_method; | ||
282 | + TLSv1_method; | ||
283 | + TLSv1_server_method; | ||
284 | + | ||
285 | + | ||
286 | + SSLeay; | ||
287 | + SSLeay_version; | ||
288 | + ASN1_BIT_STRING_asn1_meth; | ||
289 | + ASN1_HEADER_free; | ||
290 | + ASN1_HEADER_new; | ||
291 | + ASN1_IA5STRING_asn1_meth; | ||
292 | + ASN1_INTEGER_get; | ||
293 | + ASN1_INTEGER_set; | ||
294 | + ASN1_INTEGER_to_BN; | ||
295 | + ASN1_OBJECT_create; | ||
296 | + ASN1_OBJECT_free; | ||
297 | + ASN1_OBJECT_new; | ||
298 | + ASN1_PRINTABLE_type; | ||
299 | + ASN1_STRING_cmp; | ||
300 | + ASN1_STRING_dup; | ||
301 | + ASN1_STRING_free; | ||
302 | + ASN1_STRING_new; | ||
303 | + ASN1_STRING_print; | ||
304 | + ASN1_STRING_set; | ||
305 | + ASN1_STRING_type_new; | ||
306 | + ASN1_TYPE_free; | ||
307 | + ASN1_TYPE_new; | ||
308 | + ASN1_UNIVERSALSTRING_to_string; | ||
309 | + ASN1_UTCTIME_check; | ||
310 | + ASN1_UTCTIME_print; | ||
311 | + ASN1_UTCTIME_set; | ||
312 | + ASN1_check_infinite_end; | ||
313 | + ASN1_d2i_bio; | ||
314 | + ASN1_d2i_fp; | ||
315 | + ASN1_digest; | ||
316 | + ASN1_dup; | ||
317 | + ASN1_get_object; | ||
318 | + ASN1_i2d_bio; | ||
319 | + ASN1_i2d_fp; | ||
320 | + ASN1_object_size; | ||
321 | + ASN1_parse; | ||
322 | + ASN1_put_object; | ||
323 | + ASN1_sign; | ||
324 | + ASN1_verify; | ||
325 | + BF_cbc_encrypt; | ||
326 | + BF_cfb64_encrypt; | ||
327 | + BF_ecb_encrypt; | ||
328 | + BF_encrypt; | ||
329 | + BF_ofb64_encrypt; | ||
330 | + BF_options; | ||
331 | + BF_set_key; | ||
332 | + BIO_CONNECT_free; | ||
333 | + BIO_CONNECT_new; | ||
334 | + BIO_accept; | ||
335 | + BIO_ctrl; | ||
336 | + BIO_int_ctrl; | ||
337 | + BIO_debug_callback; | ||
338 | + BIO_dump; | ||
339 | + BIO_dup_chain; | ||
340 | + BIO_f_base64; | ||
341 | + BIO_f_buffer; | ||
342 | + BIO_f_cipher; | ||
343 | + BIO_f_md; | ||
344 | + BIO_f_null; | ||
345 | + BIO_f_proxy_server; | ||
346 | + BIO_fd_non_fatal_error; | ||
347 | + BIO_fd_should_retry; | ||
348 | + BIO_find_type; | ||
349 | + BIO_free; | ||
350 | + BIO_free_all; | ||
351 | + BIO_get_accept_socket; | ||
352 | + BIO_get_filter_bio; | ||
353 | + BIO_get_host_ip; | ||
354 | + BIO_get_port; | ||
355 | + BIO_get_retry_BIO; | ||
356 | + BIO_get_retry_reason; | ||
357 | + BIO_gethostbyname; | ||
358 | + BIO_gets; | ||
359 | + BIO_new; | ||
360 | + BIO_new_accept; | ||
361 | + BIO_new_connect; | ||
362 | + BIO_new_fd; | ||
363 | + BIO_new_file; | ||
364 | + BIO_new_fp; | ||
365 | + BIO_new_socket; | ||
366 | + BIO_pop; | ||
367 | + BIO_printf; | ||
368 | + BIO_push; | ||
369 | + BIO_puts; | ||
370 | + BIO_read; | ||
371 | + BIO_s_accept; | ||
372 | + BIO_s_connect; | ||
373 | + BIO_s_fd; | ||
374 | + BIO_s_file; | ||
375 | + BIO_s_mem; | ||
376 | + BIO_s_null; | ||
377 | + BIO_s_proxy_client; | ||
378 | + BIO_s_socket; | ||
379 | + BIO_set; | ||
380 | + BIO_set_cipher; | ||
381 | + BIO_set_tcp_ndelay; | ||
382 | + BIO_sock_cleanup; | ||
383 | + BIO_sock_error; | ||
384 | + BIO_sock_init; | ||
385 | + BIO_sock_non_fatal_error; | ||
386 | + BIO_sock_should_retry; | ||
387 | + BIO_socket_ioctl; | ||
388 | + BIO_write; | ||
389 | + BN_CTX_free; | ||
390 | + BN_CTX_new; | ||
391 | + BN_MONT_CTX_free; | ||
392 | + BN_MONT_CTX_new; | ||
393 | + BN_MONT_CTX_set; | ||
394 | + BN_add; | ||
395 | + BN_add_word; | ||
396 | + BN_hex2bn; | ||
397 | + BN_bin2bn; | ||
398 | + BN_bn2hex; | ||
399 | + BN_bn2bin; | ||
400 | + BN_clear; | ||
401 | + BN_clear_bit; | ||
402 | + BN_clear_free; | ||
403 | + BN_cmp; | ||
404 | + BN_copy; | ||
405 | + BN_div; | ||
406 | + BN_div_word; | ||
407 | + BN_dup; | ||
408 | + BN_free; | ||
409 | + BN_from_montgomery; | ||
410 | + BN_gcd; | ||
411 | + BN_generate_prime; | ||
412 | + BN_get_word; | ||
413 | + BN_is_bit_set; | ||
414 | + BN_is_prime; | ||
415 | + BN_lshift; | ||
416 | + BN_lshift1; | ||
417 | + BN_mask_bits; | ||
418 | + BN_mod; | ||
419 | + BN_mod_exp; | ||
420 | + BN_mod_exp_mont; | ||
421 | + BN_mod_exp_simple; | ||
422 | + BN_mod_inverse; | ||
423 | + BN_mod_mul; | ||
424 | + BN_mod_mul_montgomery; | ||
425 | + BN_mod_word; | ||
426 | + BN_mul; | ||
427 | + BN_new; | ||
428 | + BN_num_bits; | ||
429 | + BN_num_bits_word; | ||
430 | + BN_options; | ||
431 | + BN_print; | ||
432 | + BN_print_fp; | ||
433 | + BN_rand; | ||
434 | + BN_reciprocal; | ||
435 | + BN_rshift; | ||
436 | + BN_rshift1; | ||
437 | + BN_set_bit; | ||
438 | + BN_set_word; | ||
439 | + BN_sqr; | ||
440 | + BN_sub; | ||
441 | + BN_to_ASN1_INTEGER; | ||
442 | + BN_ucmp; | ||
443 | + BN_value_one; | ||
444 | + BUF_MEM_free; | ||
445 | + BUF_MEM_grow; | ||
446 | + BUF_MEM_new; | ||
447 | + BUF_strdup; | ||
448 | + CONF_free; | ||
449 | + CONF_get_number; | ||
450 | + CONF_get_section; | ||
451 | + CONF_get_string; | ||
452 | + CONF_load; | ||
453 | + CRYPTO_add_lock; | ||
454 | + CRYPTO_dbg_free; | ||
455 | + CRYPTO_dbg_malloc; | ||
456 | + CRYPTO_dbg_realloc; | ||
457 | + CRYPTO_dbg_remalloc; | ||
458 | + CRYPTO_free; | ||
459 | + CRYPTO_get_add_lock_callback; | ||
460 | + CRYPTO_get_id_callback; | ||
461 | + CRYPTO_get_lock_name; | ||
462 | + CRYPTO_get_locking_callback; | ||
463 | + CRYPTO_get_mem_functions; | ||
464 | + CRYPTO_lock; | ||
465 | + CRYPTO_malloc; | ||
466 | + CRYPTO_mem_ctrl; | ||
467 | + CRYPTO_mem_leaks; | ||
468 | + CRYPTO_mem_leaks_cb; | ||
469 | + CRYPTO_mem_leaks_fp; | ||
470 | + CRYPTO_realloc; | ||
471 | + CRYPTO_remalloc; | ||
472 | + CRYPTO_set_add_lock_callback; | ||
473 | + CRYPTO_set_id_callback; | ||
474 | + CRYPTO_set_locking_callback; | ||
475 | + CRYPTO_set_mem_functions; | ||
476 | + CRYPTO_thread_id; | ||
477 | + DH_check; | ||
478 | + DH_compute_key; | ||
479 | + DH_free; | ||
480 | + DH_generate_key; | ||
481 | + DH_generate_parameters; | ||
482 | + DH_new; | ||
483 | + DH_size; | ||
484 | + DHparams_print; | ||
485 | + DHparams_print_fp; | ||
486 | + DSA_free; | ||
487 | + DSA_generate_key; | ||
488 | + DSA_generate_parameters; | ||
489 | + DSA_is_prime; | ||
490 | + DSA_new; | ||
491 | + DSA_print; | ||
492 | + DSA_print_fp; | ||
493 | + DSA_sign; | ||
494 | + DSA_sign_setup; | ||
495 | + DSA_size; | ||
496 | + DSA_verify; | ||
497 | + DSAparams_print; | ||
498 | + DSAparams_print_fp; | ||
499 | + ERR_clear_error; | ||
500 | + ERR_error_string; | ||
501 | + ERR_free_strings; | ||
502 | + ERR_func_error_string; | ||
503 | + ERR_get_err_state_table; | ||
504 | + ERR_get_error; | ||
505 | + ERR_get_error_line; | ||
506 | + ERR_get_state; | ||
507 | + ERR_get_string_table; | ||
508 | + ERR_lib_error_string; | ||
509 | + ERR_load_ASN1_strings; | ||
510 | + ERR_load_BIO_strings; | ||
511 | + ERR_load_BN_strings; | ||
512 | + ERR_load_BUF_strings; | ||
513 | + ERR_load_CONF_strings; | ||
514 | + ERR_load_DH_strings; | ||
515 | + ERR_load_DSA_strings; | ||
516 | + ERR_load_ERR_strings; | ||
517 | + ERR_load_EVP_strings; | ||
518 | + ERR_load_OBJ_strings; | ||
519 | + ERR_load_PEM_strings; | ||
520 | + ERR_load_PROXY_strings; | ||
521 | + ERR_load_RSA_strings; | ||
522 | + ERR_load_X509_strings; | ||
523 | + ERR_load_crypto_strings; | ||
524 | + ERR_load_strings; | ||
525 | + ERR_peek_error; | ||
526 | + ERR_peek_error_line; | ||
527 | + ERR_print_errors; | ||
528 | + ERR_print_errors_fp; | ||
529 | + ERR_put_error; | ||
530 | + ERR_reason_error_string; | ||
531 | + ERR_remove_state; | ||
532 | + EVP_BytesToKey; | ||
533 | + EVP_CIPHER_CTX_cleanup; | ||
534 | + EVP_CipherFinal; | ||
535 | + EVP_CipherInit; | ||
536 | + EVP_CipherUpdate; | ||
537 | + EVP_DecodeBlock; | ||
538 | + EVP_DecodeFinal; | ||
539 | + EVP_DecodeInit; | ||
540 | + EVP_DecodeUpdate; | ||
541 | + EVP_DecryptFinal; | ||
542 | + EVP_DecryptInit; | ||
543 | + EVP_DecryptUpdate; | ||
544 | + EVP_DigestFinal; | ||
545 | + EVP_DigestInit; | ||
546 | + EVP_DigestUpdate; | ||
547 | + EVP_EncodeBlock; | ||
548 | + EVP_EncodeFinal; | ||
549 | + EVP_EncodeInit; | ||
550 | + EVP_EncodeUpdate; | ||
551 | + EVP_EncryptFinal; | ||
552 | + EVP_EncryptInit; | ||
553 | + EVP_EncryptUpdate; | ||
554 | + EVP_OpenFinal; | ||
555 | + EVP_OpenInit; | ||
556 | + EVP_PKEY_assign; | ||
557 | + EVP_PKEY_copy_parameters; | ||
558 | + EVP_PKEY_free; | ||
559 | + EVP_PKEY_missing_parameters; | ||
560 | + EVP_PKEY_new; | ||
561 | + EVP_PKEY_save_parameters; | ||
562 | + EVP_PKEY_size; | ||
563 | + EVP_PKEY_type; | ||
564 | + EVP_SealFinal; | ||
565 | + EVP_SealInit; | ||
566 | + EVP_SignFinal; | ||
567 | + EVP_VerifyFinal; | ||
568 | + EVP_add_alias; | ||
569 | + EVP_add_cipher; | ||
570 | + EVP_add_digest; | ||
571 | + EVP_bf_cbc; | ||
572 | + EVP_bf_cfb64; | ||
573 | + EVP_bf_ecb; | ||
574 | + EVP_bf_ofb; | ||
575 | + EVP_cleanup; | ||
576 | + EVP_des_cbc; | ||
577 | + EVP_des_cfb64; | ||
578 | + EVP_des_ecb; | ||
579 | + EVP_des_ede; | ||
580 | + EVP_des_ede3; | ||
581 | + EVP_des_ede3_cbc; | ||
582 | + EVP_des_ede3_cfb64; | ||
583 | + EVP_des_ede3_ofb; | ||
584 | + EVP_des_ede_cbc; | ||
585 | + EVP_des_ede_cfb64; | ||
586 | + EVP_des_ede_ofb; | ||
587 | + EVP_des_ofb; | ||
588 | + EVP_desx_cbc; | ||
589 | + EVP_dss; | ||
590 | + EVP_dss1; | ||
591 | + EVP_enc_null; | ||
592 | + EVP_get_cipherbyname; | ||
593 | + EVP_get_digestbyname; | ||
594 | + EVP_get_pw_prompt; | ||
595 | + EVP_idea_cbc; | ||
596 | + EVP_idea_cfb64; | ||
597 | + EVP_idea_ecb; | ||
598 | + EVP_idea_ofb; | ||
599 | + EVP_md2; | ||
600 | + EVP_md5; | ||
601 | + EVP_md_null; | ||
602 | + EVP_rc2_cbc; | ||
603 | + EVP_rc2_cfb64; | ||
604 | + EVP_rc2_ecb; | ||
605 | + EVP_rc2_ofb; | ||
606 | + EVP_rc4; | ||
607 | + EVP_read_pw_string; | ||
608 | + EVP_set_pw_prompt; | ||
609 | + EVP_sha; | ||
610 | + EVP_sha1; | ||
611 | + MD2; | ||
612 | + MD2_Final; | ||
613 | + MD2_Init; | ||
614 | + MD2_Update; | ||
615 | + MD2_options; | ||
616 | + MD5; | ||
617 | + MD5_Final; | ||
618 | + MD5_Init; | ||
619 | + MD5_Update; | ||
620 | + MDC2; | ||
621 | + MDC2_Final; | ||
622 | + MDC2_Init; | ||
623 | + MDC2_Update; | ||
624 | + NETSCAPE_SPKAC_free; | ||
625 | + NETSCAPE_SPKAC_new; | ||
626 | + NETSCAPE_SPKI_free; | ||
627 | + NETSCAPE_SPKI_new; | ||
628 | + NETSCAPE_SPKI_sign; | ||
629 | + NETSCAPE_SPKI_verify; | ||
630 | + OBJ_add_object; | ||
631 | + OBJ_bsearch; | ||
632 | + OBJ_cleanup; | ||
633 | + OBJ_cmp; | ||
634 | + OBJ_create; | ||
635 | + OBJ_dup; | ||
636 | + OBJ_ln2nid; | ||
637 | + OBJ_new_nid; | ||
638 | + OBJ_nid2ln; | ||
639 | + OBJ_nid2obj; | ||
640 | + OBJ_nid2sn; | ||
641 | + OBJ_obj2nid; | ||
642 | + OBJ_sn2nid; | ||
643 | + OBJ_txt2nid; | ||
644 | + PEM_ASN1_read; | ||
645 | + PEM_ASN1_read_bio; | ||
646 | + PEM_ASN1_write; | ||
647 | + PEM_ASN1_write_bio; | ||
648 | + PEM_SealFinal; | ||
649 | + PEM_SealInit; | ||
650 | + PEM_SealUpdate; | ||
651 | + PEM_SignFinal; | ||
652 | + PEM_SignInit; | ||
653 | + PEM_SignUpdate; | ||
654 | + PEM_X509_INFO_read; | ||
655 | + PEM_X509_INFO_read_bio; | ||
656 | + PEM_X509_INFO_write_bio; | ||
657 | + PEM_dek_info; | ||
658 | + PEM_do_header; | ||
659 | + PEM_get_EVP_CIPHER_INFO; | ||
660 | + PEM_proc_type; | ||
661 | + PEM_read; | ||
662 | + PEM_read_DHparams; | ||
663 | + PEM_read_DSAPrivateKey; | ||
664 | + PEM_read_DSAparams; | ||
665 | + PEM_read_PKCS7; | ||
666 | + PEM_read_PrivateKey; | ||
667 | + PEM_read_RSAPrivateKey; | ||
668 | + PEM_read_X509; | ||
669 | + PEM_read_X509_CRL; | ||
670 | + PEM_read_X509_REQ; | ||
671 | + PEM_read_bio; | ||
672 | + PEM_read_bio_DHparams; | ||
673 | + PEM_read_bio_DSAPrivateKey; | ||
674 | + PEM_read_bio_DSAparams; | ||
675 | + PEM_read_bio_PKCS7; | ||
676 | + PEM_read_bio_PrivateKey; | ||
677 | + PEM_read_bio_RSAPrivateKey; | ||
678 | + PEM_read_bio_X509; | ||
679 | + PEM_read_bio_X509_CRL; | ||
680 | + PEM_read_bio_X509_REQ; | ||
681 | + PEM_write; | ||
682 | + PEM_write_DHparams; | ||
683 | + PEM_write_DSAPrivateKey; | ||
684 | + PEM_write_DSAparams; | ||
685 | + PEM_write_PKCS7; | ||
686 | + PEM_write_PrivateKey; | ||
687 | + PEM_write_RSAPrivateKey; | ||
688 | + PEM_write_X509; | ||
689 | + PEM_write_X509_CRL; | ||
690 | + PEM_write_X509_REQ; | ||
691 | + PEM_write_bio; | ||
692 | + PEM_write_bio_DHparams; | ||
693 | + PEM_write_bio_DSAPrivateKey; | ||
694 | + PEM_write_bio_DSAparams; | ||
695 | + PEM_write_bio_PKCS7; | ||
696 | + PEM_write_bio_PrivateKey; | ||
697 | + PEM_write_bio_RSAPrivateKey; | ||
698 | + PEM_write_bio_X509; | ||
699 | + PEM_write_bio_X509_CRL; | ||
700 | + PEM_write_bio_X509_REQ; | ||
701 | + PKCS7_DIGEST_free; | ||
702 | + PKCS7_DIGEST_new; | ||
703 | + PKCS7_ENCRYPT_free; | ||
704 | + PKCS7_ENCRYPT_new; | ||
705 | + PKCS7_ENC_CONTENT_free; | ||
706 | + PKCS7_ENC_CONTENT_new; | ||
707 | + PKCS7_ENVELOPE_free; | ||
708 | + PKCS7_ENVELOPE_new; | ||
709 | + PKCS7_ISSUER_AND_SERIAL_digest; | ||
710 | + PKCS7_ISSUER_AND_SERIAL_free; | ||
711 | + PKCS7_ISSUER_AND_SERIAL_new; | ||
712 | + PKCS7_RECIP_INFO_free; | ||
713 | + PKCS7_RECIP_INFO_new; | ||
714 | + PKCS7_SIGNED_free; | ||
715 | + PKCS7_SIGNED_new; | ||
716 | + PKCS7_SIGNER_INFO_free; | ||
717 | + PKCS7_SIGNER_INFO_new; | ||
718 | + PKCS7_SIGN_ENVELOPE_free; | ||
719 | + PKCS7_SIGN_ENVELOPE_new; | ||
720 | + PKCS7_dup; | ||
721 | + PKCS7_free; | ||
722 | + PKCS7_new; | ||
723 | + PROXY_ENTRY_add_noproxy; | ||
724 | + PROXY_ENTRY_clear_noproxy; | ||
725 | + PROXY_ENTRY_free; | ||
726 | + PROXY_ENTRY_get_noproxy; | ||
727 | + PROXY_ENTRY_new; | ||
728 | + PROXY_ENTRY_set_server; | ||
729 | + PROXY_add_noproxy; | ||
730 | + PROXY_add_server; | ||
731 | + PROXY_check_by_host; | ||
732 | + PROXY_check_url; | ||
733 | + PROXY_clear_noproxy; | ||
734 | + PROXY_free; | ||
735 | + PROXY_get_noproxy; | ||
736 | + PROXY_get_proxies; | ||
737 | + PROXY_get_proxy_entry; | ||
738 | + PROXY_load_conf; | ||
739 | + PROXY_new; | ||
740 | + PROXY_print; | ||
741 | + RAND_bytes; | ||
742 | + RAND_cleanup; | ||
743 | + RAND_file_name; | ||
744 | + RAND_load_file; | ||
745 | + RAND_screen; | ||
746 | + RAND_seed; | ||
747 | + RAND_write_file; | ||
748 | + RC2_cbc_encrypt; | ||
749 | + RC2_cfb64_encrypt; | ||
750 | + RC2_ecb_encrypt; | ||
751 | + RC2_encrypt; | ||
752 | + RC2_ofb64_encrypt; | ||
753 | + RC2_set_key; | ||
754 | + RC4; | ||
755 | + RC4_options; | ||
756 | + RC4_set_key; | ||
757 | + RSAPrivateKey_asn1_meth; | ||
758 | + RSAPrivateKey_dup; | ||
759 | + RSAPublicKey_dup; | ||
760 | + RSA_PKCS1_SSLeay; | ||
761 | + RSA_free; | ||
762 | + RSA_generate_key; | ||
763 | + RSA_new; | ||
764 | + RSA_new_method; | ||
765 | + RSA_print; | ||
766 | + RSA_print_fp; | ||
767 | + RSA_private_decrypt; | ||
768 | + RSA_private_encrypt; | ||
769 | + RSA_public_decrypt; | ||
770 | + RSA_public_encrypt; | ||
771 | + RSA_set_default_method; | ||
772 | + RSA_sign; | ||
773 | + RSA_sign_ASN1_OCTET_STRING; | ||
774 | + RSA_size; | ||
775 | + RSA_verify; | ||
776 | + RSA_verify_ASN1_OCTET_STRING; | ||
777 | + SHA; | ||
778 | + SHA1; | ||
779 | + SHA1_Final; | ||
780 | + SHA1_Init; | ||
781 | + SHA1_Update; | ||
782 | + SHA_Final; | ||
783 | + SHA_Init; | ||
784 | + SHA_Update; | ||
785 | + OpenSSL_add_all_algorithms; | ||
786 | + OpenSSL_add_all_ciphers; | ||
787 | + OpenSSL_add_all_digests; | ||
788 | + TXT_DB_create_index; | ||
789 | + TXT_DB_free; | ||
790 | + TXT_DB_get_by_index; | ||
791 | + TXT_DB_insert; | ||
792 | + TXT_DB_read; | ||
793 | + TXT_DB_write; | ||
794 | + X509_ALGOR_free; | ||
795 | + X509_ALGOR_new; | ||
796 | + X509_ATTRIBUTE_free; | ||
797 | + X509_ATTRIBUTE_new; | ||
798 | + X509_CINF_free; | ||
799 | + X509_CINF_new; | ||
800 | + X509_CRL_INFO_free; | ||
801 | + X509_CRL_INFO_new; | ||
802 | + X509_CRL_add_ext; | ||
803 | + X509_CRL_cmp; | ||
804 | + X509_CRL_delete_ext; | ||
805 | + X509_CRL_dup; | ||
806 | + X509_CRL_free; | ||
807 | + X509_CRL_get_ext; | ||
808 | + X509_CRL_get_ext_by_NID; | ||
809 | + X509_CRL_get_ext_by_OBJ; | ||
810 | + X509_CRL_get_ext_by_critical; | ||
811 | + X509_CRL_get_ext_count; | ||
812 | + X509_CRL_new; | ||
813 | + X509_CRL_sign; | ||
814 | + X509_CRL_verify; | ||
815 | + X509_EXTENSION_create_by_NID; | ||
816 | + X509_EXTENSION_create_by_OBJ; | ||
817 | + X509_EXTENSION_dup; | ||
818 | + X509_EXTENSION_free; | ||
819 | + X509_EXTENSION_get_critical; | ||
820 | + X509_EXTENSION_get_data; | ||
821 | + X509_EXTENSION_get_object; | ||
822 | + X509_EXTENSION_new; | ||
823 | + X509_EXTENSION_set_critical; | ||
824 | + X509_EXTENSION_set_data; | ||
825 | + X509_EXTENSION_set_object; | ||
826 | + X509_INFO_free; | ||
827 | + X509_INFO_new; | ||
828 | + X509_LOOKUP_by_alias; | ||
829 | + X509_LOOKUP_by_fingerprint; | ||
830 | + X509_LOOKUP_by_issuer_serial; | ||
831 | + X509_LOOKUP_by_subject; | ||
832 | + X509_LOOKUP_ctrl; | ||
833 | + X509_LOOKUP_file; | ||
834 | + X509_LOOKUP_free; | ||
835 | + X509_LOOKUP_hash_dir; | ||
836 | + X509_LOOKUP_init; | ||
837 | + X509_LOOKUP_new; | ||
838 | + X509_LOOKUP_shutdown; | ||
839 | + X509_NAME_ENTRY_create_by_NID; | ||
840 | + X509_NAME_ENTRY_create_by_OBJ; | ||
841 | + X509_NAME_ENTRY_dup; | ||
842 | + X509_NAME_ENTRY_free; | ||
843 | + X509_NAME_ENTRY_get_data; | ||
844 | + X509_NAME_ENTRY_get_object; | ||
845 | + X509_NAME_ENTRY_new; | ||
846 | + X509_NAME_ENTRY_set_data; | ||
847 | + X509_NAME_ENTRY_set_object; | ||
848 | + X509_NAME_add_entry; | ||
849 | + X509_NAME_cmp; | ||
850 | + X509_NAME_delete_entry; | ||
851 | + X509_NAME_digest; | ||
852 | + X509_NAME_dup; | ||
853 | + X509_NAME_entry_count; | ||
854 | + X509_NAME_free; | ||
855 | + X509_NAME_get_entry; | ||
856 | + X509_NAME_get_index_by_NID; | ||
857 | + X509_NAME_get_index_by_OBJ; | ||
858 | + X509_NAME_get_text_by_NID; | ||
859 | + X509_NAME_get_text_by_OBJ; | ||
860 | + X509_NAME_hash; | ||
861 | + X509_NAME_new; | ||
862 | + X509_NAME_oneline; | ||
863 | + X509_NAME_print; | ||
864 | + X509_NAME_set; | ||
865 | + X509_OBJECT_free_contents; | ||
866 | + X509_OBJECT_retrieve_by_subject; | ||
867 | + X509_OBJECT_up_ref_count; | ||
868 | + X509_PKEY_free; | ||
869 | + X509_PKEY_new; | ||
870 | + X509_PUBKEY_free; | ||
871 | + X509_PUBKEY_get; | ||
872 | + X509_PUBKEY_new; | ||
873 | + X509_PUBKEY_set; | ||
874 | + X509_REQ_INFO_free; | ||
875 | + X509_REQ_INFO_new; | ||
876 | + X509_REQ_dup; | ||
877 | + X509_REQ_free; | ||
878 | + X509_REQ_get_pubkey; | ||
879 | + X509_REQ_new; | ||
880 | + X509_REQ_print; | ||
881 | + X509_REQ_print_fp; | ||
882 | + X509_REQ_set_pubkey; | ||
883 | + X509_REQ_set_subject_name; | ||
884 | + X509_REQ_set_version; | ||
885 | + X509_REQ_sign; | ||
886 | + X509_REQ_to_X509; | ||
887 | + X509_REQ_verify; | ||
888 | + X509_REVOKED_add_ext; | ||
889 | + X509_REVOKED_delete_ext; | ||
890 | + X509_REVOKED_free; | ||
891 | + X509_REVOKED_get_ext; | ||
892 | + X509_REVOKED_get_ext_by_NID; | ||
893 | + X509_REVOKED_get_ext_by_OBJ; | ||
894 | + X509_REVOKED_get_ext_by_critical; | ||
895 | + X509_REVOKED_get_ext_by_critic; | ||
896 | + X509_REVOKED_get_ext_count; | ||
897 | + X509_REVOKED_new; | ||
898 | + X509_SIG_free; | ||
899 | + X509_SIG_new; | ||
900 | + X509_STORE_CTX_cleanup; | ||
901 | + X509_STORE_CTX_init; | ||
902 | + X509_STORE_add_cert; | ||
903 | + X509_STORE_add_lookup; | ||
904 | + X509_STORE_free; | ||
905 | + X509_STORE_get_by_subject; | ||
906 | + X509_STORE_load_locations; | ||
907 | + X509_STORE_new; | ||
908 | + X509_STORE_set_default_paths; | ||
909 | + X509_VAL_free; | ||
910 | + X509_VAL_new; | ||
911 | + X509_add_ext; | ||
912 | + X509_asn1_meth; | ||
913 | + X509_certificate_type; | ||
914 | + X509_check_private_key; | ||
915 | + X509_cmp_current_time; | ||
916 | + X509_delete_ext; | ||
917 | + X509_digest; | ||
918 | + X509_dup; | ||
919 | + X509_free; | ||
920 | + X509_get_default_cert_area; | ||
921 | + X509_get_default_cert_dir; | ||
922 | + X509_get_default_cert_dir_env; | ||
923 | + X509_get_default_cert_file; | ||
924 | + X509_get_default_cert_file_env; | ||
925 | + X509_get_default_private_dir; | ||
926 | + X509_get_ext; | ||
927 | + X509_get_ext_by_NID; | ||
928 | + X509_get_ext_by_OBJ; | ||
929 | + X509_get_ext_by_critical; | ||
930 | + X509_get_ext_count; | ||
931 | + X509_get_issuer_name; | ||
932 | + X509_get_pubkey; | ||
933 | + X509_get_pubkey_parameters; | ||
934 | + X509_get_serialNumber; | ||
935 | + X509_get_subject_name; | ||
936 | + X509_gmtime_adj; | ||
937 | + X509_issuer_and_serial_cmp; | ||
938 | + X509_issuer_and_serial_hash; | ||
939 | + X509_issuer_name_cmp; | ||
940 | + X509_issuer_name_hash; | ||
941 | + X509_load_cert_file; | ||
942 | + X509_new; | ||
943 | + X509_print; | ||
944 | + X509_print_fp; | ||
945 | + X509_set_issuer_name; | ||
946 | + X509_set_notAfter; | ||
947 | + X509_set_notBefore; | ||
948 | + X509_set_pubkey; | ||
949 | + X509_set_serialNumber; | ||
950 | + X509_set_subject_name; | ||
951 | + X509_set_version; | ||
952 | + X509_sign; | ||
953 | + X509_subject_name_cmp; | ||
954 | + X509_subject_name_hash; | ||
955 | + X509_to_X509_REQ; | ||
956 | + X509_verify; | ||
957 | + X509_verify_cert; | ||
958 | + X509_verify_cert_error_string; | ||
959 | + X509v3_add_ext; | ||
960 | + X509v3_add_extension; | ||
961 | + X509v3_add_netscape_extensions; | ||
962 | + X509v3_add_standard_extensions; | ||
963 | + X509v3_cleanup_extensions; | ||
964 | + X509v3_data_type_by_NID; | ||
965 | + X509v3_data_type_by_OBJ; | ||
966 | + X509v3_delete_ext; | ||
967 | + X509v3_get_ext; | ||
968 | + X509v3_get_ext_by_NID; | ||
969 | + X509v3_get_ext_by_OBJ; | ||
970 | + X509v3_get_ext_by_critical; | ||
971 | + X509v3_get_ext_count; | ||
972 | + X509v3_pack_string; | ||
973 | + X509v3_pack_type_by_NID; | ||
974 | + X509v3_pack_type_by_OBJ; | ||
975 | + X509v3_unpack_string; | ||
976 | + _des_crypt; | ||
977 | + a2d_ASN1_OBJECT; | ||
978 | + a2i_ASN1_INTEGER; | ||
979 | + a2i_ASN1_STRING; | ||
980 | + asn1_Finish; | ||
981 | + asn1_GetSequence; | ||
982 | + bn_div_words; | ||
983 | + bn_expand2; | ||
984 | + bn_mul_add_words; | ||
985 | + bn_mul_words; | ||
986 | + BN_uadd; | ||
987 | + BN_usub; | ||
988 | + bn_sqr_words; | ||
989 | + _ossl_old_crypt; | ||
990 | + d2i_ASN1_BIT_STRING; | ||
991 | + d2i_ASN1_BOOLEAN; | ||
992 | + d2i_ASN1_HEADER; | ||
993 | + d2i_ASN1_IA5STRING; | ||
994 | + d2i_ASN1_INTEGER; | ||
995 | + d2i_ASN1_OBJECT; | ||
996 | + d2i_ASN1_OCTET_STRING; | ||
997 | + d2i_ASN1_PRINTABLE; | ||
998 | + d2i_ASN1_PRINTABLESTRING; | ||
999 | + d2i_ASN1_SET; | ||
1000 | + d2i_ASN1_T61STRING; | ||
1001 | + d2i_ASN1_TYPE; | ||
1002 | + d2i_ASN1_UTCTIME; | ||
1003 | + d2i_ASN1_bytes; | ||
1004 | + d2i_ASN1_type_bytes; | ||
1005 | + d2i_DHparams; | ||
1006 | + d2i_DSAPrivateKey; | ||
1007 | + d2i_DSAPrivateKey_bio; | ||
1008 | + d2i_DSAPrivateKey_fp; | ||
1009 | + d2i_DSAPublicKey; | ||
1010 | + d2i_DSAparams; | ||
1011 | + d2i_NETSCAPE_SPKAC; | ||
1012 | + d2i_NETSCAPE_SPKI; | ||
1013 | + d2i_Netscape_RSA; | ||
1014 | + d2i_PKCS7; | ||
1015 | + d2i_PKCS7_DIGEST; | ||
1016 | + d2i_PKCS7_ENCRYPT; | ||
1017 | + d2i_PKCS7_ENC_CONTENT; | ||
1018 | + d2i_PKCS7_ENVELOPE; | ||
1019 | + d2i_PKCS7_ISSUER_AND_SERIAL; | ||
1020 | + d2i_PKCS7_RECIP_INFO; | ||
1021 | + d2i_PKCS7_SIGNED; | ||
1022 | + d2i_PKCS7_SIGNER_INFO; | ||
1023 | + d2i_PKCS7_SIGN_ENVELOPE; | ||
1024 | + d2i_PKCS7_bio; | ||
1025 | + d2i_PKCS7_fp; | ||
1026 | + d2i_PrivateKey; | ||
1027 | + d2i_PublicKey; | ||
1028 | + d2i_RSAPrivateKey; | ||
1029 | + d2i_RSAPrivateKey_bio; | ||
1030 | + d2i_RSAPrivateKey_fp; | ||
1031 | + d2i_RSAPublicKey; | ||
1032 | + d2i_X509; | ||
1033 | + d2i_X509_ALGOR; | ||
1034 | + d2i_X509_ATTRIBUTE; | ||
1035 | + d2i_X509_CINF; | ||
1036 | + d2i_X509_CRL; | ||
1037 | + d2i_X509_CRL_INFO; | ||
1038 | + d2i_X509_CRL_bio; | ||
1039 | + d2i_X509_CRL_fp; | ||
1040 | + d2i_X509_EXTENSION; | ||
1041 | + d2i_X509_NAME; | ||
1042 | + d2i_X509_NAME_ENTRY; | ||
1043 | + d2i_X509_PKEY; | ||
1044 | + d2i_X509_PUBKEY; | ||
1045 | + d2i_X509_REQ; | ||
1046 | + d2i_X509_REQ_INFO; | ||
1047 | + d2i_X509_REQ_bio; | ||
1048 | + d2i_X509_REQ_fp; | ||
1049 | + d2i_X509_REVOKED; | ||
1050 | + d2i_X509_SIG; | ||
1051 | + d2i_X509_VAL; | ||
1052 | + d2i_X509_bio; | ||
1053 | + d2i_X509_fp; | ||
1054 | + DES_cbc_cksum; | ||
1055 | + DES_cbc_encrypt; | ||
1056 | + DES_cblock_print_file; | ||
1057 | + DES_cfb64_encrypt; | ||
1058 | + DES_cfb_encrypt; | ||
1059 | + DES_decrypt3; | ||
1060 | + DES_ecb3_encrypt; | ||
1061 | + DES_ecb_encrypt; | ||
1062 | + DES_ede3_cbc_encrypt; | ||
1063 | + DES_ede3_cfb64_encrypt; | ||
1064 | + DES_ede3_ofb64_encrypt; | ||
1065 | + DES_enc_read; | ||
1066 | + DES_enc_write; | ||
1067 | + DES_encrypt1; | ||
1068 | + DES_encrypt2; | ||
1069 | + DES_encrypt3; | ||
1070 | + DES_fcrypt; | ||
1071 | + DES_is_weak_key; | ||
1072 | + DES_key_sched; | ||
1073 | + DES_ncbc_encrypt; | ||
1074 | + DES_ofb64_encrypt; | ||
1075 | + DES_ofb_encrypt; | ||
1076 | + DES_options; | ||
1077 | + DES_pcbc_encrypt; | ||
1078 | + DES_quad_cksum; | ||
1079 | + DES_random_key; | ||
1080 | + _ossl_old_des_random_seed; | ||
1081 | + _ossl_old_des_read_2passwords; | ||
1082 | + _ossl_old_des_read_password; | ||
1083 | + _ossl_old_des_read_pw; | ||
1084 | + _ossl_old_des_read_pw_string; | ||
1085 | + DES_set_key; | ||
1086 | + DES_set_odd_parity; | ||
1087 | + DES_string_to_2keys; | ||
1088 | + DES_string_to_key; | ||
1089 | + DES_xcbc_encrypt; | ||
1090 | + DES_xwhite_in2out; | ||
1091 | + fcrypt_body; | ||
1092 | + i2a_ASN1_INTEGER; | ||
1093 | + i2a_ASN1_OBJECT; | ||
1094 | + i2a_ASN1_STRING; | ||
1095 | + i2d_ASN1_BIT_STRING; | ||
1096 | + i2d_ASN1_BOOLEAN; | ||
1097 | + i2d_ASN1_HEADER; | ||
1098 | + i2d_ASN1_IA5STRING; | ||
1099 | + i2d_ASN1_INTEGER; | ||
1100 | + i2d_ASN1_OBJECT; | ||
1101 | + i2d_ASN1_OCTET_STRING; | ||
1102 | + i2d_ASN1_PRINTABLE; | ||
1103 | + i2d_ASN1_SET; | ||
1104 | + i2d_ASN1_TYPE; | ||
1105 | + i2d_ASN1_UTCTIME; | ||
1106 | + i2d_ASN1_bytes; | ||
1107 | + i2d_DHparams; | ||
1108 | + i2d_DSAPrivateKey; | ||
1109 | + i2d_DSAPrivateKey_bio; | ||
1110 | + i2d_DSAPrivateKey_fp; | ||
1111 | + i2d_DSAPublicKey; | ||
1112 | + i2d_DSAparams; | ||
1113 | + i2d_NETSCAPE_SPKAC; | ||
1114 | + i2d_NETSCAPE_SPKI; | ||
1115 | + i2d_Netscape_RSA; | ||
1116 | + i2d_PKCS7; | ||
1117 | + i2d_PKCS7_DIGEST; | ||
1118 | + i2d_PKCS7_ENCRYPT; | ||
1119 | + i2d_PKCS7_ENC_CONTENT; | ||
1120 | + i2d_PKCS7_ENVELOPE; | ||
1121 | + i2d_PKCS7_ISSUER_AND_SERIAL; | ||
1122 | + i2d_PKCS7_RECIP_INFO; | ||
1123 | + i2d_PKCS7_SIGNED; | ||
1124 | + i2d_PKCS7_SIGNER_INFO; | ||
1125 | + i2d_PKCS7_SIGN_ENVELOPE; | ||
1126 | + i2d_PKCS7_bio; | ||
1127 | + i2d_PKCS7_fp; | ||
1128 | + i2d_PrivateKey; | ||
1129 | + i2d_PublicKey; | ||
1130 | + i2d_RSAPrivateKey; | ||
1131 | + i2d_RSAPrivateKey_bio; | ||
1132 | + i2d_RSAPrivateKey_fp; | ||
1133 | + i2d_RSAPublicKey; | ||
1134 | + i2d_X509; | ||
1135 | + i2d_X509_ALGOR; | ||
1136 | + i2d_X509_ATTRIBUTE; | ||
1137 | + i2d_X509_CINF; | ||
1138 | + i2d_X509_CRL; | ||
1139 | + i2d_X509_CRL_INFO; | ||
1140 | + i2d_X509_CRL_bio; | ||
1141 | + i2d_X509_CRL_fp; | ||
1142 | + i2d_X509_EXTENSION; | ||
1143 | + i2d_X509_NAME; | ||
1144 | + i2d_X509_NAME_ENTRY; | ||
1145 | + i2d_X509_PKEY; | ||
1146 | + i2d_X509_PUBKEY; | ||
1147 | + i2d_X509_REQ; | ||
1148 | + i2d_X509_REQ_INFO; | ||
1149 | + i2d_X509_REQ_bio; | ||
1150 | + i2d_X509_REQ_fp; | ||
1151 | + i2d_X509_REVOKED; | ||
1152 | + i2d_X509_SIG; | ||
1153 | + i2d_X509_VAL; | ||
1154 | + i2d_X509_bio; | ||
1155 | + i2d_X509_fp; | ||
1156 | + idea_cbc_encrypt; | ||
1157 | + idea_cfb64_encrypt; | ||
1158 | + idea_ecb_encrypt; | ||
1159 | + idea_encrypt; | ||
1160 | + idea_ofb64_encrypt; | ||
1161 | + idea_options; | ||
1162 | + idea_set_decrypt_key; | ||
1163 | + idea_set_encrypt_key; | ||
1164 | + lh_delete; | ||
1165 | + lh_doall; | ||
1166 | + lh_doall_arg; | ||
1167 | + lh_free; | ||
1168 | + lh_insert; | ||
1169 | + lh_new; | ||
1170 | + lh_node_stats; | ||
1171 | + lh_node_stats_bio; | ||
1172 | + lh_node_usage_stats; | ||
1173 | + lh_node_usage_stats_bio; | ||
1174 | + lh_retrieve; | ||
1175 | + lh_stats; | ||
1176 | + lh_stats_bio; | ||
1177 | + lh_strhash; | ||
1178 | + sk_delete; | ||
1179 | + sk_delete_ptr; | ||
1180 | + sk_dup; | ||
1181 | + sk_find; | ||
1182 | + sk_free; | ||
1183 | + sk_insert; | ||
1184 | + sk_new; | ||
1185 | + sk_pop; | ||
1186 | + sk_pop_free; | ||
1187 | + sk_push; | ||
1188 | + sk_set_cmp_func; | ||
1189 | + sk_shift; | ||
1190 | + sk_unshift; | ||
1191 | + sk_zero; | ||
1192 | + BIO_f_nbio_test; | ||
1193 | + ASN1_TYPE_get; | ||
1194 | + ASN1_TYPE_set; | ||
1195 | + PKCS7_content_free; | ||
1196 | + ERR_load_PKCS7_strings; | ||
1197 | + X509_find_by_issuer_and_serial; | ||
1198 | + X509_find_by_subject; | ||
1199 | + PKCS7_ctrl; | ||
1200 | + PKCS7_set_type; | ||
1201 | + PKCS7_set_content; | ||
1202 | + PKCS7_SIGNER_INFO_set; | ||
1203 | + PKCS7_add_signer; | ||
1204 | + PKCS7_add_certificate; | ||
1205 | + PKCS7_add_crl; | ||
1206 | + PKCS7_content_new; | ||
1207 | + PKCS7_dataSign; | ||
1208 | + PKCS7_dataVerify; | ||
1209 | + PKCS7_dataInit; | ||
1210 | + PKCS7_add_signature; | ||
1211 | + PKCS7_cert_from_signer_info; | ||
1212 | + PKCS7_get_signer_info; | ||
1213 | + EVP_delete_alias; | ||
1214 | + EVP_mdc2; | ||
1215 | + PEM_read_bio_RSAPublicKey; | ||
1216 | + PEM_write_bio_RSAPublicKey; | ||
1217 | + d2i_RSAPublicKey_bio; | ||
1218 | + i2d_RSAPublicKey_bio; | ||
1219 | + PEM_read_RSAPublicKey; | ||
1220 | + PEM_write_RSAPublicKey; | ||
1221 | + d2i_RSAPublicKey_fp; | ||
1222 | + i2d_RSAPublicKey_fp; | ||
1223 | + BIO_copy_next_retry; | ||
1224 | + RSA_flags; | ||
1225 | + X509_STORE_add_crl; | ||
1226 | + X509_load_crl_file; | ||
1227 | + EVP_rc2_40_cbc; | ||
1228 | + EVP_rc4_40; | ||
1229 | + EVP_CIPHER_CTX_init; | ||
1230 | + HMAC; | ||
1231 | + HMAC_Init; | ||
1232 | + HMAC_Update; | ||
1233 | + HMAC_Final; | ||
1234 | + ERR_get_next_error_library; | ||
1235 | + EVP_PKEY_cmp_parameters; | ||
1236 | + HMAC_cleanup; | ||
1237 | + BIO_ptr_ctrl; | ||
1238 | + BIO_new_file_internal; | ||
1239 | + BIO_new_fp_internal; | ||
1240 | + BIO_s_file_internal; | ||
1241 | + BN_BLINDING_convert; | ||
1242 | + BN_BLINDING_invert; | ||
1243 | + BN_BLINDING_update; | ||
1244 | + RSA_blinding_on; | ||
1245 | + RSA_blinding_off; | ||
1246 | + i2t_ASN1_OBJECT; | ||
1247 | + BN_BLINDING_new; | ||
1248 | + BN_BLINDING_free; | ||
1249 | + EVP_cast5_cbc; | ||
1250 | + EVP_cast5_cfb64; | ||
1251 | + EVP_cast5_ecb; | ||
1252 | + EVP_cast5_ofb; | ||
1253 | + BF_decrypt; | ||
1254 | + CAST_set_key; | ||
1255 | + CAST_encrypt; | ||
1256 | + CAST_decrypt; | ||
1257 | + CAST_ecb_encrypt; | ||
1258 | + CAST_cbc_encrypt; | ||
1259 | + CAST_cfb64_encrypt; | ||
1260 | + CAST_ofb64_encrypt; | ||
1261 | + RC2_decrypt; | ||
1262 | + OBJ_create_objects; | ||
1263 | + BN_exp; | ||
1264 | + BN_mul_word; | ||
1265 | + BN_sub_word; | ||
1266 | + BN_dec2bn; | ||
1267 | + BN_bn2dec; | ||
1268 | + BIO_ghbn_ctrl; | ||
1269 | + CRYPTO_free_ex_data; | ||
1270 | + CRYPTO_get_ex_data; | ||
1271 | + CRYPTO_set_ex_data; | ||
1272 | + ERR_load_CRYPTO_strings; | ||
1273 | + ERR_load_CRYPTOlib_strings; | ||
1274 | + EVP_PKEY_bits; | ||
1275 | + MD5_Transform; | ||
1276 | + SHA1_Transform; | ||
1277 | + SHA_Transform; | ||
1278 | + X509_STORE_CTX_get_chain; | ||
1279 | + X509_STORE_CTX_get_current_cert; | ||
1280 | + X509_STORE_CTX_get_error; | ||
1281 | + X509_STORE_CTX_get_error_depth; | ||
1282 | + X509_STORE_CTX_get_ex_data; | ||
1283 | + X509_STORE_CTX_set_cert; | ||
1284 | + X509_STORE_CTX_set_chain; | ||
1285 | + X509_STORE_CTX_set_error; | ||
1286 | + X509_STORE_CTX_set_ex_data; | ||
1287 | + CRYPTO_dup_ex_data; | ||
1288 | + CRYPTO_get_new_lockid; | ||
1289 | + CRYPTO_new_ex_data; | ||
1290 | + RSA_set_ex_data; | ||
1291 | + RSA_get_ex_data; | ||
1292 | + RSA_get_ex_new_index; | ||
1293 | + RSA_padding_add_PKCS1_type_1; | ||
1294 | + RSA_padding_add_PKCS1_type_2; | ||
1295 | + RSA_padding_add_SSLv23; | ||
1296 | + RSA_padding_add_none; | ||
1297 | + RSA_padding_check_PKCS1_type_1; | ||
1298 | + RSA_padding_check_PKCS1_type_2; | ||
1299 | + RSA_padding_check_SSLv23; | ||
1300 | + RSA_padding_check_none; | ||
1301 | + bn_add_words; | ||
1302 | + d2i_Netscape_RSA_2; | ||
1303 | + CRYPTO_get_ex_new_index; | ||
1304 | + RIPEMD160_Init; | ||
1305 | + RIPEMD160_Update; | ||
1306 | + RIPEMD160_Final; | ||
1307 | + RIPEMD160; | ||
1308 | + RIPEMD160_Transform; | ||
1309 | + RC5_32_set_key; | ||
1310 | + RC5_32_ecb_encrypt; | ||
1311 | + RC5_32_encrypt; | ||
1312 | + RC5_32_decrypt; | ||
1313 | + RC5_32_cbc_encrypt; | ||
1314 | + RC5_32_cfb64_encrypt; | ||
1315 | + RC5_32_ofb64_encrypt; | ||
1316 | + BN_bn2mpi; | ||
1317 | + BN_mpi2bn; | ||
1318 | + ASN1_BIT_STRING_get_bit; | ||
1319 | + ASN1_BIT_STRING_set_bit; | ||
1320 | + BIO_get_ex_data; | ||
1321 | + BIO_get_ex_new_index; | ||
1322 | + BIO_set_ex_data; | ||
1323 | + X509v3_get_key_usage; | ||
1324 | + X509v3_set_key_usage; | ||
1325 | + a2i_X509v3_key_usage; | ||
1326 | + i2a_X509v3_key_usage; | ||
1327 | + EVP_PKEY_decrypt; | ||
1328 | + EVP_PKEY_encrypt; | ||
1329 | + PKCS7_RECIP_INFO_set; | ||
1330 | + PKCS7_add_recipient; | ||
1331 | + PKCS7_add_recipient_info; | ||
1332 | + PKCS7_set_cipher; | ||
1333 | + ASN1_TYPE_get_int_octetstring; | ||
1334 | + ASN1_TYPE_get_octetstring; | ||
1335 | + ASN1_TYPE_set_int_octetstring; | ||
1336 | + ASN1_TYPE_set_octetstring; | ||
1337 | + ASN1_UTCTIME_set_string; | ||
1338 | + ERR_add_error_data; | ||
1339 | + ERR_set_error_data; | ||
1340 | + EVP_CIPHER_asn1_to_param; | ||
1341 | + EVP_CIPHER_param_to_asn1; | ||
1342 | + EVP_CIPHER_get_asn1_iv; | ||
1343 | + EVP_CIPHER_set_asn1_iv; | ||
1344 | + EVP_rc5_32_12_16_cbc; | ||
1345 | + EVP_rc5_32_12_16_cfb64; | ||
1346 | + EVP_rc5_32_12_16_ecb; | ||
1347 | + EVP_rc5_32_12_16_ofb; | ||
1348 | + asn1_add_error; | ||
1349 | + d2i_ASN1_BMPSTRING; | ||
1350 | + i2d_ASN1_BMPSTRING; | ||
1351 | + BIO_f_ber; | ||
1352 | + BN_init; | ||
1353 | + COMP_CTX_new; | ||
1354 | + COMP_CTX_free; | ||
1355 | + COMP_CTX_compress_block; | ||
1356 | + COMP_CTX_expand_block; | ||
1357 | + X509_STORE_CTX_get_ex_new_index; | ||
1358 | + OBJ_NAME_add; | ||
1359 | + BIO_socket_nbio; | ||
1360 | + EVP_rc2_64_cbc; | ||
1361 | + OBJ_NAME_cleanup; | ||
1362 | + OBJ_NAME_get; | ||
1363 | + OBJ_NAME_init; | ||
1364 | + OBJ_NAME_new_index; | ||
1365 | + OBJ_NAME_remove; | ||
1366 | + BN_MONT_CTX_copy; | ||
1367 | + BIO_new_socks4a_connect; | ||
1368 | + BIO_s_socks4a_connect; | ||
1369 | + PROXY_set_connect_mode; | ||
1370 | + RAND_SSLeay; | ||
1371 | + RAND_set_rand_method; | ||
1372 | + RSA_memory_lock; | ||
1373 | + bn_sub_words; | ||
1374 | + bn_mul_normal; | ||
1375 | + bn_mul_comba8; | ||
1376 | + bn_mul_comba4; | ||
1377 | + bn_sqr_normal; | ||
1378 | + bn_sqr_comba8; | ||
1379 | + bn_sqr_comba4; | ||
1380 | + bn_cmp_words; | ||
1381 | + bn_mul_recursive; | ||
1382 | + bn_mul_part_recursive; | ||
1383 | + bn_sqr_recursive; | ||
1384 | + bn_mul_low_normal; | ||
1385 | + BN_RECP_CTX_init; | ||
1386 | + BN_RECP_CTX_new; | ||
1387 | + BN_RECP_CTX_free; | ||
1388 | + BN_RECP_CTX_set; | ||
1389 | + BN_mod_mul_reciprocal; | ||
1390 | + BN_mod_exp_recp; | ||
1391 | + BN_div_recp; | ||
1392 | + BN_CTX_init; | ||
1393 | + BN_MONT_CTX_init; | ||
1394 | + RAND_get_rand_method; | ||
1395 | + PKCS7_add_attribute; | ||
1396 | + PKCS7_add_signed_attribute; | ||
1397 | + PKCS7_digest_from_attributes; | ||
1398 | + PKCS7_get_attribute; | ||
1399 | + PKCS7_get_issuer_and_serial; | ||
1400 | + PKCS7_get_signed_attribute; | ||
1401 | + COMP_compress_block; | ||
1402 | + COMP_expand_block; | ||
1403 | + COMP_rle; | ||
1404 | + COMP_zlib; | ||
1405 | + ms_time_diff; | ||
1406 | + ms_time_new; | ||
1407 | + ms_time_free; | ||
1408 | + ms_time_cmp; | ||
1409 | + ms_time_get; | ||
1410 | + PKCS7_set_attributes; | ||
1411 | + PKCS7_set_signed_attributes; | ||
1412 | + X509_ATTRIBUTE_create; | ||
1413 | + X509_ATTRIBUTE_dup; | ||
1414 | + ASN1_GENERALIZEDTIME_check; | ||
1415 | + ASN1_GENERALIZEDTIME_print; | ||
1416 | + ASN1_GENERALIZEDTIME_set; | ||
1417 | + ASN1_GENERALIZEDTIME_set_string; | ||
1418 | + ASN1_TIME_print; | ||
1419 | + BASIC_CONSTRAINTS_free; | ||
1420 | + BASIC_CONSTRAINTS_new; | ||
1421 | + ERR_load_X509V3_strings; | ||
1422 | + NETSCAPE_CERT_SEQUENCE_free; | ||
1423 | + NETSCAPE_CERT_SEQUENCE_new; | ||
1424 | + OBJ_txt2obj; | ||
1425 | + PEM_read_NETSCAPE_CERT_SEQUENCE; | ||
1426 | + PEM_read_NS_CERT_SEQ; | ||
1427 | + PEM_read_bio_NETSCAPE_CERT_SEQUENCE; | ||
1428 | + PEM_read_bio_NS_CERT_SEQ; | ||
1429 | + PEM_write_NETSCAPE_CERT_SEQUENCE; | ||
1430 | + PEM_write_NS_CERT_SEQ; | ||
1431 | + PEM_write_bio_NETSCAPE_CERT_SEQUENCE; | ||
1432 | + PEM_write_bio_NS_CERT_SEQ; | ||
1433 | + X509V3_EXT_add; | ||
1434 | + X509V3_EXT_add_alias; | ||
1435 | + X509V3_EXT_add_conf; | ||
1436 | + X509V3_EXT_cleanup; | ||
1437 | + X509V3_EXT_conf; | ||
1438 | + X509V3_EXT_conf_nid; | ||
1439 | + X509V3_EXT_get; | ||
1440 | + X509V3_EXT_get_nid; | ||
1441 | + X509V3_EXT_print; | ||
1442 | + X509V3_EXT_print_fp; | ||
1443 | + X509V3_add_standard_extensions; | ||
1444 | + X509V3_add_value; | ||
1445 | + X509V3_add_value_bool; | ||
1446 | + X509V3_add_value_int; | ||
1447 | + X509V3_conf_free; | ||
1448 | + X509V3_get_value_bool; | ||
1449 | + X509V3_get_value_int; | ||
1450 | + X509V3_parse_list; | ||
1451 | + d2i_ASN1_GENERALIZEDTIME; | ||
1452 | + d2i_ASN1_TIME; | ||
1453 | + d2i_BASIC_CONSTRAINTS; | ||
1454 | + d2i_NETSCAPE_CERT_SEQUENCE; | ||
1455 | + d2i_ext_ku; | ||
1456 | + ext_ku_free; | ||
1457 | + ext_ku_new; | ||
1458 | + i2d_ASN1_GENERALIZEDTIME; | ||
1459 | + i2d_ASN1_TIME; | ||
1460 | + i2d_BASIC_CONSTRAINTS; | ||
1461 | + i2d_NETSCAPE_CERT_SEQUENCE; | ||
1462 | + i2d_ext_ku; | ||
1463 | + EVP_MD_CTX_copy; | ||
1464 | + i2d_ASN1_ENUMERATED; | ||
1465 | + d2i_ASN1_ENUMERATED; | ||
1466 | + ASN1_ENUMERATED_set; | ||
1467 | + ASN1_ENUMERATED_get; | ||
1468 | + BN_to_ASN1_ENUMERATED; | ||
1469 | + ASN1_ENUMERATED_to_BN; | ||
1470 | + i2a_ASN1_ENUMERATED; | ||
1471 | + a2i_ASN1_ENUMERATED; | ||
1472 | + i2d_GENERAL_NAME; | ||
1473 | + d2i_GENERAL_NAME; | ||
1474 | + GENERAL_NAME_new; | ||
1475 | + GENERAL_NAME_free; | ||
1476 | + GENERAL_NAMES_new; | ||
1477 | + GENERAL_NAMES_free; | ||
1478 | + d2i_GENERAL_NAMES; | ||
1479 | + i2d_GENERAL_NAMES; | ||
1480 | + i2v_GENERAL_NAMES; | ||
1481 | + i2s_ASN1_OCTET_STRING; | ||
1482 | + s2i_ASN1_OCTET_STRING; | ||
1483 | + X509V3_EXT_check_conf; | ||
1484 | + hex_to_string; | ||
1485 | + string_to_hex; | ||
1486 | + DES_ede3_cbcm_encrypt; | ||
1487 | + RSA_padding_add_PKCS1_OAEP; | ||
1488 | + RSA_padding_check_PKCS1_OAEP; | ||
1489 | + X509_CRL_print_fp; | ||
1490 | + X509_CRL_print; | ||
1491 | + i2v_GENERAL_NAME; | ||
1492 | + v2i_GENERAL_NAME; | ||
1493 | + i2d_PKEY_USAGE_PERIOD; | ||
1494 | + d2i_PKEY_USAGE_PERIOD; | ||
1495 | + PKEY_USAGE_PERIOD_new; | ||
1496 | + PKEY_USAGE_PERIOD_free; | ||
1497 | + v2i_GENERAL_NAMES; | ||
1498 | + i2s_ASN1_INTEGER; | ||
1499 | + X509V3_EXT_d2i; | ||
1500 | + name_cmp; | ||
1501 | + str_dup; | ||
1502 | + i2s_ASN1_ENUMERATED; | ||
1503 | + i2s_ASN1_ENUMERATED_TABLE; | ||
1504 | + BIO_s_log; | ||
1505 | + BIO_f_reliable; | ||
1506 | + PKCS7_dataFinal; | ||
1507 | + PKCS7_dataDecode; | ||
1508 | + X509V3_EXT_CRL_add_conf; | ||
1509 | + BN_set_params; | ||
1510 | + BN_get_params; | ||
1511 | + BIO_get_ex_num; | ||
1512 | + BIO_set_ex_free_func; | ||
1513 | + EVP_ripemd160; | ||
1514 | + ASN1_TIME_set; | ||
1515 | + i2d_AUTHORITY_KEYID; | ||
1516 | + d2i_AUTHORITY_KEYID; | ||
1517 | + AUTHORITY_KEYID_new; | ||
1518 | + AUTHORITY_KEYID_free; | ||
1519 | + ASN1_seq_unpack; | ||
1520 | + ASN1_seq_pack; | ||
1521 | + ASN1_unpack_string; | ||
1522 | + ASN1_pack_string; | ||
1523 | + PKCS12_pack_safebag; | ||
1524 | + PKCS12_MAKE_KEYBAG; | ||
1525 | + PKCS8_encrypt; | ||
1526 | + PKCS12_MAKE_SHKEYBAG; | ||
1527 | + PKCS12_pack_p7data; | ||
1528 | + PKCS12_pack_p7encdata; | ||
1529 | + PKCS12_add_localkeyid; | ||
1530 | + PKCS12_add_friendlyname_asc; | ||
1531 | + PKCS12_add_friendlyname_uni; | ||
1532 | + PKCS12_get_friendlyname; | ||
1533 | + PKCS12_pbe_crypt; | ||
1534 | + PKCS12_decrypt_d2i; | ||
1535 | + PKCS12_i2d_encrypt; | ||
1536 | + PKCS12_init; | ||
1537 | + PKCS12_key_gen_asc; | ||
1538 | + PKCS12_key_gen_uni; | ||
1539 | + PKCS12_gen_mac; | ||
1540 | + PKCS12_verify_mac; | ||
1541 | + PKCS12_set_mac; | ||
1542 | + PKCS12_setup_mac; | ||
1543 | + OPENSSL_asc2uni; | ||
1544 | + OPENSSL_uni2asc; | ||
1545 | + i2d_PKCS12_BAGS; | ||
1546 | + PKCS12_BAGS_new; | ||
1547 | + d2i_PKCS12_BAGS; | ||
1548 | + PKCS12_BAGS_free; | ||
1549 | + i2d_PKCS12; | ||
1550 | + d2i_PKCS12; | ||
1551 | + PKCS12_new; | ||
1552 | + PKCS12_free; | ||
1553 | + i2d_PKCS12_MAC_DATA; | ||
1554 | + PKCS12_MAC_DATA_new; | ||
1555 | + d2i_PKCS12_MAC_DATA; | ||
1556 | + PKCS12_MAC_DATA_free; | ||
1557 | + i2d_PKCS12_SAFEBAG; | ||
1558 | + PKCS12_SAFEBAG_new; | ||
1559 | + d2i_PKCS12_SAFEBAG; | ||
1560 | + PKCS12_SAFEBAG_free; | ||
1561 | + ERR_load_PKCS12_strings; | ||
1562 | + PKCS12_PBE_add; | ||
1563 | + PKCS8_add_keyusage; | ||
1564 | + PKCS12_get_attr_gen; | ||
1565 | + PKCS12_parse; | ||
1566 | + PKCS12_create; | ||
1567 | + i2d_PKCS12_bio; | ||
1568 | + i2d_PKCS12_fp; | ||
1569 | + d2i_PKCS12_bio; | ||
1570 | + d2i_PKCS12_fp; | ||
1571 | + i2d_PBEPARAM; | ||
1572 | + PBEPARAM_new; | ||
1573 | + d2i_PBEPARAM; | ||
1574 | + PBEPARAM_free; | ||
1575 | + i2d_PKCS8_PRIV_KEY_INFO; | ||
1576 | + PKCS8_PRIV_KEY_INFO_new; | ||
1577 | + d2i_PKCS8_PRIV_KEY_INFO; | ||
1578 | + PKCS8_PRIV_KEY_INFO_free; | ||
1579 | + EVP_PKCS82PKEY; | ||
1580 | + EVP_PKEY2PKCS8; | ||
1581 | + PKCS8_set_broken; | ||
1582 | + EVP_PBE_ALGOR_CipherInit; | ||
1583 | + EVP_PBE_alg_add; | ||
1584 | + PKCS5_pbe_set; | ||
1585 | + EVP_PBE_cleanup; | ||
1586 | + i2d_SXNET; | ||
1587 | + d2i_SXNET; | ||
1588 | + SXNET_new; | ||
1589 | + SXNET_free; | ||
1590 | + i2d_SXNETID; | ||
1591 | + d2i_SXNETID; | ||
1592 | + SXNETID_new; | ||
1593 | + SXNETID_free; | ||
1594 | + DSA_SIG_new; | ||
1595 | + DSA_SIG_free; | ||
1596 | + DSA_do_sign; | ||
1597 | + DSA_do_verify; | ||
1598 | + d2i_DSA_SIG; | ||
1599 | + i2d_DSA_SIG; | ||
1600 | + i2d_ASN1_VISIBLESTRING; | ||
1601 | + d2i_ASN1_VISIBLESTRING; | ||
1602 | + i2d_ASN1_UTF8STRING; | ||
1603 | + d2i_ASN1_UTF8STRING; | ||
1604 | + i2d_DIRECTORYSTRING; | ||
1605 | + d2i_DIRECTORYSTRING; | ||
1606 | + i2d_DISPLAYTEXT; | ||
1607 | + d2i_DISPLAYTEXT; | ||
1608 | + d2i_ASN1_SET_OF_X509; | ||
1609 | + i2d_ASN1_SET_OF_X509; | ||
1610 | + i2d_PBKDF2PARAM; | ||
1611 | + PBKDF2PARAM_new; | ||
1612 | + d2i_PBKDF2PARAM; | ||
1613 | + PBKDF2PARAM_free; | ||
1614 | + i2d_PBE2PARAM; | ||
1615 | + PBE2PARAM_new; | ||
1616 | + d2i_PBE2PARAM; | ||
1617 | + PBE2PARAM_free; | ||
1618 | + d2i_ASN1_SET_OF_GENERAL_NAME; | ||
1619 | + i2d_ASN1_SET_OF_GENERAL_NAME; | ||
1620 | + d2i_ASN1_SET_OF_SXNETID; | ||
1621 | + i2d_ASN1_SET_OF_SXNETID; | ||
1622 | + d2i_ASN1_SET_OF_POLICYQUALINFO; | ||
1623 | + i2d_ASN1_SET_OF_POLICYQUALINFO; | ||
1624 | + d2i_ASN1_SET_OF_POLICYINFO; | ||
1625 | + i2d_ASN1_SET_OF_POLICYINFO; | ||
1626 | + SXNET_add_id_asc; | ||
1627 | + SXNET_add_id_ulong; | ||
1628 | + SXNET_add_id_INTEGER; | ||
1629 | + SXNET_get_id_asc; | ||
1630 | + SXNET_get_id_ulong; | ||
1631 | + SXNET_get_id_INTEGER; | ||
1632 | + X509V3_set_conf_lhash; | ||
1633 | + i2d_CERTIFICATEPOLICIES; | ||
1634 | + CERTIFICATEPOLICIES_new; | ||
1635 | + CERTIFICATEPOLICIES_free; | ||
1636 | + d2i_CERTIFICATEPOLICIES; | ||
1637 | + i2d_POLICYINFO; | ||
1638 | + POLICYINFO_new; | ||
1639 | + d2i_POLICYINFO; | ||
1640 | + POLICYINFO_free; | ||
1641 | + i2d_POLICYQUALINFO; | ||
1642 | + POLICYQUALINFO_new; | ||
1643 | + d2i_POLICYQUALINFO; | ||
1644 | + POLICYQUALINFO_free; | ||
1645 | + i2d_USERNOTICE; | ||
1646 | + USERNOTICE_new; | ||
1647 | + d2i_USERNOTICE; | ||
1648 | + USERNOTICE_free; | ||
1649 | + i2d_NOTICEREF; | ||
1650 | + NOTICEREF_new; | ||
1651 | + d2i_NOTICEREF; | ||
1652 | + NOTICEREF_free; | ||
1653 | + X509V3_get_string; | ||
1654 | + X509V3_get_section; | ||
1655 | + X509V3_string_free; | ||
1656 | + X509V3_section_free; | ||
1657 | + X509V3_set_ctx; | ||
1658 | + s2i_ASN1_INTEGER; | ||
1659 | + CRYPTO_set_locked_mem_functions; | ||
1660 | + CRYPTO_get_locked_mem_functions; | ||
1661 | + CRYPTO_malloc_locked; | ||
1662 | + CRYPTO_free_locked; | ||
1663 | + BN_mod_exp2_mont; | ||
1664 | + ERR_get_error_line_data; | ||
1665 | + ERR_peek_error_line_data; | ||
1666 | + PKCS12_PBE_keyivgen; | ||
1667 | + X509_ALGOR_dup; | ||
1668 | + d2i_ASN1_SET_OF_DIST_POINT; | ||
1669 | + i2d_ASN1_SET_OF_DIST_POINT; | ||
1670 | + i2d_CRL_DIST_POINTS; | ||
1671 | + CRL_DIST_POINTS_new; | ||
1672 | + CRL_DIST_POINTS_free; | ||
1673 | + d2i_CRL_DIST_POINTS; | ||
1674 | + i2d_DIST_POINT; | ||
1675 | + DIST_POINT_new; | ||
1676 | + d2i_DIST_POINT; | ||
1677 | + DIST_POINT_free; | ||
1678 | + i2d_DIST_POINT_NAME; | ||
1679 | + DIST_POINT_NAME_new; | ||
1680 | + DIST_POINT_NAME_free; | ||
1681 | + d2i_DIST_POINT_NAME; | ||
1682 | + X509V3_add_value_uchar; | ||
1683 | + d2i_ASN1_SET_OF_X509_ATTRIBUTE; | ||
1684 | + i2d_ASN1_SET_OF_ASN1_TYPE; | ||
1685 | + d2i_ASN1_SET_OF_X509_EXTENSION; | ||
1686 | + d2i_ASN1_SET_OF_X509_NAME_ENTRY; | ||
1687 | + d2i_ASN1_SET_OF_ASN1_TYPE; | ||
1688 | + i2d_ASN1_SET_OF_X509_ATTRIBUTE; | ||
1689 | + i2d_ASN1_SET_OF_X509_EXTENSION; | ||
1690 | + i2d_ASN1_SET_OF_X509_NAME_ENTRY; | ||
1691 | + X509V3_EXT_i2d; | ||
1692 | + X509V3_EXT_val_prn; | ||
1693 | + X509V3_EXT_add_list; | ||
1694 | + EVP_CIPHER_type; | ||
1695 | + EVP_PBE_CipherInit; | ||
1696 | + X509V3_add_value_bool_nf; | ||
1697 | + d2i_ASN1_UINTEGER; | ||
1698 | + sk_value; | ||
1699 | + sk_num; | ||
1700 | + sk_set; | ||
1701 | + i2d_ASN1_SET_OF_X509_REVOKED; | ||
1702 | + sk_sort; | ||
1703 | + d2i_ASN1_SET_OF_X509_REVOKED; | ||
1704 | + i2d_ASN1_SET_OF_X509_ALGOR; | ||
1705 | + i2d_ASN1_SET_OF_X509_CRL; | ||
1706 | + d2i_ASN1_SET_OF_X509_ALGOR; | ||
1707 | + d2i_ASN1_SET_OF_X509_CRL; | ||
1708 | + i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO; | ||
1709 | + i2d_ASN1_SET_OF_PKCS7_RECIP_INFO; | ||
1710 | + d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO; | ||
1711 | + d2i_ASN1_SET_OF_PKCS7_RECIP_INFO; | ||
1712 | + PKCS5_PBE_add; | ||
1713 | + PEM_write_bio_PKCS8; | ||
1714 | + i2d_PKCS8_fp; | ||
1715 | + PEM_read_bio_PKCS8_PRIV_KEY_INFO; | ||
1716 | + PEM_read_bio_P8_PRIV_KEY_INFO; | ||
1717 | + d2i_PKCS8_bio; | ||
1718 | + d2i_PKCS8_PRIV_KEY_INFO_fp; | ||
1719 | + PEM_write_bio_PKCS8_PRIV_KEY_INFO; | ||
1720 | + PEM_write_bio_P8_PRIV_KEY_INFO; | ||
1721 | + PEM_read_PKCS8; | ||
1722 | + d2i_PKCS8_PRIV_KEY_INFO_bio; | ||
1723 | + d2i_PKCS8_fp; | ||
1724 | + PEM_write_PKCS8; | ||
1725 | + PEM_read_PKCS8_PRIV_KEY_INFO; | ||
1726 | + PEM_read_P8_PRIV_KEY_INFO; | ||
1727 | + PEM_read_bio_PKCS8; | ||
1728 | + PEM_write_PKCS8_PRIV_KEY_INFO; | ||
1729 | + PEM_write_P8_PRIV_KEY_INFO; | ||
1730 | + PKCS5_PBE_keyivgen; | ||
1731 | + i2d_PKCS8_bio; | ||
1732 | + i2d_PKCS8_PRIV_KEY_INFO_fp; | ||
1733 | + i2d_PKCS8_PRIV_KEY_INFO_bio; | ||
1734 | + BIO_s_bio; | ||
1735 | + PKCS5_pbe2_set; | ||
1736 | + PKCS5_PBKDF2_HMAC_SHA1; | ||
1737 | + PKCS5_v2_PBE_keyivgen; | ||
1738 | + PEM_write_bio_PKCS8PrivateKey; | ||
1739 | + PEM_write_PKCS8PrivateKey; | ||
1740 | + BIO_ctrl_get_read_request; | ||
1741 | + BIO_ctrl_pending; | ||
1742 | + BIO_ctrl_wpending; | ||
1743 | + BIO_new_bio_pair; | ||
1744 | + BIO_ctrl_get_write_guarantee; | ||
1745 | + CRYPTO_num_locks; | ||
1746 | + CONF_load_bio; | ||
1747 | + CONF_load_fp; | ||
1748 | + i2d_ASN1_SET_OF_ASN1_OBJECT; | ||
1749 | + d2i_ASN1_SET_OF_ASN1_OBJECT; | ||
1750 | + PKCS7_signatureVerify; | ||
1751 | + RSA_set_method; | ||
1752 | + RSA_get_method; | ||
1753 | + RSA_get_default_method; | ||
1754 | + RSA_check_key; | ||
1755 | + OBJ_obj2txt; | ||
1756 | + DSA_dup_DH; | ||
1757 | + X509_REQ_get_extensions; | ||
1758 | + X509_REQ_set_extension_nids; | ||
1759 | + BIO_nwrite; | ||
1760 | + X509_REQ_extension_nid; | ||
1761 | + BIO_nread; | ||
1762 | + X509_REQ_get_extension_nids; | ||
1763 | + BIO_nwrite0; | ||
1764 | + X509_REQ_add_extensions_nid; | ||
1765 | + BIO_nread0; | ||
1766 | + X509_REQ_add_extensions; | ||
1767 | + BIO_new_mem_buf; | ||
1768 | + DH_set_ex_data; | ||
1769 | + DH_set_method; | ||
1770 | + DSA_OpenSSL; | ||
1771 | + DH_get_ex_data; | ||
1772 | + DH_get_ex_new_index; | ||
1773 | + DSA_new_method; | ||
1774 | + DH_new_method; | ||
1775 | + DH_OpenSSL; | ||
1776 | + DSA_get_ex_new_index; | ||
1777 | + DH_get_default_method; | ||
1778 | + DSA_set_ex_data; | ||
1779 | + DH_set_default_method; | ||
1780 | + DSA_get_ex_data; | ||
1781 | + X509V3_EXT_REQ_add_conf; | ||
1782 | + NETSCAPE_SPKI_print; | ||
1783 | + NETSCAPE_SPKI_set_pubkey; | ||
1784 | + NETSCAPE_SPKI_b64_encode; | ||
1785 | + NETSCAPE_SPKI_get_pubkey; | ||
1786 | + NETSCAPE_SPKI_b64_decode; | ||
1787 | + UTF8_putc; | ||
1788 | + UTF8_getc; | ||
1789 | + RSA_null_method; | ||
1790 | + ASN1_tag2str; | ||
1791 | + BIO_ctrl_reset_read_request; | ||
1792 | + DISPLAYTEXT_new; | ||
1793 | + ASN1_GENERALIZEDTIME_free; | ||
1794 | + X509_REVOKED_get_ext_d2i; | ||
1795 | + X509_set_ex_data; | ||
1796 | + X509_reject_set_bit_asc; | ||
1797 | + X509_NAME_add_entry_by_txt; | ||
1798 | + X509_NAME_add_entry_by_NID; | ||
1799 | + X509_PURPOSE_get0; | ||
1800 | + PEM_read_X509_AUX; | ||
1801 | + d2i_AUTHORITY_INFO_ACCESS; | ||
1802 | + PEM_write_PUBKEY; | ||
1803 | + ACCESS_DESCRIPTION_new; | ||
1804 | + X509_CERT_AUX_free; | ||
1805 | + d2i_ACCESS_DESCRIPTION; | ||
1806 | + X509_trust_clear; | ||
1807 | + X509_TRUST_add; | ||
1808 | + ASN1_VISIBLESTRING_new; | ||
1809 | + X509_alias_set1; | ||
1810 | + ASN1_PRINTABLESTRING_free; | ||
1811 | + EVP_PKEY_get1_DSA; | ||
1812 | + ASN1_BMPSTRING_new; | ||
1813 | + ASN1_mbstring_copy; | ||
1814 | + ASN1_UTF8STRING_new; | ||
1815 | + DSA_get_default_method; | ||
1816 | + i2d_ASN1_SET_OF_ACCESS_DESCRIPTION; | ||
1817 | + ASN1_T61STRING_free; | ||
1818 | + DSA_set_method; | ||
1819 | + X509_get_ex_data; | ||
1820 | + ASN1_STRING_type; | ||
1821 | + X509_PURPOSE_get_by_sname; | ||
1822 | + ASN1_TIME_free; | ||
1823 | + ASN1_OCTET_STRING_cmp; | ||
1824 | + ASN1_BIT_STRING_new; | ||
1825 | + X509_get_ext_d2i; | ||
1826 | + PEM_read_bio_X509_AUX; | ||
1827 | + ASN1_STRING_set_default_mask_asc; | ||
1828 | + ASN1_STRING_set_def_mask_asc; | ||
1829 | + PEM_write_bio_RSA_PUBKEY; | ||
1830 | + ASN1_INTEGER_cmp; | ||
1831 | + d2i_RSA_PUBKEY_fp; | ||
1832 | + X509_trust_set_bit_asc; | ||
1833 | + PEM_write_bio_DSA_PUBKEY; | ||
1834 | + X509_STORE_CTX_free; | ||
1835 | + EVP_PKEY_set1_DSA; | ||
1836 | + i2d_DSA_PUBKEY_fp; | ||
1837 | + X509_load_cert_crl_file; | ||
1838 | + ASN1_TIME_new; | ||
1839 | + i2d_RSA_PUBKEY; | ||
1840 | + X509_STORE_CTX_purpose_inherit; | ||
1841 | + PEM_read_RSA_PUBKEY; | ||
1842 | + d2i_X509_AUX; | ||
1843 | + i2d_DSA_PUBKEY; | ||
1844 | + X509_CERT_AUX_print; | ||
1845 | + PEM_read_DSA_PUBKEY; | ||
1846 | + i2d_RSA_PUBKEY_bio; | ||
1847 | + ASN1_BIT_STRING_num_asc; | ||
1848 | + i2d_PUBKEY; | ||
1849 | + ASN1_UTCTIME_free; | ||
1850 | + DSA_set_default_method; | ||
1851 | + X509_PURPOSE_get_by_id; | ||
1852 | + ACCESS_DESCRIPTION_free; | ||
1853 | + PEM_read_bio_PUBKEY; | ||
1854 | + ASN1_STRING_set_by_NID; | ||
1855 | + X509_PURPOSE_get_id; | ||
1856 | + DISPLAYTEXT_free; | ||
1857 | + OTHERNAME_new; | ||
1858 | + X509_CERT_AUX_new; | ||
1859 | + X509_TRUST_cleanup; | ||
1860 | + X509_NAME_add_entry_by_OBJ; | ||
1861 | + X509_CRL_get_ext_d2i; | ||
1862 | + X509_PURPOSE_get0_name; | ||
1863 | + PEM_read_PUBKEY; | ||
1864 | + i2d_DSA_PUBKEY_bio; | ||
1865 | + i2d_OTHERNAME; | ||
1866 | + ASN1_OCTET_STRING_free; | ||
1867 | + ASN1_BIT_STRING_set_asc; | ||
1868 | + X509_get_ex_new_index; | ||
1869 | + ASN1_STRING_TABLE_cleanup; | ||
1870 | + X509_TRUST_get_by_id; | ||
1871 | + X509_PURPOSE_get_trust; | ||
1872 | + ASN1_STRING_length; | ||
1873 | + d2i_ASN1_SET_OF_ACCESS_DESCRIPTION; | ||
1874 | + ASN1_PRINTABLESTRING_new; | ||
1875 | + X509V3_get_d2i; | ||
1876 | + ASN1_ENUMERATED_free; | ||
1877 | + i2d_X509_CERT_AUX; | ||
1878 | + X509_STORE_CTX_set_trust; | ||
1879 | + ASN1_STRING_set_default_mask; | ||
1880 | + X509_STORE_CTX_new; | ||
1881 | + EVP_PKEY_get1_RSA; | ||
1882 | + DIRECTORYSTRING_free; | ||
1883 | + PEM_write_X509_AUX; | ||
1884 | + ASN1_OCTET_STRING_set; | ||
1885 | + d2i_DSA_PUBKEY_fp; | ||
1886 | + d2i_RSA_PUBKEY; | ||
1887 | + X509_TRUST_get0_name; | ||
1888 | + X509_TRUST_get0; | ||
1889 | + AUTHORITY_INFO_ACCESS_free; | ||
1890 | + ASN1_IA5STRING_new; | ||
1891 | + d2i_DSA_PUBKEY; | ||
1892 | + X509_check_purpose; | ||
1893 | + ASN1_ENUMERATED_new; | ||
1894 | + d2i_RSA_PUBKEY_bio; | ||
1895 | + d2i_PUBKEY; | ||
1896 | + X509_TRUST_get_trust; | ||
1897 | + X509_TRUST_get_flags; | ||
1898 | + ASN1_BMPSTRING_free; | ||
1899 | + ASN1_T61STRING_new; | ||
1900 | + ASN1_UTCTIME_new; | ||
1901 | + i2d_AUTHORITY_INFO_ACCESS; | ||
1902 | + EVP_PKEY_set1_RSA; | ||
1903 | + X509_STORE_CTX_set_purpose; | ||
1904 | + ASN1_IA5STRING_free; | ||
1905 | + PEM_write_bio_X509_AUX; | ||
1906 | + X509_PURPOSE_get_count; | ||
1907 | + CRYPTO_add_info; | ||
1908 | + X509_NAME_ENTRY_create_by_txt; | ||
1909 | + ASN1_STRING_get_default_mask; | ||
1910 | + X509_alias_get0; | ||
1911 | + ASN1_STRING_data; | ||
1912 | + i2d_ACCESS_DESCRIPTION; | ||
1913 | + X509_trust_set_bit; | ||
1914 | + ASN1_BIT_STRING_free; | ||
1915 | + PEM_read_bio_RSA_PUBKEY; | ||
1916 | + X509_add1_reject_object; | ||
1917 | + X509_check_trust; | ||
1918 | + PEM_read_bio_DSA_PUBKEY; | ||
1919 | + X509_PURPOSE_add; | ||
1920 | + ASN1_STRING_TABLE_get; | ||
1921 | + ASN1_UTF8STRING_free; | ||
1922 | + d2i_DSA_PUBKEY_bio; | ||
1923 | + PEM_write_RSA_PUBKEY; | ||
1924 | + d2i_OTHERNAME; | ||
1925 | + X509_reject_set_bit; | ||
1926 | + PEM_write_DSA_PUBKEY; | ||
1927 | + X509_PURPOSE_get0_sname; | ||
1928 | + EVP_PKEY_set1_DH; | ||
1929 | + ASN1_OCTET_STRING_dup; | ||
1930 | + ASN1_BIT_STRING_set; | ||
1931 | + X509_TRUST_get_count; | ||
1932 | + ASN1_INTEGER_free; | ||
1933 | + OTHERNAME_free; | ||
1934 | + i2d_RSA_PUBKEY_fp; | ||
1935 | + ASN1_INTEGER_dup; | ||
1936 | + d2i_X509_CERT_AUX; | ||
1937 | + PEM_write_bio_PUBKEY; | ||
1938 | + ASN1_VISIBLESTRING_free; | ||
1939 | + X509_PURPOSE_cleanup; | ||
1940 | + ASN1_mbstring_ncopy; | ||
1941 | + ASN1_GENERALIZEDTIME_new; | ||
1942 | + EVP_PKEY_get1_DH; | ||
1943 | + ASN1_OCTET_STRING_new; | ||
1944 | + ASN1_INTEGER_new; | ||
1945 | + i2d_X509_AUX; | ||
1946 | + ASN1_BIT_STRING_name_print; | ||
1947 | + X509_cmp; | ||
1948 | + ASN1_STRING_length_set; | ||
1949 | + DIRECTORYSTRING_new; | ||
1950 | + X509_add1_trust_object; | ||
1951 | + PKCS12_newpass; | ||
1952 | + SMIME_write_PKCS7; | ||
1953 | + SMIME_read_PKCS7; | ||
1954 | + DES_set_key_checked; | ||
1955 | + PKCS7_verify; | ||
1956 | + PKCS7_encrypt; | ||
1957 | + DES_set_key_unchecked; | ||
1958 | + SMIME_crlf_copy; | ||
1959 | + i2d_ASN1_PRINTABLESTRING; | ||
1960 | + PKCS7_get0_signers; | ||
1961 | + PKCS7_decrypt; | ||
1962 | + SMIME_text; | ||
1963 | + PKCS7_simple_smimecap; | ||
1964 | + PKCS7_get_smimecap; | ||
1965 | + PKCS7_sign; | ||
1966 | + PKCS7_add_attrib_smimecap; | ||
1967 | + CRYPTO_dbg_set_options; | ||
1968 | + CRYPTO_remove_all_info; | ||
1969 | + CRYPTO_get_mem_debug_functions; | ||
1970 | + CRYPTO_is_mem_check_on; | ||
1971 | + CRYPTO_set_mem_debug_functions; | ||
1972 | + CRYPTO_pop_info; | ||
1973 | + CRYPTO_push_info_; | ||
1974 | + CRYPTO_set_mem_debug_options; | ||
1975 | + PEM_write_PKCS8PrivateKey_nid; | ||
1976 | + PEM_write_bio_PKCS8PrivateKey_nid; | ||
1977 | + PEM_write_bio_PKCS8PrivKey_nid; | ||
1978 | + d2i_PKCS8PrivateKey_bio; | ||
1979 | + ASN1_NULL_free; | ||
1980 | + d2i_ASN1_NULL; | ||
1981 | + ASN1_NULL_new; | ||
1982 | + i2d_PKCS8PrivateKey_bio; | ||
1983 | + i2d_PKCS8PrivateKey_fp; | ||
1984 | + i2d_ASN1_NULL; | ||
1985 | + i2d_PKCS8PrivateKey_nid_fp; | ||
1986 | + d2i_PKCS8PrivateKey_fp; | ||
1987 | + i2d_PKCS8PrivateKey_nid_bio; | ||
1988 | + i2d_PKCS8PrivateKeyInfo_fp; | ||
1989 | + i2d_PKCS8PrivateKeyInfo_bio; | ||
1990 | + PEM_cb; | ||
1991 | + i2d_PrivateKey_fp; | ||
1992 | + d2i_PrivateKey_bio; | ||
1993 | + d2i_PrivateKey_fp; | ||
1994 | + i2d_PrivateKey_bio; | ||
1995 | + X509_reject_clear; | ||
1996 | + X509_TRUST_set_default; | ||
1997 | + d2i_AutoPrivateKey; | ||
1998 | + X509_ATTRIBUTE_get0_type; | ||
1999 | + X509_ATTRIBUTE_set1_data; | ||
2000 | + X509at_get_attr; | ||
2001 | + X509at_get_attr_count; | ||
2002 | + X509_ATTRIBUTE_create_by_NID; | ||
2003 | + X509_ATTRIBUTE_set1_object; | ||
2004 | + X509_ATTRIBUTE_count; | ||
2005 | + X509_ATTRIBUTE_create_by_OBJ; | ||
2006 | + X509_ATTRIBUTE_get0_object; | ||
2007 | + X509at_get_attr_by_NID; | ||
2008 | + X509at_add1_attr; | ||
2009 | + X509_ATTRIBUTE_get0_data; | ||
2010 | + X509at_delete_attr; | ||
2011 | + X509at_get_attr_by_OBJ; | ||
2012 | + RAND_add; | ||
2013 | + BIO_number_written; | ||
2014 | + BIO_number_read; | ||
2015 | + X509_STORE_CTX_get1_chain; | ||
2016 | + ERR_load_RAND_strings; | ||
2017 | + RAND_pseudo_bytes; | ||
2018 | + X509_REQ_get_attr_by_NID; | ||
2019 | + X509_REQ_get_attr; | ||
2020 | + X509_REQ_add1_attr_by_NID; | ||
2021 | + X509_REQ_get_attr_by_OBJ; | ||
2022 | + X509at_add1_attr_by_NID; | ||
2023 | + X509_REQ_add1_attr_by_OBJ; | ||
2024 | + X509_REQ_get_attr_count; | ||
2025 | + X509_REQ_add1_attr; | ||
2026 | + X509_REQ_delete_attr; | ||
2027 | + X509at_add1_attr_by_OBJ; | ||
2028 | + X509_REQ_add1_attr_by_txt; | ||
2029 | + X509_ATTRIBUTE_create_by_txt; | ||
2030 | + X509at_add1_attr_by_txt; | ||
2031 | + BN_pseudo_rand; | ||
2032 | + BN_is_prime_fasttest; | ||
2033 | + BN_CTX_end; | ||
2034 | + BN_CTX_start; | ||
2035 | + BN_CTX_get; | ||
2036 | + EVP_PKEY2PKCS8_broken; | ||
2037 | + ASN1_STRING_TABLE_add; | ||
2038 | + CRYPTO_dbg_get_options; | ||
2039 | + AUTHORITY_INFO_ACCESS_new; | ||
2040 | + CRYPTO_get_mem_debug_options; | ||
2041 | + DES_crypt; | ||
2042 | + PEM_write_bio_X509_REQ_NEW; | ||
2043 | + PEM_write_X509_REQ_NEW; | ||
2044 | + BIO_callback_ctrl; | ||
2045 | + RAND_egd; | ||
2046 | + RAND_status; | ||
2047 | + bn_dump1; | ||
2048 | + DES_check_key_parity; | ||
2049 | + lh_num_items; | ||
2050 | + RAND_event; | ||
2051 | + DSO_new; | ||
2052 | + DSO_new_method; | ||
2053 | + DSO_free; | ||
2054 | + DSO_flags; | ||
2055 | + DSO_up; | ||
2056 | + DSO_set_default_method; | ||
2057 | + DSO_get_default_method; | ||
2058 | + DSO_get_method; | ||
2059 | + DSO_set_method; | ||
2060 | + DSO_load; | ||
2061 | + DSO_bind_var; | ||
2062 | + DSO_METHOD_null; | ||
2063 | + DSO_METHOD_openssl; | ||
2064 | + DSO_METHOD_dlfcn; | ||
2065 | + DSO_METHOD_win32; | ||
2066 | + ERR_load_DSO_strings; | ||
2067 | + DSO_METHOD_dl; | ||
2068 | + NCONF_load; | ||
2069 | + NCONF_load_fp; | ||
2070 | + NCONF_new; | ||
2071 | + NCONF_get_string; | ||
2072 | + NCONF_free; | ||
2073 | + NCONF_get_number; | ||
2074 | + CONF_dump_fp; | ||
2075 | + NCONF_load_bio; | ||
2076 | + NCONF_dump_fp; | ||
2077 | + NCONF_get_section; | ||
2078 | + NCONF_dump_bio; | ||
2079 | + CONF_dump_bio; | ||
2080 | + NCONF_free_data; | ||
2081 | + CONF_set_default_method; | ||
2082 | + ERR_error_string_n; | ||
2083 | + BIO_snprintf; | ||
2084 | + DSO_ctrl; | ||
2085 | + i2d_ASN1_SET_OF_ASN1_INTEGER; | ||
2086 | + i2d_ASN1_SET_OF_PKCS12_SAFEBAG; | ||
2087 | + i2d_ASN1_SET_OF_PKCS7; | ||
2088 | + BIO_vfree; | ||
2089 | + d2i_ASN1_SET_OF_ASN1_INTEGER; | ||
2090 | + d2i_ASN1_SET_OF_PKCS12_SAFEBAG; | ||
2091 | + ASN1_UTCTIME_get; | ||
2092 | + X509_REQ_digest; | ||
2093 | + X509_CRL_digest; | ||
2094 | + d2i_ASN1_SET_OF_PKCS7; | ||
2095 | + EVP_CIPHER_CTX_set_key_length; | ||
2096 | + EVP_CIPHER_CTX_ctrl; | ||
2097 | + BN_mod_exp_mont_word; | ||
2098 | + RAND_egd_bytes; | ||
2099 | + X509_REQ_get1_email; | ||
2100 | + X509_get1_email; | ||
2101 | + X509_email_free; | ||
2102 | + i2d_RSA_NET; | ||
2103 | + d2i_RSA_NET_2; | ||
2104 | + d2i_RSA_NET; | ||
2105 | + DSO_bind_func; | ||
2106 | + CRYPTO_get_new_dynlockid; | ||
2107 | + sk_new_null; | ||
2108 | + CRYPTO_set_dynlock_destroy_callback; | ||
2109 | + CRYPTO_set_dynlock_destroy_cb; | ||
2110 | + CRYPTO_destroy_dynlockid; | ||
2111 | + CRYPTO_set_dynlock_size; | ||
2112 | + CRYPTO_set_dynlock_create_callback; | ||
2113 | + CRYPTO_set_dynlock_create_cb; | ||
2114 | + CRYPTO_set_dynlock_lock_callback; | ||
2115 | + CRYPTO_set_dynlock_lock_cb; | ||
2116 | + CRYPTO_get_dynlock_lock_callback; | ||
2117 | + CRYPTO_get_dynlock_lock_cb; | ||
2118 | + CRYPTO_get_dynlock_destroy_callback; | ||
2119 | + CRYPTO_get_dynlock_destroy_cb; | ||
2120 | + CRYPTO_get_dynlock_value; | ||
2121 | + CRYPTO_get_dynlock_create_callback; | ||
2122 | + CRYPTO_get_dynlock_create_cb; | ||
2123 | + c2i_ASN1_BIT_STRING; | ||
2124 | + i2c_ASN1_BIT_STRING; | ||
2125 | + RAND_poll; | ||
2126 | + c2i_ASN1_INTEGER; | ||
2127 | + i2c_ASN1_INTEGER; | ||
2128 | + BIO_dump_indent; | ||
2129 | + ASN1_parse_dump; | ||
2130 | + c2i_ASN1_OBJECT; | ||
2131 | + X509_NAME_print_ex_fp; | ||
2132 | + ASN1_STRING_print_ex_fp; | ||
2133 | + X509_NAME_print_ex; | ||
2134 | + ASN1_STRING_print_ex; | ||
2135 | + MD4; | ||
2136 | + MD4_Transform; | ||
2137 | + MD4_Final; | ||
2138 | + MD4_Update; | ||
2139 | + MD4_Init; | ||
2140 | + EVP_md4; | ||
2141 | + i2d_PUBKEY_bio; | ||
2142 | + i2d_PUBKEY_fp; | ||
2143 | + d2i_PUBKEY_bio; | ||
2144 | + ASN1_STRING_to_UTF8; | ||
2145 | + BIO_vprintf; | ||
2146 | + BIO_vsnprintf; | ||
2147 | + d2i_PUBKEY_fp; | ||
2148 | + X509_cmp_time; | ||
2149 | + X509_STORE_CTX_set_time; | ||
2150 | + X509_STORE_CTX_get1_issuer; | ||
2151 | + X509_OBJECT_retrieve_match; | ||
2152 | + X509_OBJECT_idx_by_subject; | ||
2153 | + X509_STORE_CTX_set_flags; | ||
2154 | + X509_STORE_CTX_trusted_stack; | ||
2155 | + X509_time_adj; | ||
2156 | + X509_check_issued; | ||
2157 | + ASN1_UTCTIME_cmp_time_t; | ||
2158 | + DES_set_weak_key_flag; | ||
2159 | + DES_check_key; | ||
2160 | + DES_rw_mode; | ||
2161 | + RSA_PKCS1_RSAref; | ||
2162 | + X509_keyid_set1; | ||
2163 | + BIO_next; | ||
2164 | + DSO_METHOD_vms; | ||
2165 | + BIO_f_linebuffer; | ||
2166 | + BN_bntest_rand; | ||
2167 | + OPENSSL_issetugid; | ||
2168 | + BN_rand_range; | ||
2169 | + ERR_load_ENGINE_strings; | ||
2170 | + ENGINE_set_DSA; | ||
2171 | + ENGINE_get_finish_function; | ||
2172 | + ENGINE_get_default_RSA; | ||
2173 | + ENGINE_get_BN_mod_exp; | ||
2174 | + DSA_get_default_openssl_method; | ||
2175 | + ENGINE_set_DH; | ||
2176 | + ENGINE_set_def_BN_mod_exp_crt; | ||
2177 | + ENGINE_set_default_BN_mod_exp_crt; | ||
2178 | + ENGINE_init; | ||
2179 | + DH_get_default_openssl_method; | ||
2180 | + RSA_set_default_openssl_method; | ||
2181 | + ENGINE_finish; | ||
2182 | + ENGINE_load_public_key; | ||
2183 | + ENGINE_get_DH; | ||
2184 | + ENGINE_ctrl; | ||
2185 | + ENGINE_get_init_function; | ||
2186 | + ENGINE_set_init_function; | ||
2187 | + ENGINE_set_default_DSA; | ||
2188 | + ENGINE_get_name; | ||
2189 | + ENGINE_get_last; | ||
2190 | + ENGINE_get_prev; | ||
2191 | + ENGINE_get_default_DH; | ||
2192 | + ENGINE_get_RSA; | ||
2193 | + ENGINE_set_default; | ||
2194 | + ENGINE_get_RAND; | ||
2195 | + ENGINE_get_first; | ||
2196 | + ENGINE_by_id; | ||
2197 | + ENGINE_set_finish_function; | ||
2198 | + ENGINE_get_def_BN_mod_exp_crt; | ||
2199 | + ENGINE_get_default_BN_mod_exp_crt; | ||
2200 | + RSA_get_default_openssl_method; | ||
2201 | + ENGINE_set_RSA; | ||
2202 | + ENGINE_load_private_key; | ||
2203 | + ENGINE_set_default_RAND; | ||
2204 | + ENGINE_set_BN_mod_exp; | ||
2205 | + ENGINE_remove; | ||
2206 | + ENGINE_free; | ||
2207 | + ENGINE_get_BN_mod_exp_crt; | ||
2208 | + ENGINE_get_next; | ||
2209 | + ENGINE_set_name; | ||
2210 | + ENGINE_get_default_DSA; | ||
2211 | + ENGINE_set_default_BN_mod_exp; | ||
2212 | + ENGINE_set_default_RSA; | ||
2213 | + ENGINE_get_default_RAND; | ||
2214 | + ENGINE_get_default_BN_mod_exp; | ||
2215 | + ENGINE_set_RAND; | ||
2216 | + ENGINE_set_id; | ||
2217 | + ENGINE_set_BN_mod_exp_crt; | ||
2218 | + ENGINE_set_default_DH; | ||
2219 | + ENGINE_new; | ||
2220 | + ENGINE_get_id; | ||
2221 | + DSA_set_default_openssl_method; | ||
2222 | + ENGINE_add; | ||
2223 | + DH_set_default_openssl_method; | ||
2224 | + ENGINE_get_DSA; | ||
2225 | + ENGINE_get_ctrl_function; | ||
2226 | + ENGINE_set_ctrl_function; | ||
2227 | + BN_pseudo_rand_range; | ||
2228 | + X509_STORE_CTX_set_verify_cb; | ||
2229 | + ERR_load_COMP_strings; | ||
2230 | + PKCS12_item_decrypt_d2i; | ||
2231 | + ASN1_UTF8STRING_it; | ||
2232 | + ASN1_UTF8STRING_it; | ||
2233 | + ENGINE_unregister_ciphers; | ||
2234 | + ENGINE_get_ciphers; | ||
2235 | + d2i_OCSP_BASICRESP; | ||
2236 | + KRB5_CHECKSUM_it; | ||
2237 | + KRB5_CHECKSUM_it; | ||
2238 | + EC_POINT_add; | ||
2239 | + ASN1_item_ex_i2d; | ||
2240 | + OCSP_CERTID_it; | ||
2241 | + OCSP_CERTID_it; | ||
2242 | + d2i_OCSP_RESPBYTES; | ||
2243 | + X509V3_add1_i2d; | ||
2244 | + PKCS7_ENVELOPE_it; | ||
2245 | + PKCS7_ENVELOPE_it; | ||
2246 | + UI_add_input_boolean; | ||
2247 | + ENGINE_unregister_RSA; | ||
2248 | + X509V3_EXT_nconf; | ||
2249 | + ASN1_GENERALSTRING_free; | ||
2250 | + d2i_OCSP_CERTSTATUS; | ||
2251 | + X509_REVOKED_set_serialNumber; | ||
2252 | + X509_print_ex; | ||
2253 | + OCSP_ONEREQ_get1_ext_d2i; | ||
2254 | + ENGINE_register_all_RAND; | ||
2255 | + ENGINE_load_dynamic; | ||
2256 | + PBKDF2PARAM_it; | ||
2257 | + PBKDF2PARAM_it; | ||
2258 | + EXTENDED_KEY_USAGE_new; | ||
2259 | + EC_GROUP_clear_free; | ||
2260 | + OCSP_sendreq_bio; | ||
2261 | + ASN1_item_digest; | ||
2262 | + OCSP_BASICRESP_delete_ext; | ||
2263 | + OCSP_SIGNATURE_it; | ||
2264 | + OCSP_SIGNATURE_it; | ||
2265 | + X509_CRL_it; | ||
2266 | + X509_CRL_it; | ||
2267 | + OCSP_BASICRESP_add_ext; | ||
2268 | + KRB5_ENCKEY_it; | ||
2269 | + KRB5_ENCKEY_it; | ||
2270 | + UI_method_set_closer; | ||
2271 | + X509_STORE_set_purpose; | ||
2272 | + i2d_ASN1_GENERALSTRING; | ||
2273 | + OCSP_response_status; | ||
2274 | + i2d_OCSP_SERVICELOC; | ||
2275 | + ENGINE_get_digest_engine; | ||
2276 | + EC_GROUP_set_curve_GFp; | ||
2277 | + OCSP_REQUEST_get_ext_by_OBJ; | ||
2278 | + _ossl_old_des_random_key; | ||
2279 | + ASN1_T61STRING_it; | ||
2280 | + ASN1_T61STRING_it; | ||
2281 | + EC_GROUP_method_of; | ||
2282 | + i2d_KRB5_APREQ; | ||
2283 | + _ossl_old_des_encrypt; | ||
2284 | + ASN1_PRINTABLE_new; | ||
2285 | + HMAC_Init_ex; | ||
2286 | + d2i_KRB5_AUTHENT; | ||
2287 | + OCSP_archive_cutoff_new; | ||
2288 | + EC_POINT_set_Jprojective_coordinates_GFp; | ||
2289 | + EC_POINT_set_Jproj_coords_GFp; | ||
2290 | + _ossl_old_des_is_weak_key; | ||
2291 | + OCSP_BASICRESP_get_ext_by_OBJ; | ||
2292 | + EC_POINT_oct2point; | ||
2293 | + OCSP_SINGLERESP_get_ext_count; | ||
2294 | + UI_ctrl; | ||
2295 | + _shadow_DES_rw_mode; | ||
2296 | + _shadow_DES_rw_mode; | ||
2297 | + asn1_do_adb; | ||
2298 | + ASN1_template_i2d; | ||
2299 | + ENGINE_register_DH; | ||
2300 | + UI_construct_prompt; | ||
2301 | + X509_STORE_set_trust; | ||
2302 | + UI_dup_input_string; | ||
2303 | + d2i_KRB5_APREQ; | ||
2304 | + EVP_MD_CTX_copy_ex; | ||
2305 | + OCSP_request_is_signed; | ||
2306 | + i2d_OCSP_REQINFO; | ||
2307 | + KRB5_ENCKEY_free; | ||
2308 | + OCSP_resp_get0; | ||
2309 | + GENERAL_NAME_it; | ||
2310 | + GENERAL_NAME_it; | ||
2311 | + ASN1_GENERALIZEDTIME_it; | ||
2312 | + ASN1_GENERALIZEDTIME_it; | ||
2313 | + X509_STORE_set_flags; | ||
2314 | + EC_POINT_set_compressed_coordinates_GFp; | ||
2315 | + EC_POINT_set_compr_coords_GFp; | ||
2316 | + OCSP_response_status_str; | ||
2317 | + d2i_OCSP_REVOKEDINFO; | ||
2318 | + OCSP_basic_add1_cert; | ||
2319 | + ERR_get_implementation; | ||
2320 | + EVP_CipherFinal_ex; | ||
2321 | + OCSP_CERTSTATUS_new; | ||
2322 | + CRYPTO_cleanup_all_ex_data; | ||
2323 | + OCSP_resp_find; | ||
2324 | + BN_nnmod; | ||
2325 | + X509_CRL_sort; | ||
2326 | + X509_REVOKED_set_revocationDate; | ||
2327 | + ENGINE_register_RAND; | ||
2328 | + OCSP_SERVICELOC_new; | ||
2329 | + EC_POINT_set_affine_coordinates_GFp; | ||
2330 | + EC_POINT_set_affine_coords_GFp; | ||
2331 | + _ossl_old_des_options; | ||
2332 | + SXNET_it; | ||
2333 | + SXNET_it; | ||
2334 | + UI_dup_input_boolean; | ||
2335 | + PKCS12_add_CSPName_asc; | ||
2336 | + EC_POINT_is_at_infinity; | ||
2337 | + ENGINE_load_cryptodev; | ||
2338 | + DSO_convert_filename; | ||
2339 | + POLICYQUALINFO_it; | ||
2340 | + POLICYQUALINFO_it; | ||
2341 | + ENGINE_register_ciphers; | ||
2342 | + BN_mod_lshift_quick; | ||
2343 | + DSO_set_filename; | ||
2344 | + ASN1_item_free; | ||
2345 | + KRB5_TKTBODY_free; | ||
2346 | + AUTHORITY_KEYID_it; | ||
2347 | + AUTHORITY_KEYID_it; | ||
2348 | + KRB5_APREQBODY_new; | ||
2349 | + X509V3_EXT_REQ_add_nconf; | ||
2350 | + ENGINE_ctrl_cmd_string; | ||
2351 | + i2d_OCSP_RESPDATA; | ||
2352 | + EVP_MD_CTX_init; | ||
2353 | + EXTENDED_KEY_USAGE_free; | ||
2354 | + PKCS7_ATTR_SIGN_it; | ||
2355 | + PKCS7_ATTR_SIGN_it; | ||
2356 | + UI_add_error_string; | ||
2357 | + KRB5_CHECKSUM_free; | ||
2358 | + OCSP_REQUEST_get_ext; | ||
2359 | + ENGINE_load_ubsec; | ||
2360 | + ENGINE_register_all_digests; | ||
2361 | + PKEY_USAGE_PERIOD_it; | ||
2362 | + PKEY_USAGE_PERIOD_it; | ||
2363 | + PKCS12_unpack_authsafes; | ||
2364 | + ASN1_item_unpack; | ||
2365 | + NETSCAPE_SPKAC_it; | ||
2366 | + NETSCAPE_SPKAC_it; | ||
2367 | + X509_REVOKED_it; | ||
2368 | + X509_REVOKED_it; | ||
2369 | + ASN1_STRING_encode; | ||
2370 | + EVP_aes_128_ecb; | ||
2371 | + KRB5_AUTHENT_free; | ||
2372 | + OCSP_BASICRESP_get_ext_by_critical; | ||
2373 | + OCSP_BASICRESP_get_ext_by_crit; | ||
2374 | + OCSP_cert_status_str; | ||
2375 | + d2i_OCSP_REQUEST; | ||
2376 | + UI_dup_info_string; | ||
2377 | + _ossl_old_des_xwhite_in2out; | ||
2378 | + PKCS12_it; | ||
2379 | + PKCS12_it; | ||
2380 | + OCSP_SINGLERESP_get_ext_by_critical; | ||
2381 | + OCSP_SINGLERESP_get_ext_by_crit; | ||
2382 | + OCSP_CERTSTATUS_free; | ||
2383 | + _ossl_old_des_crypt; | ||
2384 | + ASN1_item_i2d; | ||
2385 | + EVP_DecryptFinal_ex; | ||
2386 | + ENGINE_load_openssl; | ||
2387 | + ENGINE_get_cmd_defns; | ||
2388 | + ENGINE_set_load_privkey_function; | ||
2389 | + ENGINE_set_load_privkey_fn; | ||
2390 | + EVP_EncryptFinal_ex; | ||
2391 | + ENGINE_set_default_digests; | ||
2392 | + X509_get0_pubkey_bitstr; | ||
2393 | + asn1_ex_i2c; | ||
2394 | + ENGINE_register_RSA; | ||
2395 | + ENGINE_unregister_DSA; | ||
2396 | + _ossl_old_des_key_sched; | ||
2397 | + X509_EXTENSION_it; | ||
2398 | + X509_EXTENSION_it; | ||
2399 | + i2d_KRB5_AUTHENT; | ||
2400 | + SXNETID_it; | ||
2401 | + SXNETID_it; | ||
2402 | + d2i_OCSP_SINGLERESP; | ||
2403 | + EDIPARTYNAME_new; | ||
2404 | + PKCS12_certbag2x509; | ||
2405 | + _ossl_old_des_ofb64_encrypt; | ||
2406 | + d2i_EXTENDED_KEY_USAGE; | ||
2407 | + ERR_print_errors_cb; | ||
2408 | + ENGINE_set_ciphers; | ||
2409 | + d2i_KRB5_APREQBODY; | ||
2410 | + UI_method_get_flusher; | ||
2411 | + X509_PUBKEY_it; | ||
2412 | + X509_PUBKEY_it; | ||
2413 | + _ossl_old_des_enc_read; | ||
2414 | + PKCS7_ENCRYPT_it; | ||
2415 | + PKCS7_ENCRYPT_it; | ||
2416 | + i2d_OCSP_RESPONSE; | ||
2417 | + EC_GROUP_get_cofactor; | ||
2418 | + PKCS12_unpack_p7data; | ||
2419 | + d2i_KRB5_AUTHDATA; | ||
2420 | + OCSP_copy_nonce; | ||
2421 | + KRB5_AUTHDATA_new; | ||
2422 | + OCSP_RESPDATA_new; | ||
2423 | + EC_GFp_mont_method; | ||
2424 | + OCSP_REVOKEDINFO_free; | ||
2425 | + UI_get_ex_data; | ||
2426 | + KRB5_APREQBODY_free; | ||
2427 | + EC_GROUP_get0_generator; | ||
2428 | + UI_get_default_method; | ||
2429 | + X509V3_set_nconf; | ||
2430 | + PKCS12_item_i2d_encrypt; | ||
2431 | + X509_add1_ext_i2d; | ||
2432 | + PKCS7_SIGNER_INFO_it; | ||
2433 | + PKCS7_SIGNER_INFO_it; | ||
2434 | + KRB5_PRINCNAME_new; | ||
2435 | + PKCS12_SAFEBAG_it; | ||
2436 | + PKCS12_SAFEBAG_it; | ||
2437 | + EC_GROUP_get_order; | ||
2438 | + d2i_OCSP_RESPID; | ||
2439 | + OCSP_request_verify; | ||
2440 | + NCONF_get_number_e; | ||
2441 | + _ossl_old_des_decrypt3; | ||
2442 | + X509_signature_print; | ||
2443 | + OCSP_SINGLERESP_free; | ||
2444 | + ENGINE_load_builtin_engines; | ||
2445 | + i2d_OCSP_ONEREQ; | ||
2446 | + OCSP_REQUEST_add_ext; | ||
2447 | + OCSP_RESPBYTES_new; | ||
2448 | + EVP_MD_CTX_create; | ||
2449 | + OCSP_resp_find_status; | ||
2450 | + X509_ALGOR_it; | ||
2451 | + X509_ALGOR_it; | ||
2452 | + ASN1_TIME_it; | ||
2453 | + ASN1_TIME_it; | ||
2454 | + OCSP_request_set1_name; | ||
2455 | + OCSP_ONEREQ_get_ext_count; | ||
2456 | + UI_get0_result; | ||
2457 | + PKCS12_AUTHSAFES_it; | ||
2458 | + PKCS12_AUTHSAFES_it; | ||
2459 | + EVP_aes_256_ecb; | ||
2460 | + PKCS12_pack_authsafes; | ||
2461 | + ASN1_IA5STRING_it; | ||
2462 | + ASN1_IA5STRING_it; | ||
2463 | + UI_get_input_flags; | ||
2464 | + EC_GROUP_set_generator; | ||
2465 | + _ossl_old_des_string_to_2keys; | ||
2466 | + OCSP_CERTID_free; | ||
2467 | + X509_CERT_AUX_it; | ||
2468 | + X509_CERT_AUX_it; | ||
2469 | + CERTIFICATEPOLICIES_it; | ||
2470 | + CERTIFICATEPOLICIES_it; | ||
2471 | + _ossl_old_des_ede3_cbc_encrypt; | ||
2472 | + RAND_set_rand_engine; | ||
2473 | + DSO_get_loaded_filename; | ||
2474 | + X509_ATTRIBUTE_it; | ||
2475 | + X509_ATTRIBUTE_it; | ||
2476 | + OCSP_ONEREQ_get_ext_by_NID; | ||
2477 | + PKCS12_decrypt_skey; | ||
2478 | + KRB5_AUTHENT_it; | ||
2479 | + KRB5_AUTHENT_it; | ||
2480 | + UI_dup_error_string; | ||
2481 | + RSAPublicKey_it; | ||
2482 | + RSAPublicKey_it; | ||
2483 | + i2d_OCSP_REQUEST; | ||
2484 | + PKCS12_x509crl2certbag; | ||
2485 | + OCSP_SERVICELOC_it; | ||
2486 | + OCSP_SERVICELOC_it; | ||
2487 | + ASN1_item_sign; | ||
2488 | + X509_CRL_set_issuer_name; | ||
2489 | + OBJ_NAME_do_all_sorted; | ||
2490 | + i2d_OCSP_BASICRESP; | ||
2491 | + i2d_OCSP_RESPBYTES; | ||
2492 | + PKCS12_unpack_p7encdata; | ||
2493 | + HMAC_CTX_init; | ||
2494 | + ENGINE_get_digest; | ||
2495 | + OCSP_RESPONSE_print; | ||
2496 | + KRB5_TKTBODY_it; | ||
2497 | + KRB5_TKTBODY_it; | ||
2498 | + ACCESS_DESCRIPTION_it; | ||
2499 | + ACCESS_DESCRIPTION_it; | ||
2500 | + PKCS7_ISSUER_AND_SERIAL_it; | ||
2501 | + PKCS7_ISSUER_AND_SERIAL_it; | ||
2502 | + PBE2PARAM_it; | ||
2503 | + PBE2PARAM_it; | ||
2504 | + PKCS12_certbag2x509crl; | ||
2505 | + PKCS7_SIGNED_it; | ||
2506 | + PKCS7_SIGNED_it; | ||
2507 | + ENGINE_get_cipher; | ||
2508 | + i2d_OCSP_CRLID; | ||
2509 | + OCSP_SINGLERESP_new; | ||
2510 | + ENGINE_cmd_is_executable; | ||
2511 | + RSA_up_ref; | ||
2512 | + ASN1_GENERALSTRING_it; | ||
2513 | + ASN1_GENERALSTRING_it; | ||
2514 | + ENGINE_register_DSA; | ||
2515 | + X509V3_EXT_add_nconf_sk; | ||
2516 | + ENGINE_set_load_pubkey_function; | ||
2517 | + PKCS8_decrypt; | ||
2518 | + PEM_bytes_read_bio; | ||
2519 | + DIRECTORYSTRING_it; | ||
2520 | + DIRECTORYSTRING_it; | ||
2521 | + d2i_OCSP_CRLID; | ||
2522 | + EC_POINT_is_on_curve; | ||
2523 | + CRYPTO_set_locked_mem_ex_functions; | ||
2524 | + CRYPTO_set_locked_mem_ex_funcs; | ||
2525 | + d2i_KRB5_CHECKSUM; | ||
2526 | + ASN1_item_dup; | ||
2527 | + X509_it; | ||
2528 | + X509_it; | ||
2529 | + BN_mod_add; | ||
2530 | + KRB5_AUTHDATA_free; | ||
2531 | + _ossl_old_des_cbc_cksum; | ||
2532 | + ASN1_item_verify; | ||
2533 | + CRYPTO_set_mem_ex_functions; | ||
2534 | + EC_POINT_get_Jprojective_coordinates_GFp; | ||
2535 | + EC_POINT_get_Jproj_coords_GFp; | ||
2536 | + ZLONG_it; | ||
2537 | + ZLONG_it; | ||
2538 | + CRYPTO_get_locked_mem_ex_functions; | ||
2539 | + CRYPTO_get_locked_mem_ex_funcs; | ||
2540 | + ASN1_TIME_check; | ||
2541 | + UI_get0_user_data; | ||
2542 | + HMAC_CTX_cleanup; | ||
2543 | + DSA_up_ref; | ||
2544 | + _ossl_old_des_ede3_cfb64_encrypt; | ||
2545 | + _ossl_odes_ede3_cfb64_encrypt; | ||
2546 | + ASN1_BMPSTRING_it; | ||
2547 | + ASN1_BMPSTRING_it; | ||
2548 | + ASN1_tag2bit; | ||
2549 | + UI_method_set_flusher; | ||
2550 | + X509_ocspid_print; | ||
2551 | + KRB5_ENCDATA_it; | ||
2552 | + KRB5_ENCDATA_it; | ||
2553 | + ENGINE_get_load_pubkey_function; | ||
2554 | + UI_add_user_data; | ||
2555 | + OCSP_REQUEST_delete_ext; | ||
2556 | + UI_get_method; | ||
2557 | + OCSP_ONEREQ_free; | ||
2558 | + ASN1_PRINTABLESTRING_it; | ||
2559 | + ASN1_PRINTABLESTRING_it; | ||
2560 | + X509_CRL_set_nextUpdate; | ||
2561 | + OCSP_REQUEST_it; | ||
2562 | + OCSP_REQUEST_it; | ||
2563 | + OCSP_BASICRESP_it; | ||
2564 | + OCSP_BASICRESP_it; | ||
2565 | + AES_ecb_encrypt; | ||
2566 | + BN_mod_sqr; | ||
2567 | + NETSCAPE_CERT_SEQUENCE_it; | ||
2568 | + NETSCAPE_CERT_SEQUENCE_it; | ||
2569 | + GENERAL_NAMES_it; | ||
2570 | + GENERAL_NAMES_it; | ||
2571 | + AUTHORITY_INFO_ACCESS_it; | ||
2572 | + AUTHORITY_INFO_ACCESS_it; | ||
2573 | + ASN1_FBOOLEAN_it; | ||
2574 | + ASN1_FBOOLEAN_it; | ||
2575 | + UI_set_ex_data; | ||
2576 | + _ossl_old_des_string_to_key; | ||
2577 | + ENGINE_register_all_RSA; | ||
2578 | + d2i_KRB5_PRINCNAME; | ||
2579 | + OCSP_RESPBYTES_it; | ||
2580 | + OCSP_RESPBYTES_it; | ||
2581 | + X509_CINF_it; | ||
2582 | + X509_CINF_it; | ||
2583 | + ENGINE_unregister_digests; | ||
2584 | + d2i_EDIPARTYNAME; | ||
2585 | + d2i_OCSP_SERVICELOC; | ||
2586 | + ENGINE_get_digests; | ||
2587 | + _ossl_old_des_set_odd_parity; | ||
2588 | + OCSP_RESPDATA_free; | ||
2589 | + d2i_KRB5_TICKET; | ||
2590 | + OTHERNAME_it; | ||
2591 | + OTHERNAME_it; | ||
2592 | + EVP_MD_CTX_cleanup; | ||
2593 | + d2i_ASN1_GENERALSTRING; | ||
2594 | + X509_CRL_set_version; | ||
2595 | + BN_mod_sub; | ||
2596 | + OCSP_SINGLERESP_get_ext_by_NID; | ||
2597 | + ENGINE_get_ex_new_index; | ||
2598 | + OCSP_REQUEST_free; | ||
2599 | + OCSP_REQUEST_add1_ext_i2d; | ||
2600 | + X509_VAL_it; | ||
2601 | + X509_VAL_it; | ||
2602 | + EC_POINTs_make_affine; | ||
2603 | + EC_POINT_mul; | ||
2604 | + X509V3_EXT_add_nconf; | ||
2605 | + X509_TRUST_set; | ||
2606 | + X509_CRL_add1_ext_i2d; | ||
2607 | + _ossl_old_des_fcrypt; | ||
2608 | + DISPLAYTEXT_it; | ||
2609 | + DISPLAYTEXT_it; | ||
2610 | + X509_CRL_set_lastUpdate; | ||
2611 | + OCSP_BASICRESP_free; | ||
2612 | + OCSP_BASICRESP_add1_ext_i2d; | ||
2613 | + d2i_KRB5_AUTHENTBODY; | ||
2614 | + CRYPTO_set_ex_data_implementation; | ||
2615 | + CRYPTO_set_ex_data_impl; | ||
2616 | + KRB5_ENCDATA_new; | ||
2617 | + DSO_up_ref; | ||
2618 | + OCSP_crl_reason_str; | ||
2619 | + UI_get0_result_string; | ||
2620 | + ASN1_GENERALSTRING_new; | ||
2621 | + X509_SIG_it; | ||
2622 | + X509_SIG_it; | ||
2623 | + ERR_set_implementation; | ||
2624 | + ERR_load_EC_strings; | ||
2625 | + UI_get0_action_string; | ||
2626 | + OCSP_ONEREQ_get_ext; | ||
2627 | + EC_POINT_method_of; | ||
2628 | + i2d_KRB5_APREQBODY; | ||
2629 | + _ossl_old_des_ecb3_encrypt; | ||
2630 | + CRYPTO_get_mem_ex_functions; | ||
2631 | + ENGINE_get_ex_data; | ||
2632 | + UI_destroy_method; | ||
2633 | + ASN1_item_i2d_bio; | ||
2634 | + OCSP_ONEREQ_get_ext_by_OBJ; | ||
2635 | + ASN1_primitive_new; | ||
2636 | + ASN1_PRINTABLE_it; | ||
2637 | + ASN1_PRINTABLE_it; | ||
2638 | + EVP_aes_192_ecb; | ||
2639 | + OCSP_SIGNATURE_new; | ||
2640 | + LONG_it; | ||
2641 | + LONG_it; | ||
2642 | + ASN1_VISIBLESTRING_it; | ||
2643 | + ASN1_VISIBLESTRING_it; | ||
2644 | + OCSP_SINGLERESP_add1_ext_i2d; | ||
2645 | + d2i_OCSP_CERTID; | ||
2646 | + ASN1_item_d2i_fp; | ||
2647 | + CRL_DIST_POINTS_it; | ||
2648 | + CRL_DIST_POINTS_it; | ||
2649 | + GENERAL_NAME_print; | ||
2650 | + OCSP_SINGLERESP_delete_ext; | ||
2651 | + PKCS12_SAFEBAGS_it; | ||
2652 | + PKCS12_SAFEBAGS_it; | ||
2653 | + d2i_OCSP_SIGNATURE; | ||
2654 | + OCSP_request_add1_nonce; | ||
2655 | + ENGINE_set_cmd_defns; | ||
2656 | + OCSP_SERVICELOC_free; | ||
2657 | + EC_GROUP_free; | ||
2658 | + ASN1_BIT_STRING_it; | ||
2659 | + ASN1_BIT_STRING_it; | ||
2660 | + X509_REQ_it; | ||
2661 | + X509_REQ_it; | ||
2662 | + _ossl_old_des_cbc_encrypt; | ||
2663 | + ERR_unload_strings; | ||
2664 | + PKCS7_SIGN_ENVELOPE_it; | ||
2665 | + PKCS7_SIGN_ENVELOPE_it; | ||
2666 | + EDIPARTYNAME_free; | ||
2667 | + OCSP_REQINFO_free; | ||
2668 | + EC_GROUP_new_curve_GFp; | ||
2669 | + OCSP_REQUEST_get1_ext_d2i; | ||
2670 | + PKCS12_item_pack_safebag; | ||
2671 | + asn1_ex_c2i; | ||
2672 | + ENGINE_register_digests; | ||
2673 | + i2d_OCSP_REVOKEDINFO; | ||
2674 | + asn1_enc_restore; | ||
2675 | + UI_free; | ||
2676 | + UI_new_method; | ||
2677 | + EVP_EncryptInit_ex; | ||
2678 | + X509_pubkey_digest; | ||
2679 | + EC_POINT_invert; | ||
2680 | + OCSP_basic_sign; | ||
2681 | + i2d_OCSP_RESPID; | ||
2682 | + OCSP_check_nonce; | ||
2683 | + ENGINE_ctrl_cmd; | ||
2684 | + d2i_KRB5_ENCKEY; | ||
2685 | + OCSP_parse_url; | ||
2686 | + OCSP_SINGLERESP_get_ext; | ||
2687 | + OCSP_CRLID_free; | ||
2688 | + OCSP_BASICRESP_get1_ext_d2i; | ||
2689 | + RSAPrivateKey_it; | ||
2690 | + RSAPrivateKey_it; | ||
2691 | + ENGINE_register_all_DH; | ||
2692 | + i2d_EDIPARTYNAME; | ||
2693 | + EC_POINT_get_affine_coordinates_GFp; | ||
2694 | + EC_POINT_get_affine_coords_GFp; | ||
2695 | + OCSP_CRLID_new; | ||
2696 | + ENGINE_get_flags; | ||
2697 | + OCSP_ONEREQ_it; | ||
2698 | + OCSP_ONEREQ_it; | ||
2699 | + UI_process; | ||
2700 | + ASN1_INTEGER_it; | ||
2701 | + ASN1_INTEGER_it; | ||
2702 | + EVP_CipherInit_ex; | ||
2703 | + UI_get_string_type; | ||
2704 | + ENGINE_unregister_DH; | ||
2705 | + ENGINE_register_all_DSA; | ||
2706 | + OCSP_ONEREQ_get_ext_by_critical; | ||
2707 | + bn_dup_expand; | ||
2708 | + OCSP_cert_id_new; | ||
2709 | + BASIC_CONSTRAINTS_it; | ||
2710 | + BASIC_CONSTRAINTS_it; | ||
2711 | + BN_mod_add_quick; | ||
2712 | + EC_POINT_new; | ||
2713 | + EVP_MD_CTX_destroy; | ||
2714 | + OCSP_RESPBYTES_free; | ||
2715 | + EVP_aes_128_cbc; | ||
2716 | + OCSP_SINGLERESP_get1_ext_d2i; | ||
2717 | + EC_POINT_free; | ||
2718 | + DH_up_ref; | ||
2719 | + X509_NAME_ENTRY_it; | ||
2720 | + X509_NAME_ENTRY_it; | ||
2721 | + UI_get_ex_new_index; | ||
2722 | + BN_mod_sub_quick; | ||
2723 | + OCSP_ONEREQ_add_ext; | ||
2724 | + OCSP_request_sign; | ||
2725 | + EVP_DigestFinal_ex; | ||
2726 | + ENGINE_set_digests; | ||
2727 | + OCSP_id_issuer_cmp; | ||
2728 | + OBJ_NAME_do_all; | ||
2729 | + EC_POINTs_mul; | ||
2730 | + ENGINE_register_complete; | ||
2731 | + X509V3_EXT_nconf_nid; | ||
2732 | + ASN1_SEQUENCE_it; | ||
2733 | + ASN1_SEQUENCE_it; | ||
2734 | + UI_set_default_method; | ||
2735 | + RAND_query_egd_bytes; | ||
2736 | + UI_method_get_writer; | ||
2737 | + UI_OpenSSL; | ||
2738 | + PEM_def_callback; | ||
2739 | + ENGINE_cleanup; | ||
2740 | + DIST_POINT_it; | ||
2741 | + DIST_POINT_it; | ||
2742 | + OCSP_SINGLERESP_it; | ||
2743 | + OCSP_SINGLERESP_it; | ||
2744 | + d2i_KRB5_TKTBODY; | ||
2745 | + EC_POINT_cmp; | ||
2746 | + OCSP_REVOKEDINFO_new; | ||
2747 | + i2d_OCSP_CERTSTATUS; | ||
2748 | + OCSP_basic_add1_nonce; | ||
2749 | + ASN1_item_ex_d2i; | ||
2750 | + BN_mod_lshift1_quick; | ||
2751 | + UI_set_method; | ||
2752 | + OCSP_id_get0_info; | ||
2753 | + BN_mod_sqrt; | ||
2754 | + EC_GROUP_copy; | ||
2755 | + KRB5_ENCDATA_free; | ||
2756 | + _ossl_old_des_cfb_encrypt; | ||
2757 | + OCSP_SINGLERESP_get_ext_by_OBJ; | ||
2758 | + OCSP_cert_to_id; | ||
2759 | + OCSP_RESPID_new; | ||
2760 | + OCSP_RESPDATA_it; | ||
2761 | + OCSP_RESPDATA_it; | ||
2762 | + d2i_OCSP_RESPDATA; | ||
2763 | + ENGINE_register_all_complete; | ||
2764 | + OCSP_check_validity; | ||
2765 | + PKCS12_BAGS_it; | ||
2766 | + PKCS12_BAGS_it; | ||
2767 | + OCSP_url_svcloc_new; | ||
2768 | + ASN1_template_free; | ||
2769 | + OCSP_SINGLERESP_add_ext; | ||
2770 | + KRB5_AUTHENTBODY_it; | ||
2771 | + KRB5_AUTHENTBODY_it; | ||
2772 | + X509_supported_extension; | ||
2773 | + i2d_KRB5_AUTHDATA; | ||
2774 | + UI_method_get_opener; | ||
2775 | + ENGINE_set_ex_data; | ||
2776 | + OCSP_REQUEST_print; | ||
2777 | + CBIGNUM_it; | ||
2778 | + CBIGNUM_it; | ||
2779 | + KRB5_TICKET_new; | ||
2780 | + KRB5_APREQ_new; | ||
2781 | + EC_GROUP_get_curve_GFp; | ||
2782 | + KRB5_ENCKEY_new; | ||
2783 | + ASN1_template_d2i; | ||
2784 | + _ossl_old_des_quad_cksum; | ||
2785 | + OCSP_single_get0_status; | ||
2786 | + BN_swap; | ||
2787 | + POLICYINFO_it; | ||
2788 | + POLICYINFO_it; | ||
2789 | + ENGINE_set_destroy_function; | ||
2790 | + asn1_enc_free; | ||
2791 | + OCSP_RESPID_it; | ||
2792 | + OCSP_RESPID_it; | ||
2793 | + EC_GROUP_new; | ||
2794 | + EVP_aes_256_cbc; | ||
2795 | + i2d_KRB5_PRINCNAME; | ||
2796 | + _ossl_old_des_encrypt2; | ||
2797 | + _ossl_old_des_encrypt3; | ||
2798 | + PKCS8_PRIV_KEY_INFO_it; | ||
2799 | + PKCS8_PRIV_KEY_INFO_it; | ||
2800 | + OCSP_REQINFO_it; | ||
2801 | + OCSP_REQINFO_it; | ||
2802 | + PBEPARAM_it; | ||
2803 | + PBEPARAM_it; | ||
2804 | + KRB5_AUTHENTBODY_new; | ||
2805 | + X509_CRL_add0_revoked; | ||
2806 | + EDIPARTYNAME_it; | ||
2807 | + EDIPARTYNAME_it; | ||
2808 | + NETSCAPE_SPKI_it; | ||
2809 | + NETSCAPE_SPKI_it; | ||
2810 | + UI_get0_test_string; | ||
2811 | + ENGINE_get_cipher_engine; | ||
2812 | + ENGINE_register_all_ciphers; | ||
2813 | + EC_POINT_copy; | ||
2814 | + BN_kronecker; | ||
2815 | + _ossl_old_des_ede3_ofb64_encrypt; | ||
2816 | + _ossl_odes_ede3_ofb64_encrypt; | ||
2817 | + UI_method_get_reader; | ||
2818 | + OCSP_BASICRESP_get_ext_count; | ||
2819 | + ASN1_ENUMERATED_it; | ||
2820 | + ASN1_ENUMERATED_it; | ||
2821 | + UI_set_result; | ||
2822 | + i2d_KRB5_TICKET; | ||
2823 | + X509_print_ex_fp; | ||
2824 | + EVP_CIPHER_CTX_set_padding; | ||
2825 | + d2i_OCSP_RESPONSE; | ||
2826 | + ASN1_UTCTIME_it; | ||
2827 | + ASN1_UTCTIME_it; | ||
2828 | + _ossl_old_des_enc_write; | ||
2829 | + OCSP_RESPONSE_new; | ||
2830 | + AES_set_encrypt_key; | ||
2831 | + OCSP_resp_count; | ||
2832 | + KRB5_CHECKSUM_new; | ||
2833 | + ENGINE_load_cswift; | ||
2834 | + OCSP_onereq_get0_id; | ||
2835 | + ENGINE_set_default_ciphers; | ||
2836 | + NOTICEREF_it; | ||
2837 | + NOTICEREF_it; | ||
2838 | + X509V3_EXT_CRL_add_nconf; | ||
2839 | + OCSP_REVOKEDINFO_it; | ||
2840 | + OCSP_REVOKEDINFO_it; | ||
2841 | + AES_encrypt; | ||
2842 | + OCSP_REQUEST_new; | ||
2843 | + ASN1_ANY_it; | ||
2844 | + ASN1_ANY_it; | ||
2845 | + CRYPTO_ex_data_new_class; | ||
2846 | + _ossl_old_des_ncbc_encrypt; | ||
2847 | + i2d_KRB5_TKTBODY; | ||
2848 | + EC_POINT_clear_free; | ||
2849 | + AES_decrypt; | ||
2850 | + asn1_enc_init; | ||
2851 | + UI_get_result_maxsize; | ||
2852 | + OCSP_CERTID_new; | ||
2853 | + ENGINE_unregister_RAND; | ||
2854 | + UI_method_get_closer; | ||
2855 | + d2i_KRB5_ENCDATA; | ||
2856 | + OCSP_request_onereq_count; | ||
2857 | + OCSP_basic_verify; | ||
2858 | + KRB5_AUTHENTBODY_free; | ||
2859 | + ASN1_item_d2i; | ||
2860 | + ASN1_primitive_free; | ||
2861 | + i2d_EXTENDED_KEY_USAGE; | ||
2862 | + i2d_OCSP_SIGNATURE; | ||
2863 | + asn1_enc_save; | ||
2864 | + ENGINE_load_nuron; | ||
2865 | + _ossl_old_des_pcbc_encrypt; | ||
2866 | + PKCS12_MAC_DATA_it; | ||
2867 | + PKCS12_MAC_DATA_it; | ||
2868 | + OCSP_accept_responses_new; | ||
2869 | + asn1_do_lock; | ||
2870 | + PKCS7_ATTR_VERIFY_it; | ||
2871 | + PKCS7_ATTR_VERIFY_it; | ||
2872 | + KRB5_APREQBODY_it; | ||
2873 | + KRB5_APREQBODY_it; | ||
2874 | + i2d_OCSP_SINGLERESP; | ||
2875 | + ASN1_item_ex_new; | ||
2876 | + UI_add_verify_string; | ||
2877 | + _ossl_old_des_set_key; | ||
2878 | + KRB5_PRINCNAME_it; | ||
2879 | + KRB5_PRINCNAME_it; | ||
2880 | + EVP_DecryptInit_ex; | ||
2881 | + i2d_OCSP_CERTID; | ||
2882 | + ASN1_item_d2i_bio; | ||
2883 | + EC_POINT_dbl; | ||
2884 | + asn1_get_choice_selector; | ||
2885 | + i2d_KRB5_CHECKSUM; | ||
2886 | + ENGINE_set_table_flags; | ||
2887 | + AES_options; | ||
2888 | + ENGINE_load_chil; | ||
2889 | + OCSP_id_cmp; | ||
2890 | + OCSP_BASICRESP_new; | ||
2891 | + OCSP_REQUEST_get_ext_by_NID; | ||
2892 | + KRB5_APREQ_it; | ||
2893 | + KRB5_APREQ_it; | ||
2894 | + ENGINE_get_destroy_function; | ||
2895 | + CONF_set_nconf; | ||
2896 | + ASN1_PRINTABLE_free; | ||
2897 | + OCSP_BASICRESP_get_ext_by_NID; | ||
2898 | + DIST_POINT_NAME_it; | ||
2899 | + DIST_POINT_NAME_it; | ||
2900 | + X509V3_extensions_print; | ||
2901 | + _ossl_old_des_cfb64_encrypt; | ||
2902 | + X509_REVOKED_add1_ext_i2d; | ||
2903 | + _ossl_old_des_ofb_encrypt; | ||
2904 | + KRB5_TKTBODY_new; | ||
2905 | + ASN1_OCTET_STRING_it; | ||
2906 | + ASN1_OCTET_STRING_it; | ||
2907 | + ERR_load_UI_strings; | ||
2908 | + i2d_KRB5_ENCKEY; | ||
2909 | + ASN1_template_new; | ||
2910 | + OCSP_SIGNATURE_free; | ||
2911 | + ASN1_item_i2d_fp; | ||
2912 | + KRB5_PRINCNAME_free; | ||
2913 | + PKCS7_RECIP_INFO_it; | ||
2914 | + PKCS7_RECIP_INFO_it; | ||
2915 | + EXTENDED_KEY_USAGE_it; | ||
2916 | + EXTENDED_KEY_USAGE_it; | ||
2917 | + EC_GFp_simple_method; | ||
2918 | + EC_GROUP_precompute_mult; | ||
2919 | + OCSP_request_onereq_get0; | ||
2920 | + UI_method_set_writer; | ||
2921 | + KRB5_AUTHENT_new; | ||
2922 | + X509_CRL_INFO_it; | ||
2923 | + X509_CRL_INFO_it; | ||
2924 | + DSO_set_name_converter; | ||
2925 | + AES_set_decrypt_key; | ||
2926 | + PKCS7_DIGEST_it; | ||
2927 | + PKCS7_DIGEST_it; | ||
2928 | + PKCS12_x5092certbag; | ||
2929 | + EVP_DigestInit_ex; | ||
2930 | + i2a_ACCESS_DESCRIPTION; | ||
2931 | + OCSP_RESPONSE_it; | ||
2932 | + OCSP_RESPONSE_it; | ||
2933 | + PKCS7_ENC_CONTENT_it; | ||
2934 | + PKCS7_ENC_CONTENT_it; | ||
2935 | + OCSP_request_add0_id; | ||
2936 | + EC_POINT_make_affine; | ||
2937 | + DSO_get_filename; | ||
2938 | + OCSP_CERTSTATUS_it; | ||
2939 | + OCSP_CERTSTATUS_it; | ||
2940 | + OCSP_request_add1_cert; | ||
2941 | + UI_get0_output_string; | ||
2942 | + UI_dup_verify_string; | ||
2943 | + BN_mod_lshift; | ||
2944 | + KRB5_AUTHDATA_it; | ||
2945 | + KRB5_AUTHDATA_it; | ||
2946 | + asn1_set_choice_selector; | ||
2947 | + OCSP_basic_add1_status; | ||
2948 | + OCSP_RESPID_free; | ||
2949 | + asn1_get_field_ptr; | ||
2950 | + UI_add_input_string; | ||
2951 | + OCSP_CRLID_it; | ||
2952 | + OCSP_CRLID_it; | ||
2953 | + i2d_KRB5_AUTHENTBODY; | ||
2954 | + OCSP_REQUEST_get_ext_count; | ||
2955 | + ENGINE_load_atalla; | ||
2956 | + X509_NAME_it; | ||
2957 | + X509_NAME_it; | ||
2958 | + USERNOTICE_it; | ||
2959 | + USERNOTICE_it; | ||
2960 | + OCSP_REQINFO_new; | ||
2961 | + OCSP_BASICRESP_get_ext; | ||
2962 | + CRYPTO_get_ex_data_implementation; | ||
2963 | + CRYPTO_get_ex_data_impl; | ||
2964 | + ASN1_item_pack; | ||
2965 | + i2d_KRB5_ENCDATA; | ||
2966 | + X509_PURPOSE_set; | ||
2967 | + X509_REQ_INFO_it; | ||
2968 | + X509_REQ_INFO_it; | ||
2969 | + UI_method_set_opener; | ||
2970 | + ASN1_item_ex_free; | ||
2971 | + ASN1_BOOLEAN_it; | ||
2972 | + ASN1_BOOLEAN_it; | ||
2973 | + ENGINE_get_table_flags; | ||
2974 | + UI_create_method; | ||
2975 | + OCSP_ONEREQ_add1_ext_i2d; | ||
2976 | + _shadow_DES_check_key; | ||
2977 | + _shadow_DES_check_key; | ||
2978 | + d2i_OCSP_REQINFO; | ||
2979 | + UI_add_info_string; | ||
2980 | + UI_get_result_minsize; | ||
2981 | + ASN1_NULL_it; | ||
2982 | + ASN1_NULL_it; | ||
2983 | + BN_mod_lshift1; | ||
2984 | + d2i_OCSP_ONEREQ; | ||
2985 | + OCSP_ONEREQ_new; | ||
2986 | + KRB5_TICKET_it; | ||
2987 | + KRB5_TICKET_it; | ||
2988 | + EVP_aes_192_cbc; | ||
2989 | + KRB5_TICKET_free; | ||
2990 | + UI_new; | ||
2991 | + OCSP_response_create; | ||
2992 | + _ossl_old_des_xcbc_encrypt; | ||
2993 | + PKCS7_it; | ||
2994 | + PKCS7_it; | ||
2995 | + OCSP_REQUEST_get_ext_by_critical; | ||
2996 | + OCSP_REQUEST_get_ext_by_crit; | ||
2997 | + ENGINE_set_flags; | ||
2998 | + _ossl_old_des_ecb_encrypt; | ||
2999 | + OCSP_response_get1_basic; | ||
3000 | + EVP_Digest; | ||
3001 | + OCSP_ONEREQ_delete_ext; | ||
3002 | + ASN1_TBOOLEAN_it; | ||
3003 | + ASN1_TBOOLEAN_it; | ||
3004 | + ASN1_item_new; | ||
3005 | + ASN1_TIME_to_generalizedtime; | ||
3006 | + BIGNUM_it; | ||
3007 | + BIGNUM_it; | ||
3008 | + AES_cbc_encrypt; | ||
3009 | + ENGINE_get_load_privkey_function; | ||
3010 | + ENGINE_get_load_privkey_fn; | ||
3011 | + OCSP_RESPONSE_free; | ||
3012 | + UI_method_set_reader; | ||
3013 | + i2d_ASN1_T61STRING; | ||
3014 | + EC_POINT_set_to_infinity; | ||
3015 | + ERR_load_OCSP_strings; | ||
3016 | + EC_POINT_point2oct; | ||
3017 | + KRB5_APREQ_free; | ||
3018 | + ASN1_OBJECT_it; | ||
3019 | + ASN1_OBJECT_it; | ||
3020 | + OCSP_crlID_new; | ||
3021 | + OCSP_crlID2_new; | ||
3022 | + CONF_modules_load_file; | ||
3023 | + CONF_imodule_set_usr_data; | ||
3024 | + ENGINE_set_default_string; | ||
3025 | + CONF_module_get_usr_data; | ||
3026 | + ASN1_add_oid_module; | ||
3027 | + CONF_modules_finish; | ||
3028 | + OPENSSL_config; | ||
3029 | + CONF_modules_unload; | ||
3030 | + CONF_imodule_get_value; | ||
3031 | + CONF_module_set_usr_data; | ||
3032 | + CONF_parse_list; | ||
3033 | + CONF_module_add; | ||
3034 | + CONF_get1_default_config_file; | ||
3035 | + CONF_imodule_get_flags; | ||
3036 | + CONF_imodule_get_module; | ||
3037 | + CONF_modules_load; | ||
3038 | + CONF_imodule_get_name; | ||
3039 | + ERR_peek_top_error; | ||
3040 | + CONF_imodule_get_usr_data; | ||
3041 | + CONF_imodule_set_flags; | ||
3042 | + ENGINE_add_conf_module; | ||
3043 | + ERR_peek_last_error_line; | ||
3044 | + ERR_peek_last_error_line_data; | ||
3045 | + ERR_peek_last_error; | ||
3046 | + DES_read_2passwords; | ||
3047 | + DES_read_password; | ||
3048 | + UI_UTIL_read_pw; | ||
3049 | + UI_UTIL_read_pw_string; | ||
3050 | + ENGINE_load_aep; | ||
3051 | + ENGINE_load_sureware; | ||
3052 | + OPENSSL_add_all_algorithms_noconf; | ||
3053 | + OPENSSL_add_all_algo_noconf; | ||
3054 | + OPENSSL_add_all_algorithms_conf; | ||
3055 | + OPENSSL_add_all_algo_conf; | ||
3056 | + OPENSSL_load_builtin_modules; | ||
3057 | + AES_ofb128_encrypt; | ||
3058 | + AES_ctr128_encrypt; | ||
3059 | + AES_cfb128_encrypt; | ||
3060 | + ENGINE_load_4758cca; | ||
3061 | + _ossl_096_des_random_seed; | ||
3062 | + EVP_aes_256_ofb; | ||
3063 | + EVP_aes_192_ofb; | ||
3064 | + EVP_aes_128_cfb128; | ||
3065 | + EVP_aes_256_cfb128; | ||
3066 | + EVP_aes_128_ofb; | ||
3067 | + EVP_aes_192_cfb128; | ||
3068 | + CONF_modules_free; | ||
3069 | + NCONF_default; | ||
3070 | + OPENSSL_no_config; | ||
3071 | + NCONF_WIN32; | ||
3072 | + ASN1_UNIVERSALSTRING_new; | ||
3073 | + EVP_des_ede_ecb; | ||
3074 | + i2d_ASN1_UNIVERSALSTRING; | ||
3075 | + ASN1_UNIVERSALSTRING_free; | ||
3076 | + ASN1_UNIVERSALSTRING_it; | ||
3077 | + ASN1_UNIVERSALSTRING_it; | ||
3078 | + d2i_ASN1_UNIVERSALSTRING; | ||
3079 | + EVP_des_ede3_ecb; | ||
3080 | + X509_REQ_print_ex; | ||
3081 | + ENGINE_up_ref; | ||
3082 | + BUF_MEM_grow_clean; | ||
3083 | + CRYPTO_realloc_clean; | ||
3084 | + BUF_strlcat; | ||
3085 | + BIO_indent; | ||
3086 | + BUF_strlcpy; | ||
3087 | + OpenSSLDie; | ||
3088 | + OPENSSL_cleanse; | ||
3089 | + ENGINE_setup_bsd_cryptodev; | ||
3090 | + ERR_release_err_state_table; | ||
3091 | + EVP_aes_128_cfb8; | ||
3092 | + FIPS_corrupt_rsa; | ||
3093 | + FIPS_selftest_des; | ||
3094 | + EVP_aes_128_cfb1; | ||
3095 | + EVP_aes_192_cfb8; | ||
3096 | + FIPS_mode_set; | ||
3097 | + FIPS_selftest_dsa; | ||
3098 | + EVP_aes_256_cfb8; | ||
3099 | + FIPS_allow_md5; | ||
3100 | + DES_ede3_cfb_encrypt; | ||
3101 | + EVP_des_ede3_cfb8; | ||
3102 | + FIPS_rand_seeded; | ||
3103 | + AES_cfbr_encrypt_block; | ||
3104 | + AES_cfb8_encrypt; | ||
3105 | + FIPS_rand_seed; | ||
3106 | + FIPS_corrupt_des; | ||
3107 | + EVP_aes_192_cfb1; | ||
3108 | + FIPS_selftest_aes; | ||
3109 | + FIPS_set_prng_key; | ||
3110 | + EVP_des_cfb8; | ||
3111 | + FIPS_corrupt_dsa; | ||
3112 | + FIPS_test_mode; | ||
3113 | + FIPS_rand_method; | ||
3114 | + EVP_aes_256_cfb1; | ||
3115 | + ERR_load_FIPS_strings; | ||
3116 | + FIPS_corrupt_aes; | ||
3117 | + FIPS_selftest_sha1; | ||
3118 | + FIPS_selftest_rsa; | ||
3119 | + FIPS_corrupt_sha1; | ||
3120 | + EVP_des_cfb1; | ||
3121 | + FIPS_dsa_check; | ||
3122 | + AES_cfb1_encrypt; | ||
3123 | + EVP_des_ede3_cfb1; | ||
3124 | + FIPS_rand_check; | ||
3125 | + FIPS_md5_allowed; | ||
3126 | + FIPS_mode; | ||
3127 | + FIPS_selftest_failed; | ||
3128 | + sk_is_sorted; | ||
3129 | + X509_check_ca; | ||
3130 | + HMAC_CTX_set_flags; | ||
3131 | + d2i_PROXY_CERT_INFO_EXTENSION; | ||
3132 | + PROXY_POLICY_it; | ||
3133 | + PROXY_POLICY_it; | ||
3134 | + i2d_PROXY_POLICY; | ||
3135 | + i2d_PROXY_CERT_INFO_EXTENSION; | ||
3136 | + d2i_PROXY_POLICY; | ||
3137 | + PROXY_CERT_INFO_EXTENSION_new; | ||
3138 | + PROXY_CERT_INFO_EXTENSION_free; | ||
3139 | + PROXY_CERT_INFO_EXTENSION_it; | ||
3140 | + PROXY_CERT_INFO_EXTENSION_it; | ||
3141 | + PROXY_POLICY_free; | ||
3142 | + PROXY_POLICY_new; | ||
3143 | + BN_MONT_CTX_set_locked; | ||
3144 | + FIPS_selftest_rng; | ||
3145 | + EVP_sha384; | ||
3146 | + EVP_sha512; | ||
3147 | + EVP_sha224; | ||
3148 | + EVP_sha256; | ||
3149 | + FIPS_selftest_hmac; | ||
3150 | + FIPS_corrupt_rng; | ||
3151 | + BN_mod_exp_mont_consttime; | ||
3152 | + RSA_X931_hash_id; | ||
3153 | + RSA_padding_check_X931; | ||
3154 | + RSA_verify_PKCS1_PSS; | ||
3155 | + RSA_padding_add_X931; | ||
3156 | + RSA_padding_add_PKCS1_PSS; | ||
3157 | + PKCS1_MGF1; | ||
3158 | + BN_X931_generate_Xpq; | ||
3159 | + RSA_X931_generate_key; | ||
3160 | + BN_X931_derive_prime; | ||
3161 | + BN_X931_generate_prime; | ||
3162 | + RSA_X931_derive; | ||
3163 | + BIO_new_dgram; | ||
3164 | + BN_get0_nist_prime_384; | ||
3165 | + ERR_set_mark; | ||
3166 | + X509_STORE_CTX_set0_crls; | ||
3167 | + ENGINE_set_STORE; | ||
3168 | + ENGINE_register_ECDSA; | ||
3169 | + STORE_meth_set_list_start_fn; | ||
3170 | + STORE_method_set_list_start_function; | ||
3171 | + BN_BLINDING_invert_ex; | ||
3172 | + NAME_CONSTRAINTS_free; | ||
3173 | + STORE_ATTR_INFO_set_number; | ||
3174 | + BN_BLINDING_get_thread_id; | ||
3175 | + X509_STORE_CTX_set0_param; | ||
3176 | + POLICY_MAPPING_it; | ||
3177 | + POLICY_MAPPING_it; | ||
3178 | + STORE_parse_attrs_start; | ||
3179 | + POLICY_CONSTRAINTS_free; | ||
3180 | + EVP_PKEY_add1_attr_by_NID; | ||
3181 | + BN_nist_mod_192; | ||
3182 | + EC_GROUP_get_trinomial_basis; | ||
3183 | + STORE_set_method; | ||
3184 | + GENERAL_SUBTREE_free; | ||
3185 | + NAME_CONSTRAINTS_it; | ||
3186 | + NAME_CONSTRAINTS_it; | ||
3187 | + ECDH_get_default_method; | ||
3188 | + PKCS12_add_safe; | ||
3189 | + EC_KEY_new_by_curve_name; | ||
3190 | + STORE_meth_get_update_store_fn; | ||
3191 | + STORE_method_get_update_store_function; | ||
3192 | + ENGINE_register_ECDH; | ||
3193 | + SHA512_Update; | ||
3194 | + i2d_ECPrivateKey; | ||
3195 | + BN_get0_nist_prime_192; | ||
3196 | + STORE_modify_certificate; | ||
3197 | + EC_POINT_set_affine_coordinates_GF2m; | ||
3198 | + EC_POINT_set_affine_coords_GF2m; | ||
3199 | + BN_GF2m_mod_exp_arr; | ||
3200 | + STORE_ATTR_INFO_modify_number; | ||
3201 | + X509_keyid_get0; | ||
3202 | + ENGINE_load_gmp; | ||
3203 | + pitem_new; | ||
3204 | + BN_GF2m_mod_mul_arr; | ||
3205 | + STORE_list_public_key_endp; | ||
3206 | + o2i_ECPublicKey; | ||
3207 | + EC_KEY_copy; | ||
3208 | + BIO_dump_fp; | ||
3209 | + X509_policy_node_get0_parent; | ||
3210 | + EC_GROUP_check_discriminant; | ||
3211 | + i2o_ECPublicKey; | ||
3212 | + EC_KEY_precompute_mult; | ||
3213 | + a2i_IPADDRESS; | ||
3214 | + STORE_meth_set_initialise_fn; | ||
3215 | + STORE_method_set_initialise_function; | ||
3216 | + X509_STORE_CTX_set_depth; | ||
3217 | + X509_VERIFY_PARAM_inherit; | ||
3218 | + EC_POINT_point2bn; | ||
3219 | + STORE_ATTR_INFO_set_dn; | ||
3220 | + X509_policy_tree_get0_policies; | ||
3221 | + EC_GROUP_new_curve_GF2m; | ||
3222 | + STORE_destroy_method; | ||
3223 | + ENGINE_unregister_STORE; | ||
3224 | + EVP_PKEY_get1_EC_KEY; | ||
3225 | + STORE_ATTR_INFO_get0_number; | ||
3226 | + ENGINE_get_default_ECDH; | ||
3227 | + EC_KEY_get_conv_form; | ||
3228 | + ASN1_OCTET_STRING_NDEF_it; | ||
3229 | + ASN1_OCTET_STRING_NDEF_it; | ||
3230 | + STORE_delete_public_key; | ||
3231 | + STORE_get_public_key; | ||
3232 | + STORE_modify_arbitrary; | ||
3233 | + ENGINE_get_static_state; | ||
3234 | + pqueue_iterator; | ||
3235 | + ECDSA_SIG_new; | ||
3236 | + OPENSSL_DIR_end; | ||
3237 | + BN_GF2m_mod_sqr; | ||
3238 | + EC_POINT_bn2point; | ||
3239 | + X509_VERIFY_PARAM_set_depth; | ||
3240 | + EC_KEY_set_asn1_flag; | ||
3241 | + STORE_get_method; | ||
3242 | + EC_KEY_get_key_method_data; | ||
3243 | + ECDSA_sign_ex; | ||
3244 | + STORE_parse_attrs_end; | ||
3245 | + EC_GROUP_get_point_conversion_form; | ||
3246 | + EC_GROUP_get_point_conv_form; | ||
3247 | + STORE_method_set_store_function; | ||
3248 | + STORE_ATTR_INFO_in; | ||
3249 | + PEM_read_bio_ECPKParameters; | ||
3250 | + EC_GROUP_get_pentanomial_basis; | ||
3251 | + EVP_PKEY_add1_attr_by_txt; | ||
3252 | + BN_BLINDING_set_flags; | ||
3253 | + X509_VERIFY_PARAM_set1_policies; | ||
3254 | + X509_VERIFY_PARAM_set1_name; | ||
3255 | + X509_VERIFY_PARAM_set_purpose; | ||
3256 | + STORE_get_number; | ||
3257 | + ECDSA_sign_setup; | ||
3258 | + BN_GF2m_mod_solve_quad_arr; | ||
3259 | + EC_KEY_up_ref; | ||
3260 | + POLICY_MAPPING_free; | ||
3261 | + BN_GF2m_mod_div; | ||
3262 | + X509_VERIFY_PARAM_set_flags; | ||
3263 | + EC_KEY_free; | ||
3264 | + STORE_meth_set_list_next_fn; | ||
3265 | + STORE_method_set_list_next_function; | ||
3266 | + PEM_write_bio_ECPrivateKey; | ||
3267 | + d2i_EC_PUBKEY; | ||
3268 | + STORE_meth_get_generate_fn; | ||
3269 | + STORE_method_get_generate_function; | ||
3270 | + STORE_meth_set_list_end_fn; | ||
3271 | + STORE_method_set_list_end_function; | ||
3272 | + pqueue_print; | ||
3273 | + EC_GROUP_have_precompute_mult; | ||
3274 | + EC_KEY_print_fp; | ||
3275 | + BN_GF2m_mod_arr; | ||
3276 | + PEM_write_bio_X509_CERT_PAIR; | ||
3277 | + EVP_PKEY_cmp; | ||
3278 | + X509_policy_level_node_count; | ||
3279 | + STORE_new_engine; | ||
3280 | + STORE_list_public_key_start; | ||
3281 | + X509_VERIFY_PARAM_new; | ||
3282 | + ECDH_get_ex_data; | ||
3283 | + EVP_PKEY_get_attr; | ||
3284 | + ECDSA_do_sign; | ||
3285 | + ENGINE_unregister_ECDH; | ||
3286 | + ECDH_OpenSSL; | ||
3287 | + EC_KEY_set_conv_form; | ||
3288 | + EC_POINT_dup; | ||
3289 | + GENERAL_SUBTREE_new; | ||
3290 | + STORE_list_crl_endp; | ||
3291 | + EC_get_builtin_curves; | ||
3292 | + X509_policy_node_get0_qualifiers; | ||
3293 | + X509_pcy_node_get0_qualifiers; | ||
3294 | + STORE_list_crl_end; | ||
3295 | + EVP_PKEY_set1_EC_KEY; | ||
3296 | + BN_GF2m_mod_sqrt_arr; | ||
3297 | + i2d_ECPrivateKey_bio; | ||
3298 | + ECPKParameters_print_fp; | ||
3299 | + pqueue_find; | ||
3300 | + ECDSA_SIG_free; | ||
3301 | + PEM_write_bio_ECPKParameters; | ||
3302 | + STORE_method_set_ctrl_function; | ||
3303 | + STORE_list_public_key_end; | ||
3304 | + EC_KEY_set_private_key; | ||
3305 | + pqueue_peek; | ||
3306 | + STORE_get_arbitrary; | ||
3307 | + STORE_store_crl; | ||
3308 | + X509_policy_node_get0_policy; | ||
3309 | + PKCS12_add_safes; | ||
3310 | + BN_BLINDING_convert_ex; | ||
3311 | + X509_policy_tree_free; | ||
3312 | + OPENSSL_ia32cap_loc; | ||
3313 | + BN_GF2m_poly2arr; | ||
3314 | + STORE_ctrl; | ||
3315 | + STORE_ATTR_INFO_compare; | ||
3316 | + BN_get0_nist_prime_224; | ||
3317 | + i2d_ECParameters; | ||
3318 | + i2d_ECPKParameters; | ||
3319 | + BN_GENCB_call; | ||
3320 | + d2i_ECPKParameters; | ||
3321 | + STORE_meth_set_generate_fn; | ||
3322 | + STORE_method_set_generate_function; | ||
3323 | + ENGINE_set_ECDH; | ||
3324 | + NAME_CONSTRAINTS_new; | ||
3325 | + SHA256_Init; | ||
3326 | + EC_KEY_get0_public_key; | ||
3327 | + PEM_write_bio_EC_PUBKEY; | ||
3328 | + STORE_ATTR_INFO_set_cstr; | ||
3329 | + STORE_list_crl_next; | ||
3330 | + STORE_ATTR_INFO_in_range; | ||
3331 | + ECParameters_print; | ||
3332 | + STORE_meth_set_delete_fn; | ||
3333 | + STORE_method_set_delete_function; | ||
3334 | + STORE_list_certificate_next; | ||
3335 | + ASN1_generate_nconf; | ||
3336 | + BUF_memdup; | ||
3337 | + BN_GF2m_mod_mul; | ||
3338 | + STORE_meth_get_list_next_fn; | ||
3339 | + STORE_method_get_list_next_function; | ||
3340 | + STORE_ATTR_INFO_get0_dn; | ||
3341 | + STORE_list_private_key_next; | ||
3342 | + EC_GROUP_set_seed; | ||
3343 | + X509_VERIFY_PARAM_set_trust; | ||
3344 | + STORE_ATTR_INFO_free; | ||
3345 | + STORE_get_private_key; | ||
3346 | + EVP_PKEY_get_attr_count; | ||
3347 | + STORE_ATTR_INFO_new; | ||
3348 | + EC_GROUP_get_curve_GF2m; | ||
3349 | + STORE_meth_set_revoke_fn; | ||
3350 | + STORE_method_set_revoke_function; | ||
3351 | + STORE_store_number; | ||
3352 | + BN_is_prime_ex; | ||
3353 | + STORE_revoke_public_key; | ||
3354 | + X509_STORE_CTX_get0_param; | ||
3355 | + STORE_delete_arbitrary; | ||
3356 | + PEM_read_X509_CERT_PAIR; | ||
3357 | + X509_STORE_set_depth; | ||
3358 | + ECDSA_get_ex_data; | ||
3359 | + SHA224; | ||
3360 | + BIO_dump_indent_fp; | ||
3361 | + EC_KEY_set_group; | ||
3362 | + BUF_strndup; | ||
3363 | + STORE_list_certificate_start; | ||
3364 | + BN_GF2m_mod; | ||
3365 | + X509_REQ_check_private_key; | ||
3366 | + EC_GROUP_get_seed_len; | ||
3367 | + ERR_load_STORE_strings; | ||
3368 | + PEM_read_bio_EC_PUBKEY; | ||
3369 | + STORE_list_private_key_end; | ||
3370 | + i2d_EC_PUBKEY; | ||
3371 | + ECDSA_get_default_method; | ||
3372 | + ASN1_put_eoc; | ||
3373 | + X509_STORE_CTX_get_explicit_policy; | ||
3374 | + X509_STORE_CTX_get_expl_policy; | ||
3375 | + X509_VERIFY_PARAM_table_cleanup; | ||
3376 | + STORE_modify_private_key; | ||
3377 | + X509_VERIFY_PARAM_free; | ||
3378 | + EC_METHOD_get_field_type; | ||
3379 | + EC_GFp_nist_method; | ||
3380 | + STORE_meth_set_modify_fn; | ||
3381 | + STORE_method_set_modify_function; | ||
3382 | + STORE_parse_attrs_next; | ||
3383 | + ENGINE_load_padlock; | ||
3384 | + EC_GROUP_set_curve_name; | ||
3385 | + X509_CERT_PAIR_it; | ||
3386 | + X509_CERT_PAIR_it; | ||
3387 | + STORE_meth_get_revoke_fn; | ||
3388 | + STORE_method_get_revoke_function; | ||
3389 | + STORE_method_set_get_function; | ||
3390 | + STORE_modify_number; | ||
3391 | + STORE_method_get_store_function; | ||
3392 | + STORE_store_private_key; | ||
3393 | + BN_GF2m_mod_sqr_arr; | ||
3394 | + RSA_setup_blinding; | ||
3395 | + BIO_s_datagram; | ||
3396 | + STORE_Memory; | ||
3397 | + sk_find_ex; | ||
3398 | + EC_GROUP_set_curve_GF2m; | ||
3399 | + ENGINE_set_default_ECDSA; | ||
3400 | + POLICY_CONSTRAINTS_new; | ||
3401 | + BN_GF2m_mod_sqrt; | ||
3402 | + ECDH_set_default_method; | ||
3403 | + EC_KEY_generate_key; | ||
3404 | + SHA384_Update; | ||
3405 | + BN_GF2m_arr2poly; | ||
3406 | + STORE_method_get_get_function; | ||
3407 | + STORE_meth_set_cleanup_fn; | ||
3408 | + STORE_method_set_cleanup_function; | ||
3409 | + EC_GROUP_check; | ||
3410 | + d2i_ECPrivateKey_bio; | ||
3411 | + EC_KEY_insert_key_method_data; | ||
3412 | + STORE_meth_get_lock_store_fn; | ||
3413 | + STORE_method_get_lock_store_function; | ||
3414 | + X509_VERIFY_PARAM_get_depth; | ||
3415 | + SHA224_Final; | ||
3416 | + STORE_meth_set_update_store_fn; | ||
3417 | + STORE_method_set_update_store_function; | ||
3418 | + SHA224_Update; | ||
3419 | + d2i_ECPrivateKey; | ||
3420 | + ASN1_item_ndef_i2d; | ||
3421 | + STORE_delete_private_key; | ||
3422 | + ERR_pop_to_mark; | ||
3423 | + ENGINE_register_all_STORE; | ||
3424 | + X509_policy_level_get0_node; | ||
3425 | + i2d_PKCS7_NDEF; | ||
3426 | + EC_GROUP_get_degree; | ||
3427 | + ASN1_generate_v3; | ||
3428 | + STORE_ATTR_INFO_modify_cstr; | ||
3429 | + X509_policy_tree_level_count; | ||
3430 | + BN_GF2m_add; | ||
3431 | + EC_KEY_get0_group; | ||
3432 | + STORE_generate_crl; | ||
3433 | + STORE_store_public_key; | ||
3434 | + X509_CERT_PAIR_free; | ||
3435 | + STORE_revoke_private_key; | ||
3436 | + BN_nist_mod_224; | ||
3437 | + SHA512_Final; | ||
3438 | + STORE_ATTR_INFO_modify_dn; | ||
3439 | + STORE_meth_get_initialise_fn; | ||
3440 | + STORE_method_get_initialise_function; | ||
3441 | + STORE_delete_number; | ||
3442 | + i2d_EC_PUBKEY_bio; | ||
3443 | + BIO_dgram_non_fatal_error; | ||
3444 | + EC_GROUP_get_asn1_flag; | ||
3445 | + STORE_ATTR_INFO_in_ex; | ||
3446 | + STORE_list_crl_start; | ||
3447 | + ECDH_get_ex_new_index; | ||
3448 | + STORE_meth_get_modify_fn; | ||
3449 | + STORE_method_get_modify_function; | ||
3450 | + v2i_ASN1_BIT_STRING; | ||
3451 | + STORE_store_certificate; | ||
3452 | + OBJ_bsearch_ex; | ||
3453 | + X509_STORE_CTX_set_default; | ||
3454 | + STORE_ATTR_INFO_set_sha1str; | ||
3455 | + BN_GF2m_mod_inv; | ||
3456 | + BN_GF2m_mod_exp; | ||
3457 | + STORE_modify_public_key; | ||
3458 | + STORE_meth_get_list_start_fn; | ||
3459 | + STORE_method_get_list_start_function; | ||
3460 | + EC_GROUP_get0_seed; | ||
3461 | + STORE_store_arbitrary; | ||
3462 | + STORE_meth_set_unlock_store_fn; | ||
3463 | + STORE_method_set_unlock_store_function; | ||
3464 | + BN_GF2m_mod_div_arr; | ||
3465 | + ENGINE_set_ECDSA; | ||
3466 | + STORE_create_method; | ||
3467 | + ECPKParameters_print; | ||
3468 | + EC_KEY_get0_private_key; | ||
3469 | + PEM_write_EC_PUBKEY; | ||
3470 | + X509_VERIFY_PARAM_set1; | ||
3471 | + ECDH_set_method; | ||
3472 | + v2i_GENERAL_NAME_ex; | ||
3473 | + ECDH_set_ex_data; | ||
3474 | + STORE_generate_key; | ||
3475 | + BN_nist_mod_521; | ||
3476 | + X509_policy_tree_get0_level; | ||
3477 | + EC_GROUP_set_point_conversion_form; | ||
3478 | + EC_GROUP_set_point_conv_form; | ||
3479 | + PEM_read_EC_PUBKEY; | ||
3480 | + i2d_ECDSA_SIG; | ||
3481 | + ECDSA_OpenSSL; | ||
3482 | + STORE_delete_crl; | ||
3483 | + EC_KEY_get_enc_flags; | ||
3484 | + ASN1_const_check_infinite_end; | ||
3485 | + EVP_PKEY_delete_attr; | ||
3486 | + ECDSA_set_default_method; | ||
3487 | + EC_POINT_set_compressed_coordinates_GF2m; | ||
3488 | + EC_POINT_set_compr_coords_GF2m; | ||
3489 | + EC_GROUP_cmp; | ||
3490 | + STORE_revoke_certificate; | ||
3491 | + BN_get0_nist_prime_256; | ||
3492 | + STORE_meth_get_delete_fn; | ||
3493 | + STORE_method_get_delete_function; | ||
3494 | + SHA224_Init; | ||
3495 | + PEM_read_ECPrivateKey; | ||
3496 | + SHA512_Init; | ||
3497 | + STORE_parse_attrs_endp; | ||
3498 | + BN_set_negative; | ||
3499 | + ERR_load_ECDSA_strings; | ||
3500 | + EC_GROUP_get_basis_type; | ||
3501 | + STORE_list_public_key_next; | ||
3502 | + i2v_ASN1_BIT_STRING; | ||
3503 | + STORE_OBJECT_free; | ||
3504 | + BN_nist_mod_384; | ||
3505 | + i2d_X509_CERT_PAIR; | ||
3506 | + PEM_write_ECPKParameters; | ||
3507 | + ECDH_compute_key; | ||
3508 | + STORE_ATTR_INFO_get0_sha1str; | ||
3509 | + ENGINE_register_all_ECDH; | ||
3510 | + pqueue_pop; | ||
3511 | + STORE_ATTR_INFO_get0_cstr; | ||
3512 | + POLICY_CONSTRAINTS_it; | ||
3513 | + POLICY_CONSTRAINTS_it; | ||
3514 | + STORE_get_ex_new_index; | ||
3515 | + EVP_PKEY_get_attr_by_OBJ; | ||
3516 | + X509_VERIFY_PARAM_add0_policy; | ||
3517 | + BN_GF2m_mod_solve_quad; | ||
3518 | + SHA256; | ||
3519 | + i2d_ECPrivateKey_fp; | ||
3520 | + X509_policy_tree_get0_user_policies; | ||
3521 | + X509_pcy_tree_get0_usr_policies; | ||
3522 | + OPENSSL_DIR_read; | ||
3523 | + ENGINE_register_all_ECDSA; | ||
3524 | + X509_VERIFY_PARAM_lookup; | ||
3525 | + EC_POINT_get_affine_coordinates_GF2m; | ||
3526 | + EC_POINT_get_affine_coords_GF2m; | ||
3527 | + EC_GROUP_dup; | ||
3528 | + ENGINE_get_default_ECDSA; | ||
3529 | + EC_KEY_new; | ||
3530 | + SHA256_Transform; | ||
3531 | + EC_KEY_set_enc_flags; | ||
3532 | + ECDSA_verify; | ||
3533 | + EC_POINT_point2hex; | ||
3534 | + ENGINE_get_STORE; | ||
3535 | + SHA512; | ||
3536 | + STORE_get_certificate; | ||
3537 | + ECDSA_do_sign_ex; | ||
3538 | + ECDSA_do_verify; | ||
3539 | + d2i_ECPrivateKey_fp; | ||
3540 | + STORE_delete_certificate; | ||
3541 | + SHA512_Transform; | ||
3542 | + X509_STORE_set1_param; | ||
3543 | + STORE_method_get_ctrl_function; | ||
3544 | + STORE_free; | ||
3545 | + PEM_write_ECPrivateKey; | ||
3546 | + STORE_meth_get_unlock_store_fn; | ||
3547 | + STORE_method_get_unlock_store_function; | ||
3548 | + STORE_get_ex_data; | ||
3549 | + EC_KEY_set_public_key; | ||
3550 | + PEM_read_ECPKParameters; | ||
3551 | + X509_CERT_PAIR_new; | ||
3552 | + ENGINE_register_STORE; | ||
3553 | + RSA_generate_key_ex; | ||
3554 | + DSA_generate_parameters_ex; | ||
3555 | + ECParameters_print_fp; | ||
3556 | + X509V3_NAME_from_section; | ||
3557 | + EVP_PKEY_add1_attr; | ||
3558 | + STORE_modify_crl; | ||
3559 | + STORE_list_private_key_start; | ||
3560 | + POLICY_MAPPINGS_it; | ||
3561 | + POLICY_MAPPINGS_it; | ||
3562 | + GENERAL_SUBTREE_it; | ||
3563 | + GENERAL_SUBTREE_it; | ||
3564 | + EC_GROUP_get_curve_name; | ||
3565 | + PEM_write_X509_CERT_PAIR; | ||
3566 | + BIO_dump_indent_cb; | ||
3567 | + d2i_X509_CERT_PAIR; | ||
3568 | + STORE_list_private_key_endp; | ||
3569 | + asn1_const_Finish; | ||
3570 | + i2d_EC_PUBKEY_fp; | ||
3571 | + BN_nist_mod_256; | ||
3572 | + X509_VERIFY_PARAM_add0_table; | ||
3573 | + pqueue_free; | ||
3574 | + BN_BLINDING_create_param; | ||
3575 | + ECDSA_size; | ||
3576 | + d2i_EC_PUBKEY_bio; | ||
3577 | + BN_get0_nist_prime_521; | ||
3578 | + STORE_ATTR_INFO_modify_sha1str; | ||
3579 | + BN_generate_prime_ex; | ||
3580 | + EC_GROUP_new_by_curve_name; | ||
3581 | + SHA256_Final; | ||
3582 | + DH_generate_parameters_ex; | ||
3583 | + PEM_read_bio_ECPrivateKey; | ||
3584 | + STORE_meth_get_cleanup_fn; | ||
3585 | + STORE_method_get_cleanup_function; | ||
3586 | + ENGINE_get_ECDH; | ||
3587 | + d2i_ECDSA_SIG; | ||
3588 | + BN_is_prime_fasttest_ex; | ||
3589 | + ECDSA_sign; | ||
3590 | + X509_policy_check; | ||
3591 | + EVP_PKEY_get_attr_by_NID; | ||
3592 | + STORE_set_ex_data; | ||
3593 | + ENGINE_get_ECDSA; | ||
3594 | + EVP_ecdsa; | ||
3595 | + BN_BLINDING_get_flags; | ||
3596 | + PKCS12_add_cert; | ||
3597 | + STORE_OBJECT_new; | ||
3598 | + ERR_load_ECDH_strings; | ||
3599 | + EC_KEY_dup; | ||
3600 | + EVP_CIPHER_CTX_rand_key; | ||
3601 | + ECDSA_set_method; | ||
3602 | + a2i_IPADDRESS_NC; | ||
3603 | + d2i_ECParameters; | ||
3604 | + STORE_list_certificate_end; | ||
3605 | + STORE_get_crl; | ||
3606 | + X509_POLICY_NODE_print; | ||
3607 | + SHA384_Init; | ||
3608 | + EC_GF2m_simple_method; | ||
3609 | + ECDSA_set_ex_data; | ||
3610 | + SHA384_Final; | ||
3611 | + PKCS7_set_digest; | ||
3612 | + EC_KEY_print; | ||
3613 | + STORE_meth_set_lock_store_fn; | ||
3614 | + STORE_method_set_lock_store_function; | ||
3615 | + ECDSA_get_ex_new_index; | ||
3616 | + SHA384; | ||
3617 | + POLICY_MAPPING_new; | ||
3618 | + STORE_list_certificate_endp; | ||
3619 | + X509_STORE_CTX_get0_policy_tree; | ||
3620 | + EC_GROUP_set_asn1_flag; | ||
3621 | + EC_KEY_check_key; | ||
3622 | + d2i_EC_PUBKEY_fp; | ||
3623 | + PKCS7_set0_type_other; | ||
3624 | + PEM_read_bio_X509_CERT_PAIR; | ||
3625 | + pqueue_next; | ||
3626 | + STORE_meth_get_list_end_fn; | ||
3627 | + STORE_method_get_list_end_function; | ||
3628 | + EVP_PKEY_add1_attr_by_OBJ; | ||
3629 | + X509_VERIFY_PARAM_set_time; | ||
3630 | + pqueue_new; | ||
3631 | + ENGINE_set_default_ECDH; | ||
3632 | + STORE_new_method; | ||
3633 | + PKCS12_add_key; | ||
3634 | + DSO_merge; | ||
3635 | + EC_POINT_hex2point; | ||
3636 | + BIO_dump_cb; | ||
3637 | + SHA256_Update; | ||
3638 | + pqueue_insert; | ||
3639 | + pitem_free; | ||
3640 | + BN_GF2m_mod_inv_arr; | ||
3641 | + ENGINE_unregister_ECDSA; | ||
3642 | + BN_BLINDING_set_thread_id; | ||
3643 | + get_rfc3526_prime_8192; | ||
3644 | + X509_VERIFY_PARAM_clear_flags; | ||
3645 | + get_rfc2409_prime_1024; | ||
3646 | + DH_check_pub_key; | ||
3647 | + get_rfc3526_prime_2048; | ||
3648 | + get_rfc3526_prime_6144; | ||
3649 | + get_rfc3526_prime_1536; | ||
3650 | + get_rfc3526_prime_3072; | ||
3651 | + get_rfc3526_prime_4096; | ||
3652 | + get_rfc2409_prime_768; | ||
3653 | + X509_VERIFY_PARAM_get_flags; | ||
3654 | + EVP_CIPHER_CTX_new; | ||
3655 | + EVP_CIPHER_CTX_free; | ||
3656 | + Camellia_cbc_encrypt; | ||
3657 | + Camellia_cfb128_encrypt; | ||
3658 | + Camellia_cfb1_encrypt; | ||
3659 | + Camellia_cfb8_encrypt; | ||
3660 | + Camellia_ctr128_encrypt; | ||
3661 | + Camellia_cfbr_encrypt_block; | ||
3662 | + Camellia_decrypt; | ||
3663 | + Camellia_ecb_encrypt; | ||
3664 | + Camellia_encrypt; | ||
3665 | + Camellia_ofb128_encrypt; | ||
3666 | + Camellia_set_key; | ||
3667 | + EVP_camellia_128_cbc; | ||
3668 | + EVP_camellia_128_cfb128; | ||
3669 | + EVP_camellia_128_cfb1; | ||
3670 | + EVP_camellia_128_cfb8; | ||
3671 | + EVP_camellia_128_ecb; | ||
3672 | + EVP_camellia_128_ofb; | ||
3673 | + EVP_camellia_192_cbc; | ||
3674 | + EVP_camellia_192_cfb128; | ||
3675 | + EVP_camellia_192_cfb1; | ||
3676 | + EVP_camellia_192_cfb8; | ||
3677 | + EVP_camellia_192_ecb; | ||
3678 | + EVP_camellia_192_ofb; | ||
3679 | + EVP_camellia_256_cbc; | ||
3680 | + EVP_camellia_256_cfb128; | ||
3681 | + EVP_camellia_256_cfb1; | ||
3682 | + EVP_camellia_256_cfb8; | ||
3683 | + EVP_camellia_256_ecb; | ||
3684 | + EVP_camellia_256_ofb; | ||
3685 | + a2i_ipadd; | ||
3686 | + ASIdentifiers_free; | ||
3687 | + i2d_ASIdOrRange; | ||
3688 | + EVP_CIPHER_block_size; | ||
3689 | + v3_asid_is_canonical; | ||
3690 | + IPAddressChoice_free; | ||
3691 | + EVP_CIPHER_CTX_set_app_data; | ||
3692 | + BIO_set_callback_arg; | ||
3693 | + v3_addr_add_prefix; | ||
3694 | + IPAddressOrRange_it; | ||
3695 | + IPAddressOrRange_it; | ||
3696 | + BIO_set_flags; | ||
3697 | + ASIdentifiers_it; | ||
3698 | + ASIdentifiers_it; | ||
3699 | + v3_addr_get_range; | ||
3700 | + BIO_method_type; | ||
3701 | + v3_addr_inherits; | ||
3702 | + IPAddressChoice_it; | ||
3703 | + IPAddressChoice_it; | ||
3704 | + AES_ige_encrypt; | ||
3705 | + v3_addr_add_range; | ||
3706 | + EVP_CIPHER_CTX_nid; | ||
3707 | + d2i_ASRange; | ||
3708 | + v3_addr_add_inherit; | ||
3709 | + v3_asid_add_id_or_range; | ||
3710 | + v3_addr_validate_resource_set; | ||
3711 | + EVP_CIPHER_iv_length; | ||
3712 | + EVP_MD_type; | ||
3713 | + v3_asid_canonize; | ||
3714 | + IPAddressRange_free; | ||
3715 | + v3_asid_add_inherit; | ||
3716 | + EVP_CIPHER_CTX_key_length; | ||
3717 | + IPAddressRange_new; | ||
3718 | + ASIdOrRange_new; | ||
3719 | + EVP_MD_size; | ||
3720 | + EVP_MD_CTX_test_flags; | ||
3721 | + BIO_clear_flags; | ||
3722 | + i2d_ASRange; | ||
3723 | + IPAddressRange_it; | ||
3724 | + IPAddressRange_it; | ||
3725 | + IPAddressChoice_new; | ||
3726 | + ASIdentifierChoice_new; | ||
3727 | + ASRange_free; | ||
3728 | + EVP_MD_pkey_type; | ||
3729 | + EVP_MD_CTX_clear_flags; | ||
3730 | + IPAddressFamily_free; | ||
3731 | + i2d_IPAddressFamily; | ||
3732 | + IPAddressOrRange_new; | ||
3733 | + EVP_CIPHER_flags; | ||
3734 | + v3_asid_validate_resource_set; | ||
3735 | + d2i_IPAddressRange; | ||
3736 | + AES_bi_ige_encrypt; | ||
3737 | + BIO_get_callback; | ||
3738 | + IPAddressOrRange_free; | ||
3739 | + v3_addr_subset; | ||
3740 | + d2i_IPAddressFamily; | ||
3741 | + v3_asid_subset; | ||
3742 | + BIO_test_flags; | ||
3743 | + i2d_ASIdentifierChoice; | ||
3744 | + ASRange_it; | ||
3745 | + ASRange_it; | ||
3746 | + d2i_ASIdentifiers; | ||
3747 | + ASRange_new; | ||
3748 | + d2i_IPAddressChoice; | ||
3749 | + v3_addr_get_afi; | ||
3750 | + EVP_CIPHER_key_length; | ||
3751 | + EVP_Cipher; | ||
3752 | + i2d_IPAddressOrRange; | ||
3753 | + ASIdOrRange_it; | ||
3754 | + ASIdOrRange_it; | ||
3755 | + EVP_CIPHER_nid; | ||
3756 | + i2d_IPAddressChoice; | ||
3757 | + EVP_CIPHER_CTX_block_size; | ||
3758 | + ASIdentifiers_new; | ||
3759 | + v3_addr_validate_path; | ||
3760 | + IPAddressFamily_new; | ||
3761 | + EVP_MD_CTX_set_flags; | ||
3762 | + v3_addr_is_canonical; | ||
3763 | + i2d_IPAddressRange; | ||
3764 | + IPAddressFamily_it; | ||
3765 | + IPAddressFamily_it; | ||
3766 | + v3_asid_inherits; | ||
3767 | + EVP_CIPHER_CTX_cipher; | ||
3768 | + EVP_CIPHER_CTX_get_app_data; | ||
3769 | + EVP_MD_block_size; | ||
3770 | + EVP_CIPHER_CTX_flags; | ||
3771 | + v3_asid_validate_path; | ||
3772 | + d2i_IPAddressOrRange; | ||
3773 | + v3_addr_canonize; | ||
3774 | + ASIdentifierChoice_it; | ||
3775 | + ASIdentifierChoice_it; | ||
3776 | + EVP_MD_CTX_md; | ||
3777 | + d2i_ASIdentifierChoice; | ||
3778 | + BIO_method_name; | ||
3779 | + EVP_CIPHER_CTX_iv_length; | ||
3780 | + ASIdOrRange_free; | ||
3781 | + ASIdentifierChoice_free; | ||
3782 | + BIO_get_callback_arg; | ||
3783 | + BIO_set_callback; | ||
3784 | + d2i_ASIdOrRange; | ||
3785 | + i2d_ASIdentifiers; | ||
3786 | + SEED_decrypt; | ||
3787 | + SEED_encrypt; | ||
3788 | + SEED_cbc_encrypt; | ||
3789 | + EVP_seed_ofb; | ||
3790 | + SEED_cfb128_encrypt; | ||
3791 | + SEED_ofb128_encrypt; | ||
3792 | + EVP_seed_cbc; | ||
3793 | + SEED_ecb_encrypt; | ||
3794 | + EVP_seed_ecb; | ||
3795 | + SEED_set_key; | ||
3796 | + EVP_seed_cfb128; | ||
3797 | + X509_EXTENSIONS_it; | ||
3798 | + X509_EXTENSIONS_it; | ||
3799 | + X509_get1_ocsp; | ||
3800 | + OCSP_REQ_CTX_free; | ||
3801 | + i2d_X509_EXTENSIONS; | ||
3802 | + OCSP_sendreq_nbio; | ||
3803 | + OCSP_sendreq_new; | ||
3804 | + d2i_X509_EXTENSIONS; | ||
3805 | + X509_ALGORS_it; | ||
3806 | + X509_ALGORS_it; | ||
3807 | + X509_ALGOR_get0; | ||
3808 | + X509_ALGOR_set0; | ||
3809 | + AES_unwrap_key; | ||
3810 | + AES_wrap_key; | ||
3811 | + X509at_get0_data_by_OBJ; | ||
3812 | + ASN1_TYPE_set1; | ||
3813 | + ASN1_STRING_set0; | ||
3814 | + i2d_X509_ALGORS; | ||
3815 | + BIO_f_zlib; | ||
3816 | + COMP_zlib_cleanup; | ||
3817 | + d2i_X509_ALGORS; | ||
3818 | + CMS_ReceiptRequest_free; | ||
3819 | + PEM_write_CMS; | ||
3820 | + CMS_add0_CertificateChoices; | ||
3821 | + CMS_unsigned_add1_attr_by_OBJ; | ||
3822 | + ERR_load_CMS_strings; | ||
3823 | + CMS_sign_receipt; | ||
3824 | + i2d_CMS_ContentInfo; | ||
3825 | + CMS_signed_delete_attr; | ||
3826 | + d2i_CMS_bio; | ||
3827 | + CMS_unsigned_get_attr_by_NID; | ||
3828 | + CMS_verify; | ||
3829 | + SMIME_read_CMS; | ||
3830 | + CMS_decrypt_set1_key; | ||
3831 | + CMS_SignerInfo_get0_algs; | ||
3832 | + CMS_add1_cert; | ||
3833 | + CMS_set_detached; | ||
3834 | + CMS_encrypt; | ||
3835 | + CMS_EnvelopedData_create; | ||
3836 | + CMS_uncompress; | ||
3837 | + CMS_add0_crl; | ||
3838 | + CMS_SignerInfo_verify_content; | ||
3839 | + CMS_unsigned_get0_data_by_OBJ; | ||
3840 | + PEM_write_bio_CMS; | ||
3841 | + CMS_unsigned_get_attr; | ||
3842 | + CMS_RecipientInfo_ktri_cert_cmp; | ||
3843 | + CMS_RecipientInfo_ktri_get0_algs; | ||
3844 | + CMS_RecipInfo_ktri_get0_algs; | ||
3845 | + CMS_ContentInfo_free; | ||
3846 | + CMS_final; | ||
3847 | + CMS_add_simple_smimecap; | ||
3848 | + CMS_SignerInfo_verify; | ||
3849 | + CMS_data; | ||
3850 | + CMS_ContentInfo_it; | ||
3851 | + CMS_ContentInfo_it; | ||
3852 | + d2i_CMS_ReceiptRequest; | ||
3853 | + CMS_compress; | ||
3854 | + CMS_digest_create; | ||
3855 | + CMS_SignerInfo_cert_cmp; | ||
3856 | + CMS_SignerInfo_sign; | ||
3857 | + CMS_data_create; | ||
3858 | + i2d_CMS_bio; | ||
3859 | + CMS_EncryptedData_set1_key; | ||
3860 | + CMS_decrypt; | ||
3861 | + int_smime_write_ASN1; | ||
3862 | + CMS_unsigned_delete_attr; | ||
3863 | + CMS_unsigned_get_attr_count; | ||
3864 | + CMS_add_smimecap; | ||
3865 | + PEM_read_CMS; | ||
3866 | + CMS_signed_get_attr_by_OBJ; | ||
3867 | + d2i_CMS_ContentInfo; | ||
3868 | + CMS_add_standard_smimecap; | ||
3869 | + CMS_ContentInfo_new; | ||
3870 | + CMS_RecipientInfo_type; | ||
3871 | + CMS_get0_type; | ||
3872 | + CMS_is_detached; | ||
3873 | + CMS_sign; | ||
3874 | + CMS_signed_add1_attr; | ||
3875 | + CMS_unsigned_get_attr_by_OBJ; | ||
3876 | + SMIME_write_CMS; | ||
3877 | + CMS_EncryptedData_decrypt; | ||
3878 | + CMS_get0_RecipientInfos; | ||
3879 | + CMS_add0_RevocationInfoChoice; | ||
3880 | + CMS_decrypt_set1_pkey; | ||
3881 | + CMS_SignerInfo_set1_signer_cert; | ||
3882 | + CMS_get0_signers; | ||
3883 | + CMS_ReceiptRequest_get0_values; | ||
3884 | + CMS_signed_get0_data_by_OBJ; | ||
3885 | + CMS_get0_SignerInfos; | ||
3886 | + CMS_add0_cert; | ||
3887 | + CMS_EncryptedData_encrypt; | ||
3888 | + CMS_digest_verify; | ||
3889 | + CMS_set1_signers_certs; | ||
3890 | + CMS_signed_get_attr; | ||
3891 | + CMS_RecipientInfo_set0_key; | ||
3892 | + CMS_SignedData_init; | ||
3893 | + CMS_RecipientInfo_kekri_get0_id; | ||
3894 | + CMS_verify_receipt; | ||
3895 | + CMS_ReceiptRequest_it; | ||
3896 | + CMS_ReceiptRequest_it; | ||
3897 | + PEM_read_bio_CMS; | ||
3898 | + CMS_get1_crls; | ||
3899 | + CMS_add0_recipient_key; | ||
3900 | + SMIME_read_ASN1; | ||
3901 | + CMS_ReceiptRequest_new; | ||
3902 | + CMS_get0_content; | ||
3903 | + CMS_get1_ReceiptRequest; | ||
3904 | + CMS_signed_add1_attr_by_OBJ; | ||
3905 | + CMS_RecipientInfo_kekri_id_cmp; | ||
3906 | + CMS_add1_ReceiptRequest; | ||
3907 | + CMS_SignerInfo_get0_signer_id; | ||
3908 | + CMS_unsigned_add1_attr_by_NID; | ||
3909 | + CMS_unsigned_add1_attr; | ||
3910 | + CMS_signed_get_attr_by_NID; | ||
3911 | + CMS_get1_certs; | ||
3912 | + CMS_signed_add1_attr_by_NID; | ||
3913 | + CMS_unsigned_add1_attr_by_txt; | ||
3914 | + CMS_dataFinal; | ||
3915 | + CMS_RecipientInfo_ktri_get0_signer_id; | ||
3916 | + CMS_RecipInfo_ktri_get0_sigr_id; | ||
3917 | + i2d_CMS_ReceiptRequest; | ||
3918 | + CMS_add1_recipient_cert; | ||
3919 | + CMS_dataInit; | ||
3920 | + CMS_signed_add1_attr_by_txt; | ||
3921 | + CMS_RecipientInfo_decrypt; | ||
3922 | + CMS_signed_get_attr_count; | ||
3923 | + CMS_get0_eContentType; | ||
3924 | + CMS_set1_eContentType; | ||
3925 | + CMS_ReceiptRequest_create0; | ||
3926 | + CMS_add1_signer; | ||
3927 | + CMS_RecipientInfo_set0_pkey; | ||
3928 | + ENGINE_set_load_ssl_client_cert_function; | ||
3929 | + ENGINE_set_ld_ssl_clnt_cert_fn; | ||
3930 | + ENGINE_get_ssl_client_cert_function; | ||
3931 | + ENGINE_get_ssl_client_cert_fn; | ||
3932 | + ENGINE_load_ssl_client_cert; | ||
3933 | + ENGINE_load_capi; | ||
3934 | + OPENSSL_isservice; | ||
3935 | + FIPS_dsa_sig_decode; | ||
3936 | + EVP_CIPHER_CTX_clear_flags; | ||
3937 | + FIPS_rand_status; | ||
3938 | + FIPS_rand_set_key; | ||
3939 | + CRYPTO_set_mem_info_functions; | ||
3940 | + RSA_X931_generate_key_ex; | ||
3941 | + int_ERR_set_state_func; | ||
3942 | + int_EVP_MD_set_engine_callbacks; | ||
3943 | + int_CRYPTO_set_do_dynlock_callback; | ||
3944 | + FIPS_rng_stick; | ||
3945 | + EVP_CIPHER_CTX_set_flags; | ||
3946 | + BN_X931_generate_prime_ex; | ||
3947 | + FIPS_selftest_check; | ||
3948 | + FIPS_rand_set_dt; | ||
3949 | + CRYPTO_dbg_pop_info; | ||
3950 | + FIPS_dsa_free; | ||
3951 | + RSA_X931_derive_ex; | ||
3952 | + FIPS_rsa_new; | ||
3953 | + FIPS_rand_bytes; | ||
3954 | + fips_cipher_test; | ||
3955 | + EVP_CIPHER_CTX_test_flags; | ||
3956 | + CRYPTO_malloc_debug_init; | ||
3957 | + CRYPTO_dbg_push_info; | ||
3958 | + FIPS_corrupt_rsa_keygen; | ||
3959 | + FIPS_dh_new; | ||
3960 | + FIPS_corrupt_dsa_keygen; | ||
3961 | + FIPS_dh_free; | ||
3962 | + fips_pkey_signature_test; | ||
3963 | + EVP_add_alg_module; | ||
3964 | + int_RAND_init_engine_callbacks; | ||
3965 | + int_EVP_CIPHER_set_engine_callbacks; | ||
3966 | + int_EVP_MD_init_engine_callbacks; | ||
3967 | + FIPS_rand_test_mode; | ||
3968 | + FIPS_rand_reset; | ||
3969 | + FIPS_dsa_new; | ||
3970 | + int_RAND_set_callbacks; | ||
3971 | + BN_X931_derive_prime_ex; | ||
3972 | + int_ERR_lib_init; | ||
3973 | + int_EVP_CIPHER_init_engine_callbacks; | ||
3974 | + FIPS_rsa_free; | ||
3975 | + FIPS_dsa_sig_encode; | ||
3976 | + CRYPTO_dbg_remove_all_info; | ||
3977 | + OPENSSL_init; | ||
3978 | + CRYPTO_strdup; | ||
3979 | + JPAKE_STEP3A_process; | ||
3980 | + JPAKE_STEP1_release; | ||
3981 | + JPAKE_get_shared_key; | ||
3982 | + JPAKE_STEP3B_init; | ||
3983 | + JPAKE_STEP1_generate; | ||
3984 | + JPAKE_STEP1_init; | ||
3985 | + JPAKE_STEP3B_process; | ||
3986 | + JPAKE_STEP2_generate; | ||
3987 | + JPAKE_CTX_new; | ||
3988 | + JPAKE_CTX_free; | ||
3989 | + JPAKE_STEP3B_release; | ||
3990 | + JPAKE_STEP3A_release; | ||
3991 | + JPAKE_STEP2_process; | ||
3992 | + JPAKE_STEP3B_generate; | ||
3993 | + JPAKE_STEP1_process; | ||
3994 | + JPAKE_STEP3A_generate; | ||
3995 | + JPAKE_STEP2_release; | ||
3996 | + JPAKE_STEP3A_init; | ||
3997 | + ERR_load_JPAKE_strings; | ||
3998 | + JPAKE_STEP2_init; | ||
3999 | + pqueue_size; | ||
4000 | + i2d_TS_ACCURACY; | ||
4001 | + i2d_TS_MSG_IMPRINT_fp; | ||
4002 | + i2d_TS_MSG_IMPRINT; | ||
4003 | + EVP_PKEY_print_public; | ||
4004 | + EVP_PKEY_CTX_new; | ||
4005 | + i2d_TS_TST_INFO; | ||
4006 | + EVP_PKEY_asn1_find; | ||
4007 | + DSO_METHOD_beos; | ||
4008 | + TS_CONF_load_cert; | ||
4009 | + TS_REQ_get_ext; | ||
4010 | + EVP_PKEY_sign_init; | ||
4011 | + ASN1_item_print; | ||
4012 | + TS_TST_INFO_set_nonce; | ||
4013 | + TS_RESP_dup; | ||
4014 | + ENGINE_register_pkey_meths; | ||
4015 | + EVP_PKEY_asn1_add0; | ||
4016 | + PKCS7_add0_attrib_signing_time; | ||
4017 | + i2d_TS_TST_INFO_fp; | ||
4018 | + BIO_asn1_get_prefix; | ||
4019 | + TS_TST_INFO_set_time; | ||
4020 | + EVP_PKEY_meth_set_decrypt; | ||
4021 | + EVP_PKEY_set_type_str; | ||
4022 | + EVP_PKEY_CTX_get_keygen_info; | ||
4023 | + TS_REQ_set_policy_id; | ||
4024 | + d2i_TS_RESP_fp; | ||
4025 | + ENGINE_get_pkey_asn1_meth_engine; | ||
4026 | + ENGINE_get_pkey_asn1_meth_eng; | ||
4027 | + WHIRLPOOL_Init; | ||
4028 | + TS_RESP_set_status_info; | ||
4029 | + EVP_PKEY_keygen; | ||
4030 | + EVP_DigestSignInit; | ||
4031 | + TS_ACCURACY_set_millis; | ||
4032 | + TS_REQ_dup; | ||
4033 | + GENERAL_NAME_dup; | ||
4034 | + ASN1_SEQUENCE_ANY_it; | ||
4035 | + ASN1_SEQUENCE_ANY_it; | ||
4036 | + WHIRLPOOL; | ||
4037 | + X509_STORE_get1_crls; | ||
4038 | + ENGINE_get_pkey_asn1_meth; | ||
4039 | + EVP_PKEY_asn1_new; | ||
4040 | + BIO_new_NDEF; | ||
4041 | + ENGINE_get_pkey_meth; | ||
4042 | + TS_MSG_IMPRINT_set_algo; | ||
4043 | + i2d_TS_TST_INFO_bio; | ||
4044 | + TS_TST_INFO_set_ordering; | ||
4045 | + TS_TST_INFO_get_ext_by_OBJ; | ||
4046 | + CRYPTO_THREADID_set_pointer; | ||
4047 | + TS_CONF_get_tsa_section; | ||
4048 | + SMIME_write_ASN1; | ||
4049 | + TS_RESP_CTX_set_signer_key; | ||
4050 | + EVP_PKEY_encrypt_old; | ||
4051 | + EVP_PKEY_encrypt_init; | ||
4052 | + CRYPTO_THREADID_cpy; | ||
4053 | + ASN1_PCTX_get_cert_flags; | ||
4054 | + i2d_ESS_SIGNING_CERT; | ||
4055 | + TS_CONF_load_key; | ||
4056 | + i2d_ASN1_SEQUENCE_ANY; | ||
4057 | + d2i_TS_MSG_IMPRINT_bio; | ||
4058 | + EVP_PKEY_asn1_set_public; | ||
4059 | + b2i_PublicKey_bio; | ||
4060 | + BIO_asn1_set_prefix; | ||
4061 | + EVP_PKEY_new_mac_key; | ||
4062 | + BIO_new_CMS; | ||
4063 | + CRYPTO_THREADID_cmp; | ||
4064 | + TS_REQ_ext_free; | ||
4065 | + EVP_PKEY_asn1_set_free; | ||
4066 | + EVP_PKEY_get0_asn1; | ||
4067 | + d2i_NETSCAPE_X509; | ||
4068 | + EVP_PKEY_verify_recover_init; | ||
4069 | + EVP_PKEY_CTX_set_data; | ||
4070 | + EVP_PKEY_keygen_init; | ||
4071 | + TS_RESP_CTX_set_status_info; | ||
4072 | + TS_MSG_IMPRINT_get_algo; | ||
4073 | + TS_REQ_print_bio; | ||
4074 | + EVP_PKEY_CTX_ctrl_str; | ||
4075 | + EVP_PKEY_get_default_digest_nid; | ||
4076 | + PEM_write_bio_PKCS7_stream; | ||
4077 | + TS_MSG_IMPRINT_print_bio; | ||
4078 | + BN_asc2bn; | ||
4079 | + TS_REQ_get_policy_id; | ||
4080 | + ENGINE_set_default_pkey_asn1_meths; | ||
4081 | + ENGINE_set_def_pkey_asn1_meths; | ||
4082 | + d2i_TS_ACCURACY; | ||
4083 | + DSO_global_lookup; | ||
4084 | + TS_CONF_set_tsa_name; | ||
4085 | + i2d_ASN1_SET_ANY; | ||
4086 | + ENGINE_load_gost; | ||
4087 | + WHIRLPOOL_BitUpdate; | ||
4088 | + ASN1_PCTX_get_flags; | ||
4089 | + TS_TST_INFO_get_ext_by_NID; | ||
4090 | + TS_RESP_new; | ||
4091 | + ESS_CERT_ID_dup; | ||
4092 | + TS_STATUS_INFO_dup; | ||
4093 | + TS_REQ_delete_ext; | ||
4094 | + EVP_DigestVerifyFinal; | ||
4095 | + EVP_PKEY_print_params; | ||
4096 | + i2d_CMS_bio_stream; | ||
4097 | + TS_REQ_get_msg_imprint; | ||
4098 | + OBJ_find_sigid_by_algs; | ||
4099 | + TS_TST_INFO_get_serial; | ||
4100 | + TS_REQ_get_nonce; | ||
4101 | + X509_PUBKEY_set0_param; | ||
4102 | + EVP_PKEY_CTX_set0_keygen_info; | ||
4103 | + DIST_POINT_set_dpname; | ||
4104 | + i2d_ISSUING_DIST_POINT; | ||
4105 | + ASN1_SET_ANY_it; | ||
4106 | + ASN1_SET_ANY_it; | ||
4107 | + EVP_PKEY_CTX_get_data; | ||
4108 | + TS_STATUS_INFO_print_bio; | ||
4109 | + EVP_PKEY_derive_init; | ||
4110 | + d2i_TS_TST_INFO; | ||
4111 | + EVP_PKEY_asn1_add_alias; | ||
4112 | + d2i_TS_RESP_bio; | ||
4113 | + OTHERNAME_cmp; | ||
4114 | + GENERAL_NAME_set0_value; | ||
4115 | + PKCS7_RECIP_INFO_get0_alg; | ||
4116 | + TS_RESP_CTX_new; | ||
4117 | + TS_RESP_set_tst_info; | ||
4118 | + PKCS7_final; | ||
4119 | + EVP_PKEY_base_id; | ||
4120 | + TS_RESP_CTX_set_signer_cert; | ||
4121 | + TS_REQ_set_msg_imprint; | ||
4122 | + EVP_PKEY_CTX_ctrl; | ||
4123 | + TS_CONF_set_digests; | ||
4124 | + d2i_TS_MSG_IMPRINT; | ||
4125 | + EVP_PKEY_meth_set_ctrl; | ||
4126 | + TS_REQ_get_ext_by_NID; | ||
4127 | + PKCS5_pbe_set0_algor; | ||
4128 | + BN_BLINDING_thread_id; | ||
4129 | + TS_ACCURACY_new; | ||
4130 | + X509_CRL_METHOD_free; | ||
4131 | + ASN1_PCTX_get_nm_flags; | ||
4132 | + EVP_PKEY_meth_set_sign; | ||
4133 | + CRYPTO_THREADID_current; | ||
4134 | + EVP_PKEY_decrypt_init; | ||
4135 | + NETSCAPE_X509_free; | ||
4136 | + i2b_PVK_bio; | ||
4137 | + EVP_PKEY_print_private; | ||
4138 | + GENERAL_NAME_get0_value; | ||
4139 | + b2i_PVK_bio; | ||
4140 | + ASN1_UTCTIME_adj; | ||
4141 | + TS_TST_INFO_new; | ||
4142 | + EVP_MD_do_all_sorted; | ||
4143 | + TS_CONF_set_default_engine; | ||
4144 | + TS_ACCURACY_set_seconds; | ||
4145 | + TS_TST_INFO_get_time; | ||
4146 | + PKCS8_pkey_get0; | ||
4147 | + EVP_PKEY_asn1_get0; | ||
4148 | + OBJ_add_sigid; | ||
4149 | + PKCS7_SIGNER_INFO_sign; | ||
4150 | + EVP_PKEY_paramgen_init; | ||
4151 | + EVP_PKEY_sign; | ||
4152 | + OBJ_sigid_free; | ||
4153 | + EVP_PKEY_meth_set_init; | ||
4154 | + d2i_ESS_ISSUER_SERIAL; | ||
4155 | + ISSUING_DIST_POINT_new; | ||
4156 | + ASN1_TIME_adj; | ||
4157 | + TS_OBJ_print_bio; | ||
4158 | + EVP_PKEY_meth_set_verify_recover; | ||
4159 | + EVP_PKEY_meth_set_vrfy_recover; | ||
4160 | + TS_RESP_get_status_info; | ||
4161 | + CMS_stream; | ||
4162 | + EVP_PKEY_CTX_set_cb; | ||
4163 | + PKCS7_to_TS_TST_INFO; | ||
4164 | + ASN1_PCTX_get_oid_flags; | ||
4165 | + TS_TST_INFO_add_ext; | ||
4166 | + EVP_PKEY_meth_set_derive; | ||
4167 | + i2d_TS_RESP_fp; | ||
4168 | + i2d_TS_MSG_IMPRINT_bio; | ||
4169 | + TS_RESP_CTX_set_accuracy; | ||
4170 | + TS_REQ_set_nonce; | ||
4171 | + ESS_CERT_ID_new; | ||
4172 | + ENGINE_pkey_asn1_find_str; | ||
4173 | + TS_REQ_get_ext_count; | ||
4174 | + BUF_reverse; | ||
4175 | + TS_TST_INFO_print_bio; | ||
4176 | + d2i_ISSUING_DIST_POINT; | ||
4177 | + ENGINE_get_pkey_meths; | ||
4178 | + i2b_PrivateKey_bio; | ||
4179 | + i2d_TS_RESP; | ||
4180 | + b2i_PublicKey; | ||
4181 | + TS_VERIFY_CTX_cleanup; | ||
4182 | + TS_STATUS_INFO_free; | ||
4183 | + TS_RESP_verify_token; | ||
4184 | + OBJ_bsearch_ex_; | ||
4185 | + ASN1_bn_print; | ||
4186 | + EVP_PKEY_asn1_get_count; | ||
4187 | + ENGINE_register_pkey_asn1_meths; | ||
4188 | + ASN1_PCTX_set_nm_flags; | ||
4189 | + EVP_DigestVerifyInit; | ||
4190 | + ENGINE_set_default_pkey_meths; | ||
4191 | + TS_TST_INFO_get_policy_id; | ||
4192 | + TS_REQ_get_cert_req; | ||
4193 | + X509_CRL_set_meth_data; | ||
4194 | + PKCS8_pkey_set0; | ||
4195 | + ASN1_STRING_copy; | ||
4196 | + d2i_TS_TST_INFO_fp; | ||
4197 | + X509_CRL_match; | ||
4198 | + EVP_PKEY_asn1_set_private; | ||
4199 | + TS_TST_INFO_get_ext_d2i; | ||
4200 | + TS_RESP_CTX_add_policy; | ||
4201 | + d2i_TS_RESP; | ||
4202 | + TS_CONF_load_certs; | ||
4203 | + TS_TST_INFO_get_msg_imprint; | ||
4204 | + ERR_load_TS_strings; | ||
4205 | + TS_TST_INFO_get_version; | ||
4206 | + EVP_PKEY_CTX_dup; | ||
4207 | + EVP_PKEY_meth_set_verify; | ||
4208 | + i2b_PublicKey_bio; | ||
4209 | + TS_CONF_set_certs; | ||
4210 | + EVP_PKEY_asn1_get0_info; | ||
4211 | + TS_VERIFY_CTX_free; | ||
4212 | + TS_REQ_get_ext_by_critical; | ||
4213 | + TS_RESP_CTX_set_serial_cb; | ||
4214 | + X509_CRL_get_meth_data; | ||
4215 | + TS_RESP_CTX_set_time_cb; | ||
4216 | + TS_MSG_IMPRINT_get_msg; | ||
4217 | + TS_TST_INFO_ext_free; | ||
4218 | + TS_REQ_get_version; | ||
4219 | + TS_REQ_add_ext; | ||
4220 | + EVP_PKEY_CTX_set_app_data; | ||
4221 | + OBJ_bsearch_; | ||
4222 | + EVP_PKEY_meth_set_verifyctx; | ||
4223 | + i2d_PKCS7_bio_stream; | ||
4224 | + CRYPTO_THREADID_set_numeric; | ||
4225 | + PKCS7_sign_add_signer; | ||
4226 | + d2i_TS_TST_INFO_bio; | ||
4227 | + TS_TST_INFO_get_ordering; | ||
4228 | + TS_RESP_print_bio; | ||
4229 | + TS_TST_INFO_get_exts; | ||
4230 | + HMAC_CTX_copy; | ||
4231 | + PKCS5_pbe2_set_iv; | ||
4232 | + ENGINE_get_pkey_asn1_meths; | ||
4233 | + b2i_PrivateKey; | ||
4234 | + EVP_PKEY_CTX_get_app_data; | ||
4235 | + TS_REQ_set_cert_req; | ||
4236 | + CRYPTO_THREADID_set_callback; | ||
4237 | + TS_CONF_set_serial; | ||
4238 | + TS_TST_INFO_free; | ||
4239 | + d2i_TS_REQ_fp; | ||
4240 | + TS_RESP_verify_response; | ||
4241 | + i2d_ESS_ISSUER_SERIAL; | ||
4242 | + TS_ACCURACY_get_seconds; | ||
4243 | + EVP_CIPHER_do_all; | ||
4244 | + b2i_PrivateKey_bio; | ||
4245 | + OCSP_CERTID_dup; | ||
4246 | + X509_PUBKEY_get0_param; | ||
4247 | + TS_MSG_IMPRINT_dup; | ||
4248 | + PKCS7_print_ctx; | ||
4249 | + i2d_TS_REQ_bio; | ||
4250 | + EVP_whirlpool; | ||
4251 | + EVP_PKEY_asn1_set_param; | ||
4252 | + EVP_PKEY_meth_set_encrypt; | ||
4253 | + ASN1_PCTX_set_flags; | ||
4254 | + i2d_ESS_CERT_ID; | ||
4255 | + TS_VERIFY_CTX_new; | ||
4256 | + TS_RESP_CTX_set_extension_cb; | ||
4257 | + ENGINE_register_all_pkey_meths; | ||
4258 | + TS_RESP_CTX_set_status_info_cond; | ||
4259 | + TS_RESP_CTX_set_stat_info_cond; | ||
4260 | + EVP_PKEY_verify; | ||
4261 | + WHIRLPOOL_Final; | ||
4262 | + X509_CRL_METHOD_new; | ||
4263 | + EVP_DigestSignFinal; | ||
4264 | + TS_RESP_CTX_set_def_policy; | ||
4265 | + NETSCAPE_X509_it; | ||
4266 | + NETSCAPE_X509_it; | ||
4267 | + TS_RESP_create_response; | ||
4268 | + PKCS7_SIGNER_INFO_get0_algs; | ||
4269 | + TS_TST_INFO_get_nonce; | ||
4270 | + EVP_PKEY_decrypt_old; | ||
4271 | + TS_TST_INFO_set_policy_id; | ||
4272 | + TS_CONF_set_ess_cert_id_chain; | ||
4273 | + EVP_PKEY_CTX_get0_pkey; | ||
4274 | + d2i_TS_REQ; | ||
4275 | + EVP_PKEY_asn1_find_str; | ||
4276 | + BIO_f_asn1; | ||
4277 | + ESS_SIGNING_CERT_new; | ||
4278 | + EVP_PBE_find; | ||
4279 | + X509_CRL_get0_by_cert; | ||
4280 | + EVP_PKEY_derive; | ||
4281 | + i2d_TS_REQ; | ||
4282 | + TS_TST_INFO_delete_ext; | ||
4283 | + ESS_ISSUER_SERIAL_free; | ||
4284 | + ASN1_PCTX_set_str_flags; | ||
4285 | + ENGINE_get_pkey_asn1_meth_str; | ||
4286 | + TS_CONF_set_signer_key; | ||
4287 | + TS_ACCURACY_get_millis; | ||
4288 | + TS_RESP_get_token; | ||
4289 | + TS_ACCURACY_dup; | ||
4290 | + ENGINE_register_all_pkey_asn1_meths; | ||
4291 | + ENGINE_reg_all_pkey_asn1_meths; | ||
4292 | + X509_CRL_set_default_method; | ||
4293 | + CRYPTO_THREADID_hash; | ||
4294 | + CMS_ContentInfo_print_ctx; | ||
4295 | + TS_RESP_free; | ||
4296 | + ISSUING_DIST_POINT_free; | ||
4297 | + ESS_ISSUER_SERIAL_new; | ||
4298 | + CMS_add1_crl; | ||
4299 | + PKCS7_add1_attrib_digest; | ||
4300 | + TS_RESP_CTX_add_md; | ||
4301 | + TS_TST_INFO_dup; | ||
4302 | + ENGINE_set_pkey_asn1_meths; | ||
4303 | + PEM_write_bio_Parameters; | ||
4304 | + TS_TST_INFO_get_accuracy; | ||
4305 | + X509_CRL_get0_by_serial; | ||
4306 | + TS_TST_INFO_set_version; | ||
4307 | + TS_RESP_CTX_get_tst_info; | ||
4308 | + TS_RESP_verify_signature; | ||
4309 | + CRYPTO_THREADID_get_callback; | ||
4310 | + TS_TST_INFO_get_tsa; | ||
4311 | + TS_STATUS_INFO_new; | ||
4312 | + EVP_PKEY_CTX_get_cb; | ||
4313 | + TS_REQ_get_ext_d2i; | ||
4314 | + GENERAL_NAME_set0_othername; | ||
4315 | + TS_TST_INFO_get_ext_count; | ||
4316 | + TS_RESP_CTX_get_request; | ||
4317 | + i2d_NETSCAPE_X509; | ||
4318 | + ENGINE_get_pkey_meth_engine; | ||
4319 | + EVP_PKEY_meth_set_signctx; | ||
4320 | + EVP_PKEY_asn1_copy; | ||
4321 | + ASN1_TYPE_cmp; | ||
4322 | + EVP_CIPHER_do_all_sorted; | ||
4323 | + EVP_PKEY_CTX_free; | ||
4324 | + ISSUING_DIST_POINT_it; | ||
4325 | + ISSUING_DIST_POINT_it; | ||
4326 | + d2i_TS_MSG_IMPRINT_fp; | ||
4327 | + X509_STORE_get1_certs; | ||
4328 | + EVP_PKEY_CTX_get_operation; | ||
4329 | + d2i_ESS_SIGNING_CERT; | ||
4330 | + TS_CONF_set_ordering; | ||
4331 | + EVP_PBE_alg_add_type; | ||
4332 | + TS_REQ_set_version; | ||
4333 | + EVP_PKEY_get0; | ||
4334 | + BIO_asn1_set_suffix; | ||
4335 | + i2d_TS_STATUS_INFO; | ||
4336 | + EVP_MD_do_all; | ||
4337 | + TS_TST_INFO_set_accuracy; | ||
4338 | + PKCS7_add_attrib_content_type; | ||
4339 | + ERR_remove_thread_state; | ||
4340 | + EVP_PKEY_meth_add0; | ||
4341 | + TS_TST_INFO_set_tsa; | ||
4342 | + EVP_PKEY_meth_new; | ||
4343 | + WHIRLPOOL_Update; | ||
4344 | + TS_CONF_set_accuracy; | ||
4345 | + ASN1_PCTX_set_oid_flags; | ||
4346 | + ESS_SIGNING_CERT_dup; | ||
4347 | + d2i_TS_REQ_bio; | ||
4348 | + X509_time_adj_ex; | ||
4349 | + TS_RESP_CTX_add_flags; | ||
4350 | + d2i_TS_STATUS_INFO; | ||
4351 | + TS_MSG_IMPRINT_set_msg; | ||
4352 | + BIO_asn1_get_suffix; | ||
4353 | + TS_REQ_free; | ||
4354 | + EVP_PKEY_meth_free; | ||
4355 | + TS_REQ_get_exts; | ||
4356 | + TS_RESP_CTX_set_clock_precision_digits; | ||
4357 | + TS_RESP_CTX_set_clk_prec_digits; | ||
4358 | + TS_RESP_CTX_add_failure_info; | ||
4359 | + i2d_TS_RESP_bio; | ||
4360 | + EVP_PKEY_CTX_get0_peerkey; | ||
4361 | + PEM_write_bio_CMS_stream; | ||
4362 | + TS_REQ_new; | ||
4363 | + TS_MSG_IMPRINT_new; | ||
4364 | + EVP_PKEY_meth_find; | ||
4365 | + EVP_PKEY_id; | ||
4366 | + TS_TST_INFO_set_serial; | ||
4367 | + a2i_GENERAL_NAME; | ||
4368 | + TS_CONF_set_crypto_device; | ||
4369 | + EVP_PKEY_verify_init; | ||
4370 | + TS_CONF_set_policies; | ||
4371 | + ASN1_PCTX_new; | ||
4372 | + ESS_CERT_ID_free; | ||
4373 | + ENGINE_unregister_pkey_meths; | ||
4374 | + TS_MSG_IMPRINT_free; | ||
4375 | + TS_VERIFY_CTX_init; | ||
4376 | + PKCS7_stream; | ||
4377 | + TS_RESP_CTX_set_certs; | ||
4378 | + TS_CONF_set_def_policy; | ||
4379 | + ASN1_GENERALIZEDTIME_adj; | ||
4380 | + NETSCAPE_X509_new; | ||
4381 | + TS_ACCURACY_free; | ||
4382 | + TS_RESP_get_tst_info; | ||
4383 | + EVP_PKEY_derive_set_peer; | ||
4384 | + PEM_read_bio_Parameters; | ||
4385 | + TS_CONF_set_clock_precision_digits; | ||
4386 | + TS_CONF_set_clk_prec_digits; | ||
4387 | + ESS_ISSUER_SERIAL_dup; | ||
4388 | + TS_ACCURACY_get_micros; | ||
4389 | + ASN1_PCTX_get_str_flags; | ||
4390 | + NAME_CONSTRAINTS_check; | ||
4391 | + ASN1_BIT_STRING_check; | ||
4392 | + X509_check_akid; | ||
4393 | + ENGINE_unregister_pkey_asn1_meths; | ||
4394 | + ENGINE_unreg_pkey_asn1_meths; | ||
4395 | + ASN1_PCTX_free; | ||
4396 | + PEM_write_bio_ASN1_stream; | ||
4397 | + i2d_ASN1_bio_stream; | ||
4398 | + TS_X509_ALGOR_print_bio; | ||
4399 | + EVP_PKEY_meth_set_cleanup; | ||
4400 | + EVP_PKEY_asn1_free; | ||
4401 | + ESS_SIGNING_CERT_free; | ||
4402 | + TS_TST_INFO_set_msg_imprint; | ||
4403 | + GENERAL_NAME_cmp; | ||
4404 | + d2i_ASN1_SET_ANY; | ||
4405 | + ENGINE_set_pkey_meths; | ||
4406 | + i2d_TS_REQ_fp; | ||
4407 | + d2i_ASN1_SEQUENCE_ANY; | ||
4408 | + GENERAL_NAME_get0_otherName; | ||
4409 | + d2i_ESS_CERT_ID; | ||
4410 | + OBJ_find_sigid_algs; | ||
4411 | + EVP_PKEY_meth_set_keygen; | ||
4412 | + PKCS5_PBKDF2_HMAC; | ||
4413 | + EVP_PKEY_paramgen; | ||
4414 | + EVP_PKEY_meth_set_paramgen; | ||
4415 | + BIO_new_PKCS7; | ||
4416 | + EVP_PKEY_verify_recover; | ||
4417 | + TS_ext_print_bio; | ||
4418 | + TS_ASN1_INTEGER_print_bio; | ||
4419 | + check_defer; | ||
4420 | + DSO_pathbyaddr; | ||
4421 | + EVP_PKEY_set_type; | ||
4422 | + TS_ACCURACY_set_micros; | ||
4423 | + TS_REQ_to_TS_VERIFY_CTX; | ||
4424 | + EVP_PKEY_meth_set_copy; | ||
4425 | + ASN1_PCTX_set_cert_flags; | ||
4426 | + TS_TST_INFO_get_ext; | ||
4427 | + EVP_PKEY_asn1_set_ctrl; | ||
4428 | + TS_TST_INFO_get_ext_by_critical; | ||
4429 | + EVP_PKEY_CTX_new_id; | ||
4430 | + TS_REQ_get_ext_by_OBJ; | ||
4431 | + TS_CONF_set_signer_cert; | ||
4432 | + X509_NAME_hash_old; | ||
4433 | + ASN1_TIME_set_string; | ||
4434 | + EVP_MD_flags; | ||
4435 | + TS_RESP_CTX_free; | ||
4436 | + DSAparams_dup; | ||
4437 | + DHparams_dup; | ||
4438 | + OCSP_REQ_CTX_add1_header; | ||
4439 | + OCSP_REQ_CTX_set1_req; | ||
4440 | + X509_STORE_set_verify_cb; | ||
4441 | + X509_STORE_CTX_get0_current_crl; | ||
4442 | + X509_STORE_CTX_get0_parent_ctx; | ||
4443 | + X509_STORE_CTX_get0_current_issuer; | ||
4444 | + X509_STORE_CTX_get0_cur_issuer; | ||
4445 | + X509_issuer_name_hash_old; | ||
4446 | + X509_subject_name_hash_old; | ||
4447 | + EVP_CIPHER_CTX_copy; | ||
4448 | + UI_method_get_prompt_constructor; | ||
4449 | + UI_method_get_prompt_constructr; | ||
4450 | + UI_method_set_prompt_constructor; | ||
4451 | + UI_method_set_prompt_constructr; | ||
4452 | + EVP_read_pw_string_min; | ||
4453 | + CRYPTO_cts128_encrypt; | ||
4454 | + CRYPTO_cts128_decrypt_block; | ||
4455 | + CRYPTO_cfb128_1_encrypt; | ||
4456 | + CRYPTO_cbc128_encrypt; | ||
4457 | + CRYPTO_ctr128_encrypt; | ||
4458 | + CRYPTO_ofb128_encrypt; | ||
4459 | + CRYPTO_cts128_decrypt; | ||
4460 | + CRYPTO_cts128_encrypt_block; | ||
4461 | + CRYPTO_cbc128_decrypt; | ||
4462 | + CRYPTO_cfb128_encrypt; | ||
4463 | + CRYPTO_cfb128_8_encrypt; | ||
4464 | + | ||
4465 | + local: | ||
4466 | + *; | ||
4467 | +}; | ||
4468 | + | ||
4469 | + | ||
4470 | +OPENSSL_1.0.1 { | ||
4471 | + global: | ||
4472 | + SSL_renegotiate_abbreviated; | ||
4473 | + TLSv1_1_method; | ||
4474 | + TLSv1_1_client_method; | ||
4475 | + TLSv1_1_server_method; | ||
4476 | + SSL_CTX_set_srp_client_pwd_callback; | ||
4477 | + SSL_CTX_set_srp_client_pwd_cb; | ||
4478 | + SSL_get_srp_g; | ||
4479 | + SSL_CTX_set_srp_username_callback; | ||
4480 | + SSL_CTX_set_srp_un_cb; | ||
4481 | + SSL_get_srp_userinfo; | ||
4482 | + SSL_set_srp_server_param; | ||
4483 | + SSL_set_srp_server_param_pw; | ||
4484 | + SSL_get_srp_N; | ||
4485 | + SSL_get_srp_username; | ||
4486 | + SSL_CTX_set_srp_password; | ||
4487 | + SSL_CTX_set_srp_strength; | ||
4488 | + SSL_CTX_set_srp_verify_param_callback; | ||
4489 | + SSL_CTX_set_srp_vfy_param_cb; | ||
4490 | + SSL_CTX_set_srp_cb_arg; | ||
4491 | + SSL_CTX_set_srp_username; | ||
4492 | + SSL_CTX_SRP_CTX_init; | ||
4493 | + SSL_SRP_CTX_init; | ||
4494 | + SRP_Calc_A_param; | ||
4495 | + SRP_generate_server_master_secret; | ||
4496 | + SRP_gen_server_master_secret; | ||
4497 | + SSL_CTX_SRP_CTX_free; | ||
4498 | + SRP_generate_client_master_secret; | ||
4499 | + SRP_gen_client_master_secret; | ||
4500 | + SSL_srp_server_param_with_username; | ||
4501 | + SSL_srp_server_param_with_un; | ||
4502 | + SSL_SRP_CTX_free; | ||
4503 | + SSL_set_debug; | ||
4504 | + SSL_SESSION_get0_peer; | ||
4505 | + TLSv1_2_client_method; | ||
4506 | + SSL_SESSION_set1_id_context; | ||
4507 | + TLSv1_2_server_method; | ||
4508 | + SSL_cache_hit; | ||
4509 | + SSL_get0_kssl_ctx; | ||
4510 | + SSL_set0_kssl_ctx; | ||
4511 | + SSL_set_state; | ||
4512 | + SSL_CIPHER_get_id; | ||
4513 | + TLSv1_2_method; | ||
4514 | + kssl_ctx_get0_client_princ; | ||
4515 | + SSL_export_keying_material; | ||
4516 | + SSL_set_tlsext_use_srtp; | ||
4517 | + SSL_CTX_set_next_protos_advertised_cb; | ||
4518 | + SSL_CTX_set_next_protos_adv_cb; | ||
4519 | + SSL_get0_next_proto_negotiated; | ||
4520 | + SSL_get_selected_srtp_profile; | ||
4521 | + SSL_CTX_set_tlsext_use_srtp; | ||
4522 | + SSL_select_next_proto; | ||
4523 | + SSL_get_srtp_profiles; | ||
4524 | + SSL_CTX_set_next_proto_select_cb; | ||
4525 | + SSL_CTX_set_next_proto_sel_cb; | ||
4526 | + SSL_SESSION_get_compress_id; | ||
4527 | + | ||
4528 | + SRP_VBASE_get_by_user; | ||
4529 | + SRP_Calc_server_key; | ||
4530 | + SRP_create_verifier; | ||
4531 | + SRP_create_verifier_BN; | ||
4532 | + SRP_Calc_u; | ||
4533 | + SRP_VBASE_free; | ||
4534 | + SRP_Calc_client_key; | ||
4535 | + SRP_get_default_gN; | ||
4536 | + SRP_Calc_x; | ||
4537 | + SRP_Calc_B; | ||
4538 | + SRP_VBASE_new; | ||
4539 | + SRP_check_known_gN_param; | ||
4540 | + SRP_Calc_A; | ||
4541 | + SRP_Verify_A_mod_N; | ||
4542 | + SRP_VBASE_init; | ||
4543 | + SRP_Verify_B_mod_N; | ||
4544 | + EC_KEY_set_public_key_affine_coordinates; | ||
4545 | + EC_KEY_set_pub_key_aff_coords; | ||
4546 | + EVP_aes_192_ctr; | ||
4547 | + EVP_PKEY_meth_get0_info; | ||
4548 | + EVP_PKEY_meth_copy; | ||
4549 | + ERR_add_error_vdata; | ||
4550 | + EVP_aes_128_ctr; | ||
4551 | + EVP_aes_256_ctr; | ||
4552 | + EC_GFp_nistp224_method; | ||
4553 | + EC_KEY_get_flags; | ||
4554 | + RSA_padding_add_PKCS1_PSS_mgf1; | ||
4555 | + EVP_aes_128_xts; | ||
4556 | + EVP_aes_256_xts; | ||
4557 | + EVP_aes_128_gcm; | ||
4558 | + EC_KEY_clear_flags; | ||
4559 | + EC_KEY_set_flags; | ||
4560 | + EVP_aes_256_ccm; | ||
4561 | + RSA_verify_PKCS1_PSS_mgf1; | ||
4562 | + EVP_aes_128_ccm; | ||
4563 | + EVP_aes_192_gcm; | ||
4564 | + X509_ALGOR_set_md; | ||
4565 | + RAND_init_fips; | ||
4566 | + EVP_aes_256_gcm; | ||
4567 | + EVP_aes_192_ccm; | ||
4568 | + CMAC_CTX_copy; | ||
4569 | + CMAC_CTX_free; | ||
4570 | + CMAC_CTX_get0_cipher_ctx; | ||
4571 | + CMAC_CTX_cleanup; | ||
4572 | + CMAC_Init; | ||
4573 | + CMAC_Update; | ||
4574 | + CMAC_resume; | ||
4575 | + CMAC_CTX_new; | ||
4576 | + CMAC_Final; | ||
4577 | + CRYPTO_ctr128_encrypt_ctr32; | ||
4578 | + CRYPTO_gcm128_release; | ||
4579 | + CRYPTO_ccm128_decrypt_ccm64; | ||
4580 | + CRYPTO_ccm128_encrypt; | ||
4581 | + CRYPTO_gcm128_encrypt; | ||
4582 | + CRYPTO_xts128_encrypt; | ||
4583 | + EVP_rc4_hmac_md5; | ||
4584 | + CRYPTO_nistcts128_decrypt_block; | ||
4585 | + CRYPTO_gcm128_setiv; | ||
4586 | + CRYPTO_nistcts128_encrypt; | ||
4587 | + EVP_aes_128_cbc_hmac_sha1; | ||
4588 | + CRYPTO_gcm128_tag; | ||
4589 | + CRYPTO_ccm128_encrypt_ccm64; | ||
4590 | + ENGINE_load_rdrand; | ||
4591 | + CRYPTO_ccm128_setiv; | ||
4592 | + CRYPTO_nistcts128_encrypt_block; | ||
4593 | + CRYPTO_gcm128_aad; | ||
4594 | + CRYPTO_ccm128_init; | ||
4595 | + CRYPTO_nistcts128_decrypt; | ||
4596 | + CRYPTO_gcm128_new; | ||
4597 | + CRYPTO_ccm128_tag; | ||
4598 | + CRYPTO_ccm128_decrypt; | ||
4599 | + CRYPTO_ccm128_aad; | ||
4600 | + CRYPTO_gcm128_init; | ||
4601 | + CRYPTO_gcm128_decrypt; | ||
4602 | + ENGINE_load_rsax; | ||
4603 | + CRYPTO_gcm128_decrypt_ctr32; | ||
4604 | + CRYPTO_gcm128_encrypt_ctr32; | ||
4605 | + CRYPTO_gcm128_finish; | ||
4606 | + EVP_aes_256_cbc_hmac_sha1; | ||
4607 | + PKCS5_pbkdf2_set; | ||
4608 | + CMS_add0_recipient_password; | ||
4609 | + CMS_decrypt_set1_password; | ||
4610 | + CMS_RecipientInfo_set0_password; | ||
4611 | + RAND_set_fips_drbg_type; | ||
4612 | + X509_REQ_sign_ctx; | ||
4613 | + RSA_PSS_PARAMS_new; | ||
4614 | + X509_CRL_sign_ctx; | ||
4615 | + X509_signature_dump; | ||
4616 | + d2i_RSA_PSS_PARAMS; | ||
4617 | + RSA_PSS_PARAMS_it; | ||
4618 | + RSA_PSS_PARAMS_it; | ||
4619 | + RSA_PSS_PARAMS_free; | ||
4620 | + X509_sign_ctx; | ||
4621 | + i2d_RSA_PSS_PARAMS; | ||
4622 | + ASN1_item_sign_ctx; | ||
4623 | + EC_GFp_nistp521_method; | ||
4624 | + EC_GFp_nistp256_method; | ||
4625 | + OPENSSL_stderr; | ||
4626 | + OPENSSL_cpuid_setup; | ||
4627 | + OPENSSL_showfatal; | ||
4628 | + BIO_new_dgram_sctp; | ||
4629 | + BIO_dgram_sctp_msg_waiting; | ||
4630 | + BIO_dgram_sctp_wait_for_dry; | ||
4631 | + BIO_s_datagram_sctp; | ||
4632 | + BIO_dgram_is_sctp; | ||
4633 | + BIO_dgram_sctp_notification_cb; | ||
4634 | +} OPENSSL_1.0.0; | ||
4635 | + | ||
4636 | +OPENSSL_1.0.1d { | ||
4637 | + global: | ||
4638 | + CRYPTO_memcmp; | ||
4639 | +} OPENSSL_1.0.1; | ||
4640 | + | ||
4641 | Index: openssl-1.0.1d/engines/openssl.ld | ||
4642 | =================================================================== | ||
4643 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
4644 | +++ openssl-1.0.1d/engines/openssl.ld 2013-02-06 19:41:43.000000000 +0100 | ||
4645 | @@ -0,0 +1,10 @@ | ||
4646 | +OPENSSL_1.0.0 { | ||
4647 | + global: | ||
4648 | + bind_engine; | ||
4649 | + v_check; | ||
4650 | + OPENSSL_init; | ||
4651 | + OPENSSL_finish; | ||
4652 | + local: | ||
4653 | + *; | ||
4654 | +}; | ||
4655 | + | ||
4656 | Index: openssl-1.0.1d/engines/ccgost/openssl.ld | ||
4657 | =================================================================== | ||
4658 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
4659 | +++ openssl-1.0.1d/engines/ccgost/openssl.ld 2013-02-06 19:41:43.000000000 +0100 | ||
4660 | @@ -0,0 +1,10 @@ | ||
4661 | +OPENSSL_1.0.0 { | ||
4662 | + global: | ||
4663 | + bind_engine; | ||
4664 | + v_check; | ||
4665 | + OPENSSL_init; | ||
4666 | + OPENSSL_finish; | ||
4667 | + local: | ||
4668 | + *; | ||
4669 | +}; | ||
4670 | + | ||
diff --git a/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch b/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch new file mode 100644 index 00000000..d8a6f1a2 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/engines-install-in-libdir-ssl.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | |||
4 | Index: openssl-1.0.0/engines/Makefile | ||
5 | =================================================================== | ||
6 | --- openssl-1.0.0.orig/engines/Makefile | ||
7 | +++ openssl-1.0.0/engines/Makefile | ||
8 | @@ -107,7 +107,7 @@ | ||
9 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
10 | @if [ -n "$(SHARED_LIBS)" ]; then \ | ||
11 | set -e; \ | ||
12 | - $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \ | ||
13 | + $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines; \ | ||
14 | for l in $(LIBNAMES); do \ | ||
15 | ( echo installing $$l; \ | ||
16 | pfx=lib; \ | ||
17 | @@ -119,13 +119,13 @@ | ||
18 | *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ | ||
19 | *) sfx=".bad";; \ | ||
20 | esac; \ | ||
21 | - cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ | ||
22 | + cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ | ||
23 | else \ | ||
24 | sfx=".so"; \ | ||
25 | - cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ | ||
26 | + cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ | ||
27 | fi; \ | ||
28 | - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ | ||
29 | - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \ | ||
30 | + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ | ||
31 | + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \ | ||
32 | done; \ | ||
33 | fi | ||
34 | @target=install; $(RECURSIVE_MAKE) | ||
35 | Index: openssl-1.0.0/engines/ccgost/Makefile | ||
36 | =================================================================== | ||
37 | --- openssl-1.0.0.orig/engines/ccgost/Makefile | ||
38 | +++ openssl-1.0.0/engines/ccgost/Makefile | ||
39 | @@ -53,13 +53,13 @@ | ||
40 | *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ | ||
41 | *) sfx=".bad";; \ | ||
42 | esac; \ | ||
43 | - cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ | ||
44 | + cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ | ||
45 | else \ | ||
46 | sfx=".so"; \ | ||
47 | - cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ | ||
48 | + cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ | ||
49 | fi; \ | ||
50 | - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ | ||
51 | - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \ | ||
52 | + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ | ||
53 | + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx; \ | ||
54 | fi | ||
55 | |||
56 | links: | ||
diff --git a/recipes-connectivity/openssl/openssl/find.pl b/recipes-connectivity/openssl/openssl/find.pl new file mode 100644 index 00000000..8e1b42c8 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/find.pl | |||
@@ -0,0 +1,54 @@ | |||
1 | warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n"; | ||
2 | |||
3 | # This library is deprecated and unmaintained. It is included for | ||
4 | # compatibility with Perl 4 scripts which may use it, but it will be | ||
5 | # removed in a future version of Perl. Please use the File::Find module | ||
6 | # instead. | ||
7 | |||
8 | # Usage: | ||
9 | # require "find.pl"; | ||
10 | # | ||
11 | # &find('/foo','/bar'); | ||
12 | # | ||
13 | # sub wanted { ... } | ||
14 | # where wanted does whatever you want. $dir contains the | ||
15 | # current directory name, and $_ the current filename within | ||
16 | # that directory. $name contains "$dir/$_". You are cd'ed | ||
17 | # to $dir when the function is called. The function may | ||
18 | # set $prune to prune the tree. | ||
19 | # | ||
20 | # For example, | ||
21 | # | ||
22 | # find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune | ||
23 | # | ||
24 | # corresponds to this | ||
25 | # | ||
26 | # sub wanted { | ||
27 | # /^\.nfs.*$/ && | ||
28 | # (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && | ||
29 | # int(-M _) > 7 && | ||
30 | # unlink($_) | ||
31 | # || | ||
32 | # ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) && | ||
33 | # $dev < 0 && | ||
34 | # ($prune = 1); | ||
35 | # } | ||
36 | # | ||
37 | # Set the variable $dont_use_nlink if you're using AFS, since AFS cheats. | ||
38 | |||
39 | use File::Find (); | ||
40 | |||
41 | *name = *File::Find::name; | ||
42 | *prune = *File::Find::prune; | ||
43 | *dir = *File::Find::dir; | ||
44 | *topdir = *File::Find::topdir; | ||
45 | *topdev = *File::Find::topdev; | ||
46 | *topino = *File::Find::topino; | ||
47 | *topmode = *File::Find::topmode; | ||
48 | *topnlink = *File::Find::topnlink; | ||
49 | |||
50 | sub find { | ||
51 | &File::Find::find(\&wanted, @_); | ||
52 | } | ||
53 | |||
54 | 1; | ||
diff --git a/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch b/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch new file mode 100644 index 00000000..f0e17784 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | |||
3 | This patch adds the fix for one of the ciphers used in openssl, namely | ||
4 | the cipher des-ede3-cfb1. Complete bug log and patch is present here: | ||
5 | http://rt.openssl.org/Ticket/Display.html?id=2867 | ||
6 | |||
7 | Signed-Off-By: Muhammad Shakeel <muhammad_shakeel@mentor.com> | ||
8 | |||
9 | diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c | ||
10 | index 3232cfe..df84922 100644 | ||
11 | =================================================================== | ||
12 | --- a/crypto/evp/e_des3.c | ||
13 | +++ b/crypto/evp/e_des3.c | ||
14 | @@ -173,7 +173,7 @@ static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
15 | size_t n; | ||
16 | unsigned char c[1],d[1]; | ||
17 | |||
18 | - for(n=0 ; n < inl ; ++n) | ||
19 | + for(n=0 ; n < inl*8 ; ++n) | ||
20 | { | ||
21 | c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; | ||
22 | DES_ede3_cfb_encrypt(c,d,1,1, | ||
diff --git a/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch b/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch new file mode 100644 index 00000000..2185ff8a --- /dev/null +++ b/recipes-connectivity/openssl/openssl/initial-aarch64-bits.patch | |||
@@ -0,0 +1,119 @@ | |||
1 | From: Andy Polyakov <appro@openssl.org> | ||
2 | Date: Sun, 13 Oct 2013 17:15:15 +0000 (+0200) | ||
3 | Subject: Initial aarch64 bits. | ||
4 | X-Git-Url: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=039081b80977e2a5de84e1f88f8b4d025b559956 | ||
5 | |||
6 | Initial aarch64 bits. | ||
7 | --- | ||
8 | crypto/bn/bn_lcl.h | 9 +++++++++ | ||
9 | crypto/md32_common.h | 18 ++++++++++++++++++ | ||
10 | crypto/modes/modes_lcl.h | 8 ++++++++ | ||
11 | crypto/sha/sha512.c | 13 +++++++++++++ | ||
12 | 4 files changed, 48 insertions(+) | ||
13 | |||
14 | Index: openssl-1.0.1f/crypto/bn/bn_lcl.h | ||
15 | =================================================================== | ||
16 | --- openssl-1.0.1f.orig/crypto/bn/bn_lcl.h 2014-01-06 15:47:42.000000000 +0200 | ||
17 | +++ openssl-1.0.1f/crypto/bn/bn_lcl.h 2014-02-28 10:37:55.495979037 +0200 | ||
18 | @@ -300,6 +300,15 @@ | ||
19 | : "r"(a), "r"(b)); | ||
20 | # endif | ||
21 | # endif | ||
22 | +# elif defined(__aarch64__) && defined(SIXTY_FOUR_BIT_LONG) | ||
23 | +# if defined(__GNUC__) && __GNUC__>=2 | ||
24 | +# define BN_UMULT_HIGH(a,b) ({ \ | ||
25 | + register BN_ULONG ret; \ | ||
26 | + asm ("umulh %0,%1,%2" \ | ||
27 | + : "=r"(ret) \ | ||
28 | + : "r"(a), "r"(b)); \ | ||
29 | + ret; }) | ||
30 | +# endif | ||
31 | # endif /* cpu */ | ||
32 | #endif /* OPENSSL_NO_ASM */ | ||
33 | |||
34 | Index: openssl-1.0.1f/crypto/md32_common.h | ||
35 | =================================================================== | ||
36 | --- openssl-1.0.1f.orig/crypto/md32_common.h 2014-01-06 15:47:42.000000000 +0200 | ||
37 | +++ openssl-1.0.1f/crypto/md32_common.h 2014-02-28 10:39:21.751979107 +0200 | ||
38 | @@ -213,6 +213,24 @@ | ||
39 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | ||
40 | *((unsigned int *)(c))=r; (c)+=4; r; }) | ||
41 | # endif | ||
42 | +# elif defined(__aarch64__) | ||
43 | +# if defined(__BYTE_ORDER__) | ||
44 | +# if defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ | ||
45 | +# define HOST_c2l(c,l) ({ unsigned int r; \ | ||
46 | + asm ("rev %w0,%w1" \ | ||
47 | + :"=r"(r) \ | ||
48 | + :"r"(*((const unsigned int *)(c))));\ | ||
49 | + (c)+=4; (l)=r; }) | ||
50 | +# define HOST_l2c(l,c) ({ unsigned int r; \ | ||
51 | + asm ("rev %w0,%w1" \ | ||
52 | + :"=r"(r) \ | ||
53 | + :"r"((unsigned int)(l)));\ | ||
54 | + *((unsigned int *)(c))=r; (c)+=4; r; }) | ||
55 | +# elif defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ | ||
56 | +# define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, (l)) | ||
57 | +# define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l)) | ||
58 | +# endif | ||
59 | +# endif | ||
60 | # endif | ||
61 | # endif | ||
62 | #endif | ||
63 | Index: openssl-1.0.1f/crypto/modes/modes_lcl.h | ||
64 | =================================================================== | ||
65 | --- openssl-1.0.1f.orig/crypto/modes/modes_lcl.h 2014-02-28 10:47:48.731979011 +0200 | ||
66 | +++ openssl-1.0.1f/crypto/modes/modes_lcl.h 2014-02-28 10:48:49.707978919 +0200 | ||
67 | @@ -29,6 +29,7 @@ | ||
68 | #if defined(__i386) || defined(__i386__) || \ | ||
69 | defined(__x86_64) || defined(__x86_64__) || \ | ||
70 | defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || \ | ||
71 | + defined(__aarch64__) || \ | ||
72 | defined(__s390__) || defined(__s390x__) | ||
73 | # undef STRICT_ALIGNMENT | ||
74 | #endif | ||
75 | @@ -50,6 +51,13 @@ | ||
76 | # define BSWAP4(x) ({ u32 ret=(x); \ | ||
77 | asm ("bswapl %0" \ | ||
78 | : "+r"(ret)); ret; }) | ||
79 | +# elif defined(__aarch64__) | ||
80 | +# define BSWAP8(x) ({ u64 ret; \ | ||
81 | + asm ("rev %0,%1" \ | ||
82 | + : "=r"(ret) : "r"(x)); ret; }) | ||
83 | +# define BSWAP4(x) ({ u32 ret; \ | ||
84 | + asm ("rev %w0,%w1" \ | ||
85 | + : "=r"(ret) : "r"(x)); ret; }) | ||
86 | # elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT) | ||
87 | # define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ | ||
88 | asm ("rev %0,%0; rev %1,%1" \ | ||
89 | Index: openssl-1.0.1f/crypto/sha/sha512.c | ||
90 | =================================================================== | ||
91 | --- openssl-1.0.1f.orig/crypto/sha/sha512.c 2014-01-06 15:47:42.000000000 +0200 | ||
92 | +++ openssl-1.0.1f/crypto/sha/sha512.c 2014-02-28 10:52:14.579978981 +0200 | ||
93 | @@ -55,6 +55,7 @@ | ||
94 | #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ | ||
95 | defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || \ | ||
96 | defined(__s390__) || defined(__s390x__) || \ | ||
97 | + defined(__aarch64__) || \ | ||
98 | defined(SHA512_ASM) | ||
99 | #define SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA | ||
100 | #endif | ||
101 | @@ -347,6 +348,18 @@ | ||
102 | asm ("rotrdi %0,%1,%2" \ | ||
103 | : "=r"(ret) \ | ||
104 | : "r"(a),"K"(n)); ret; }) | ||
105 | +# elif defined(__aarch64__) | ||
106 | +# define ROTR(a,n) ({ SHA_LONG64 ret; \ | ||
107 | + asm ("ror %0,%1,%2" \ | ||
108 | + : "=r"(ret) \ | ||
109 | + : "r"(a),"I"(n)); ret; }) | ||
110 | +# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ | ||
111 | + __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ | ||
112 | +# define PULL64(x) ({ SHA_LONG64 ret; \ | ||
113 | + asm ("rev %0,%1" \ | ||
114 | + : "=r"(ret) \ | ||
115 | + : "r"(*((const SHA_LONG64 *)(&(x))))); ret; }) | ||
116 | +# endif | ||
117 | # endif | ||
118 | # elif defined(_MSC_VER) | ||
119 | # if defined(_WIN64) /* applies to both IA-64 and AMD64 */ | ||
diff --git a/recipes-connectivity/openssl/openssl/oe-ldflags.patch b/recipes-connectivity/openssl/openssl/oe-ldflags.patch new file mode 100644 index 00000000..292e13dc --- /dev/null +++ b/recipes-connectivity/openssl/openssl/oe-ldflags.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Upstream-Status: Inappropriate [open-embedded] | ||
2 | |||
3 | Index: openssl-1.0.0/Makefile.shared | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.0.orig/Makefile.shared | ||
6 | +++ openssl-1.0.0/Makefile.shared | ||
7 | @@ -92,7 +92,7 @@ | ||
8 | LINK_APP= \ | ||
9 | ( $(SET_X); \ | ||
10 | LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ | ||
11 | - LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \ | ||
12 | + LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \ | ||
13 | LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ | ||
14 | LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ | ||
15 | LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ | ||
16 | @@ -102,7 +102,7 @@ | ||
17 | ( $(SET_X); \ | ||
18 | LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ | ||
19 | SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \ | ||
20 | - SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ | ||
21 | + SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ | ||
22 | LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ | ||
23 | LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ | ||
24 | LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ | ||
diff --git a/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch new file mode 100644 index 00000000..c161e62f --- /dev/null +++ b/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | openssl: avoid NULL pointer dereference in EVP_DigestInit_ex() | ||
2 | |||
3 | We should avoid accessing the type pointer if it's NULL, | ||
4 | this could happen if ctx->digest is not NULL. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html | ||
8 | |||
9 | Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> | ||
10 | --- | ||
11 | --- a/crypto/evp/digest.c | ||
12 | +++ b/crypto/evp/digest.c | ||
13 | @@ -199,7 +199,7 @@ | ||
14 | return 0; | ||
15 | } | ||
16 | #endif | ||
17 | - if (ctx->digest != type) | ||
18 | + if (type && (ctx->digest != type)) | ||
19 | { | ||
20 | if (ctx->digest && ctx->digest->ctx_size) | ||
21 | OPENSSL_free(ctx->md_data); | ||
diff --git a/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch b/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch new file mode 100644 index 00000000..3e93fe4e --- /dev/null +++ b/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | openssl: avoid NULL pointer dereference in dh_pub_encode()/dsa_pub_encode() | ||
2 | |||
3 | We should avoid accessing the pointer if ASN1_STRING_new() | ||
4 | allocates memory failed. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | http://www.mail-archive.com/openssl-dev@openssl.org/msg32859.html | ||
8 | |||
9 | Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> | ||
10 | --- | ||
11 | --- a/crypto/dh/dh_ameth.c | ||
12 | +++ b/crypto/dh/dh_ameth.c | ||
13 | @@ -139,6 +139,12 @@ | ||
14 | dh=pkey->pkey.dh; | ||
15 | |||
16 | str = ASN1_STRING_new(); | ||
17 | + if (!str) | ||
18 | + { | ||
19 | + DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE); | ||
20 | + goto err; | ||
21 | + } | ||
22 | + | ||
23 | str->length = i2d_DHparams(dh, &str->data); | ||
24 | if (str->length <= 0) | ||
25 | { | ||
26 | --- a/crypto/dsa/dsa_ameth.c | ||
27 | +++ b/crypto/dsa/dsa_ameth.c | ||
28 | @@ -148,6 +148,11 @@ | ||
29 | { | ||
30 | ASN1_STRING *str; | ||
31 | str = ASN1_STRING_new(); | ||
32 | + if (!str) | ||
33 | + { | ||
34 | + DSAerr(DSA_F_DSA_PUB_ENCODE, ERR_R_MALLOC_FAILURE); | ||
35 | + goto err; | ||
36 | + } | ||
37 | str->length = i2d_DSAparams(dsa, &str->data); | ||
38 | if (str->length <= 0) | ||
39 | { | ||
diff --git a/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch b/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch new file mode 100644 index 00000000..de49729e --- /dev/null +++ b/recipes-connectivity/openssl/openssl/openssl-fix-des.pod-error.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | openssl: Fix pod2man des.pod error on Ubuntu 12.04 | ||
2 | |||
3 | This is a formatting fix, '=back' is required before | ||
4 | '=head1' on Ubuntu 12.04. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Baogen Shang <baogen.shang@windriver.com> | ||
8 | diff -urpN a_origin/des.pod b_modify/des.pod | ||
9 | --- a_origin/crypto/des/des.pod 2013-08-15 15:02:56.211674589 +0800 | ||
10 | +++ b_modify/crypto/des/des.pod 2013-08-15 15:04:14.439674580 +0800 | ||
11 | @@ -181,6 +181,8 @@ the uuencoded file to embed in the begin | ||
12 | output. If there is no name specified after the B<-u>, the name text.des | ||
13 | will be embedded in the header. | ||
14 | |||
15 | +=back | ||
16 | + | ||
17 | =head1 SEE ALSO | ||
18 | |||
19 | ps(1), | ||
diff --git a/recipes-connectivity/openssl/openssl/openssl-fix-link.patch b/recipes-connectivity/openssl/openssl/openssl-fix-link.patch new file mode 100644 index 00000000..154106cb --- /dev/null +++ b/recipes-connectivity/openssl/openssl/openssl-fix-link.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From aabfb6f78af8e337d3239142117ba303fce55e7e Mon Sep 17 00:00:00 2001 | ||
2 | From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | ||
3 | Date: Thu, 22 Sep 2011 08:55:26 +0200 | ||
4 | Subject: [PATCH] fix the parallel build regarding shared libraries. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | --- | ||
8 | .../openssl-1.0.0e/Makefile.org | 8 ++++---- | ||
9 | 1 files changed, 4 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/Makefile.org | ||
12 | index 3c7aea1..6326cd6 100644 | ||
13 | --- a/Makefile.org | ||
14 | +++ b/Makefile.org | ||
15 | @@ -243,13 +243,13 @@ build_libs: build_crypto build_ssl build_engines | ||
16 | |||
17 | build_crypto: | ||
18 | @dir=crypto; target=all; $(BUILD_ONE_CMD) | ||
19 | -build_ssl: | ||
20 | +build_ssl: build_crypto | ||
21 | @dir=ssl; target=all; $(BUILD_ONE_CMD) | ||
22 | -build_engines: | ||
23 | +build_engines: build_crypto | ||
24 | @dir=engines; target=all; $(BUILD_ONE_CMD) | ||
25 | -build_apps: | ||
26 | +build_apps: build_crypto build_ssl | ||
27 | @dir=apps; target=all; $(BUILD_ONE_CMD) | ||
28 | -build_tests: | ||
29 | +build_tests: build_crypto build_ssl | ||
30 | @dir=test; target=all; $(BUILD_ONE_CMD) | ||
31 | build_tools: | ||
32 | @dir=tools; target=all; $(BUILD_ONE_CMD) | ||
33 | -- | ||
34 | 1.6.6.1 | ||
35 | |||
diff --git a/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch new file mode 100644 index 00000000..93ce0343 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Received from H J Liu @ Intel | ||
4 | Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors. | ||
5 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13 | ||
6 | |||
7 | ported the patch to the 1.0.0e version | ||
8 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01 | ||
9 | Index: openssl-1.0.1e/Configure | ||
10 | =================================================================== | ||
11 | --- openssl-1.0.1e.orig/Configure | ||
12 | +++ openssl-1.0.1e/Configure | ||
13 | @@ -402,6 +402,7 @@ my %table=( | ||
14 | "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
15 | "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", | ||
16 | "linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", | ||
17 | +"linux-x32", "gcc:-mx32 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", | ||
18 | "linux64-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", | ||
19 | #### So called "highgprs" target for z/Architecture CPUs | ||
20 | # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see | ||
21 | Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | ||
22 | =================================================================== | ||
23 | --- openssl-1.0.1e.orig/crypto/bn/asm/x86_64-gcc.c | ||
24 | +++ openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | ||
25 | @@ -55,7 +55,7 @@ | ||
26 | * machine. | ||
27 | */ | ||
28 | |||
29 | -#ifdef _WIN64 | ||
30 | +#if defined _WIN64 || !defined __LP64__ | ||
31 | #define BN_ULONG unsigned long long | ||
32 | #else | ||
33 | #define BN_ULONG unsigned long | ||
34 | @@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con | ||
35 | asm ( | ||
36 | " subq %2,%2 \n" | ||
37 | ".p2align 4 \n" | ||
38 | - "1: movq (%4,%2,8),%0 \n" | ||
39 | - " adcq (%5,%2,8),%0 \n" | ||
40 | - " movq %0,(%3,%2,8) \n" | ||
41 | + "1: movq (%q4,%2,8),%0 \n" | ||
42 | + " adcq (%q5,%2,8),%0 \n" | ||
43 | + " movq %0,(%q3,%2,8) \n" | ||
44 | " leaq 1(%2),%2 \n" | ||
45 | " loop 1b \n" | ||
46 | " sbbq %0,%0 \n" | ||
47 | @@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con | ||
48 | asm ( | ||
49 | " subq %2,%2 \n" | ||
50 | ".p2align 4 \n" | ||
51 | - "1: movq (%4,%2,8),%0 \n" | ||
52 | - " sbbq (%5,%2,8),%0 \n" | ||
53 | - " movq %0,(%3,%2,8) \n" | ||
54 | + "1: movq (%q4,%2,8),%0 \n" | ||
55 | + " sbbq (%q5,%2,8),%0 \n" | ||
56 | + " movq %0,(%q3,%2,8) \n" | ||
57 | " leaq 1(%2),%2 \n" | ||
58 | " loop 1b \n" | ||
59 | " sbbq %0,%0 \n" | ||
60 | Index: openssl-1.0.1e/crypto/bn/bn.h | ||
61 | =================================================================== | ||
62 | --- openssl-1.0.1e.orig/crypto/bn/bn.h | ||
63 | +++ openssl-1.0.1e/crypto/bn/bn.h | ||
64 | @@ -172,6 +172,13 @@ extern "C" { | ||
65 | # endif | ||
66 | #endif | ||
67 | |||
68 | +/* Address type. */ | ||
69 | +#ifdef _WIN64 | ||
70 | +#define BN_ADDR unsigned long long | ||
71 | +#else | ||
72 | +#define BN_ADDR unsigned long | ||
73 | +#endif | ||
74 | + | ||
75 | /* assuming long is 64bit - this is the DEC Alpha | ||
76 | * unsigned long long is only 64 bits :-(, don't define | ||
77 | * BN_LLONG for the DEC Alpha */ | ||
78 | Index: openssl-1.0.1e/crypto/bn/bn_exp.c | ||
79 | =================================================================== | ||
80 | --- openssl-1.0.1e.orig/crypto/bn/bn_exp.c | ||
81 | +++ openssl-1.0.1e/crypto/bn/bn_exp.c | ||
82 | @@ -567,7 +567,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU | ||
83 | |||
84 | /* Given a pointer value, compute the next address that is a cache line multiple. */ | ||
85 | #define MOD_EXP_CTIME_ALIGN(x_) \ | ||
86 | - ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) | ||
87 | + ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK)))) | ||
88 | |||
89 | /* This variant of BN_mod_exp_mont() uses fixed windows and the special | ||
90 | * precomputation memory layout to limit data-dependency to a minimum | ||
diff --git a/recipes-connectivity/openssl/openssl/shared-libs.patch b/recipes-connectivity/openssl/openssl/shared-libs.patch new file mode 100644 index 00000000..a7ca0a30 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/shared-libs.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: openssl-1.0.1e/crypto/Makefile | ||
4 | =================================================================== | ||
5 | --- openssl-1.0.1e.orig/crypto/Makefile | ||
6 | +++ openssl-1.0.1e/crypto/Makefile | ||
7 | @@ -108,7 +108,7 @@ $(LIB): $(LIBOBJ) | ||
8 | |||
9 | shared: buildinf.h lib subdirs | ||
10 | if [ -n "$(SHARED_LIBS)" ]; then \ | ||
11 | - (cd ..; $(MAKE) $(SHARED_LIB)); \ | ||
12 | + (cd ..; $(MAKE) -e $(SHARED_LIB)); \ | ||
13 | fi | ||
14 | |||
15 | libs: | ||
16 | Index: openssl-1.0.1e/Makefile.org | ||
17 | =================================================================== | ||
18 | --- openssl-1.0.1e.orig/Makefile.org | ||
19 | +++ openssl-1.0.1e/Makefile.org | ||
20 | @@ -310,7 +310,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_ | ||
21 | |||
22 | libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a | ||
23 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ | ||
24 | - $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ | ||
25 | + $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ | ||
26 | else \ | ||
27 | echo "There's no support for shared libraries on this platform" >&2; \ | ||
28 | exit 1; \ | ||
29 | Index: openssl-1.0.1e/ssl/Makefile | ||
30 | =================================================================== | ||
31 | --- openssl-1.0.1e.orig/ssl/Makefile | ||
32 | +++ openssl-1.0.1e/ssl/Makefile | ||
33 | @@ -62,7 +62,7 @@ lib: $(LIBOBJ) | ||
34 | |||
35 | shared: lib | ||
36 | if [ -n "$(SHARED_LIBS)" ]; then \ | ||
37 | - (cd ..; $(MAKE) $(SHARED_LIB)); \ | ||
38 | + (cd ..; $(MAKE) -e $(SHARED_LIB)); \ | ||
39 | fi | ||
40 | |||
41 | files: | ||
diff --git a/recipes-connectivity/openssl/openssl_1.0.1i.bb b/recipes-connectivity/openssl/openssl_1.0.1i.bb new file mode 100644 index 00000000..9d093efe --- /dev/null +++ b/recipes-connectivity/openssl/openssl_1.0.1i.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | require openssl.inc | ||
2 | |||
3 | # For target side versions of openssl enable support for cryptodev Linux driver | ||
4 | # if they are available. | ||
5 | DEPENDS_class-target += "cryptodev-linux" | ||
6 | CFLAG_class-target += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8" | ||
9 | |||
10 | export DIRS = "crypto ssl apps engines" | ||
11 | export OE_LDFLAGS="${LDFLAGS}" | ||
12 | |||
13 | SRC_URI += "file://configure-targets.patch \ | ||
14 | file://shared-libs.patch \ | ||
15 | file://oe-ldflags.patch \ | ||
16 | file://engines-install-in-libdir-ssl.patch \ | ||
17 | file://openssl-fix-link.patch \ | ||
18 | file://debian/version-script.patch \ | ||
19 | file://debian/pic.patch \ | ||
20 | file://debian/c_rehash-compat.patch \ | ||
21 | file://debian/ca.patch \ | ||
22 | file://debian/make-targets.patch \ | ||
23 | file://debian/no-rpath.patch \ | ||
24 | file://debian/man-dir.patch \ | ||
25 | file://debian/man-section.patch \ | ||
26 | file://debian/no-symbolic.patch \ | ||
27 | file://debian/debian-targets.patch \ | ||
28 | file://openssl_fix_for_x32.patch \ | ||
29 | file://fix-cipher-des-ede3-cfb1.patch \ | ||
30 | file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ | ||
31 | file://openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch \ | ||
32 | file://initial-aarch64-bits.patch \ | ||
33 | file://find.pl \ | ||
34 | file://openssl-fix-des.pod-error.patch \ | ||
35 | " | ||
36 | |||
37 | SRC_URI[md5sum] = "c8dc151a671b9b92ff3e4c118b174972" | ||
38 | SRC_URI[sha256sum] = "3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7" | ||
39 | |||
40 | PACKAGES =+ " \ | ||
41 | ${PN}-engines-dbg \ | ||
42 | ${PN}-engines \ | ||
43 | " | ||
44 | |||
45 | FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines" | ||
46 | FILES_${PN}-engines-dbg = "${libdir}/engines/.debug ${libdir}/ssl/engines/.debug" | ||
47 | |||
48 | PARALLEL_MAKE = "" | ||
49 | PARALLEL_MAKEINST = "" | ||
50 | |||
51 | do_configure_prepend() { | ||
52 | cp ${WORKDIR}/find.pl ${S}/util/find.pl | ||
53 | } | ||
diff --git a/recipes-connectivity/openssl/openssl_1.0.1i.bbappend b/recipes-connectivity/openssl/openssl_1.0.1i.bbappend new file mode 100644 index 00000000..7b381ffb --- /dev/null +++ b/recipes-connectivity/openssl/openssl_1.0.1i.bbappend | |||
@@ -0,0 +1,40 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/openssl-fsl:" | ||
2 | |||
3 | RDEPENDS_${PN}_class-target += "cryptodev-module" | ||
4 | |||
5 | SRC_URI_append_class-target = " file://0001-remove-double-initialization-of-cryptodev-engine.patch \ | ||
6 | file://0002-eng_cryptodev-add-support-for-TLS-algorithms-offload.patch \ | ||
7 | file://0003-cryptodev-fix-algorithm-registration.patch \ | ||
8 | file://0004-linux-pcc-make-it-more-robust-and-recognize-KERNEL_B.patch \ | ||
9 | file://0005-ECC-Support-header-for-Cryptodev-Engine.patch \ | ||
10 | file://0006-Fixed-private-key-support-for-DH.patch \ | ||
11 | file://0007-Fixed-private-key-support-for-DH.patch \ | ||
12 | file://0008-Initial-support-for-PKC-in-cryptodev-engine.patch \ | ||
13 | file://0009-Added-hwrng-dev-file-as-source-of-RNG.patch \ | ||
14 | file://0010-Asynchronous-interface-added-for-PKC-cryptodev-inter.patch \ | ||
15 | file://0011-Add-RSA-keygen-operation-and-support-gendsa-command-.patch \ | ||
16 | file://0012-RSA-Keygen-Fix.patch \ | ||
17 | file://0013-Removed-local-copy-of-curve_t-type.patch \ | ||
18 | file://0014-Modulus-parameter-is-not-populated-by-dhparams.patch \ | ||
19 | file://0015-SW-Backoff-mechanism-for-dsa-keygen.patch \ | ||
20 | file://0016-Fixed-DH-keygen-pair-generator.patch \ | ||
21 | file://0017-cryptodev-add-support-for-aes-gcm-algorithm-offloadi.patch \ | ||
22 | file://0018-eng_cryptodev-extend-TLS-offload-with-3des_cbc_hmac_.patch \ | ||
23 | file://0019-eng_cryptodev-add-support-for-TLSv1.1-record-offload.patch \ | ||
24 | file://0020-eng_cryptodev-add-support-for-TLSv1.2-record-offload.patch \ | ||
25 | file://0021-cryptodev-drop-redundant-function.patch \ | ||
26 | file://0022-cryptodev-do-not-zero-the-buffer-before-use.patch \ | ||
27 | file://0023-cryptodev-clean-up-code-layout.patch \ | ||
28 | file://0024-cryptodev-do-not-cache-file-descriptor-in-open.patch \ | ||
29 | file://0025-cryptodev-put_dev_crypto-should-be-an-int.patch \ | ||
30 | file://0026-cryptodev-simplify-cryptodev-pkc-support-code.patch \ | ||
31 | " | ||
32 | |||
33 | # Digest offloading through cryptodev is not recommended because of the | ||
34 | # performance penalty of the Openssl engine interface. Openssl generates a huge | ||
35 | # number of calls to digest functions for even a small amount of work data. | ||
36 | # For example there are 70 calls to cipher code and over 10000 to digest code | ||
37 | # when downloading only 10 files of 700 bytes each. | ||
38 | # Do not build OpenSSL with cryptodev digest support until engine digest | ||
39 | # interface gets some rework: | ||
40 | CFLAG_class-target := "${@'${CFLAG}'.replace('-DUSE_CRYPTODEV_DIGESTS', '')}" | ||