« first day (1208 days earlier)      last day (3966 days later) » 

15:01
@rdlowrey Wicked, I'll get that downloaded
@Ocramius I'd like to see how people actually use it in a large application. i.e. what the code looks like when you have large numbers of relationships between objects, and lots of repositories, so that I can see how people manage the Doctrine code.
user895378
@Danack I assume it's static all of the things ... that's how every ORM I've seen does things ...
user895378
Which is funny, because ORM has Object in the name
@PeeHaa I did it for the tag badge.
user895378
Ruby's active record made everyone go bananas
15:03
@Danack wish I could share some code, but it's NDAd
user895378
Yes, it's easy. Just like global is easy.
@Danack That's loser talk! ;-)
@rdlowrey wow
user895378
@Ocramius Things like making constructors protected and forcing static things? No?
@Ocramius np - I'll keep searching.
user895378
15:04
Pretty much what I said: static all of the things :)
@rdlowrey that is just a constructor =_=
god, can you add some more bias?
user895378
But it breaks OO code.
you're not trying hard enuff
add more bias, please
@rdlowrey I've seen some people put a -1 at the end of the range header when choosing what to grab - why's this?
user895378
@Ocramius No bias, that's simply fact. It's not a "constructor" because you can't properly use OO principles with it.
15:05
@Jimbo The whole thing usually.
Or at least till the end.
it is a constructor, it's just expressed differently =_=
user895378
Expressed differently in that it won't work with OOP
@rdlowrey it works with OOP
it doesn't work with reflection automagic
user895378
It has nothing to do with reflection automagic.
it has all to do with reflection automagic
15:07
@Ocramius It's weird that EntityManager can't be extended though.
user924016
I would like to give a qoute form clean code.
you've been bitching around it since yesterday for no reason except for that
$redBull + $dayQuil; // E_CANT_DO_SHIT
@rdlowrey what would you use in it's place then?
user924016
"When constructors are overloaded, use static factory methods with names that
describe the arguments. For example,
Complex fulcrumPoint = Complex.FromRealNumber(23.0);
is generally better than
Complex fulcrumPoint = new Complex(23.0);
Consider enforcing their use by making the corresponding constructors private.
"
15:07
@Danack it was marked final, but we had to remove that for mocking reasons
user895378
@Jimbo Can you show me an actual example?
@Ocramius [You should never attempt to inherit from the EntityManager: Inheritance is not a valid extension point for the EntityManager. ](github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/…)
@rdlowrey Nope, it's okay, doesn't matter - Artax works brilliantly!
user895378
^^ Super OOP (the entity manager)
user895378
I'm not bitching about it. I'm just saying don't pretend that it's not assassinating OOP
user895378
15:09
Because it is.
It is not?
what is it assassinating exactly?
user895378
> Inheritance is not a valid extension point for the EntityManager
and what is the problem in having a factory method instead of a public constructor?
yes, you can compose it
OOP has nothing to do with inheritance
user895378
I agree.
so what about that? we disallow it
user895378
15:10
OOP has everything to do with asking for dependencies, though. That's what composition is and that's what you can't do with EntityManager::create
Guys, are you still talking about bad design in ORMs?
@rdlowrey EntityManager::create is just your __construct for that particular object - what's the problem with that?
It's a futile discussion, given that bad design and ORMs are about the same thing ;)
user895378
You just cited composition as the cop-out when the static call explicitly prevents composition
:P
15:11
@NikiC lolz
user895378
@Ocramius I think we'll likely never agree on this :)
@rdlowrey composition is perfectly feasible here
@rdlowrey new MyEm(Em::create(...), EM::create(...));
or also
user895378
Not if you want to create an entity manager anywhere outside the global namespace
MyEm::create(Em::create(...), Em::create(...)
user895378
If you have to wrap a call to make it OO it's not OO is it? :)
15:12
@rdlowrey what?
@rdlowrey it is not a newable, it doesn't need to be instantiated on-demand anywhere
user895378
That's not for you to say, though.
user895378
It might be.
Then your code should simply use ::create() instead of __construct
what is the big deal here? It's a static method as a constructor, it doesn't imply any global or hidden state
@Ocramius "OOP has nothing to do with inheritance" but subtyping is part of OOP, which in PHP is achieved through inheritance.
user895378
3 mins ago, by rdlowrey
@Ocramius I think we'll likely never agree on this :)
user924016
15:14
opcasting, downcasting
@Danack subtyping is not OOP, OOP is about objects exchanging messages
@rdlowrey no, I want an explanation, or next time I'll simply reply STFU
user895378
I've provided explanations.
you didn't
what is wrong with a public static method as constructor?
I want a full explanation on that
if you don't feel like you want to explain, I'm fine with that
but not a wonky explanation
Statics are ghey.
@Jimbo no?
15:16
:D
Static state is gay
user895378
If you don't use the static call to instantiate your object only in the global namespace then you've broken OOP
not statics themselves
user895378
You're forcing me to instantiate it where I don't want to otherwise I have to write bad code.
user895378
It's bad design.
15:16
@rdlowrey a static call producing a new object has nothing to do with global state
user895378
Not state
@rdlowrey I'm not forcing you to instantiate it in some particular location
user895378
You are if I want to test my dependency
you can instantiate it wherever you want, you just use that method call instead of the new operator
@Jimbo Careful now...
user895378
15:17
And everyone knows you shouldn't litter your internal object code with new
@rdlowrey what kind of test?
@DaveRandom E_FIXED
@rdlowrey that class is meant to be final
@Jimbo lol
user895378
Then it's completely untestable (unit) even for doctrine devs, which is even worse.
15:18
Just half paying attention; I think one could argue that a constructor is in a sense a static method itself.
user895378
It is
It is testable as before
user895378
That's all it is.
you just pass your dependencies to the static method instead of the constructor
and yes, @DanLugg is correct
user895378
But if the entity manager is a dependency of my code I want to be able to mock it to do what I want.
15:19
constructors are just static methods bound to a type
user895378
And I can't do that if I can't instantiate it myself.
@rdlowrey you'd mock its interface
user895378
@Ocramius No one's arguing that
@Ocramius ^^ yea, that's how I think of it
so what's the matter with renaming a constructor?
15:19
Sorry, just jumped in.
user895378
You limit my options.
user895378
new can be used for anything
PHPunit allows you to do staticExpects(), as I found out here it took a while to find out why my code wasn't working
user895378
When you take that away you've pointlessly taken away my ability to do certain things that are perfectly valid
@Ocramius I'm not sure why you would think this is a good idea. What's your rationale for breaking normal, expected language defined behavior?
user895378
15:20
(like automatic injection)
@Jimbo you don't need to mock the constructor if you use the interface
user895378
But now you've made it untestable internally in the doctrine development.
@LeviMorrison I'm not saying it is a good idea - it was indeed introduced for some hacks (which I must ask back to the original author), but it doesn't cause any harm
except breaking automagic
> In conclusion, just don't write static methods in your own code. It will make other developer's testing (like mine) much harder to deal with having to go into the source code of an external library to understand why I couldn't test my code by mocking out theirs.
user895378
Just like Singleton doesn't cause any harm
user895378
15:21
IT's the same thing
@rdlowrey singletons cause global state
Except it isn't auto-magic; it's how the language works by design. Doing something else is breaking the language design.
for fucks sake, may people finally stop screaming when they see a static?
I don't know why you'd want to do that.
user924016
^ that is the question
user895378
15:21
@Ocramius suboptimal is suboptimal. Use it if you like. Just don't pretend it's the same as new.
@Ocramius This isn't about static at all from my opinion.
@rdlowrey it is as good as a constructor
user924016
For one to change from construct to static, then there must be a special reason for this?
@Ocramius No, it's not.
@RonniSkansing making it a factory method. Afaik, there were different statics here in the past
15:22
The language does constructors.
@LeviMorrison why not?
user895378
Because the language does constructors
user924016
@Ocramius but compared to a factory class?
The language PHP does constructors
other languages have more constructors (overloading)
user895378
Which is the language doctrine is written in, last time I checked.
15:23
@Ocramius Because you are breaking out of the normal language design and implementation and doing manual constructors that break that design. How is that just as good?
other languages have named constructors
You are breaking all the tooling and user understanding by doing this.
@LeviMorrison that class is not meant to be instantiated via automagic
Break a few eggs... yada yada omelette.
the ORM config is large and complex
user895378
15:24
No it's meant to favor "easy" over "well-designed"
@Ocramius It's not magic. It's expected, normal language behavior. It's even normal expected OOP behavior. You are breaking it.
@rdlowrey @Ocramius has still to learn much about OOP.
and doing it via automagic causes only headaches
user895378
doing it via static only causes headaches
@bwoebi Now now, be nice, we're all trying to be educated here
15:24
@rdlowrey not at all, as I said, I had this fixed also in "automagic" containers with a simple switch
user895378
@bwoebi I don't think it's that. @Ocramius is a very good developer :)
user895378
I just don't understand the argument that 95% is somehow better than 100%
@rdlowrey I didn't say he's a bad developer, but I feel we all (except Ocramius) disagree about the same things
whatever, thanks @bwoebi for the GREAT feedback
user924016
Time for some dumbledoorweeds..
15:26
@bwoebi hem hem
and yeah, ORMs suck
that's why I use them all day
because I suck badly
@NikiC mhm? :-D
user895378
ORMs are amazing if your data is organized in a fairly simplistic way. Greatest thing in the world, in fact.
user895378
Maybe ever.
15:27
@bwoebi You might or might not have noticed, that your views on good object oriented design are usually direct contradictions to the views of most of the other people in this room ;)
user895378
But I don't like depending on a tool that I can't extend out with the same abstractions for more complex situations.
good morning
user924016
^ Morning
If your data is organized in a simplistic way then writing your own data interfaces is really simple. Why would ORM be better than that? Less work for you?
@NikiC actually I notice that I often agree with @rdlowrey…
15:29
@bwoebi From a third-person perspective: No, no you don't ;)
user895378
@bwoebi I think you've been slowly indoctrinated over time. A few months ago we had some serious philosophical disagreements :)
@bwoebi You and I predictably disagree ;-)
user895378
@Ocramius These are obviously extremely esoteric concerns. I'm not saying "doctrine is stupid don't ever use ORM" ...
user895378
new is exactly the same as using a static. It's just that static creation methods limit what I can do with it because the language runs on new. That's my issue.
user895378
There's no good reason to limit the functionality other than "noobs who don't know OOP will have an easier time"
15:33
@rdlowrey your opinions changed over time too…
user895378
@bwoebi certainly :)
user924016
Hopefully
Would be bad if opinions don't change ;)
Agree^^
That would mean that people stay as stupid as they were a year ago :P
15:34
For example, I now know how to get a little Super Mario Bros ditty to play when grub initializes. I didn't know this a week ago and it has been a great benefit to my life.
user924016
That is too cool
Due to the lack of method overloading, static construction methods make arguable sense to the API, in the same way that doFoo(Foo $f) and doBar(Bar $b) would otherwise be simplified to do(Foo $f) and do(Bar $b) in languages that support overloading (furthermore, provided they were semantically the same method).
user895378
I don't really understand why people want method overloading ...
That's where I would probably agree with @Ocramius
user895378
Composition.
15:36
However in the broader sense, it's probably not that important because factories.
But I think that there are two different views on OOP which predominate in this room
@rdlowrey I think because the mental model makes sense: you give someone flour, eggs, and water and say "bake a cake". You give them pre-mix in a box and say "bake a cake". The direction is the same, the internal process only differs because of the arguments. And it differs only up to a point.
user924016
Any of you written/write alot of java?
Rather than having to say "bake a cake with these raw ingredients" and separately, "bake a cake with the shit in this box".
user895378
@DanLugg I agree that that's the justification. But like @Ocramius said, that's the wrong way to think about OOP:
user895378
15:40
25 mins ago, by Ocramius
@Danack subtyping is not OOP, OOP is about objects exchanging messages
user895378
You're creating static coupling when you inherit.
*shrug*, I'm high on cough medicine. </disregard>
I'm actually surprised my analogy made any sense.
user895378
So this is a longshot, but ...
user895378
Does anyone currently use an SSL certificate that supports elliptic curve ciphers for perfect forward secrecy?
user895378
I'm having a really difficult time creating one with openssl that works in actual browsers and not just with the openssl command line client.
15:44
> I want to take the time to point out that MVC isn't possible over HTTP anyway so nobody in this thread (or over half the PHP world) knows what they are talking about in this respect. Sorry guys, but MVC over HTTP is technically impossible (impossible from a technical perspective); anyone claiming MVC over HTTP is lying whether they know it or not.
^ I want to post this on every post in r/php that mentions MVC
I'm really sick of MVC in PHP. It's not possible and calling it that isn't helping anyone. Focus on something else, like your super-unique way of doing whatever it is you do.
Of course, thanks to Microsoft and others we have multiple definitions of MVC at this point; I am talking about the original, still applicable and not-outdated definitions by Fowler and friends.
user924016
Choose your battles with care a wise man once told me...
Although, perhaps you could take Fowlers statements and say at its core MVC is all about Separated Presentation in which case any well-designed project with a GUI is MVC.
user924016
Fowler says in Enterprise patterns that all patterns are half baked
is there anyone who can clarify exactly when __destruct() is called? or do i have to find out myself :(. Also clarify its behaviour in a cloned object. ie:

$x = new class(); $y = $x; $z = &$x; $xx = clone $x; function foo(class $x); function bar (class &$x)
@mAsT3RpEE It's called when the object is destroyed. When exactly that happens is context specific.
user924016
15:49
He also qoutes someone saying. A pattern should be usable a million times without looking the same
when is __destruct called
or rather object destroyed?
Right, but my main point with the above comments is to say: quit talking about MVC and talk about what your unique selling point is.
@mAsT3RpEE In your example it would happen at the end of the script.
Nothing there actually would trigger it; it would happen implicitly during shutdown.
@rdlowrey I was looking at this bit of arya and I was wondering if would be possible to allow the user to specify handlers for there own content-types.
15:51
@Orangepill They probably should be able to do that, yeah ^^
really? what if an object is completely de/unreferenced? doesn't php destroy it automatically?
@mAsT3RpEE Yes.
ie $x = null; $y = null; $xx = null;
so is __destruct called on all dereferenced or just on the last one.
When there are no more references to the object it is called.
@rdlowrey the challenge is that the form fields in the Request object appear to be designed to be immutable... if that where not the case then it would be trivial to implement that in a before middleware.
user895378
15:53
@Orangepill Yes I absolutely plan to do that. I just need to write a content-type parser and add some code to the router so it happens automatically.
user895378
Was going to do it last weekend and just didn't have time
@rdlowrey Why do you need a parser for Content-type?
user895378
Accept: text/*;q=0.4, */*;q=0.1, application/xml;q=0, application/json
@rdlowrey You are going to make the router content-type aware?... haven't seen that but I think it would eloquently solve the problem.
user895378
@Orangepill yes, that's the plan. Something like:
15:56
@rdlowrey I thought you meant specifically Content-type ^^
user895378
@LeviMorrison Oh, sorry :) Yeah the Accept header is what you use to negotiate the eventual content-type. Should've been more clear
@LeviMorrison any chance for a link to source that calls __destruct i'd like to look @ logic please.
user895378
->route('GET', '/', [
    'text/html' => 'myHtmlControllerFunction',
    'application/json' => 'myJsonControllerFunction'
]);
It's a bad lacking example though ^^
user895378
Then if the client doesn't ask for a content type you support they'll get a 406 Not Acceptable response automatically.
15:59
> Since MVC was originally invented for traditional GUI applications, certain details in original MVC pattern don't map well to web applications. (L<Note 1|Note 1>) Since I'm describing MVC for the web, I will simplify, change, misrepresent and ignore those details here.
Hahaha just found this on a website.
user895378
Oh sweet.
Also while looking for that I stumbled on gist.github.com/DaveRandom/7182654
5
user895378
Do you have a test suite?
@rdlowrey It's a gist :-P
16:01
@rdlowrey so am I right in thinking that the controller would still be responsible for unpacking the data from the body of the request unless it is sent over url encoded or as multipart/form-data?
@rdlowrey I think parsing that is a critical piece of your business so you had better just roll your own, right?
:)
You're welcome to bastardize and use all/some/none of that however you want
user895378
@Orangepill For now, yes. However that's something else I am going to automate.
@LeviMorrison I've learned the hard way to look at source. sometimes thing's dont always go as documented.
user895378
Well, I mean I'm going to automate urlencoded and multipart parsing for non-POST method bodies.
16:03
@mAsT3RpEE If you can read PHP source code then what do you need me for? ^^
@LeviMorrison I dont know where it is? the whole new objects in php 5.3+
@LeviMorrison for a troll victim?
@rdlowrey You won't urlencode query parameters on POST methods? They can still exist in POST, you know...
user895378
@LeviMorrison I'm talking about this:
please help. i wont bother anyone once ive been directed
user895378
16:04
PUT / HTTP/1.0
Content-Lenght: 42

