Home / IOS Development / ios, alamofire5: need an equivalent of curl –key foo.key –cert foo, pem –location –request GET ‘https: //bar.baz/foo “

ios, alamofire5: need an equivalent of curl –key foo.key –cert foo, pem –location –request GET ‘https: //bar.baz/foo “



I have a private key in addition to a public key to attach the certificate.

How will authenticate with the server?

$ file *
foo.der:         data
foo.private.der: data

derived with openssl from

foo.key: PEM RSA private key
foo.pem: PEM certificate

what i need is an alamofire equivalent to this:

curl –key foo.key –cert foo.pem –location –request GET ‘https: // somhostofmine / v1 / welcome /’

$ curl –key ./client_key.pem –cert ./client.pem –location –request GET ‘https: // someurl’ “Hello wold!”

works

$ curl –cert ./client.pem ̵

1;location –request GET ‘https: // someurl / v1 / welcome /’ curl: (58) can not set private key file: ‘./client.pem’ type PEM

do not

So proposal to use the certificate itself without private key does not work.

Are we dealing with a certificate that sticks here or given the presence of the private key, this is something else happening here ???


Source link