E selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot parse common name value from the certificate. Is it valid and base64-encoded?
it should work in both cases, but I generally use the simulator.
Managed to solve the problem: openssl pkcs12 -in //properties/cert.p12 -out /properties/newfile.pem -clcerts -passin 'pass:password’
but faced with another one, when I try to install cert to simulator, received the error
One or more parameters passed to a function were not valid.
If the above works as expected then make sure you properly base64-encode the certificate payload before passing it to mobile: installCertificate. Make sure you use the most recent xcuitest driver version (only available as part of Appium 2).
I receive this error, after xcrun simctl keychain booted add-root-cert <your_certificate_path> An error was encountered processing the command (domain=NSOSStatusErrorDomain, code=-50):
One or more parameters passed to a function were not valid.
the certificate was successfully installed, but it is not working. .p12 works correctly, but after converting to .pem or .der the authorization does not work
useless documentation
spent too much time on this, it is easier to send the file to the device
mykola-mokhnach
Perhaps there is an example of the structure of a valid certificate in PEM, what exactly it should contain
this is the structure of my certificate in .p12,
also, I use a password with a certificate
-----BEGIN ENCRYPTED PRIVATE KEY-----
....
-----END ENCRYPTED PRIVATE KEY-----
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 1024
Certificate bag
Bag Attributes
localKeyID:
friendlyName: ...
subject=/..
issuer=/CN=OneLogin Inc Intermediate
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Certificate bag
Bag Attributes
friendlyName: OneLogin Inc Root CA
subject=/CN=OneLogin Inc
issuer=/CN=OneLogin Inc
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Certificate bag
Bag Attributes
friendlyName: OneLogin Inc Intermediate CA
subject=/CN=OneLogin Inc Intermediate
issuer=/CN=OneLogin Inc Root
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
How can I encode it to PEM?
I used OpenSSL but the received certificates don’t work and i can’t authenticate with them
Unfortunately I cannot help with that. Like I said the API that XCUITest driver provides is a simple wrapper over simctl. Try asking at Apple forums about such nitty-gritty details.