urlencoded=value&val2=something
@LeviMorrison for inspiration? lol. XP
user895378
PHP won't parse that for you automatically like it does for POST
@mAsT3RpEE There's nothing else I can really say. When the last reference to an object is destroyed then __destruct will be called.
user895378
The urlencoded bodies are obviously extremely trivial, but multipart bodies are not.
@LeviMorrison There is actually something else that could be said, destructor handling is a little different at shutdown in that exceptions are ignored
@mAsT3RpEE start here
16:10
I thought of a fun project that might help me get introduced to sockets @rdlowrey :)
@DaveRandom thanks man.
user895378
Yeah? What kind of stuff?
I was thinking a website version of the game.
@rdlowrey I still maintain that this is an invalid use of PUT. Even if it isn't it's a stupid use of PUT. I don't want automagic parsing of PUT, I'm happy with some exposed parsing functions. What if I want to store an entity that is a multipart MIME message? Imagine I'm storing an email on the server - I don't want the language to waste a shitload of time parsing the entity body into a pretty struct just for me to dump the raw into a file at the end of it.
user895378
@DaveRandom I agree ... that's why it should be optional :)
16:14
@rdlowrey ...and definable per-route?
user895378
But if you cruise the SO you'll find tons of people wondering where the $_PUT superglobal is. It's obviously something people want.
@rdlowrey So is singletons in the core...
user895378
@DaveRandom No, not at all definable per-route.
user895378
In the same way you can disable entity body parsing for PHP
user895378
One setting. If you want non-POST entity bodies parsed automatically then set the option. Otherwise you have to do it yourself.
user895378
16:15
But by the logic you presented people shouldn't have access to $_POST or $_FILES
@rdlowrey OK fair enough I suppose. I presume the multipart MIME parser is exposed to the user?
user895378
Yeah definitely.
@rdlowrey No, because that's what POST is for (IMO). Post requests contain formatted data, PUT requests contain actual things.
user895378
Yes but consider this scenario ...
@DaveRandom That distinction isn't in the spec anywhere.
That's just behavior stuff people had traditionally done.
user895378
16:17
I POST a form to create a new resource consisting of four files as a multipart body.
user895378
Great.
user895378
Now I want to update only two of them.
user895378
That's what PUT (probably PATCH really) is for.
user895378
So now I send a PUT with only two files in a multipart body.
user895378
The multipart parsing is useful.
16:19
@LeviMorrison True, but it's still a distinction I like.
user895378
Personally I prefer raw access to the entity body as well.
I may need to re-consider this, I'm in an increasingly small minority on the point and I am aware of that.
@rdlowrey I'm surprised php doesn't expose function to parse multipart/form-data to the user.
user895378
@Orangepill It would be nice.
@rdlowrey I suppose my real point of view is that I don't want some framework enforcing semantics onto my entity. And if I can turn it off, then that's good enough for me.
user895378
16:21
@Fabien I haven't played it but I have family members who love it. I tried to buy it at Christmas and couldn't find it anywhere :/
user895378
@DaveRandom I completely agree.
Must... resist... joke... about... forcing semantics onto your mom's entity... Nggggrhh
user895378
lol
I got it for a few people at Christmas. They're a little localized too, due to pop culture.
Games premises is easy. Everyone gets cards with answers. Pick a card from questions pile. Everyone chooses an answer from their cards. Funniest answer wins by vote.
Sort of like apples to apples.
Except sick and twisted.
user895378
16:23
I would love to implement something like that with websockets. so much work to finish before I can do fun things :/
@rdlowrey I'd love to see you do it. I still think we should focus on cloning you.
@rdlowrey The extreme irony there being that the vast majority of your current projects started from one idea that was "a bit of fun"
@fabien I loved there black friday deal
@Fabien I concluded that's probably not possible due to an inadequate supply of orange light in the universe
I think the cool thing about an online adaption is that we can allow users to build the card deck. Even have a community of high rated answers/questions to bring in to your own deck.
user895378
16:26
@DaveRandom I know right. Now I'm working to add perfect forward secrecy support for the TLS RFC. Not the original idea of "fun" I set out with :)
@DaveRandom heh
@rdlowrey For 5.6? :-S
@Orangepill lol. CaH also did an "Pay what you want" deal back when they started. Even if you paid $0 they sent you some.
user895378
@DaveRandom Yes.
I really think you should stop poking that bear and just do it for 5.7
user895378
16:27
Well I'm close ... it's working with the openssl command line client, just not with browsers yet :)
I plan to look at the whole win cert store thing this weekend, although I somehow doubt I will get time
user895378
I honestly don't think it's really worth it right now ... a single cacert file solves all problems.
user895378
@DaveRandom I'm only doing it because I'd like to use it myself in 5.6 ... but if I can't get it working satisfactorily today I'll probably just wait.
@rdlowrey ...for 5.7. Ain't gonna happen for 5.6.
user895378
I feel pretty confident the existing RFC will be in 5.6 ... Oh wait, you mean a cert file
16:30
I do think it's worth it though, because free updates from MS. I also think that with a suitable caching layer the performance hit can be basically negated.
Wont know if you don't try :)
The current RFC will 99% certain get into 5.6
user895378
@DaveRandom Totally, but it won't be doable with openssl, will it?
user895378
Well, I guess with a caching layer of some kind
Although @rdlowrey if you are going add PFS, make sure you don't do it at the 11th hour and then immediately open voting or you'll get a whole bunch of on-principle "no"s
user895378
16:32
@DaveRandom Yeah, I mean it only consists externally of adding a couple of context options you can set on your server stream.
user895378
It's not a big change outwardly.
user895378
But if I can't get it working and well-tested I won't put it in the RFC.
user895378
The last thing I want is to introduce buggy things.
@rdlowrey In that case it could be a candidate for 5.6.1 if you don't get it in time
user895378
@DaveRandom Also, did my name change to Yasuo or something? :)
user895378
16:34
stealth RFC change ... INITIATE VOTE IMMEDIATELY.
@rdlowrey I don't think so, I've not seen you spitting out RFC's 1+ a day like tweets
user895378
yeah all those RFCs are a little stressful.
RFC: Breakfast on 05/02/2014

