... generate_api
authornk
Thu, 28 Mar 2019 15:05:07 +0100
branchgenerate_api
changeset 341410dd8071d216
parent 3405 ec4598385828
child 3415 e9388ddb3962
...
api/basic_api.yml2
api/keymanagement_api.yml2
api/message_api.yml2
api/pEp.yml2
     1.1 --- a/api/basic_api.yml2	Wed Mar 27 17:11:24 2019 +0100
     1.2 +++ b/api/basic_api.yml2	Thu Mar 28 15:05:07 2019 +0100
     1.3 @@ -7,116 +7,5 @@
     1.4  // written by Nana Karlstetter and Volker Birk
     1.5  
     1.6  
     1.7 -type ISO639_1 is string size=2 > a-z
     1.8  
     1.9 -type hex is string > a-f0-9
    1.10  
    1.11 -type hash doc="32bit Key ID to SHA512 in hex"
    1.12 -    is hex min=16, max=128;
    1.13 -
    1.14 -type hash_list doc="sequence of fingerprints of keys"
    1.15 -    is list< hash >;
    1.16 -
    1.17 -type TID doc="UUID version 4 variant 1"
    1.18 -    is binary size=16;
    1.19 -
    1.20 -type blob_list is list< blob >;
    1.21 -
    1.22 -type identity_list is list< identity >;
    1.23 -
    1.24 -type string_list is list< string > ; 
    1.25 -
    1.26 -type string_pair is pair< string, string >;
    1.27 -
    1.28 -
    1.29 -enum comm_type {
    1.30 -    hex unknown 0;
    1.31 -
    1.32 -    doc > range 0x01 to 0x09: no encryption, 0x0a to 0x0e: nothing reasonable
    1.33 -
    1.34 -    hex no_encryption 0x01                 doc="generic";
    1.35 -    hex no_encrypted_channel 0x02;
    1.36 -    hex key_not_found 0x03;
    1.37 -    hex key_expired 0x04;
    1.38 -    hex key_revoked 0x05;
    1.39 -    hex key_b0rken 0x06;
    1.40 -
    1.41 -    hex key_expired_but_confirmed 0x07
    1.42 -        doc="NOT with confirmed bit. Just retaining info here in case of renewal.";
    1.43 -
    1.44 -    hex my_key_not_included 0x09;
    1.45 -
    1.46 -    hex security_by_obscurity 0x0a;
    1.47 -    hex b0rken_crypto 0x0b;
    1.48 -    hex key_too_short 0x0c;
    1.49 -
    1.50 -    hex compromised 0x0e                   doc="known compromised connection";
    1.51 -    hex compromized 0x0e                   doc="deprecated misspelling";
    1.52 -    hex mistrusted 0x0f                    doc="known mistrusted key";
    1.53 -
    1.54 -    doc > range 0x10 to 0x3f: unconfirmed encryption
    1.55 -
    1.56 -    hex unconfirmed_encryption 0x10        doc="generic";
    1.57 -    hex OpenPGP_weak_unconfirmed 0x11      doc="RSA 1024 is weak";
    1.58 -
    1.59 -    hex to_be_checked 0x20                 doc="generic";
    1.60 -    hex SMIME_unconfirmed 0x21;
    1.61 -    hex CMS_unconfirmed 0x22;
    1.62 -
    1.63 -    hex strong_but_unconfirmed 0x30        doc="generic";
    1.64 -    hex OpenPGP_unconfirmed 0x38           doc="key at least 2048 bit RSA or EC";
    1.65 -    hex OTR_unconfirmed 0x3a;
    1.66 -
    1.67 -    doc > range 0x40 to 0x7f: unconfirmed encryption and anonymization
    1.68 -
    1.69 -    hex unconfirmed_enc_anon 0x40          doc="generic";
    1.70 -    hex pEp_unconfirmed 0x7f 
    1.71 -
    1.72 -    hex confirmed 0x80                     doc="this bit decides if trust is confirmed";
    1.73 -
    1.74 -    doc > range 0x81 to 0x8f: reserved
    1.75 -    doc > range 0x90 to 0xbf: confirmed encryption
    1.76 -
    1.77 -    hex confirmed_encryption 0x90          doc="generic";
    1.78 -    hex OpenPGP_weak 0x91                  doc="RSA 1024 is weak (unused)";
    1.79 -
    1.80 -    hex to_be_checked_confirmed 0xa0       doc="generic";
    1.81 -    hex SMIME 0xa1;
    1.82 -    hex CMS 0xa2;
    1.83 -
    1.84 -    hex strong_encryption 0xb0             doc="generic";
    1.85 -    hex OpenPGP 0xb8                       doc="key at least 2048 bit RSA or EC";
    1.86 -    hex OTR 0xba;
    1.87 -
    1.88 -    doc > range 0xc0 to 0xff: confirmed encryption and anonymization
    1.89 -
    1.90 -    hex confirmed_enc_anon 0xc0            doc="generic";
    1.91 -    hex pEp 0xff
    1.92 -
    1.93 -} // enum comm_type
    1.94 -
    1.95 -
    1.96 -struct identity {
    1.97 -    
    1.98 -    field string address doc="SMTP address or URI";
    1.99 -    field hash fpr doc="fingerprint of key being used as ID";
   1.100 -    field string user_id doc="ID for person or entity in M2M case";
   1.101 -    field string username doc="descriptive string";
   1.102 -    field ISO639_1 lang doc="two-digit language code or null bytes";
   1.103 -
   1.104 -    flags {
   1.105 -        flag not_for_sync 0x0001
   1.106 -            doc="don't use this identity for Sync";
   1.107 -
   1.108 -        flag list 0x0002
   1.109 -            doc="identity of list of persons";
   1.110 -
   1.111 -        doc | the second octet flags are calculated
   1.112 -
   1.113 -        flag devicegroup 0x0100
   1.114 -            doc="identity of a device group member"
   1.115 -    }
   1.116 -
   1.117 -} // struct Identity
   1.118 -
   1.119 -
     2.1 --- a/api/keymanagement_api.yml2	Wed Mar 27 17:11:24 2019 +0100
     2.2 +++ b/api/keymanagement_api.yml2	Thu Mar 28 15:05:07 2019 +0100
     2.3 @@ -65,7 +65,7 @@
     2.4  	{
     2.5  	// parms
     2.6  
     2.7 -	supply identity identity
     2.8 +	supply identity ident
     2.9  	doc="""
    2.10  		identity of local user
    2.11  		both .address and .user_id must be set.
     3.1 --- a/api/message_api.yml2	Wed Mar 27 17:11:24 2019 +0100
     3.2 +++ b/api/message_api.yml2	Thu Mar 28 15:05:07 2019 +0100
     3.3 @@ -80,6 +80,8 @@
     3.4      field string comments doc='string with comments';
     3.5      field stringpair_list opt_fields doc='optional fields';
     3.6      field enc_format format doc='format of encrypted data';
     3.7 +
     3.8 +    new (msg_direction dir);
     3.9  }
    3.10  
    3.11  
    3.12 @@ -249,8 +251,8 @@
    3.13                  private key was imported for one of our addresses (NOT trusted
    3.14                  or set to be used - handshake/trust is required for that)
    3.15                  """;
    3.16 -            flag decrypt_flag_consume 0x2 doc=’used by sync';
    3.17 -            flag decrypt_flag_ignore 0x4 doc=’used by sync';
    3.18 +            flag decrypt_flag_consume 0x2 doc='used by sync';
    3.19 +            flag decrypt_flag_ignore 0x4 doc='used by sync';
    3.20              flag decrypt_flag_src_modified 0x8 
    3.21              doc="""
    3.22                  indicates that the src object has been modified. At the moment,
     4.1 --- a/api/pEp.yml2	Wed Mar 27 17:11:24 2019 +0100
     4.2 +++ b/api/pEp.yml2	Thu Mar 28 15:05:07 2019 +0100
     4.3 @@ -19,6 +19,7 @@
     4.4  decl flag @name;
     4.5  decl protocol @name;
     4.6  decl method @name;
     4.7 +decl construct, new is construct;
     4.8  
     4.9  // use: readonly in parm, ownership remains with caller
    4.10  decl use @type @name (mode=use) alias parm;