Category Archives: Security

Loading SecCertificateRef from PEM String

In order to load a PEM certificate, you’d probably wanna grab the PEM itself from your backend, right?.

You can do so, by means of this command:

openssl s_client -showcerts -host host.com -port 443

Once you’ve got the certificate, you should get rid of the Begin/End Certificate substrings.

Cocoa Snippet itself is quite easy:

[cc lang=”objc”]

NSData *rawCertificate = [[NSData alloc] initWithBase64Encoding:PlaintextCertificateString];
SecCertificateRef parsedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)rawCertificate);
[/cc]

That’s it. Don’t forget about checking expiration dates. Unfortunately, Apple’s API to do so is private, and i personally refuse to build OpenSSL into my app, just to check that.

Apple Got Hacked!?

apple-hacked

In a recent press release, Apple announced that a small group of computers in their network got hacked. You might be wondering… how in the hell this happened?.

The answer is pretty simple. Java Virtual Machine has been found to ve **very** insecure. Several zero-day exploits have been uncovered, and long short story, if you’ve got Java VM installed in your machine, i suggest you disable it. As soon as possible!.

Who were these hackers?. It sounds crazy, but it has been determined that the attack came from China. Specifically, from a military facility. It seems that the war, these days, has evolved to computer security.

I’d like to recall that Facebook got hacked, also, a couple weeks ago. Remember about it?. Well, the exact same group of hackers is said to be behind this new attack against¬†Apple.

By the way… no important information has been affected. So don’t expect to see iPhone 6 mockups in the net, because it just won’t happen.

Stay safe!

Howto Uninstall Flash Player from a Mac

If you’re reading this post, you’re probably aware of the dangers of Flash Player. And you’ve read, most probably, about the last couple of viruses / penetrations to Facebook and Google.

Steve Jobs hated Adobe Flash… ¬†personally, i say he had a very good reason. If wasn’t, probably, just because Adobe refused (at first) to publish its suite for Mac. He knew that it was troublesome… so… let’s proceed removing that junk from our system!.

First: Download the Uninstaller

If you’re running Snow Leopard (or newer), you’re gonna need to download the Flash Player Uninstaller. However, if you’re running an older version (Leopard and Tiger), please, download this uninstaller.

You’re gonna need to double click on the DMG file, and click on the “Adobe Flash Player Uninstaller” application. You should get the following window onscreen:

uninstall-flash-player

Second: Proceed uninstalling

This is pretty straightforward. Simply hit the ‘Uninstall’ button, and it will all be over, soon enough. You will be required to close all of your browsers first. Once it’s all over, you should see the following screen:

remove-flash-player-from-mac
Congratulations! welcome to the future!. HTML 5 is becoming the web standard… and we certainly don’t need Adobe to run anything on a browser.