System.Security.Cryptography.Native.Android PAL Tracking List #45737
Labels
area-System.Runtime.InteropServices
os-android
tracking
This issue is tracking the completion of other related issues.
Milestone
The overall list of pinvokes needed to integrate with the Android api's:
Hashing
Interop.EVP.cs
extern SafeEvpMdCtxHandle EvpMdCtxCreate(IntPtr type)
extern void EvpMdCtxDestroy(IntPtr ctx)
extern int EvpDigestReset(SafeEvpMdCtxHandle ctx, IntPtr type)
extern int EvpDigestUpdate(SafeEvpMdCtxHandle ctx, ref byte d, int cnt)
extern int EvpDigestFinalEx(SafeEvpMdCtxHandle ctx, ref byte md, ref uint s)
extern int EvpDigestCurrent(SafeEvpMdCtxHandle ctx, ref byte md, ref uint s)
extern int EvpDigestOneShot(IntPtr type, byte* source, int sourceSize, byte* md, ref uint mdSize)
extern int EvpMdSize(IntPtr md)
extern IntPtr EvpMd5()
extern IntPtr EvpSha1()
extern IntPtr EvpSha256()
extern IntPtr EvpSha384()
extern IntPtr EvpSha512()
extern int GetMaxMdSize()
Interop.Hmac.cs
extern SafeHmacCtxHandle HmacCreate(ref byte key, int keyLen, IntPtr md)
extern void HmacDestroy(IntPtr ctx)
extern int HmacReset(SafeHmacCtxHandle ctx)
extern int HmacUpdate(SafeHmacCtxHandle ctx, ref byte data, int len)
extern int HmacFinal(SafeHmacCtxHandle ctx, ref byte data, ref int len)
extern int HmacCurrent(SafeHmacCtxHandle ctx, ref byte data, ref int len)
Misc
Interop.Bignum.cs
extern void BigNumDestroy(IntPtr a)
extern IntPtr BigNumFromBinary(byte* s, int len)
extern int BigNumToBinary(SafeBignumHandle a, byte* to)
extern int GetBigNumBytes(SafeBignumHandle a)
Interop.Initialization.cs
extern int EnsureOpenSslInitialized()
Interop.LookupFriendlyNameByOid.cs
extern int LookupFriendlyNameByOid(string oidValue, ref IntPtr friendlyNamePtr)
Interop.OpenSslGetProtocolSupport.cs
extern int OpenSslGetProtocolSupport(int protocol)
Interop.OpenSslVersion.cs
extern long OpenSslVersionNumber()
Interop.RAND.cs
extern bool CryptoNative_GetRandomBytes(byte* buf, int num)
Symmetric/Asymmetric
Interop.ASN1.GetIntegerBytes.cs
extern int GetAsn1IntegerDerSize(SafeSharedAsn1IntegerHandle i)
extern int EncodeAsn1Integer(SafeSharedAsn1IntegerHandle i, byte[] buf)
Interop.ASN1.Nid.cs
extern int ObjSn2Nid(string sn)
extern int ObjTxt2Nid(string oid)
Interop.ASN1.cs
extern SafeAsn1ObjectHandle ObjTxt2Obj(string s)
extern int ObjObj2Txt(byte* buf, int buf_len, IntPtr a)
extern IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName)
extern IntPtr ObjNid2Obj(int nid)
extern void Asn1ObjectFree(IntPtr o)
extern SafeAsn1BitStringHandle DecodeAsn1BitString(byte[] buf, int len)
extern void Asn1BitStringFree(IntPtr o)
extern SafeAsn1OctetStringHandle Asn1OctetStringNew()
extern bool Asn1OctetStringSet(SafeAsn1OctetStringHandle o, byte[] d, int len)
extern void Asn1OctetStringFree(IntPtr o)
extern void Asn1StringFree(IntPtr o)
Interop.BIO.cs
extern SafeBioHandle CreateMemoryBio()
extern SafeBioHandle BioNewFile(string filename, string mode)
extern bool BioDestroy(IntPtr a)
extern int BioGets(SafeBioHandle b, byte[] buf, int size)
extern int BioRead(SafeBioHandle b, byte[] data, int len)
extern int BioWrite(SafeBioHandle b, byte[] data, int len)
extern int BioWrite(SafeBioHandle b, ref byte data, int len)
extern int GetMemoryBioSize(SafeBioHandle bio)
extern int BioCtrlPending(SafeBioHandle bio)
Interop.Dsa.cs
extern bool DsaUpRef(IntPtr dsa)
extern void DsaDestroy(IntPtr dsa)
extern bool DsaGenerateKey(out SafeDsaHandle dsa, int bits)
extern int DsaSizeSignature(SafeDsaHandle dsa)
extern int DsaSizeQ(SafeDsaHandle dsa)
extern int DsaSizeP(SafeDsaHandle dsa)
extern bool DsaSign(SafeDsaHandle dsa, ref byte hash, int hashLength, ref byte refSignature, out int outSignatureLength)
extern bool DsaVerify(SafeDsaHandle dsa, ref byte hash, int hashLength, ref byte signature, int signatureLength)
extern bool GetDsaParameters(...)
extern bool DsaKeyCreateByExplicitParameters(...)
Interop.EvpPkey.Dsa.cs
extern SafeDsaHandle EvpPkeyGetDsa(SafeEvpPKeyHandle pkey)
extern bool EvpPkeySetDsa(SafeEvpPKeyHandle pkey, SafeDsaHandle key)
Interop.ERR.cs
extern ulong ErrClearError()
extern ulong ErrGetErrorAlloc([MarshalAs(UnmanagedType.Bool)] out bool isAllocFailure)
extern ulong ErrPeekError()
extern ulong ErrPeekLastError()
extern IntPtr ErrReasonErrorString(ulong error)
extern void ErrErrorStringN(ulong e, byte* buf, int len)
Interop.EVP.Cipher.cs
extern SafeEvpCipherCtxHandle EvpCipherCreate(...)
extern SafeEvpCipherCtxHandle EvpCipherCreatePartial(...)
extern bool EvpCipherSetKeyAndIV(...)
extern bool CryptoNative_EvpCipherSetGcmNonceLength(...)
extern bool CryptoNative_EvpCipherSetCcmNonceLength(...)
extern void EvpCipherDestroy(IntPtr ctx)
extern bool EvpCipherReset(SafeEvpCipherCtxHandle ctx)
extern bool EvpCipherCtxSetPadding(SafeEvpCipherCtxHandle x, int padding)
extern bool EvpCipherUpdate(...)
extern bool EvpCipherFinalEx(...)
extern bool EvpCipherGetGcmTag(...)
extern bool EvpCipherSetGcmTag(...)
extern bool EvpCipherGetCcmTag(...)
extern bool EvpCipherSetCcmTag(...)
extern IntPtr EvpAes128Ecb()
extern IntPtr EvpAes128Cbc()
extern IntPtr EvpAes128Gcm()
extern IntPtr EvpAes128Cfb8()
extern IntPtr EvpAes128Cfb128()
extern IntPtr EvpAes128Ccm()
extern IntPtr EvpAes192Ecb()
extern IntPtr EvpAes192Cbc()
extern IntPtr EvpAes192Gcm()
extern IntPtr EvpAes192Cfb8()
extern IntPtr EvpAes192Cfb128()
extern IntPtr EvpAes192Ccm()
extern IntPtr EvpAes256Ecb()
extern IntPtr EvpAes256Cbc()
extern IntPtr EvpAes256Gcm()
extern IntPtr EvpAes256Cfb128()
extern IntPtr EvpAes256Cfb8()
extern IntPtr EvpAes256Ccm()
extern IntPtr EvpDesCbc()
extern IntPtr EvpDesEcb()
extern IntPtr EvpDesCfb8()
extern IntPtr EvpDes3Cbc()
extern IntPtr EvpDes3Ecb()
extern IntPtr EvpDes3Cfb8()
extern IntPtr EvpDes3Cfb64()
extern IntPtr EvpRC2Cbc()
extern IntPtr EvpRC2Ecb()
Interop.EcDsa.ImportExport.cs
extern int EcKeyCreateByKeyParameters(...)
extern SafeEcKeyHandle EcKeyCreateByExplicitParameters(...)
extern int CryptoNative_GetECKeyParameters(...)
extern int CryptoNative_GetECCurveParameters(...)
Interop.EcDsa.cs
extern bool EcDsaSign(ref byte dgst, int dlen, ref byte sig, out int siglen, SafeEcKeyHandle ecKey)
extern int EcDsaVerify(ref byte dgst, int dgst_len, ref byte sigbuf, int sig_len, SafeEcKeyHandle ecKey)
extern int CryptoNative_EcDsaSize(SafeEcKeyHandle ecKey)
Interop.EcKey.cs
extern SafeEcKeyHandle CryptoNative_EcKeyCreateByOid(string oid)
extern void EcKeyDestroy(IntPtr a)
extern bool EcKeyGenerateKey(SafeEcKeyHandle eckey)
extern bool EcKeyUpRef(IntPtr r)
extern int CryptoNative_EcKeyGetSize(SafeEcKeyHandle ecKey, out int keySize)
extern int CryptoNative_EcKeyGetCurveName(SafeEcKeyHandle ecKey, out int nid)
Interop.EvpPkey.EcKey.cs
extern SafeEcKeyHandle EvpPkeyGetEcKey(SafeEvpPKeyHandle pkey)
extern bool EvpPkeySetEcKey(SafeEvpPKeyHandle pkey, SafeEcKeyHandle key)
Interop.EvpPkey.Ecdh.cs
extern SafeEvpPKeyCtxHandle EvpPKeyCtxCreate(SafeEvpPKeyHandle pkey, SafeEvpPKeyHandle peerkey, out uint secretLength)
extern int EvpPKeyDeriveSecretAgreement(...)
extern void EvpPKeyCtxDestroy(IntPtr ctx)
Interop.EvpPkey.Rsa.cs
extern SafeRsaHandle EvpPkeyGetRsa(SafeEvpPKeyHandle pkey)
extern bool EvpPkeySetRsa(SafeEvpPKeyHandle pkey, SafeRsaHandle rsa)
Interop.EvpPkey.cs
extern SafeEvpPKeyHandle EvpPkeyCreate()
extern void EvpPkeyDestroy(IntPtr pkey)
extern int UpRefEvpPkey(SafeEvpPKeyHandle handle)
Interop.Rsa.cs
extern SafeRsaHandle RsaCreate()
extern bool RsaUpRef(IntPtr rsa)
extern void RsaDestroy(IntPtr rsa)
extern SafeRsaHandle DecodeRsaPublicKey(ref byte buf, int len)
extern int RsaPublicEncrypt(...)
extern int RsaPrivateDecrypt(...)
extern int RsaSignPrimitive(...)
extern int RsaVerificationPrimitive(...)
extern int RsaSize(SafeRsaHandle rsa)
extern int RsaGenerateKeyEx(SafeRsaHandle rsa, int bits, SafeBignumHandle e)
extern bool RsaSign(int type, ref byte m, int m_len, ref byte sigret, out int siglen, SafeRsaHandle rsa)
extern bool RsaVerify(int type, ref byte m, int m_len, ref byte sigbuf, int siglen, SafeRsaHandle rsa)
extern bool GetRsaParameters(...)
extern bool SetRsaParameters(...)
SSL
Interop.SetProtocolOptions.cs
extern void SetProtocolOptions(IntPtr ctx, SslProtocols protocols)
Interop.Ssl.cs
extern void EnsureLibSslInitialized()
extern IntPtr SslV2_3Method()
extern SafeSslHandle SslCreate(SafeSslContextHandle ctx)
extern SslErrorCode SslGetError(SafeSslHandle ssl, int ret)
extern SslErrorCode SslGetError(IntPtr ssl, int ret)
extern void SslSetQuietShutdown(SafeSslHandle ssl, int mode)
extern void SslDestroy(IntPtr ssl)
extern void SslSetConnectState(SafeSslHandle ssl)
extern void SslSetAcceptState(SafeSslHandle ssl)
extern IntPtr SslGetVersion(SafeSslHandle ssl)
extern bool SslSetTlsExtHostName(SafeSslHandle ssl, string host)
extern void SslGetAlpnSelected(SafeSslHandle ssl, out IntPtr protocol, out int len)
extern int SslWrite(SafeSslHandle ssl, ref byte buf, int num)
extern int SslRead(SafeSslHandle ssl, byte* buf, int num)
extern bool IsSslRenegotiatePending(SafeSslHandle ssl)
extern int SslShutdown(IntPtr ssl)
extern int SslShutdown(SafeSslHandle ssl)
extern void SslSetBio(SafeSslHandle ssl, SafeBioHandle rbio, SafeBioHandle wbio)
extern int SslDoHandshake(SafeSslHandle ssl)
extern bool IsSslStateOK(SafeSslHandle ssl)
extern int BioWrite(SafeBioHandle b, byte* data, int len)
extern int BioWrite(SafeBioHandle b, ref byte data, int len)
extern SafeX509Handle SslGetPeerCertificate(SafeSslHandle ssl)
extern SafeSharedX509StackHandle SslGetPeerCertChain(SafeSslHandle ssl)
extern int SslGetPeerFinished(SafeSslHandle ssl, IntPtr buf, int count)
extern int SslGetFinished(SafeSslHandle ssl, IntPtr buf, int count)
extern bool SslSessionReused(SafeSslHandle ssl)
extern bool SslAddExtraChainCert(SafeSslHandle ssl, SafeX509Handle x509)
extern SafeSharedX509NameStackHandle SslGetClientCAList_private(SafeSslHandle ssl)
extern bool SslGetCurrentCipherId(SafeSslHandle ssl, out int cipherId)
extern IntPtr GetOpenSslCipherSuiteName(SafeSslHandle ssl, int cipherSuite, out int isTls12OrLower)
extern bool Tls13SupportedImpl()
Interop.SslCtx.cs
extern SafeSslContextHandle SslCtxCreate(IntPtr method)
extern void SslCtxDestroy(IntPtr ctx)
extern void SslCtxSetCertVerifyCallback(IntPtr ctx, AppVerifyCallback cb, IntPtr arg)
extern void SslCtxSetClientCertCallback(IntPtr ctx, ClientCertCallback callback)
extern int SslCtxSetAlpnProtos(SafeSslContextHandle ctx, IntPtr protos, int len)
extern void SslCtxSetAlpnSelectCb(SafeSslContextHandle ctx, SslCtxSetAlpnCallback callback, IntPtr arg)
Interop.SslCtxOptions.cs
extern int SslCtxUseCertificate(SafeSslContextHandle ctx, SafeX509Handle certPtr)
extern int SslCtxUsePrivateKey(SafeSslContextHandle ctx, SafeEvpPKeyHandle keyPtr)
extern int SslCtxCheckPrivateKey(SafeSslContextHandle ctx)
extern void SslCtxSetQuietShutdown(SafeSslContextHandle ctx)
extern void SslCtxSetVerify(SafeSslContextHandle ctx, SslCtxSetVerifyCallback callback)
extern bool SetCiphers(SafeSslContextHandle ctx, byte* cipherList, byte* cipherSuites)
extern bool SetEncryptionPolicy(SafeSslContextHandle ctx, EncryptionPolicy policy)
X509
Interop.OCSP.cs
extern void OcspRequestDestroy(IntPtr ocspReq)
extern int GetOcspRequestDerSize(SafeOcspRequestHandle req)
extern int EncodeOcspRequest(SafeOcspRequestHandle req, byte[] buf)
extern SafeOcspResponseHandle CryptoNative_DecodeOcspResponse(ref byte buf, int len)
extern void OcspResponseDestroy(IntPtr ocspReq)
extern X509VerifyStatusCode CryptoNative_X509ChainGetCachedOcspStatus(...)
extern X509VerifyStatusCode CryptoNative_X509ChainVerifyOcsp(...)
extern SafeOcspRequestHandle CryptoNative_X509ChainBuildOcspRequest(...)
Interop.Pkcs7.cs
extern SafePkcs7Handle PemReadBioPkcs7(SafeBioHandle bp)
extern SafePkcs7Handle DecodePkcs7(ref byte buf, int len)
extern SafePkcs7Handle D2IPkcs7Bio(SafeBioHandle bp)
extern SafePkcs7Handle Pkcs7CreateCertificateCollection(SafeX509StackHandle certs)
extern void Pkcs7Destroy(IntPtr p7)
extern int GetPkcs7Certificates(SafePkcs7Handle p7, out SafeSharedX509StackHandle certs)
extern int GetPkcs7DerSize(SafePkcs7Handle p7)
extern int EncodePkcs7(SafePkcs7Handle p7, byte[] buf)
Interop.Crypto.cs
extern int CryptoNative_BioTell(SafeBioHandle bio)
extern int BioSeek(SafeBioHandle bio, int pos)
extern int GetX509Thumbprint(SafeX509Handle x509, byte[]? buf, int cBuf)
extern int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf)
extern SafeX509Handle ReadX509AsDerFromBio(SafeBioHandle bio)
extern IntPtr GetX509NotBefore(SafeX509Handle x509)
extern IntPtr GetX509NotAfter(SafeX509Handle x509)
extern IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl)
extern int GetX509Version(SafeX509Handle x509)
extern IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509)
extern IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509)
extern int GetX509PublicKeyParameterBytes(SafeX509Handle x509, byte[]? buf, int cBuf)
extern IntPtr GetX509PublicKeyBytes(SafeX509Handle x509)
extern int GetX509EkuFieldCount(SafeEkuExtensionHandle eku)
extern IntPtr GetX509EkuField(SafeEkuExtensionHandle eku, int loc)
extern SafeBioHandle GetX509NameInfo(SafeX509Handle x509, int nameType, [MarshalAs(UnmanagedType.Bool)] bool forIssuer)
extern int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf)
extern bool PushX509StackField(SafeX509StackHandle stack, SafeX509Handle x509)
extern bool PushX509StackField(SafeSharedX509StackHandle stack, SafeX509Handle x509)
extern IntPtr GetX509RootStorePath_private()
extern IntPtr GetX509RootStoreFile_private()
extern int CryptoNative_X509StoreSetVerifyTime(...)
extern int CheckX509IpAddress(SafeX509Handle x509, [In]byte[] addressBytes, int addressLen, string hostname, int cchHostname)
extern int CheckX509Hostname(SafeX509Handle x509, string hostname, int cchHostname)
Interop.X509.cs
extern SafeEvpPKeyHandle GetX509EvpPublicKey(SafeX509Handle x509)
extern SafeX509CrlHandle DecodeX509Crl(byte[] buf, int len)
extern SafeX509Handle DecodeX509(ref byte buf, int len)
extern int GetX509DerSize(SafeX509Handle x)
extern int EncodeX509(SafeX509Handle x, byte[] buf)
extern void X509Destroy(IntPtr a)
extern SafeX509Handle X509Duplicate(IntPtr handle)
extern SafeX509Handle X509Duplicate(SafeX509Handle handle)
extern SafeX509Handle X509UpRef(IntPtr handle)
extern SafeX509Handle X509UpRef(SafeX509Handle handle)
extern SafeX509Handle PemReadX509FromBio(SafeBioHandle bio)
extern SafeX509Handle PemReadX509FromBioAux(SafeBioHandle bio)
extern SafeSharedAsn1IntegerHandle X509GetSerialNumber_private(SafeX509Handle x)
extern IntPtr X509GetIssuerName(SafeX509Handle x)
extern IntPtr X509GetSubjectName(SafeX509Handle x)
extern bool X509CheckPurpose(SafeX509Handle x, int id, int ca)
extern ulong X509IssuerNameHash(SafeX509Handle x)
extern SafeSharedAsn1OctetStringHandle CryptoNative_X509FindExtensionData(...)
extern int X509GetExtCount(SafeX509Handle x)
extern IntPtr X509GetExt(SafeX509Handle x, int loc)
extern IntPtr X509ExtensionGetOid(IntPtr ex)
extern IntPtr X509ExtensionGetData(IntPtr ex)
extern bool X509ExtensionGetCritical(IntPtr ex)
extern SafeX509StoreHandle CryptoNative_X509ChainNew(SafeX509StackHandle systemTrust, SafeX509StackHandle userTrust)
extern void X509StoreDestory(IntPtr v)
extern bool X509StoreAddCrl(SafeX509StoreHandle ctx, SafeX509CrlHandle x)
extern bool CryptoNative_X509StoreSetRevocationFlag(SafeX509StoreHandle ctx, X509RevocationFlag revocationFlag)
extern bool X509StoreCtxInit(...)
extern int CryptoNative_X509VerifyCert(SafeX509StoreCtxHandle ctx)
extern X509VerifyStatusCode X509StoreCtxGetError(SafeX509StoreCtxHandle ctx)
extern int CryptoNative_X509StoreCtxReset(SafeX509StoreCtxHandle ctx)
extern int CryptoNative_X509StoreCtxRebuildChain(SafeX509StoreCtxHandle ctx)
extern int X509StoreCtxGetErrorDepth(SafeX509StoreCtxHandle ctx)
extern void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, X509StoreVerifyCallback callback)
extern IntPtr X509VerifyCertErrorString(X509VerifyStatusCode n)
extern void X509CrlDestroy(IntPtr a)
extern int PemWriteBioX509Crl(SafeBioHandle bio, SafeX509CrlHandle crl)
extern SafeX509CrlHandle PemReadBioX509Crl(SafeBioHandle bio)
extern int GetX509SubjectPublicKeyInfoDerSize(SafeX509Handle x509)
extern int EncodeX509SubjectPublicKeyInfo(SafeX509Handle x509, byte[] buf)
Interop.X509Ext.cs
extern SafeX509ExtensionHandle X509ExtensionCreateByObj(...)
extern int X509ExtensionDestroy(IntPtr x)
extern bool X509V3ExtPrint(SafeBioHandle buf, SafeX509ExtensionHandle ext)
extern bool DecodeX509BasicConstraints2Extension(...)
extern SafeEkuExtensionHandle DecodeExtendedKeyUsage(byte[] buf, int len)
extern void ExtendedKeyUsageDestory(IntPtr a)
Interop.X509Name.cs
extern int GetX509NameStackFieldCount(SafeSharedX509NameStackHandle sk)
extern SafeSharedX509NameHandle GetX509NameStackField_private(SafeSharedX509NameStackHandle sk,...)
extern int GetX509NameRawBytes(SafeSharedX509NameHandle x509Name, byte[]? buf, int cBuf)
Interop.X509Stack.cs
extern SafeX509StackHandle NewX509Stack()
extern void RecursiveFreeX509Stack(IntPtr stack)
extern int GetX509StackFieldCount(SafeX509StackHandle stack)
extern int GetX509StackFieldCount(SafeSharedX509StackHandle stack)
extern IntPtr GetX509StackField(SafeX509StackHandle stack, int loc)
extern IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc)
extern int CryptoNative_X509StackAddDirectoryStore(SafeX509StackHandle stack, string storePath)
extern int CryptoNative_X509StackAddMultiple(SafeX509StackHandle dest, SafeX509StackHandle src)
Interop.X509StoreCtx.cs
extern SafeX509StoreCtxHandle X509StoreCtxCreate()
extern void X509StoreCtxDestroy(IntPtr v)
extern SafeX509StackHandle X509StoreCtxGetChain(SafeX509StoreCtxHandle ctx)
extern SafeX509Handle X509StoreCtxGetCurrentCert(SafeX509StoreCtxHandle ctx)
extern int CryptoNative_X509StoreCtxCommitToChain(SafeX509StoreCtxHandle ctx)
extern int CryptoNative_X509StoreCtxResetForSignatureError(...)
extern SafeSharedX509StackHandle X509StoreCtxGetSharedUntrusted_private(SafeX509StoreCtxHandle ctx)
extern IntPtr X509StoreCtxGetTargetCert(SafeX509StoreCtxHandle ctx)
The text was updated successfully, but these errors were encountered: