[openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC
[bigmus...@centrum.cz - Mon Jan 25 11:42:47 2010]: I’m trying to build version 1.0 (doesn’t depend which beta snapshot, 0.9.8l is ok) under MS Visual Studio 2008 and it fails if building 64-bit version (switch VC-WIN64A). 32-bit builds ok, also 64-bit with “no-asm” builds ok, but it is about 4x slower which is unacceptable for our application. OS is Windows 7 Professional x64, CPU AMD Athlon II X4 620. The 64-bit build ends up with following errors: Microsoft (R) Macro Assembler (x64) Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Assembling: tmp32.dbgaes-x86_64.asm tmp32.dbgaes-x86_64.asm(2197) : error A2206:missing operator in expression tmp32.dbgaes-x86_64.asm(2198) : error A2206:missing operator in expression Have you tried installing and using nasm instead? Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
Re: how to generate RSA format data?
On Tue, Feb 02, 2010, hunter li wrote: Hi, All, I have the following code to generate the RSA data. But it always gives me error: 5049:error:0906D064:lib(9):func(109):reason(100):pem_lib.c:756. I do appreciate any suggestion! First suggestion is don't post user questions to the dev list. Second is that you don't have any newlines in the base64 data. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
Re: Version 3.2 testing
On Mon, Feb 01, 2010, Brandt Springman wrote: Just wondering if anyone has had a chance to try setting the version number to 3.2 (from the current 3.1) in OpenSSL 1.0.0 and what results they might have seen? Why would you want to do that? I've done that in 1.1.0-dev in order to support TLS v1.1 but that includes other changes too (the new block cipher handling). Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
RE: [openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC
No, I didn't. Since I'm not too familiar with assembler things, I just wanted to use only that one which is available with MSVS2008. Anyway, I'm not sure if it would help. If I look at errorneous lines, they look like DD 1h, 0x0002, 0x0004, 0x0008. Question is why 1st hexa-value has different format (01h) than the rest (0x02)? -Original Message- From: Stephen Henson via RT [mailto:r...@openssl.org] Sent: Wednesday, February 03, 2010 4:27 PM To: bigmus...@centrum.cz Cc: openssl-dev@openssl.org Subject: [openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC [bigmus...@centrum.cz - Mon Jan 25 11:42:47 2010]: I’m trying to build version 1.0 (doesn’t depend which beta snapshot, 0.9.8l is ok) under MS Visual Studio 2008 and it fails if building 64-bit version (switch VC-WIN64A). 32-bit builds ok, also 64-bit with “no-asm” builds ok, but it is about 4x slower which is unacceptable for our application. OS is Windows 7 Professional x64, CPU AMD Athlon II X4 620. The 64-bit build ends up with following errors: Microsoft (R) Macro Assembler (x64) Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Assembling: tmp32.dbgaes-x86_64.asm tmp32.dbgaes-x86_64.asm(2197) : error A2206:missing operator in expression tmp32.dbgaes-x86_64.asm(2198) : error A2206:missing operator in expression Have you tried installing and using nasm instead? Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
[openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC
[bigmus...@centrum.cz - Wed Feb 03 17:40:50 2010]: No, I didn't. Since I'm not too familiar with assembler things, I just wanted to use only that one which is available with MSVS2008. Anyway, I'm not sure if it would help. If I look at errorneous lines, they look likeDD 1h, 0x0002, 0x0004, 0x0008. Question is why 1st hexa-value has different format (01h) than the rest (0x02)? Ah, good catch. I've fixed the asm translation script now. Now compiles but don't have a WIN64 platform to test it on. Try the next shapshot, current CVS or just apply this patch: http://cvs.openssl.org/chngview?cn=19243 Let me know if that works for you. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
RE: [openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC
Thanks. I tried your patch and now it compiles well. However, I'm not able to make TLS connections with that. I often get sslv3 alert bad record mac or decryption failed or bad record mac. No problem when using x64 with no-asm, but I guess it will be different problem. -Original Message- From: Stephen Henson via RT [mailto:r...@openssl.org] Sent: Wednesday, February 03, 2010 7:27 PM To: bigmus...@centrum.cz Cc: openssl-dev@openssl.org Subject: [openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC [bigmus...@centrum.cz - Wed Feb 03 17:40:50 2010]: No, I didn't. Since I'm not too familiar with assembler things, I just wanted to use only that one which is available with MSVS2008. Anyway, I'm not sure if it would help. If I look at errorneous lines, they look likeDD 1h, 0x0002, 0x0004, 0x0008. Question is why 1st hexa-value has different format (01h) than the rest (0x02)? Ah, good catch. I've fixed the asm translation script now. Now compiles but don't have a WIN64 platform to test it on. Try the next shapshot, current CVS or just apply this patch: http://cvs.openssl.org/chngview?cn=19243 Let me know if that works for you. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
[openssl.org #2086] problem with bufferoverflowu.lib on x64 VS2008
[ar...@rti.com - Tue Jan 26 01:08:56 2010]: Appears to be fixed in 1.0.0 tree; but 0.9.8m-beta still has part of the problem because it didn't get the remove duplicate code part of e.g. http://cvs.openssl.org/chngview?cn=18895 . That code isn't appropriate for 0.9.8 which does things differently. I've now committed a fix to 0.9.8 which should address this. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
[openssl.org #2155] [Bug report] OpenSSL 1.0.0 64-bit build fails under MSVC
[bigmus...@centrum.cz - Wed Feb 03 22:37:19 2010]: Thanks. I tried your patch and now it compiles well. However, I'm not able to make TLS connections with that. I often get sslv3 alert bad record mac or decryption failed or bad record mac. No problem when using x64 with no-asm, but I guess it will be different problem. You could also try nasm. That's not tricky to do, all you need to do is download the latest version from for example: http://www.nasm.us/pub/nasm/releasebuilds/2.07/nasm-2.07.zip and extract nasm.exe somewhere on your path. Don't have access to Win64 or I'd test this myself. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
Re: how to generate RSA format data?
Hi, Steve, thank you very much! How can I add newlines into the base64 data. sincerely, Hunter On Wed, Feb 3, 2010 at 9:35 AM, Dr. Stephen Henson st...@openssl.orgwrote: On Tue, Feb 02, 2010, hunter li wrote: Hi, All, I have the following code to generate the RSA data. But it always gives me error: 5049:error:0906D064:lib(9):func(109):reason(100):pem_lib.c:756. I do appreciate any suggestion! First suggestion is don't post user questions to the dev list. Second is that you don't have any newlines in the base64 data. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
Re: how to generate RSA format data?
Hi, Shahin, Thank you very much! I will try to find the algorithm identifier and an exponent. I just read raw data from DVD disk to verify the DVD data. I try to use rsa_public_decrypt or rsa_verify. Both of them need to use a RSA* format data. For now I only have the above raw data as public key. Actually I really have no idea to convert the raw data into RSA* format. sincerely, Hunter On Wed, Feb 3, 2010 at 12:15 AM, Shahin Khorasani khoras...@amnafzar.comwrote: Hello hunter, Your raw data seems to be a RSA public key modulus. A public key in ASN.1 must have an algorithm identifier and an exponent. Take a look at this sample: raw data is (hexdump): 8230 2201 0d30 0906 862a 8648 0df7 0101 0501 0300 0182 000f 8230 0a01 8202 0101 *d200 808c f87b cf63 7cb3 2cff 43dd 5cf5 * --- You just provided this part *7def d1f5 adaa 0944 87ea f398 a654 b36d 2303 4d68 e9fa fd46 9171 0f97 2960 cd1e 6045 21aa 6986 44e2 679f 5a07 bbf9 157e 82e2 82a8 5f42 7cee 4af6 7c1a e53d 05a3 cf9a fc6a a0d9 6850 64f1 a6af f6fe c61c f39f ba1e cb31 c734 5c2f 4937 5383 4de5 7b29 010a 2f86 41ab 00af 2ce3 3a48 3d19 41c2 3196 455d 219b d1a0 9600 a107 65a7 f195 aacd a105 3c71 fc7f 9c58 5825 6bd7 ffe7 8d47 6c3d de2a 2779 489f 2641 ed81 9f54 62e2 c4ed 893d e0bf 3678 a8c9 6573 bda9 9b1f acb1 6634 9375 48bf ef82 887c 0e08 6b68 b6f3 8170 bda0 f8a7 2e1b 023d 5309 a755 e68e e014 cffd 9610 857a 3ffb f569 344c 7ea7 2520 d33f 0084 a9ca eaf6 028f *0103 0100 Gutman ASN1 dumper output: 0 290: SEQUENCE { 4 13: SEQUENCE { 69: OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 1 1) 170: NULL : } 19 271: BIT STRING, encapsulates { 24 266: SEQUENCE { 28 257: INTEGER : 00 D2 8C 80 7B F8 63 CF B3 7C FF 2C DD 43 F5 5C : EF 7D F5 D1 AA AD 44 09 EA 87 98 F3 54 A6 6D B3 : 03 23 68 4D FA E9 46 FD 71 91 97 0F 60 29 1E CD : 45 60 AA 21 86 69 E2 44 9F 67 07 5A F9 BB 7E 15 : E2 82 A8 82 42 5F EE 7C F6 4A 1A 7C 3D E5 A3 05 : 9A CF 6A FC D9 A0 50 68 F1 64 AF A6 FE F6 1C C6 : 9F F3 1E BA 31 CB 34 C7 2F 5C 37 49 83 53 E5 4D : 29 7B 0A 01 86 2F AB 41 AF 00 E3 2C 48 3A 19 3D : C2 41 96 31 5D 45 9B 21 A0 D1 00 96 07 A1 A7 65 : 95 F1 CD AA 05 A1 71 3C 7F FC 58 9C 25 58 D7 6B : E7 FF 47 8D 3D 6C 2A DE 79 27 9F 48 41 26 81 ED : 54 9F E2 62 ED C4 3D 89 BF E0 78 36 C9 A8 73 65 : A9 BD 1F 9B B1 AC 34 66 75 93 BF 48 82 EF 7C 88 : 08 0E 68 6B F3 B6 70 81 A0 BD A7 F8 1B 2E 3D 02 : 09 53 55 A7 8E E6 14 E0 FD CF 10 96 7A 85 FB 3F : 69 F5 4C 34 A7 7E 20 25 3F D3 84 00 CA A9 F6 EA : 8F 2893: INTEGER 65537 : } : } : } Regards, Shahin Khorasani hunter li wrote: Hi, All, I have the following code to generate the RSA data. But it always gives me error: 5049:error:0906D064:lib(9):func(109):reason(100):pem_lib.c:756. I do appreciate any suggestion! #include stdio.h #include stdlib.h #include stdint.h #include string.h #include openssl/bio.h #include openssl/rsa.h #include openssl/pem.h #include openssl/err.h int main(void) { RSA *public_key; BIO *pub_bio; char *publicKey_test = -BEGIN PUBLIC KEY-\nOTJjM2I3NTJmMmZlMzhkOTZjOTI2MjIxNzc0NjllNzM\ MWExMDk5MmZkNWY3MWE0N2JlMzRhMzcxMDZkZDNkMTk\ ZTUzNDc4OTY4OWQzM2FlYWRjMmQ2NWEzNGM5NjdjYzg\ ODQzMzNhNDI4YjEyODRjZmQ0ZGNkZjVjM2UyNDU5Njk\ NzNmMDAyZGEyMjIxZGM3NGM3NjdhYzZkYWIzYjc1YmE\ MzAwZmZlNzcxZmIzMGJhZTBhMzQ4OGUxYTBhYzU0MmI\ N2EwOTVlZWIzMzg1MWMwZWM2N2YwNDMzMzE3MTdkOTU\ ZjM2ZmFlM2NiMDI3MTdhMjQxNjc3YTRkNTI4ODNhZDM\ MzQ3ODE1N2IzZDcwODk0YjVmYzI3MTI5NmU4MjViOTU\ Y2Q1NTQ3M2ZlMWY5MzgzYmZjZTkzN2YyNmRhNjliOTY\ OGE0MjA4YzBiOTU1NDAyNDM1ZTcwYjY0NDE1OTE2MmE\ YjFmNmU4ODA5YTAwMWI2N2MwNDE4NzU3NWEwMGNkN2Q\ OTU0YTcxNzkyZTJiZjlhYjcxOTk1NzdmYjc2NWI3YjQ\ OWNmOGJmYjM3MGQxNDMxZGE3OGYwMTU4ODEwY2Y5OTI\ MWUxMzAyMzUzNTFmNjUyMjU4NjkzNjM3MTU1YmUyMzU\ NTQyYjhlYTIzMzI2NTE0ZTAzOGVlZjM4ZDVjZTBmNzc=\n-END PUBLIC KEY-; pub_bio = BIO_new_mem_buf(publicKey_test, -1); if(pub_bio == NULL) { ERR_print_errors_fp(stdout); return 1; } public_key = PEM_read_bio_RSA_PUBKEY(pub_bio, NULL, NULL, NULL); if(public_key == NULL) { ERR_print_errors_fp(stdout); } RSA_free(public_key); return 0; } Here I try to convert the following public key raw data into PEM format. I encode the data into base64 and add-BEGIN PUBLIC KEY-, END PUBLIC KEY-. The raw data is as following 256 Bytes: 92 c3 b7 52 f2 fe 38 d9 6c 92 62 21 77 46 9e 73 1a 10 99 2f d5 f7 1a 47 be 34 a3 71 06 dd 3d 19 e5 34 78 96 89 d3 3a ea dc 2d 65 a3 4c 96 7c c8 84 33 3a 42 8b 12 84 cf d4 dc df 5c 3e 24 59 69 73 f0 02 da 22 21 dc 74 c7 67 ac 6d ab