We have a cert cloud storage and signature service. We have developed PKCS11 libraries for OSX, Linux, Windows... a native CSP and KSP driver for Windows.
Using Xamarin, we have developed a "WebViewClient" for android that can authenticate with client certificate (with cloud storaged certificates) BUT I could not find out how to do the same in IOS.
I tried to override SecIdentity Class and SecKey class, so I can develop signature methods to signature in cloud, BUT at instantiation time SecIdentity needs a IntPtr and I don´t know how to create/assign it, I tried with:
Snippet
try {
var cred = new NSUrlCredential(new IVSSecIdentity(), new SecCertificate[] {
cert
}, NSUrlCredentialPersistence.ForSession);
} catch (Exception e) {
//never raised this error, always app crash
Log(e);
}
try {
var cred = new NSUrlCredential(new IVSSecIdentity(1), new SecCertificate[] {
cert
}, NSUrlCredentialPersistence.ForSession);
} catch (Exception e) {
//never raised this error, always app crash
Log(e);
}
try {
var cred = new NSUrlCredential(new IVSSecIdentity("test"), new SecCertificate[] {
cert
}, NSUrlCredentialPersistence.ForSession);
} catch (Exception e) {
//never raised this error, always app crash
Log(e);
}
public class IVSSecIdentity: SecIdentity {
public IVSSecIdentity(): base(new IntPtr(1)) {}
public IVSSecIdentity(int test1): base(new IntPtr(0)) {}
public IVSSecIdentity(string test2): base(IntPtr.Zero) {}
... (All stuff and methods/properties/fields)...
}
If could some one please help me (or redirect my question to some documentation) will be so thankfully