]> git.saurik.com Git - cycript.git/blobdiff - Bridge.def
Add Security framework definitions to Bridge.def.
[cycript.git] / Bridge.def
index b3792aa6a87e7b803677756e79585fe42efce8e5..ef38eb92d5b9161299d682c17442a9abd14f21be 100644 (file)
@@ -1,20 +1,23 @@
 C YES true
 C NO false
-C nil null
 C NULL null
 
 : applicationDidFinishLaunching: v12@0:4@8
 
 T id @
+T Class #
+T SEL :
 
 T short s
 T int i
 T long l
+T longlong q
 
 T byte C
+T ushort S
 T uint I
 T ulong L
-T ushort S
+T ulonglong Q
 
 T char c
 T boolean B
@@ -22,17 +25,30 @@ T float f
 T double d
 
 T Boolean B
-
-T SInt8 {char}
-T UInt8 {byte}
-T SInt16 {short}
-T UInt16 {ushort}
-T SInt32 {int}
-T UInt32 {uint}
-
-S CGPoint "x"f"y"f
+T BOOL B
+T bool B
+
+T int8_t {char}
+T uint8_t {byte}
+T int16_t {short}
+T uint16_t {ushort}
+T int32_t {int}
+T uint32_t {uint}
+T int64_t {longlong}
+T uint64_t {ulonglong}
+
+T SInt8 {int8_t}
+T UInt8 {uint8_t}
+T SInt16 {int16_t}
+T UInt16 {uint16_t}
+T SInt32 {int32_t}
+T UInt32 {uint32_t}
+T SInt64 {int64_t}
+T UInt64 {uint64_t}
+
+S CGPoint "x"{CGFloat}"y"{CGFloat}
 S CGRect "origin"{CGPoint}"size"{CGSize}
-S CGSize "width"f"height"f
+S CGSize "width"{CGFloat}"height"{CGFloat}
 
 l c
 
@@ -118,7 +134,7 @@ F property_getName *^{objc_property=}
 
 F protocol_conformsToProtocol B@@
 F protocol_copyMethodDescriptionList ^{objc_method_description=:*}@BB^I
-F protocol_copyPropertyList ^{objc_property=}@^I
+F protocol_copyPropertyList ^^{objc_property=}@^I
 F protocol_copyProtocolList ^@@^I
 F protocol_getMethodDescription {objc_method_description=:*}@:BB
 F protocol_getName *@
@@ -330,7 +346,7 @@ V UIKeyboardAnimationDurationUserInfoKey @
 
 F UIApplicationMain ii^^c@@
 
-F UIImageJPEGRepresentation @@
+F UIImageJPEGRepresentation @@f
 F UIImagePNGRepresentation @@
 F UIImageWriteToSavedPhotosAlbum v@@:^v
 
@@ -441,6 +457,252 @@ V UIWebViewGrowsAndShrinksToFitHeight f
 V UIWebViewGrowsAndShrinksToFitWidth f
 V UIWebViewScalesToFitScale f
 