What should I have for breakfast this morning? Thoughts? May break BC with yesterdays evening meal.
@DaveRandom Have you contributed to making breakfast? If not, please refrain from speaking. Ever.
user895378
Yeah, it's obvious that know nothing about making breakfast. Why are you even doing this. #internalsDrama
16:40
@CarrieKendall I made several PRs for different implementations of scrambled eggs, they were all criticised for being the wrong shade of yellow and closed. The most recent one has not attracted any criticism colour-wise but has been sitting open for 9 months with no comments, despite the fact that I keep putting them in microwave to keep them hot.
user895378
I've read that poached eggs are more secure. Does anyone know someone who can look into this?
I'm allergic to eggs! And so should be everyone! I VOTE NO!
user895378
I wish you wouldn't always hijack the vote, @DanLugg
@DaveRandom I actually think its a great idea despite making you feel stupid for bringing up discussion on the topic. /votes no
user895378
This is about what's right for PHP! Not your personal egg preference!
16:42
It's clear that no-one is interested in breakfast, so I'm also going to vote no and propose it be removed from the list of available meals.
People eat eggs for breakfast. People drink coffee for breakfast. By extension, eggs are too much like Java and I don't want PHP to be more like Java so fuck eggs.
user895378
Python has green eggs and ham.
^^^ win.
wtf
Room 11 got really weird.
And delicious
16:44
class SomeThingIWantToEat implements BACON { }
I want a concrete implementation of bacon ... not some shitty subclass. ....
That bacon looks like it came from Fortran, it's probably old and grimey.
TurkeyBacon or CanadianBacon does not adequately fulfill the Bacon interface imho
user895378
> The ca command is quirky and at times downright unfriendly.
user895378
^ From the openssl docs
16:48
@Orangepill That's because you're looking for StreakyBacon
user895378
"We know this program sucks, but here ya go"
I like turkey bacon, just don't think of it as a bacon replacement. Think of it like another flavor of something you already like, so why not try it?
Also note that CanadianBacon is what the rest of the world (including, I think, Canada) just call "bacon"
I was not aware of that... so "american bacon" you call streaky bacon?
Oooh @rdlowrey I know what I wanted to ask you (because I haven't bothered to go figure it out yet) - is there any way to get the server cert at the moment? I was wondering if there is a way to implement: connect SSL sock -> cert not trusted -> present cert info to user and ask user whether to trust cert for host -> store cert locally for later use in cert verification
(by which I mean: is there currently a way to do it in PHP with currently exposed functionality)
user895378
16:52
Yes. Basically you would just do the following steps:
@Orangepill In the UK we do anyway
We also call Canadian Bacon "back bacon"
user895378
@DaveRandom Wait, you mean from the client side?
user895378
(I was thinking in terms of servers)
@rdlowrey Yes
user895378
16:54
Yeah you should just be able to:
user895378
1. Connect
2. When it fails you look at the error code to see why
3. If it was because reason X you then ask the user if they want to proceed
4. If so, reconnect with peer verifiction disabled
@DanLugg can you confirm correct bacon nomenclature for canadian vs streaky bacon in canada?
user895378
Oh, but that suffers from "you have to connect again"
user895378
You probably meant a way to capture it without making an entire separate request
@rdlowrey Yeh but that's not what I want to do. I want to do something like when you connect to a new SSH server (and what FF does with SSL certs it doesn't recognise) - get the cert info, present it to the user and ask them about that specific cert. Then store that cert so it can be used to verify the peer in future transactions.
user895378
16:58
Well you can capture the peer certificate now via the context options. You could then pull the certificate's hased fingerprint out of the cert and store it (associated with the host name).
user895378
Then in future requests to that host you would just populate the "peer_fingerprint" context option.
user895378
If the expected peer fingerprint matches then that overrides any CA system verification in our implementation.
user895378
The verification pulls out immediately on a fingerprint match

« first day (1208 days earlier)      last day (3966 days later) »