Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
2.8.0
-
Security Level: Public
Description
CBL=2.8.0-273
Android:-api versions used for peers-28 ,23
Steps:
When we are trying to create a certificate using the createIdentity api seeing below error in the testserver app.
Expected:
should be able to create identity using the createIdentity api.
API params:
Date certTime = calendar.getTime();
HashMap<String, String> X509Attributes = new HashMap<String, String>();
X509Attributes.put(TLSIdentity.CERT_ATTRIBUTE_COMMON_NAME, "CBL Test");
X509Attributes.put(TLSIdentity.CERT_ATTRIBUTE_ORGANIZATION, "Couchbase");
X509Attributes.put(TLSIdentity.CERT_ATTRIBUTE_ORGANIZATION_UNIT, "Mobile");
X509Attributes.put(TLSIdentity.CERT_ATTRIBUTE_EMAIL_ADDRESS, "lite@couchbase.com");
String alias = UUID.randomUUID().toString();
API
TLSIdentity.createIdentity(true, X509Attributes, certTime, alias);
|
ERROR:
|
I/System.out: Wed Sep 28 15:42:13 EDT 2022 |
W/KeyStore: KeyStore exception
|
android.os.ServiceSpecificException: (code 7) |
at android.os.Parcel.createException(Parcel.java:1956) |
at android.os.Parcel.readException(Parcel.java:1910) |
at android.os.Parcel.readException(Parcel.java:1860) |
at android.security.IKeystoreService$Stub$Proxy.get(IKeystoreService.java:786) |
at android.security.KeyStore.get(KeyStore.java:195) |
at android.security.keystore.AndroidKeyStoreSpi.engineGetCertificateChain(AndroidKeyStoreSpi.java:118) |
at java.security.KeyStore.getCertificateChain(KeyStore.java:1087) |
at com.couchbase.lite.internal.KeyStoreManager.getCertificates(KeyStoreManager.java:248) |
at com.couchbase.lite.internal.KeyStoreManagerDelegate.getCertificateChain(KeyStoreManagerDelegate.java:160) |
at com.couchbase.lite.TLSIdentity.getIdentity(TLSIdentity.java:58) |
at com.couchbase.lite.TLSIdentity.createIdentity(TLSIdentity.java:107) |
at com.couchbase.mobiletestkit.javacommon.RequestHandler.PeerToPeerRequestHandler.serverStart(PeerToPeerRequestHandler.java:304) |
at java.lang.reflect.Method.invoke(Native Method)
|
at com.couchbase.mobiletestkit.javacommon.RequestHandlerDispatcher.handle(RequestHandlerDispatcher.java:133) |
at com.couchbase.mobiletestkit.javalistener.Server.handle(Server.java:128) |
at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:418) |
at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) |
at java.lang.Thread.run(Thread.java:764) |
W/KeyStore: KeyStore exception
|
android.os.ServiceSpecificException: (code 7) |
at android.os.Parcel.createException(Parcel.java:1956) |
at android.os.Parcel.readException(Parcel.java:1910) |
at android.os.Parcel.readException(Parcel.java:1860) |
at android.security.IKeystoreService$Stub$Proxy.get(IKeystoreService.java:786) |
at android.security.KeyStore.get(KeyStore.java:195) |
at android.security.keystore.AndroidKeyStoreSpi.engineGetCertificateChain(AndroidKeyStoreSpi.java:118) |
at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:484) |
at java.security.KeyStore.getEntry(KeyStore.java:1560) |
at com.couchbase.lite.internal.KeyStoreManager.getPrivateKey(KeyStoreManager.java:225) |
at com.couchbase.lite.internal.KeyStoreManagerDelegate.getKey(KeyStoreManagerDelegate.java:152) |
at com.couchbase.lite.TLSIdentity.getIdentity(TLSIdentity.java:64) |
at com.couchbase.lite.TLSIdentity.createIdentity(TLSIdentity.java:107) |
at com.couchbase.mobiletestkit.javacommon.RequestHandler.PeerToPeerRequestHandler.serverStart(PeerToPeerRequestHandler.java:304) |
at java.lang.reflect.Method.invoke(Native Method)
|
at com.couchbase.mobiletestkit.javacommon.RequestHandlerDispatcher.handle(RequestHandlerDispatcher.java:133) |
at com.couchbase.mobiletestkit.javalistener.Server.handle(Server.java:128) |
at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:418) |
at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) |
at java.lang.Thread.run(Thread.java:764) |
|
|
Test:
pytest -s -rsx --timeout 1800 --liteserv-version=2.8.0-273,2.8.0-273 --liteserv-host=192.168.33.101,192.168.33.126,192.168.33.101 --liteserv-port=8080,8080,8080 --liteserv-platform=android,android,android --create-db-per-test=cbl-test testsuites/CBLTester/p2p_tests/test_peer_to_peer_tls.py --use-local-testserver -k "test_peer_to_peer_tls_any_self_signed_certs_create[True-push_pull-URLEndPoint-True]"
Attachments
Issue Links
- duplicates
-
CBL-1240 URL listener starts with ugly (but unimportant) KeyStore exception
- Closed