summaryrefslogtreecommitdiffstats
path: root/archives/extend/2014-April.txt
blob: 7118b8ac1f61dfc7c4710e9889917284cd4a39e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
From essen at ninenines.eu  Tue Apr  8 11:11:07 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Tue, 08 Apr 2014 11:11:07 +0200
Subject: [99s-extend] Closing the mailing lists later this week
Message-ID: <[email protected]>

Hello,

I will be closing the mailing lists later this week. Preferred medium 
for getting help will be opening tickets on github (if you can't figure 
something out, then it's a bug!) or IRC.

If you would like to continue helping users, then hop on IRC or follow 
the projects on github and answer tickets. Thank you.

Announcements will probably be made using the website's articles page 
instead of here.

The archives will be moved to git for safekeeping, but everything else 
will be deleted, including user data and backups.

Thanks for your understanding,

-- 
Lo?c Hoguin
http://ninenines.eu


From samset at wanadoo.fr  Wed Apr  9 16:52:47 2014
From: samset at wanadoo.fr (Samir Sow)
Date: Wed, 9 Apr 2014 16:52:47 +0200
Subject: [99s-extend] REST handler with ssl support
Message-ID: <[email protected]>

Hi,

I?d like to secure my rest api with an ssl transport.
Could not find any example to do so ?

Any clue ?

Thank you.

Samir

From samset at wanadoo.fr  Fri Apr 11 12:39:13 2014
From: samset at wanadoo.fr (Samir Sow)
Date: Fri, 11 Apr 2014 12:39:13 +0200
Subject: [99s-extend] ssl_hello_world
Message-ID: <[email protected]>

Hi,

Still struggling to make ssl work.

I downloaded the example ssl_hello_world.
Upon execution : i get the following error with curl 

 About to connect() to localhost port 8443 (#0)
*   Trying ::1... Connexion refus?e
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* NSS error -8018
* Closing connection #0
* Problem with the SSL CA cert (path? access rights?)
curl: (77) Problem with the SSL CA cert (path? access rights?)


cmd = curl -vv --cacert priv/cert/cowboy-ca.crt -i https://localhost:8443/

cacert path checked.
read permission checked

I?ve tested with a browser and get a connection error.

Any clue ?

Samir




From essen at ninenines.eu  Fri Apr 11 13:18:56 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Fri, 11 Apr 2014 13:18:56 +0200
Subject: [99s-extend] ssl_hello_world
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

The certificate in the SSL example is self-generated, try curl with the 
--insecure option.

On 04/11/2014 12:39 PM, Samir Sow wrote:
> Hi,
>
> Still struggling to make ssl work.
>
> I downloaded the example ssl_hello_world.
> Upon execution : i get the following error with curl
>
>   About to connect() to localhost port 8443 (#0)
> *   Trying ::1... Connexion refus?e
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 8443 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> * NSS error -8018
> * Closing connection #0
> * Problem with the SSL CA cert (path? access rights?)
> curl: (77) Problem with the SSL CA cert (path? access rights?)
>
>
> cmd = curl -vv --cacert priv/cert/cowboy-ca.crt -i https://localhost:8443/
>
> cacert path checked.
> read permission checked
>
> I?ve tested with a browser and get a connection error.
>
> Any clue ?
>
> Samir
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> https://lists.ninenines.eu/listinfo/extend
>

-- 
Lo?c Hoguin
http://ninenines.eu


From samset at wanadoo.fr  Fri Apr 11 13:25:51 2014
From: samset at wanadoo.fr (Samir Sow)
Date: Fri, 11 Apr 2014 13:25:51 +0200
Subject: [99s-extend] ssl_hello_world
In-Reply-To: <[email protected]>
References: <[email protected]>
 <[email protected]>
Message-ID: <[email protected]>

Thx.

Same error ?
Openssl s_client does not work either.
the server does not answer to ClientHello ?

Samir

On 11 avr. 2014, at 13:18, Lo?c Hoguin <essen at ninenines.eu> wrote:

> The certificate in the SSL example is self-generated, try curl with the --insecure option.
> 
> On 04/11/2014 12:39 PM, Samir Sow wrote:
>> Hi,
>> 
>> Still struggling to make ssl work.
>> 
>> I downloaded the example ssl_hello_world.
>> Upon execution : i get the following error with curl
>> 
>>  About to connect() to localhost port 8443 (#0)
>> *   Trying ::1... Connexion refus?e
>> *   Trying 127.0.0.1... connected
>> * Connected to localhost (127.0.0.1) port 8443 (#0)
>> * Initializing NSS with certpath: sql:/etc/pki/nssdb
>> * NSS error -8018
>> * Closing connection #0
>> * Problem with the SSL CA cert (path? access rights?)
>> curl: (77) Problem with the SSL CA cert (path? access rights?)
>> 
>> 
>> cmd = curl -vv --cacert priv/cert/cowboy-ca.crt -i https://localhost:8443/
>> 
>> cacert path checked.
>> read permission checked
>> 
>> I?ve tested with a browser and get a connection error.
>> 
>> Any clue ?
>> 
>> Samir
>> 
>> 
>> _______________________________________________
>> Extend mailing list
>> Extend at lists.ninenines.eu
>> https://lists.ninenines.eu/listinfo/extend
>> 
> 
> -- 
> Lo?c Hoguin
> http://ninenines.eu



From essen at ninenines.eu  Fri Apr 11 13:41:29 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Fri, 11 Apr 2014 13:41:29 +0200
Subject: [99s-extend] ssl_hello_world
In-Reply-To: <[email protected]>
References: <[email protected]>
 <[email protected]>
 <[email protected]>
Message-ID: <[email protected]>

This is the successful output I get. You should try to see why yours is 
different, perhaps someone somewhere ran into the same issue at some 
point. Note that the --cacert option isn't needed and basically makes no 
difference.


% curl -ikvv https://localhost:8443
* Rebuilt URL to: https://localhost:8443/
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
   CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-RSA-AES256-SHA384
* Server certificate:
* 	 subject: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=localhost
* 	 start date: 2013-02-28 05:23:34 GMT
* 	 expire date: 2033-02-23 05:23:34 GMT
* 	 issuer: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=ROOT CA
* 	 SSL certificate verify result: self signed certificate in 
certificate chain (19), continuing anyway.
 > GET / HTTP/1.1
 > User-Agent: curl/7.35.0
 > Host: localhost:8443
 > Accept: */*
 >
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< connection: keep-alive
connection: keep-alive
* Server Cowboy is not blacklisted
< server: Cowboy
server: Cowboy
< date: Fri, 11 Apr 2014 11:30:03 GMT
date: Fri, 11 Apr 2014 11:30:03 GMT
< content-length: 12
content-length: 12
< content-type: text/plain
content-type: text/plain

<


On 04/11/2014 01:25 PM, Samir Sow wrote:
> Thx.
>
> Same error ?
> Openssl s_client does not work either.
> the server does not answer to ClientHello ?
>
> Samir
>
> On 11 avr. 2014, at 13:18, Lo?c Hoguin <essen at ninenines.eu> wrote:
>
>> The certificate in the SSL example is self-generated, try curl with the --insecure option.
>>
>> On 04/11/2014 12:39 PM, Samir Sow wrote:
>>> Hi,
>>>
>>> Still struggling to make ssl work.
>>>
>>> I downloaded the example ssl_hello_world.
>>> Upon execution : i get the following error with curl
>>>
>>>   About to connect() to localhost port 8443 (#0)
>>> *   Trying ::1... Connexion refus?e
>>> *   Trying 127.0.0.1... connected
>>> * Connected to localhost (127.0.0.1) port 8443 (#0)
>>> * Initializing NSS with certpath: sql:/etc/pki/nssdb
>>> * NSS error -8018
>>> * Closing connection #0
>>> * Problem with the SSL CA cert (path? access rights?)
>>> curl: (77) Problem with the SSL CA cert (path? access rights?)
>>>
>>>
>>> cmd = curl -vv --cacert priv/cert/cowboy-ca.crt -i https://localhost:8443/
>>>
>>> cacert path checked.
>>> read permission checked
>>>
>>> I?ve tested with a browser and get a connection error.
>>>
>>> Any clue ?
>>>
>>> Samir
>>>
>>>
>>> _______________________________________________
>>> Extend mailing list
>>> Extend at lists.ninenines.eu
>>> https://lists.ninenines.eu/listinfo/extend
>>>
>>
>> --
>> Lo?c Hoguin
>> http://ninenines.eu
>

-- 
Lo?c Hoguin
http://ninenines.eu


From samset at wanadoo.fr  Fri Apr 11 13:48:41 2014
From: samset at wanadoo.fr (Samir Sow)
Date: Fri, 11 Apr 2014 13:48:41 +0200
Subject: [99s-extend] ssl_hello_world
In-Reply-To: <[email protected]>
References: <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
Message-ID: <[email protected]>

Thx.

On which OS + Erlang version is the server running ?

Samir
On 11 avr. 2014, at 13:41, Lo?c Hoguin <essen at ninenines.eu> wrote:

> This is the successful output I get. You should try to see why yours is different, perhaps someone somewhere ran into the same issue at some point. Note that the --cacert option isn't needed and basically makes no difference.
> 
> 
> % curl -ikvv https://localhost:8443
> * Rebuilt URL to: https://localhost:8443/
> * Hostname was NOT found in DNS cache
> *   Trying 127.0.0.1...
> * Connected to localhost (127.0.0.1) port 8443 (#0)
> * successfully set certificate verify locations:
> *   CAfile: /etc/ssl/certs/ca-certificates.crt
>  CApath: none
> * SSLv3, TLS handshake, Client hello (1):
> * SSLv3, TLS handshake, Server hello (2):
> * SSLv3, TLS handshake, CERT (11):
> * SSLv3, TLS handshake, Server key exchange (12):
> * SSLv3, TLS handshake, Server finished (14):
> * SSLv3, TLS handshake, Client key exchange (16):
> * SSLv3, TLS change cipher, Client hello (1):
> * SSLv3, TLS handshake, Finished (20):
> * SSLv3, TLS change cipher, Client hello (1):
> * SSLv3, TLS handshake, Finished (20):
> * SSL connection using ECDHE-RSA-AES256-SHA384
> * Server certificate:
> * 	 subject: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=localhost
> * 	 start date: 2013-02-28 05:23:34 GMT
> * 	 expire date: 2033-02-23 05:23:34 GMT
> * 	 issuer: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=ROOT CA
> * 	 SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
> > GET / HTTP/1.1
> > User-Agent: curl/7.35.0
> > Host: localhost:8443
> > Accept: */*
> >
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < connection: keep-alive
> connection: keep-alive
> * Server Cowboy is not blacklisted
> < server: Cowboy
> server: Cowboy
> < date: Fri, 11 Apr 2014 11:30:03 GMT
> date: Fri, 11 Apr 2014 11:30:03 GMT
> < content-length: 12
> content-length: 12
> < content-type: text/plain
> content-type: text/plain
> 
> <
> 
> 
> On 04/11/2014 01:25 PM, Samir Sow wrote:
>> Thx.
>> 
>> Same error ?
>> Openssl s_client does not work either.
>> the server does not answer to ClientHello ?
>> 
>> Samir
>> 
>> On 11 avr. 2014, at 13:18, Lo?c Hoguin <essen at ninenines.eu> wrote:
>> 
>>> The certificate in the SSL example is self-generated, try curl with the --insecure option.
>>> 
>>> On 04/11/2014 12:39 PM, Samir Sow wrote:
>>>> Hi,
>>>> 
>>>> Still struggling to make ssl work.
>>>> 
>>>> I downloaded the example ssl_hello_world.
>>>> Upon execution : i get the following error with curl
>>>> 
>>>>  About to connect() to localhost port 8443 (#0)
>>>> *   Trying ::1... Connexion refus?e
>>>> *   Trying 127.0.0.1... connected
>>>> * Connected to localhost (127.0.0.1) port 8443 (#0)
>>>> * Initializing NSS with certpath: sql:/etc/pki/nssdb
>>>> * NSS error -8018
>>>> * Closing connection #0
>>>> * Problem with the SSL CA cert (path? access rights?)
>>>> curl: (77) Problem with the SSL CA cert (path? access rights?)
>>>> 
>>>> 
>>>> cmd = curl -vv --cacert priv/cert/cowboy-ca.crt -i https://localhost:8443/
>>>> 
>>>> cacert path checked.
>>>> read permission checked
>>>> 
>>>> I?ve tested with a browser and get a connection error.
>>>> 
>>>> Any clue ?
>>>> 
>>>> Samir
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Extend mailing list
>>>> Extend at lists.ninenines.eu
>>>> https://lists.ninenines.eu/listinfo/extend
>>>> 
>>> 
>>> --
>>> Lo?c Hoguin
>>> http://ninenines.eu
>> 
> 
> -- 
> Lo?c Hoguin
> http://ninenines.eu



From essen at ninenines.eu  Fri Apr 11 13:57:59 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Fri, 11 Apr 2014 13:57:59 +0200
Subject: [99s-extend] ssl_hello_world
In-Reply-To: <[email protected]>
References: <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
Message-ID: <[email protected]>

It's tested on ArchLinux from R15B01 to master so that's unrelated to 
the Erlang version.

On 04/11/2014 01:48 PM, Samir Sow wrote:
> Thx.
>
> On which OS + Erlang version is the server running ?
>
> Samir
> On 11 avr. 2014, at 13:41, Lo?c Hoguin <essen at ninenines.eu> wrote:
>
>> This is the successful output I get. You should try to see why yours is different, perhaps someone somewhere ran into the same issue at some point. Note that the --cacert option isn't needed and basically makes no difference.
>>
>>
>> % curl -ikvv https://localhost:8443
>> * Rebuilt URL to: https://localhost:8443/
>> * Hostname was NOT found in DNS cache
>> *   Trying 127.0.0.1...
>> * Connected to localhost (127.0.0.1) port 8443 (#0)
>> * successfully set certificate verify locations:
>> *   CAfile: /etc/ssl/certs/ca-certificates.crt
>>   CApath: none
>> * SSLv3, TLS handshake, Client hello (1):
>> * SSLv3, TLS handshake, Server hello (2):
>> * SSLv3, TLS handshake, CERT (11):
>> * SSLv3, TLS handshake, Server key exchange (12):
>> * SSLv3, TLS handshake, Server finished (14):
>> * SSLv3, TLS handshake, Client key exchange (16):
>> * SSLv3, TLS change cipher, Client hello (1):
>> * SSLv3, TLS handshake, Finished (20):
>> * SSLv3, TLS change cipher, Client hello (1):
>> * SSLv3, TLS handshake, Finished (20):
>> * SSL connection using ECDHE-RSA-AES256-SHA384
>> * Server certificate:
>> * 	 subject: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=localhost
>> * 	 start date: 2013-02-28 05:23:34 GMT
>> * 	 expire date: 2033-02-23 05:23:34 GMT
>> * 	 issuer: C=US; ST=Texas; O=Nine Nines; OU=Cowboy; CN=ROOT CA
>> * 	 SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
>>> GET / HTTP/1.1
>>> User-Agent: curl/7.35.0
>>> Host: localhost:8443
>>> Accept: */*
>>>
>> < HTTP/1.1 200 OK
>> HTTP/1.1 200 OK
>> < connection: keep-alive
>> connection: keep-alive
>> * Server Cowboy is not blacklisted
>> < server: Cowboy
>> server: Cowboy
>> < date: Fri, 11 Apr 2014 11:30:03 GMT
>> date: Fri, 11 Apr 2014 11:30:03 GMT
>> < content-length: 12
>> content-length: 12
>> < content-type: text/plain
>> content-type: text/plain
>>
>> <
>>
>>
>> On 04/11/2014 01:25 PM, Samir Sow wrote:
>>> Thx.
>>>
>>> Same error ?
>>> Openssl s_client does not work either.
>>> the server does not answer to ClientHello ?
>>>
>>> Samir
>>>
>>> On 11 avr. 2014, at 13:18, Lo?c Hoguin <essen at ninenines.eu> wrote:
>>>
>>>> The certificate in the SSL example is self-generated, try curl with the --insecure option.
>>>>
>>>> On 04/11/2014 12:39 PM, Samir Sow wrote:
>>>>> Hi,
>>>>>
>>>>> Still struggling to make ssl work.
>>>>>
>>>>> I downloaded the example ssl_hello_world.
>>>>> Upon execution : i get the following error with curl
>>>>>
>>>>>   About to connect() to localhost port 8443 (#0)
>>>>> *   Trying ::1... Connexion refus?e
>>>>> *   Trying 127.0.0.1... connected
>>>>> * Connected to localhost (127.0.0.1) port 8443 (#0)
>>>>> * Initializing NSS with certpath: sql:/etc/pki/nssdb
>>>>> * NSS error -8018
>>>>> * Closing connection #0
>>>>> * Problem with the SSL CA cert (path? access rights?)
>>>>> curl: (77) Problem with the SSL CA cert (path? access rights?)
>>>>>
>>>>>
>>>>> cmd = curl -vv --cacert priv/cert/cowboy-ca.crt -i https://localhost:8443/
>>>>>
>>>>> cacert path checked.
>>>>> read permission checked
>>>>>
>>>>> I?ve tested with a browser and get a connection error.
>>>>>
>>>>> Any clue ?
>>>>>
>>>>> Samir
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Extend mailing list
>>>>> Extend at lists.ninenines.eu
>>>>> https://lists.ninenines.eu/listinfo/extend
>>>>>
>>>>
>>>> --
>>>> Lo?c Hoguin
>>>> http://ninenines.eu
>>>
>>
>> --
>> Lo?c Hoguin
>> http://ninenines.eu
>

-- 
Lo?c Hoguin
http://ninenines.eu


From samset at wanadoo.fr  Fri Apr 11 23:23:10 2014
From: samset at wanadoo.fr (Samir Sow)
Date: Fri, 11 Apr 2014 23:23:10 +0200
Subject: [99s-extend] ssl
Message-ID: <[email protected]>

Hi,

Still struggling with ssl.
I decided to check what?s going on at the ssl module level. Did a step by step ssl connection using the erlang ssl doc.
Found an error erlang:size badarg, but could not understand if it?s a problem with the key/cert files or with the data sent by the client.

Any help welcomed. Thx

Samir

{ok, SSLSocket} = ssl:ssl_accept(Socket, [{cacertfile, "priv/cert/cacert.crt"}, {certfile, "priv/cert/server.crt"}, {keyfile, "priv/cert/server.key"}]).
** exception exit: {{badarg,
                        [{erlang,size,
                             [[22,3,1,0,176,1,0,0,172,3,3,83,72,89,48,183,175,
                               58,145,197,219|...]],
                             []},
                         {tls_record,get_tls_records_aux,2,
                             [{file,"tls_record.erl"},{line,122}]},
                         {tls_connection,next_tls_record,2,
                             [{file,"tls_connection.erl"},{line,484}]},
                         {tls_connection,handle_info,3,
                             [{file,"tls_connection.erl"},{line,307}]},
                         {gen_fsm,handle_msg,7,
                             [{file,"gen_fsm.erl"},{line,503}]},
                         {proc_lib,init_p_do_apply,3,
                             [{file,"proc_lib.erl"},{line,239}]}]},
                    {gen_fsm,sync_send_all_state_event,
                        [<0.105.0>,{start,infinity},infinity]}}
     in function  gen_fsm:sync_send_all_state_event/3 (gen_fsm.erl, line 242)
     in call from ssl_connection:sync_send_all_state_event/2 (ssl_connection.erl, line 1649)
     in call from ssl_connection:handshake/2 (ssl_connection.erl, line 97)
     in call from tls_connection:start_fsm/8 (tls_connection.erl, line 81)
     in call from ssl_connection:ssl_accept/7 (ssl_connection.erl, line 84)

From essen at ninenines.eu  Fri Apr 11 23:31:36 2014
From: essen at ninenines.eu (=?ISO-8859-1?Q?Lo=EFc_Hoguin?=)
Date: Fri, 11 Apr 2014 23:31:36 +0200
Subject: [99s-extend] ssl
Message-ID: <[email protected]>

Please report it to erlang-bugs, you'll get better help with ssl bugs there.

-- 
Lo?c Hoguin
http://ninenines.eu

-------- Original Message --------
From:Samir Sow <samset at wanadoo.fr>
Sent:Fri, 11 Apr 2014 23:23:10 +0200
To:extend at lists.ninenines.eu
Subject:[99s-extend] ssl

>Hi,
>
>Still struggling with ssl.
>I decided to check what?s going on at the ssl module level. Did a step by step ssl connection using the erlang ssl doc.
>Found an error erlang:size badarg, but could not understand if it?s a problem with the key/cert files or with the data sent by the client.
>
>Any help welcomed. Thx
>
>Samir
>
>{ok, SSLSocket} = ssl:ssl_accept(Socket, [{cacertfile, "priv/cert/cacert.crt"}, {certfile, "priv/cert/server.crt"}, {keyfile, "priv/cert/server.key"}]).
>** exception exit: {{badarg,
>                        [{erlang,size,
>                             [[22,3,1,0,176,1,0,0,172,3,3,83,72,89,48,183,175,
>                               58,145,197,219|...]],
>                             []},
>                         {tls_record,get_tls_records_aux,2,
>                             [{file,"tls_record.erl"},{line,122}]},
>                         {tls_connection,next_tls_record,2,
>                             [{file,"tls_connection.erl"},{line,484}]},
>                         {tls_connection,handle_info,3,
>                             [{file,"tls_connection.erl"},{line,307}]},
>                         {gen_fsm,handle_msg,7,
>                             [{file,"gen_fsm.erl"},{line,503}]},
>                         {proc_lib,init_p_do_apply,3,
>                             [{file,"proc_lib.erl"},{line,239}]}]},
>                    {gen_fsm,sync_send_all_state_event,
>                        [<0.105.0>,{start,infinity},infinity]}}
>     in function  gen_fsm:sync_send_all_state_event/3 (gen_fsm.erl, line 242)
>     in call from ssl_connection:sync_send_all_state_event/2 (ssl_connection.erl, line 1649)
>     in call from ssl_connection:handshake/2 (ssl_connection.erl, line 97)
>     in call from tls_connection:start_fsm/8 (tls_connection.erl, line 81)
>     in call from ssl_connection:ssl_accept/7 (ssl_connection.erl, line 84)
>_______________________________________________
>Extend mailing list
>Extend at lists.ninenines.eu
>https://lists.ninenines.eu/listinfo/extend
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20140411/9e3c6c32/attachment.html>

From ka.gemayel at gmail.com  Sun Apr 20 19:46:55 2014
From: ka.gemayel at gmail.com (Karim Gemayel)
Date: Sun, 20 Apr 2014 19:46:55 +0200
Subject: [99s-extend] [cowboy] Websocket with Firefox Android
Message-ID: <[email protected]>

Hello,

Writing a Cowboy (0.9.0) Websocket server (running on Ubuntu 12.04 ; 
Erlang R16B03), it works fine on Firefox Desktop but fails on Firefox 
Android (28.0.1).

When testing with the websocket_example, on client-side Websockets are 
detected but nothing happens then, no connection seems to be initiated ; 
and on server-side, despite having traces in all functions of 
ws_handler.erl, nothing appears in the console.

However when testing http://www.websocket.org/echo.html with Firefox 
Android, it works.

So before going for remote debugging Firefox, I was looking for similar 
cases using Cowboy Websocket with Firefox Android. Is there a JavaScript 
tip to manage Websocket connection in that case ? Am I missing something ?

Thanks.

-- 
Karim Gemayel


From essen at ninenines.eu  Sun Apr 20 19:50:07 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Sun, 20 Apr 2014 19:50:07 +0200
Subject: [99s-extend] [cowboy] Websocket with Firefox Android
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

Try tracing the cowboy_websocket module?

On 04/20/2014 07:46 PM, Karim Gemayel wrote:
> Hello,
>
> Writing a Cowboy (0.9.0) Websocket server (running on Ubuntu 12.04 ;
> Erlang R16B03), it works fine on Firefox Desktop but fails on Firefox
> Android (28.0.1).
>
> When testing with the websocket_example, on client-side Websockets are
> detected but nothing happens then, no connection seems to be initiated ;
> and on server-side, despite having traces in all functions of
> ws_handler.erl, nothing appears in the console.
>
> However when testing http://www.websocket.org/echo.html with Firefox
> Android, it works.
>
> So before going for remote debugging Firefox, I was looking for similar
> cases using Cowboy Websocket with Firefox Android. Is there a JavaScript
> tip to manage Websocket connection in that case ? Am I missing something ?
>
> Thanks.
>

-- 
Lo?c Hoguin
http://ninenines.eu


From ka.gemayel at gmail.com  Sun Apr 20 20:28:16 2014
From: ka.gemayel at gmail.com (Karim Gemayel)
Date: Sun, 20 Apr 2014 20:28:16 +0200
Subject: [99s-extend] [cowboy] Websocket with Firefox Android
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
Message-ID: <[email protected]>

On 04/20/2014 07:50 PM, Lo?c Hoguin wrote:
> Try tracing the cowboy_websocket module?

The same case happens, no logs at all from Android whereas logs appear 
from Desktop.

I've attached the traces diffs.

-- 
Karim Gemayel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cowboy_websocket.diff
Type: text/x-patch
Size: 5780 bytes
Desc: not available
URL: <http://lists.ninenines.eu/archives/extend/attachments/20140420/bf45e4d0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: websocket_example.diff
Type: text/x-patch
Size: 2413 bytes
Desc: not available
URL: <http://lists.ninenines.eu/archives/extend/attachments/20140420/bf45e4d0/attachment-0001.bin>

From essen at ninenines.eu  Sun Apr 20 20:30:55 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Sun, 20 Apr 2014 20:30:55 +0200
Subject: [99s-extend] [cowboy] Websocket with Firefox Android
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
 <[email protected]>
Message-ID: <[email protected]>

You really should take a look at tracing using dbg at some point. :-)

But yeah if you don't get the upgrade function output and you are 
testing against the Websocket example then I doubt the request even 
reaches the server.

As for why, I have no idea.

On 04/20/2014 08:28 PM, Karim Gemayel wrote:
> On 04/20/2014 07:50 PM, Lo?c Hoguin wrote:
>> Try tracing the cowboy_websocket module?
>
> The same case happens, no logs at all from Android whereas logs appear
> from Desktop.
>
> I've attached the traces diffs.
>
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> https://lists.ninenines.eu/listinfo/extend
>

-- 
Lo?c Hoguin
http://ninenines.eu


From ka.gemayel at gmail.com  Sun Apr 20 20:49:34 2014
From: ka.gemayel at gmail.com (Karim Gemayel)
Date: Sun, 20 Apr 2014 20:49:34 +0200
Subject: [99s-extend] [cowboy] Websocket with Firefox Android
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
 <[email protected]> <[email protected]>
Message-ID: <[email protected]>

On 04/20/2014 08:30 PM, Lo?c Hoguin wrote:
> You really should take a look at tracing using dbg at some point. :-)

Yes, true. Actually, dbg is on my to-learn list. :)

> But yeah if you don't get the upgrade function output and you are
> testing against the Websocket example then I doubt the request even
> reaches the server.
>
> As for why, I have no idea.

That's a bit frustrating because the app is supposed to be used 
primarily on mobile, so it seems I have to implement an HTTP fallback 
that I didn't want to implement.

I'll have to go for Firefox remote debugging, so.

Thanks anyway.

-- 
Karim Gemayel


From ka.gemayel at gmail.com  Sun Apr 20 22:47:08 2014
From: ka.gemayel at gmail.com (Karim Gemayel)
Date: Sun, 20 Apr 2014 22:47:08 +0200
Subject: [99s-extend] [cowboy] Websocket with Firefox Android
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
 <[email protected]> <[email protected]>
 <[email protected]>
Message-ID: <[email protected]>

On 04/20/2014 08:49 PM, Karim Gemayel wrote:
> I'll have to go for Firefox remote debugging, so.

Erm, finally it does work if I set up the correct IP for the Websocket 
server - localhost is unknown on the LAN...

And it works nicely. Thanks !

-- 
Karim Gemayel


From ka.gemayel at gmail.com  Mon Apr 28 18:01:07 2014
From: ka.gemayel at gmail.com (Karim Gemayel)
Date: Mon, 28 Apr 2014 18:01:07 +0200
Subject: [99s-extend] [cowboy] SSL client authentication
Message-ID: <[email protected]>

Hello,

I'm looking to use SSL client certificate for authentication with 
Cowboy, but according to the Farwest roadmap this feature is not 
implemented. Is this correct ?

Would Nginx + Cowboy be an alternate solution ?

-- 
Karim Gemayel


From essen at ninenines.eu  Mon Apr 28 18:04:47 2014
From: essen at ninenines.eu (=?UTF-8?B?TG/Dr2MgSG9ndWlu?=)
Date: Mon, 28 Apr 2014 18:04:47 +0200
Subject: [99s-extend] [cowboy] SSL client authentication
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

http://ninenines.eu/docs/en/ranch/HEAD/guide/ssl_auth/

On 04/28/2014 06:01 PM, Karim Gemayel wrote:
> Hello,
>
> I'm looking to use SSL client certificate for authentication with
> Cowboy, but according to the Farwest roadmap this feature is not
> implemented. Is this correct ?
>
> Would Nginx + Cowboy be an alternate solution ?
>

-- 
Lo?c Hoguin
http://ninenines.eu


From ka.gemayel at gmail.com  Mon Apr 28 18:12:46 2014
From: ka.gemayel at gmail.com (Karim Gemayel)
Date: Mon, 28 Apr 2014 18:12:46 +0200
Subject: [99s-extend] [cowboy] SSL client authentication
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
Message-ID: <[email protected]>

On 04/28/2014 06:04 PM, Lo?c Hoguin wrote:
> http://ninenines.eu/docs/en/ranch/HEAD/guide/ssl_auth/

Thanks !

-- 
Karim Gemayel