I think that you already fixed your problem, but I can see two problems:


you forgot about a slash between getcwd() and filename:
curl_setopt($ch, CURLOPT_CAINFO,  getcwd().'/ipm.crt');
curl_setopt($ch, CURLOPT_SSLCERT, getcwd().'/ipm.pem');
you need to attach a key file as @donparalias already said


cURL is unable to use client certificate , in local server
I recently came across a problem with My.Computer.FileSystem.DeleteDirectory(). It will not delete read only files.

I found out by Googling that I could delete the read only files by changing the file attributes to 'Normal'. So I wrote a recursive function, as below.

Private Sub DeleteDir(ByVal dir As DirectoryInfo)

    For Each d In dir.GetDirectories
        DeleteDir(d)
    Next
    For Each f In dir.GetFiles
        Try
            f.Attributes = FileAttributes.Normal
            f.Delete()
        Catch ex As Exception
            Log(ex.Message)
        End Try
    Next
    dir.Delete(True)
End Sub


It seems to work fine, but it would be nice if My.Computer.FileSystem.DeleteDirectory() had another parameter to delete read only files, or there was an easier way to do this.