+f Security
+
+T OSStatus {ulong}
+
+F SecCertificateAddToKeychain {OSStatus}@@
+F SecCertificateCopyCommonName {OSStatus}@^@
+F SecCertificateCopyData @@
+F SecCertificateCopyEmailAddresses {OSStatus}@^@
+F SecCertificateCopyLongDescription @@@^@
+F SecCertificateCopyNormalizedIssuerContent @@^@
+F SecCertificateCopyNormalizedSubjectContent @@^@
+F SecCertificateCopyPreferred @@@
+F SecCertificateCopyPublicKey {OSStatus}@^@
+F SecCertificateCopySerialNumber @@^@
+F SecCertificateCopyShortDescription @@@^@
+F SecCertificateCopySubjectSummary @@
+F SecCertificateCopyValues @@@^@
+F SecCertificateCreateWithData @@@
+F SecCertificateGetItem @@^@
+F SecCertificateGetTypeID {CFTypeID}
+F SecCertificateSetPreference {OSStatus}@@{uint32_t}@
+F SecCertificateSetPreferred {OSStatus}@@@
+F SecCopyErrorMessageString @{OSStatus}^v
+F SecIdentityCopyCertificate {OSStatus}@^@
+F SecIdentityCopyPreferred @@@@
+F SecIdentityCopyPrivateKey {OSStatus}@^@
+F SecIdentityCopySystemIdentity {OSStatus}@^@^@
+F SecIdentityCreateWithCertificate {OSStatus}@@^@
+F SecIdentityGetTypeID {CFTypeID}
+F SecIdentitySetPreferred {OSStatus}@@@
+F SecIdentitySetSystemIdentity {OSStatus}@@
+F SecKeyCreateFromData @@@^@
+F SecKeyDeriveFromPassword @@@^@
+F SecKeyGeneratePair {OSStatus}@^@^@
+F SecKeyGeneratePairAsync v@{dispatch_queue_t}@?
+F SecKeyGenerateSymmetric @@^@
+F SecKeyGetBlockSize {size_t}@
+F SecKeyGetTypeID {CFTypeID}
+F SecKeyUnwrapSymmetric @^@@@^@
+F SecKeyWrapSymmetric @@@@^@
+F SecPKCS12Import {OSStatus}@@^@
+F SecPolicyCopyProperties @@
+F SecPolicyCreateBasicX509 @
+F SecPolicyCreateSSL @B@
+F SecPolicyGetTypeID {CFTypeID}
+F SecTrustCopyAnchorCertificates {OSStatus}^@
+F SecTrustCopyCustomAnchorCertificates {OSStatus}@^@
+F SecTrustCopyExceptions @@
+F SecTrustCopyPolicies {OSStatus}@^@
+F SecTrustCopyProperties @@
+F SecTrustCopyPublicKey @@
+F SecTrustCreateWithCertificates {OSStatus}@@^@
+F SecTrustEvaluate {OSStatus}@^@
+F SecTrustEvaluateAsync @{dispatch_queue_t}@?
+F SecTrustGetCertificateAtIndex @@{CFIndex}
+F SecTrustGetCertificateCount {CFIndex}@
+F SecTrustGetTrustResult {OSStatus}@^@
+F SecTrustGetTypeID {CFTypeID}
+F SecTrustGetVerifyTime {CFAbsoluteTime}@
+F SecTrustSetAnchorCertificates {OSStatus}@@
+F SecTrustSetAnchorCertificatesOnly {OSStatus}@B
+F SecTrustSetExceptions B@@
+F SecTrustSetKeychains {OSStatus}@@
+F SecTrustSetOptions {OSStatus}@{SecTrustOptionFlags}
+F SecTrustSetPolicies {OSStatus}@@
+F SecTrustSettingsCopyCertificates {OSStatus}{SecTrustSettingsDomain}^@
+F SecTrustSettingsCopyModificationDate {OSStatus}@{SecTrustSettingsDomain}^@
+F SecTrustSettingsCopyTrustSettings {OSStatus}@{SecTrustSettingsDomain}^@
+F SecTrustSettingsCreateExternalRepresentation {OSStatus}{SecTrustSettingsDomain}^@
+F SecTrustSettingsImportExternalRepresentation {OSStatus}{SecTrustSettingsDomain}@
+F SecTrustSettingsRemoveTrustSettings {OSStatus}@{SecTrustSettingsDomain}
+F SecTrustSettingsSetTrustSettings {OSStatus}@{SecTrustSettingsDomain}@
+F SecTrustSetVerifyDate {OSStatus}@@
+
+C CSSM_CERT_STATUS_EXPIRED 0x00000001
+C CSSM_CERT_STATUS_NOT_VALID_YET 0x00000002
+C CSSM_CERT_STATUS_IS_IN_INPUT_CERTS 0x00000004
+C CSSM_CERT_STATUS_IS_IN_ANCHORS 0x00000008
+C CSSM_CERT_STATUS_IS_ROOT 0x00000010
+C CSSM_CERT_STATUS_IS_FROM_NET 0x00000020
+
+C kSecPaddingNone 0
+C kSecPaddingPKCS1 1
+C kSecPaddingPKCS1MD2 0x8000
+C kSecPaddingPKCS1MD5 0x8001
+C kSecPaddingPKCS1SHA1 0x8002
+
+C kSecTrustResultInvalid 0
+C kSecTrustResultProceed 1
+C kSecTrustResultConfirm 2
+C kSecTrustResultDeny 3
+C kSecTrustResultUnspecified 4
+C kSecTrustResultRecoverableTrustFailure 5
+C kSecTrustResultFatalTrustFailure 6
+C kSecTrustResultOtherError 7
+
+C CSSM_TP_ACTION_ALLOW_EXPIRED 0x00000001
+C CSSM_TP_ACTION_LEAF_IS_CA 0x00000002
+C CSSM_TP_ACTION_FETCH_CERT_FROM_NET 0x00000004
+C CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT 0x00000008
+
+V kSecImportItemLabel @
+V kSecImportItemKeyID @
+V kSecImportItemTrust @
+V kSecImportItemCertChain @
+V kSecImportItemIdentity @
+
+V kSecIdentityDomainDefault @
+V kSecIdentityDomainKerberosKDC @
+
+C kSecCredentialTypeDefault 0
+C kSecCredentialTypeWithUI 1
+C kSecCredentialTypeNoUI 2
+
+T SecTrustSettingsDomain {uint32_t}
+C kSecTrustSettingsDomainUser 0
+C kSecTrustSettingsDomainAdmin 1
+C kSecTrustSettingsDomainSystem 2
+
+C kSecTrustSettingsKeyUseSignature 0x00000001
+C kSecTrustSettingsKeyUseEnDecryptData 0x00000002
+C kSecTrustSettingsKeyUseEnDecryptKey 0x00000004
+C kSecTrustSettingsKeyUseSignCert 0x00000008
+C kSecTrustSettingsKeyUseSignRevocation 0x00000010
+C kSecTrustSettingsKeyUseKeyExchange 0x00000020
+C kSecTrustSettingsKeyUseAny 0xffffffff
+
+C kSecTrustSettingsPolicy @"kSecTrustSettingsPolicy"
+C kSecTrustSettingsApplication @"kSecTrustSettingsApplication"
+C kSecTrustSettingsPolicyString @"kSecTrustSettingsPolicyString"
+C kSecTrustSettingsKeyUsage @"kSecTrustSettingsKeyUsage"
+C kSecTrustSettingsAllowedError @"kSecTrustSettingsAllowedError"
+C kSecTrustSettingsResult @"kSecTrustSettingsResult"
+
+C kSecTrustSettingsResultInvalid 0
+C kSecTrustSettingsResultTrustRoot 1
+C kSecTrustSettingsResultTrustAsRoot 2
+C kSecTrustSettingsResultDeny 3
+C kSecTrustSettingsResultUnspecified 4
+
+# XXX: this is a pointer...
+C kSecTrustSettingsDefaultRootCertSetting -1
+
+V kSecPropertyKeyType @
+V kSecPropertyKeyLabel @
+V kSecPropertyKeyLocalizedLabel @
+V kSecPropertyKeyValue @
+
+V kSecPropertyTypeWarning @
+V kSecPropertyTypeSuccess @
+V kSecPropertyTypeSection @
+V kSecPropertyTypeData @
+V kSecPropertyTypeString @
+V kSecPropertyTypeURL @
+V kSecPropertyTypeDate @
+V kSecPropertyTypeTitle @
+V kSecPropertyTypeError @
+
+V kSecCertificateUsageSigning @
+V kSecCertificateUsageSigningAndEncrypting @
+V kSecCertificateUsageDeriveAndSign @
+
+V kSecPolicyOid @
+V kSecPolicyName @
+V kSecPolicyClient @
+V kSecPolicyKU_DigitalSignature @
+V kSecPolicyKU_NonRepudiation @
+V kSecPolicyKU_KeyEncipherment @
+V kSecPolicyKU_DataEncipherment @
+V kSecPolicyKU_KeyAgreement @
+V kSecPolicyKU_KeyCertSign @
+V kSecPolicyKU_CRLSign @
+V kSecPolicyKU_EncipherOnly @
+V kSecPolicyKU_DecipherOnly @
+
+C kSecTrustOptionAllowExpired 0x00000001
+C kSecTrustOptionLeafIsCA 0x00000002
+C kSecTrustOptionFetchIssuerFromNet 0x00000004
+C kSecTrustOptionAllowExpiredRoot 0x00000008
+C kSecTrustOptionRequireRevPerCert 0x00000010
+C kSecTrustOptionImplicitAnchors 0x00000040
+
+C kSecDefaultKeySize 0
+C kSec3DES192 192
+C kSecAES128 128
+C kSecAES192 192
+C kSecAES256 256
+C kSecp192r1 192
+C kSecp256r1 256
+C kSecp384r1 384
+C kSecp521r1 521
+C kSecRSAMin 1024
+C kSecRSAMax 4096
+
+V kSecPolicyAppleX509Basic @
+V kSecPolicyAppleSSL @
+V kSecPolicyAppleSMIME @
+V kSecPolicyAppleEAP @
+V kSecPolicyAppleIPsec @
+V kSecPolicyAppleiCha @
+V kSecPolicyApplePKINITClient @
+V kSecPolicyApplePKINITServer @
+V kSecPolicyAppleCodeSigning @
+V kSecPolicyMacAppStoreReceipt @
+V kSecPolicyAppleIDValidation @
+V kSecPolicyAppleTimeStamping @
+
+C errSecSuccess 0
+C errSecUnimplemented -4
+C errSecParam -50
+C errSecAllocate  -108
+C errSecNotAvailable  –25291
+C errSecReadOnly  –25292
+C errSecAuthFailed  –25293
+C errSecNoSuchKeychain  –25294
+C errSecInvalidKeychain –25295
+C errSecDuplicateKeychain –25296
+C errSecDuplicateItem –25299
+C errSecItemNotFound  –25300
+C errSecBufferTooSmall  –25301
+C errSecDataTooLarge  –25302
+C errSecNoSuchAttr  –25303
+C errSecInvalidItemRef  –25304
+C errSecInvalidSearchRef  –25305
+C errSecNoSuchClass –25306
+C errSecNoDefaultKeychain –25307
+C errSecInteractionNotAllowed –25308
+C errSecReadOnlyAttr  –25309
+C errSecWrongSecVersion –25310
+C errSecKeySizeNotAllowed –25311
+C errSecNoStorageModule –25312
+C errSecNoCertificateModule –25313
+C errSecNoPolicyModule  –25314
+C errSecInteractionRequired –25315
+C errSecDataNotAvailable  –25316
+C errSecDataNotModifiable –25317
+C errSecCreateChainFailed –25318
+C errSecInvalidPrefsDomain  –25319
+C errSecACLNotSimple  –25240
+C errSecPolicyNotFound  –25241
+C errSecInvalidTrustSetting –25242
+C errSecNoAccessForItem –25243
+C errSecInvalidOwnerEdit  –25244
+C errSecTrustNotAvailable –25245
+C errSecDecode  -26275
+
 f AddressBook
 
 # Private
