* [ECOS] Openssl questions @ 2007-01-22 18:50 Steve West 2007-01-22 18:52 ` Andrew Lunn 0 siblings, 1 reply; 12+ messages in thread From: Steve West @ 2007-01-22 18:50 UTC (permalink / raw) To: ecos-discuss I am trying to use the open ssl that Andrew has provided for eCos. It seems very confusing to use to set up sockets. Is there any example code of using a https server with several threads available? Steve -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] Openssl questions 2007-01-22 18:50 [ECOS] Openssl questions Steve West @ 2007-01-22 18:52 ` Andrew Lunn 2007-01-24 20:32 ` Steve West 0 siblings, 1 reply; 12+ messages in thread From: Andrew Lunn @ 2007-01-22 18:52 UTC (permalink / raw) To: Steve West; +Cc: ecos-discuss On Mon, Jan 22, 2007 at 01:48:11PM -0500, Steve West wrote: > I am trying to use the open ssl that Andrew has provided for > eCos. It seems very confusing to use to set up sockets. Is there any > example code of using a https server with several threads available? Hi Steve There is nothing special about the eCos version of OpenSSL. So i suggest you try on the OpenSSL list, to find the sources of a server that uses openSSL. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] Openssl questions 2007-01-22 18:52 ` Andrew Lunn @ 2007-01-24 20:32 ` Steve West 2007-01-24 20:37 ` Andrew Lunn 0 siblings, 1 reply; 12+ messages in thread From: Steve West @ 2007-01-24 20:32 UTC (permalink / raw) To: Andrew Lunn; +Cc: ecos-discuss In building the openSSL library in eCos I get the following ld error. Is there some functions missing from the package? /home/sbms_ecos/sbme_install/lib/libtarget.a(net_openssl_evp_key.o): In function `EVP_BytesToKey': /home/ecos/packages/net/openssl/current/src/crypto/evp/evp_key.c:105: undefined reference to `des_read_pw_string' collect2: ld returned 1 exit status make: *** [smtpd] Error 1 $ ----- Original Message ----- From: "Andrew Lunn" <andrew@lunn.ch> To: "Steve West" <swest@cyglan.com> Cc: <ecos-discuss@ecos.sourceware.org> Sent: Monday, January 22, 2007 1:52 PM Subject: Re: [ECOS] Openssl questions > On Mon, Jan 22, 2007 at 01:48:11PM -0500, Steve West wrote: > >> I am trying to use the open ssl that Andrew has provided for >> eCos. It seems very confusing to use to set up sockets. Is there any >> example code of using a https server with several threads available? > > Hi Steve > > There is nothing special about the eCos version of OpenSSL. So i > suggest you try on the OpenSSL list, to find the sources of a server > that uses openSSL. > > Andrew > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] Openssl questions 2007-01-24 20:32 ` Steve West @ 2007-01-24 20:37 ` Andrew Lunn 2007-02-02 19:41 ` Steve West 2007-02-06 13:44 ` [ECOS] Openssl questions Steve West 0 siblings, 2 replies; 12+ messages in thread From: Andrew Lunn @ 2007-01-24 20:37 UTC (permalink / raw) To: Steve West; +Cc: ecos-discuss On Wed, Jan 24, 2007 at 03:32:55PM -0500, Steve West wrote: > In building the openSSL library in eCos I get the following ld error. Is > there some functions missing from the package? > > /home/sbms_ecos/sbme_install/lib/libtarget.a(net_openssl_evp_key.o): In > function > `EVP_BytesToKey': > /home/ecos/packages/net/openssl/current/src/crypto/evp/evp_key.c:105: > undefined > reference to `des_read_pw_string' Have you enabled CYGPKG_OPENSSL_DES_READ_PWD? Do you have the prerequisites? Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] Openssl questions 2007-01-24 20:37 ` Andrew Lunn @ 2007-02-02 19:41 ` Steve West 2007-02-02 19:49 ` Andrew Lunn 2007-02-06 13:44 ` [ECOS] Openssl questions Steve West 1 sibling, 1 reply; 12+ messages in thread From: Steve West @ 2007-02-02 19:41 UTC (permalink / raw) To: Andrew Lunn; +Cc: ecos-discuss I am getting an error from s3_pkt.c:290 saying "wrong version number" Do you have any clue what this means? Steve > On Wed, Jan 24, 2007 at 03:32:55PM -0500, Steve West wrote: >> In building the openSSL library in eCos I get the following ld error. Is >> there some functions missing from the package? >> >> /home/sbms_ecos/sbme_install/lib/libtarget.a(net_openssl_evp_key.o): In >> function >> `EVP_BytesToKey': >> /home/ecos/packages/net/openssl/current/src/crypto/evp/evp_key.c:105: >> undefined >> reference to `des_read_pw_string' > > Have you enabled CYGPKG_OPENSSL_DES_READ_PWD? > Do you have the prerequisites? > > Andrew > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] Openssl questions 2007-02-02 19:41 ` Steve West @ 2007-02-02 19:49 ` Andrew Lunn 2007-02-08 21:09 ` [ECOS] protected boot startup Steve West 0 siblings, 1 reply; 12+ messages in thread From: Andrew Lunn @ 2007-02-02 19:49 UTC (permalink / raw) To: Steve West; +Cc: Andrew Lunn, ecos-discuss On Fri, Feb 02, 2007 at 02:39:41PM -0500, Steve West wrote: > > I am getting an error from s3_pkt.c:290 saying "wrong version number" Do > you have any clue what this means? There seems to be some disagreement about the version of ssl being used. The packet received is using a different version to what is expected. It looks like your packet is not version 3. Maybe it is using TLS not SSL3? Just a guess. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* [ECOS] protected boot startup 2007-02-02 19:49 ` Andrew Lunn @ 2007-02-08 21:09 ` Steve West 2007-02-12 19:02 ` Bart Veer 2007-02-12 21:03 ` [ECOS] Opensll issues Steve West 0 siblings, 2 replies; 12+ messages in thread From: Steve West @ 2007-02-08 21:09 UTC (permalink / raw) To: Andrew Lunn; +Cc: Andrew Lunn, ecos-discuss [-- Attachment #1: Type: text/plain, Size: 176 bytes --] Can anyone tell me why this attached code does not boot into protected mode. I am converting from msdos to gcc compilers and cannot seem to get th pc into prot mode. Steve [-- Attachment #2: vectors.S --] [-- Type: application/octet-stream, Size: 1823 bytes --] .extern _main .code16 _start: /* Disable interrupt handling. */ cli /* Load GDTR and IDTR. */ lgdt %cs:gdt lidt %cs:idt /* Switch to protected mode. */ movl %cr0,%eax orb $1, %al movl %eax,%cr0 ljmp $8, $3f hlt .align 4, 0xFF gdt: .word gdtEnd - gdtStart .long gdtStart .align 4, 0xFF idt: .word 0x07FF # space for 256 entries .long 0x1000 gdtStart: /* Selector 0x00 == invalid. */ .word 0x0000 .word 0x0000 .byte 0x00 .byte 0x00 .byte 0x00 .byte 0x00 /* Selector 0x08 == code. */ .word 0xFFFF .word 0x0000 .byte 0x00 .byte 0x9B .byte 0xCF .byte 0x00 /* Selector 0x10 == data. */ .word 0xFFFF .word 0x0000 .byte 0x00 .byte 0x93 .byte 0xCF .byte 0x00 # /* Selector 0x18 == shorter code: faults any code # * access 0xF0000000-0xFFFFFFFF. # */ .word 0xFFFF .word 0x0000 .byte 0x00 .byte 0x9B .byte 0xC7 .byte 0x00 /* Selector 0x20 == data; faults any access 0xF0000000-0xFFFFFFFF. */ .word 0xFFFF .word 0x0000 .byte 0x00 .byte 0x93 .byte 0xC7 .byte 0x00 .align 4, 0xFF gdtEnd: .code32 3: protmode: hlt movw $0x10, %ax movw %ax, %ds movw %ax, %es movw %ax, %fs movw %ax, %gs /* Make our new stack point to the same place as the old one. */ xorl %ebx, %ebx movw %ss, %bx shl $4, %ebx addl %esp, %ebx movw %ax, %ss movl %ebx, %esp movl $0, %ebp /* Reset the flags register. */ pushl $0 popfl /* never gets here*/ hlt movl $main,%eax jmp *%eax nop [-- Attachment #3: Type: text/plain, Size: 148 bytes --] -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] protected boot startup 2007-02-08 21:09 ` [ECOS] protected boot startup Steve West @ 2007-02-12 19:02 ` Bart Veer 2007-02-12 19:11 ` [ECOS] protected boot startup 2nd stage pc boot Steve West 2007-02-12 21:03 ` [ECOS] Opensll issues Steve West 1 sibling, 1 reply; 12+ messages in thread From: Bart Veer @ 2007-02-12 19:02 UTC (permalink / raw) To: swest; +Cc: ecos-discuss [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1141 bytes --] >>>>> "Steve" == Steve West <swest@cyglan.com> writes: Steve> Can anyone tell me why this attached code does not boot Steve> into protected mode. I am converting from msdos to gcc Steve> compilers and cannot seem to get th pc into prot mode. That code looks like it came straight from the pcmb HAL package's pcmb.inc, for handling bootstrap from floppy. That code is known to work fine on typical PCs when booting from floppy. There are various reasons why it might not work in any other setup, e.g. if you are not running on a typical PC or if you are not booting from floppy. Without more information on your setup there is no way of knowing what might be going wrong. Bart -- Bart Veer eCos Configuration Architect http://www.ecoscentric.com/ The eCos and RedBoot experts Besuchen Sie uns vom 13.-15.02.07 auf der Embedded World 2007, Stand 11-336 Visit us at Embedded World 2007, Nürnberg, Germany, 13-15 Feb, Stand 11-336 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] protected boot startup 2nd stage pc boot 2007-02-12 19:02 ` Bart Veer @ 2007-02-12 19:11 ` Steve West 0 siblings, 0 replies; 12+ messages in thread From: Steve West @ 2007-02-12 19:11 UTC (permalink / raw) To: Bart Veer; +Cc: ecos-discuss [-- Attachment #1: Type: text/plain, Size: 1449 bytes --] Bart, Thanks for the input. I have since written a 2nd stage boot for booting eCos. It assembles with nasm and can be placed in front of a ecos pc image. Here it is for the archives. Steve ----- Original Message ----- From: "Bart Veer" <bartv@ecoscentric.com> To: <swest@cyglan.com> Cc: <ecos-discuss@ecos.sourceware.org> Sent: Monday, February 12, 2007 2:02 PM Subject: Re: [ECOS] protected boot startup >>>>>> "Steve" == Steve West <swest@cyglan.com> writes: > > Steve> Can anyone tell me why this attached code does not boot > Steve> into protected mode. I am converting from msdos to gcc > Steve> compilers and cannot seem to get th pc into prot mode. > > That code looks like it came straight from the pcmb HAL package's > pcmb.inc, for handling bootstrap from floppy. That code is known to > work fine on typical PCs when booting from floppy. There are various > reasons why it might not work in any other setup, e.g. if you are not > running on a typical PC or if you are not booting from floppy. Without > more information on your setup there is no way of knowing what might > be going wrong. > > Bart > > -- > Bart Veer eCos Configuration Architect > http://www.ecoscentric.com/ The eCos and RedBoot experts > Besuchen Sie uns vom 13.-15.02.07 auf der Embedded World 2007, Stand > 11-336 > Visit us at Embedded World 2007, Nürnberg, Germany, 13-15 Feb, Stand > 11-336 > [-- Attachment #2: p.asm --] [-- Type: application/octet-stream, Size: 6031 bytes --] RESTART16 equ 000400h ; Restart entry point IDT equ 000C00h ; IDT Gate MAIN equ 40000h+4096 ; main entry point ;MAIN equ 6000h+4096 ; main entry point BASE equ 40000h ;BASE equ 6000h DESize0 equ 512 ; filesize DESize1 equ 1024 ; filesize DESize1a equ 512+1024 ; filesize DESize2 equ 2048 ; filesize DESize3 equ 4096 ; filesize ;ORG 06000h org 0 [BITS 16] ;extern _main ;-----------------------------------------------------------------------------; ; Entry Point. The CPU is executing in 16-bit real mode. ; ;-----------------------------------------------------------------------------; ;EntryPoint: ; times 4096 db 0 ; times 4096 db 0 ; times 4096 db 0 ; times 4096 db 0 ; times 4096 db 0 ; times 4096 db 0 EntryPoint0: push ds mov ax,0b800h mov ds,ax mov si,0 mov al,'R' mov [si],al inc si mov al,31 mov [si],al pop ds DB 66h ; 32-bit operand override DB 8Dh ; lea (e)bx,Addr DB 1Eh DD BASE+_GdtDesc DB 0Fh ; lgdt fword ptr [bx] DB 01h DB 17h mov eax,cr0 ; Get control register 0 or ax,1 ; Set PE bit (bit #0) in (e)ax mov cr0,eax ; Activate protected mode! jmp EntryPoint1 ; To flush the instruction queue. EntryPoint1: DB 66h ; 32-bit operand override DB 0EAh ; far jump DD BASE+EntryPoint32 ; 32-bit offset DW PROT_CODE_SEL ; 16-bit selector ;-----------------------------------------------------------------------------; ; The CPU is now executing in 32-bit protected mode. ; ;-----------------------------------------------------------------------------; Dummy0 times DESize0+EntryPoint0-Dummy0 db 0 [BITS 32] EntryPoint32: ; Initialize all segment registers to 10h (entry #2 in the GDT) mov ax,PROT_DATA_SEL ; entry #2 in GDT mov ds,ax ; ds = 10h mov es,ax ; es = 10h mov fs,ax ; fs = 10h mov gs,ax ; gs = 10h mov ss,ax ; ss = 10h ; Set the top of stack to allow stack operations. mov esp, 080000h ; Call main(), which is not expected to return. ;hlt mov eax,MAIN call eax ; In case main() returns, enter an infinite loop. IdleLoop: hlt jmp IdleLoop ; This point is never reached. Dummy1 times (DESize1)+EntryPoint0-Dummy1 db 0 ;-------------------------------------------------------------------------------; ; Tables Descriptors (to use with LGDT32 & LIDT32) ; ;-------------------------------------------------------------------------------; ALIGN 4 _GdtDesc: ; GDT descriptor DW GDT_SIZE - 1 ; GDT limit gdtrb DD _Gdt+BASE ; GDT base address (below) ALIGN 4 _IdtDesc: ; IDT descriptor DW IDT_SIZE - 1 ; IDT limit DD _Idt+BASE ; IDT base address (below) ;-------------------------------------------------------------------------------; ; GDT ; ;-------------------------------------------------------------------------------; ALIGN 4 Dummy1a times DESize1a+EntryPoint0-Dummy1a db 0 ; Global Descriptor Table (GDT) _Gdt: ; GDT[0]: Null entry, never used. DD 0 DD 0 ; GDT[1]: Executable, read-only code, base address of 0, limit of FFFFFh, ; granularity bit (G) set (making the limit 4GB) PROT_CODE_SEL equ $-_Gdt DW 0FFFFh ; Limit[15..0] DW 0000h ; Base[15..0] DB 00h ; Base[23..16] DB 10011010b ; P(1) DPL(00) S(1) 1 C(0) R(1) A(0) DB 11001111b ; G(1) D(1) 0 0 Limit[19..16] DB 00h ; Base[31..24] ; GDT[2]: Writable data segment, covering the save address space than GDT[1]. PROT_DATA_SEL equ $-_Gdt DW 0FFFFh ; Limit[15..0] DW 0000h ; Base[15..0] DB 00h ; Base[23..16] DB 10010010b ; P(1) DPL(00) S(1) 0 E(0) W(1) A(0) DB 11001111b ; G(1) B(1) 0 0 Limit[19..16] DB 00h ; Base[31..24] REAL_CODE_SEL equ $-_Gdt gdta DW 0FFFFH gdtb DW 0 ; (base gets set above) gdtc DB 0 gdtd DB 09AH ; present, ring 0, code, non-conforming, readable gdte DB 0 ; byte-granular, 16-bit gdtf DB 0 REAL_DATA_SEL equ $-_Gdt gdt5 dw 0FFFFh dw 0 ; (base gets set above) db 0 db 092h ; present, ring 0, data, expand-up, writable db 0 ; byte-granular, 16-bit db 0 GDT_SIZE EQU $ - _Gdt ; Size, in bytes ;-------------------------------------------------------------------------------; ; IDT ; ;-------------------------------------------------------------------------------; ALIGN 4 ; Interrupt Descriptor Table (IDT) Dummy2 times DESize2+EntryPoint0-Dummy2 db 0 _Idt: idt1 times 512 db 0 idt2 times 256 db 0 idt3 times 256 db 0 IDT_SIZE EQU $ - _Idt ; Size, in bytes Dummy3 times DESize3+EntryPoint0-Dummy3 db 0 [-- Attachment #3: Type: text/plain, Size: 148 bytes --] -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* [ECOS] Opensll issues 2007-02-08 21:09 ` [ECOS] protected boot startup Steve West 2007-02-12 19:02 ` Bart Veer @ 2007-02-12 21:03 ` Steve West 2007-02-13 14:42 ` [ECOS] " Steve West 1 sibling, 1 reply; 12+ messages in thread From: Steve West @ 2007-02-12 21:03 UTC (permalink / raw) To: Steve West; +Cc: Andrew Lunn, ecos-discuss I have openssl working with a web server. Seems to work well. Every once in a while I get an error "bad mac decode" s3_pkt.c 383. I try to shutdown the ssl and start over but I keep getting the same message over and over. Got any clues? Steve -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* [ECOS] Re: Opensll issues 2007-02-12 21:03 ` [ECOS] Opensll issues Steve West @ 2007-02-13 14:42 ` Steve West 0 siblings, 0 replies; 12+ messages in thread From: Steve West @ 2007-02-13 14:42 UTC (permalink / raw) To: Steve West; +Cc: Andrew Lunn, ecos-discuss I have encountered another error. Seems to be thread/build related. md_rand.c 303 seems to be an assert if no threads are defined. Steve >I have openssl working with a web server. Seems to work well. Every once in >a while I get an error "bad mac decode" s3_pkt.c 383. I try to shutdown the >ssl and start over but I keep getting the same message over and over. Got >any clues? > > Steve > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [ECOS] Openssl questions 2007-01-24 20:37 ` Andrew Lunn 2007-02-02 19:41 ` Steve West @ 2007-02-06 13:44 ` Steve West 1 sibling, 0 replies; 12+ messages in thread From: Steve West @ 2007-02-06 13:44 UTC (permalink / raw) To: Andrew Lunn; +Cc: ecos-discuss I am having some difficulty loading the certificate file. I get a response that it is an "unknown cert type". I am using SSL_CTX_use_certificate() to load the sertificate. I selected this because the fopen and file io is not connected. The cert file has some text "begin cert" at the top and is formated with line feeds. should this binary be stripped somehow to be used with this function? I did have some luck with the connections, they are trying to resolve the cert keys. So I am making some progress. Steve -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-02-13 14:42 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-01-22 18:50 [ECOS] Openssl questions Steve West 2007-01-22 18:52 ` Andrew Lunn 2007-01-24 20:32 ` Steve West 2007-01-24 20:37 ` Andrew Lunn 2007-02-02 19:41 ` Steve West 2007-02-02 19:49 ` Andrew Lunn 2007-02-08 21:09 ` [ECOS] protected boot startup Steve West 2007-02-12 19:02 ` Bart Veer 2007-02-12 19:11 ` [ECOS] protected boot startup 2nd stage pc boot Steve West 2007-02-12 21:03 ` [ECOS] Opensll issues Steve West 2007-02-13 14:42 ` [ECOS] " Steve West 2007-02-06 13:44 ` [ECOS] Openssl questions Steve West
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).