OpenSSL self-signed certificates in one line

Yes, it is pretty easy to google for this (heck, it turns up first in a relevant result list), but I sometimes find myself out and about in need of this particular thing without immediate access to google. And since I have a full copy of my blog on my laptop...

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout server.key -out server.crt

There you go. That's from some kind soul who didn't get it right the first time. But at least he did have an idea, as opposed to me...

It does beg the question why there's no openssl selfsigned command or so. Not as if you wouldn't need that all too often.