@@ -623,6 +885,7 @@ F CalFilterCreateWithDatabase ^{CalFilter}^{CalDatabase}
 
 F CalEventOccurrenceGetEvent @@
 F CalEventCopySummary @@
+F CalEventIsAllDay B@
 F CalEventOccurrenceGetDate I@
 
 f CoreAnimation
@@ -1226,7 +1489,7 @@ F CFShowStr v@
 
 f CoreGraphics
 
-T CGFloat f
+T CGFloat F
 
 # CGAffineTransform
 
@@ -1436,6 +1699,7 @@ T NSMapTable {_NSMapTable}
 T NSMapTableOptions {NSUInteger}
 # NSMapTableValueCallBacks
 
+S _NSPoint "x"{CGFloat}"y"{CGFloat}
 T NSPoint {_NSPoint}
 T NSPointArray ^{NSPoint}
 T NSPointPointer ^{NSPoint}
@@ -1600,7 +1864,7 @@ C RTLD_NEXT -1
 C RTLD_DEFAULT -2
 C RTLD_SELF -3
 
-S dl_info "dli_fname"*"dli_fbase"v^"dli_sname"*"dli_saddr"^v
+S dl_info "dli_fname"*"dli_fbase"^v"dli_sname"*"dli_saddr"^v
 T Dl_info {dl_info}
 
 F dladdr i^rv^{dl_info}