@@ -60,18 +60,18 @@ enum EVP_PKS_DSA = 0x0200;
60
60
enum EVP_PKS_EC = 0x0400 ;
61
61
enum EVP_PKT_EXP = 0x1000 ; /* <= 512 bit key */
62
62
63
- alias NID_undef EVP_PKEY_NONE ;
64
- alias NID_rsaEncryption EVP_PKEY_RSA ;
65
- alias NID_rsa EVP_PKEY_RSA2 ;
66
- alias NID_dsa EVP_PKEY_DSA ;
67
- alias NID_dsa_2 EVP_PKEY_DSA1 ;
68
- alias NID_dsaWithSHA EVP_PKEY_DSA2 ;
69
- alias NID_dsaWithSHA1 EVP_PKEY_DSA3 ;
70
- alias NID_dsaWithSHA1_2 EVP_PKEY_DSA4 ;
71
- alias NID_dhKeyAgreement EVP_PKEY_DH ;
72
- alias NID_X9_62_id_ecPublicKey EVP_PKEY_EC ;
73
- alias NID_hmac EVP_PKEY_HMAC ;
74
- alias NID_cmac EVP_PKEY_CMAC ;
63
+ alias EVP_PKEY_NONE = NID_undef ;
64
+ alias EVP_PKEY_RSA = NID_rsaEncryption ;
65
+ alias EVP_PKEY_RSA2 = NID_rsa ;
66
+ alias EVP_PKEY_DSA = NID_dsa ;
67
+ alias EVP_PKEY_DSA1 = NID_dsa_2 ;
68
+ alias EVP_PKEY_DSA2 = NID_dsaWithSHA ;
69
+ alias EVP_PKEY_DSA3 = NID_dsaWithSHA1 ;
70
+ alias EVP_PKEY_DSA4 = NID_dsaWithSHA1_2 ;
71
+ alias EVP_PKEY_DH = NID_dhKeyAgreement ;
72
+ alias EVP_PKEY_EC = NID_X9_62_id_ecPublicKey ;
73
+ alias EVP_PKEY_HMAC = NID_hmac ;
74
+ alias EVP_PKEY_CMAC = NID_cmac ;
75
75
76
76
extern (C ):
77
77
nothrow :
@@ -137,12 +137,12 @@ struct env_md_st
137
137
ExternC! (int function (EVP_MD_CTX * ctx, int cmd, int p1, void * p2)) md_ctrl;
138
138
} /* EVP_MD */ ;
139
139
140
- alias typeof (* (ExternC! (int function (int type,const (ubyte )* m,
140
+ alias evp_sign_method = typeof (* (ExternC! (int function (int type,const (ubyte )* m,
141
141
uint m_length,ubyte * sigret,
142
- uint * siglen, void * key))).init) evp_sign_method ;
143
- alias typeof (* (ExternC! (int function (int type,const (ubyte )* m,
142
+ uint * siglen, void * key))).init);
143
+ alias evp_verify_method = typeof (* (ExternC! (int function (int type,const (ubyte )* m,
144
144
uint m_length,const (ubyte )* sigbuf,
145
- uint siglen, void * key))).init) evp_verify_method ;
145
+ uint siglen, void * key))).init);
146
146
147
147
enum EVP_MD_FLAG_ONESHOT = 0x0001 ; /* digest can only handle a single
148
148
* block */
@@ -186,23 +186,23 @@ enum EVP_MD_CTRL_ALG_CTRL = 0x1000;
186
186
enum EVP_PKEY_NULL_method = " null,null,{0,0,0,0}" ;
187
187
188
188
version (OPENSSL_NO_DSA) {
189
- alias EVP_PKEY_NULL_method EVP_PKEY_DSA_method;
189
+ alias EVP_PKEY_DSA_method = EVP_PKEY_NULL_method ;
190
190
} else {
191
191
enum EVP_PKEY_DSA_method = " cast(evp_sign_method*)&DSA_sign," ~
192
192
" cast(evp_verify_method*)&DSA_verify,{EVP_PKEY_DSA,EVP_PKEY_DSA2," ~
193
193
" EVP_PKEY_DSA3, EVP_PKEY_DSA4,0}" ;
194
194
}
195
195
196
196
version (OPENSSL_NO_ECDSA) {
197
- alias EVP_PKEY_NULL_method EVP_PKEY_ECDSA_method;
197
+ alias EVP_PKEY_ECDSA_method = EVP_PKEY_NULL_method ;
198
198
} else {
199
199
enum EVP_PKEY_ECDSA_method = " cast(evp_sign_method*)&ECDSA_sign," ~
200
200
" cast(evp_verify_method*)&ECDSA_verify,{EVP_PKEY_EC,0,0,0}" ;
201
201
}
202
202
203
203
version (OPENSSL_NO_RSA) {
204
- alias EVP_PKEY_NULL_method EVP_PKEY_RSA_method;
205
- alias EVP_PKEY_NULL_method EVP_PKEY_RSA_ASN1_OCTET_STRING_method;
204
+ alias EVP_PKEY_RSA_method = EVP_PKEY_NULL_method ;
205
+ alias EVP_PKEY_RSA_ASN1_OCTET_STRING_method = EVP_PKEY_NULL_method ;
206
206
} else {
207
207
enum EVP_PKEY_RSA_method = " cast(evp_sign_method*)&RSA_sign," ~
208
208
" cast(evp_verify_method*)RSA_verify,{EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}" ;
@@ -358,7 +358,7 @@ struct evp_cipher_info_st {
358
358
const (EVP_CIPHER )* cipher;
359
359
ubyte [EVP_MAX_IV_LENGTH ] iv;
360
360
}
361
- alias evp_cipher_info_st EVP_CIPHER_INFO ;
361
+ alias EVP_CIPHER_INFO = evp_cipher_info_st ;
362
362
363
363
struct evp_cipher_ctx_st
364
364
{
@@ -392,7 +392,7 @@ struct evp_Encode_Ctx_st {
392
392
int line_num; /* number read on current line */
393
393
int expect_nl;
394
394
}
395
- alias evp_Encode_Ctx_st EVP_ENCODE_CTX ;
395
+ alias EVP_ENCODE_CTX = evp_Encode_Ctx_st ;
396
396
397
397
/* Password based encryption function */
398
398
alias typeof (* (ExternC! (int function (EVP_CIPHER_CTX * ctx, const (char )* pass, int passlen,
@@ -430,7 +430,7 @@ auto EVP_get_cipherbynid()(int a) { return EVP_get_cipherbyname(OBJ_nid2sn(a));
430
430
auto EVP_get_cipherbyobj ()(const (ASN1_OBJECT )* a) { return EVP_get_cipherbynid(OBJ_obj2nid(a)); }
431
431
432
432
int EVP_MD_type (const (EVP_MD )* md);
433
- alias EVP_MD_type EVP_MD_nid;
433
+ alias EVP_MD_nid = EVP_MD_type ;
434
434
auto EVP_MD_name ()(const (EVP_MD )* e) { return OBJ_nid2sn(EVP_MD_nid(e)); }
435
435
int EVP_MD_pkey_type (const (EVP_MD )* md);
436
436
int EVP_MD_size (const (EVP_MD )* md);
@@ -465,16 +465,16 @@ auto EVP_CIPHER_CTX_mode()(const(EVP_CIPHER_CTX)* e) { return (EVP_CIPHER_CTX_fl
465
465
auto EVP_ENCODE_LENGTH (T)(T l) { return (((l+ 2 )/ 3 * 4 )+ (l/ 48 + 1 )* 2 + 80 ); }
466
466
auto EVP_DECODE_LENGTH (T)(T l) { return ((l+ 3 )/ 4 * 3 + 80 ); }
467
467
468
- alias EVP_DigestInit_ex EVP_SignInit_ex;
469
- alias EVP_DigestInit EVP_SignInit;
470
- alias EVP_DigestUpdate EVP_SignUpdate;
471
- alias EVP_DigestInit_ex EVP_VerifyInit_ex;
472
- alias EVP_DigestInit EVP_VerifyInit;
473
- alias EVP_DigestUpdate EVP_VerifyUpdate;
474
- alias EVP_DecryptUpdate EVP_OpenUpdate;
475
- alias EVP_EncryptUpdate EVP_SealUpdate;
476
- alias EVP_DigestUpdate EVP_DigestSignUpdate;
477
- alias EVP_DigestUpdate EVP_DigestVerifyUpdate;
468
+ alias EVP_SignInit_ex = EVP_DigestInit_ex ;
469
+ alias EVP_SignInit = EVP_DigestInit ;
470
+ alias EVP_SignUpdate = EVP_DigestUpdate ;
471
+ alias EVP_VerifyInit_ex = EVP_DigestInit_ex ;
472
+ alias EVP_VerifyInit = EVP_DigestInit ;
473
+ alias EVP_VerifyUpdate = EVP_DigestUpdate ;
474
+ alias EVP_OpenUpdate = EVP_DecryptUpdate ;
475
+ alias EVP_SealUpdate = EVP_EncryptUpdate ;
476
+ alias EVP_DigestSignUpdate = EVP_DigestUpdate ;
477
+ alias EVP_DigestVerifyUpdate = EVP_DigestUpdate ;
478
478
479
479
void BIO_set_md ()(BIO * b,const (EVP_MD )* md) { return BIO_ctrl(b,BIO_C_SET_MD ,0 ,md); }
480
480
auto BIO_get_md ()(BIO * b,EVP_MD ** mdp) { return BIO_ctrl(b,BIO_C_GET_MD ,0 ,mdp); }
@@ -660,17 +660,17 @@ const(EVP_CIPHER)* EVP_des_ede3();
660
660
const (EVP_CIPHER )* EVP_des_ede_ecb ();
661
661
const (EVP_CIPHER )* EVP_des_ede3_ecb ();
662
662
const (EVP_CIPHER )* EVP_des_cfb64 ();
663
- alias EVP_des_cfb64 EVP_des_cfb;
663
+ alias EVP_des_cfb = EVP_des_cfb64 ;
664
664
const (EVP_CIPHER )* EVP_des_cfb1 ();
665
665
const (EVP_CIPHER )* EVP_des_cfb8 ();
666
666
const (EVP_CIPHER )* EVP_des_ede_cfb64 ();
667
- alias EVP_des_ede_cfb64 EVP_des_ede_cfb;
667
+ alias EVP_des_ede_cfb = EVP_des_ede_cfb64 ;
668
668
version (none ) {
669
669
const (EVP_CIPHER )* EVP_des_ede_cfb1 ();
670
670
const (EVP_CIPHER )* EVP_des_ede_cfb8 ();
671
671
}
672
672
const (EVP_CIPHER )* EVP_des_ede3_cfb64 ();
673
- alias EVP_des_ede3_cfb64 EVP_des_ede3_cfb;
673
+ alias EVP_des_ede3_cfb = EVP_des_ede3_cfb64 ;
674
674
const (EVP_CIPHER )* EVP_des_ede3_cfb1 ();
675
675
const (EVP_CIPHER )* EVP_des_ede3_cfb8 ();
676
676
const (EVP_CIPHER )* EVP_des_ofb ();
@@ -700,7 +700,7 @@ const(EVP_CIPHER)* EVP_rc4_hmac_md5();
700
700
version (OPENSSL_NO_IDEA) {} else {
701
701
const (EVP_CIPHER )* EVP_idea_ecb ();
702
702
const (EVP_CIPHER )* EVP_idea_cfb64 ();
703
- alias EVP_idea_cfb64 EVP_idea_cfb;
703
+ alias EVP_idea_cfb = EVP_idea_cfb64 ;
704
704
const (EVP_CIPHER )* EVP_idea_ofb ();
705
705
const (EVP_CIPHER )* EVP_idea_cbc ();
706
706
}
@@ -710,28 +710,28 @@ const(EVP_CIPHER)* EVP_rc2_cbc();
710
710
const (EVP_CIPHER )* EVP_rc2_40_cbc ();
711
711
const (EVP_CIPHER )* EVP_rc2_64_cbc ();
712
712
const (EVP_CIPHER )* EVP_rc2_cfb64 ();
713
- alias EVP_rc2_cfb64 EVP_rc2_cfb;
713
+ alias EVP_rc2_cfb = EVP_rc2_cfb64 ;
714
714
const (EVP_CIPHER )* EVP_rc2_ofb ();
715
715
}
716
716
version (OPENSSL_NO_BF) {} else {
717
717
const (EVP_CIPHER )* EVP_bf_ecb ();
718
718
const (EVP_CIPHER )* EVP_bf_cbc ();
719
719
const (EVP_CIPHER )* EVP_bf_cfb64 ();
720
- alias EVP_bf_cfb64 EVP_bf_cfb;
720
+ alias EVP_bf_cfb = EVP_bf_cfb64 ;
721
721
const (EVP_CIPHER )* EVP_bf_ofb ();
722
722
}
723
723
version (OPENSSL_NO_CAST) {} else {
724
724
const (EVP_CIPHER )* EVP_cast5_ecb ();
725
725
const (EVP_CIPHER )* EVP_cast5_cbc ();
726
726
const (EVP_CIPHER )* EVP_cast5_cfb64 ();
727
- alias EVP_cast5_cfb64 EVP_cast5_cfb;
727
+ alias EVP_cast5_cfb = EVP_cast5_cfb64 ;
728
728
const (EVP_CIPHER )* EVP_cast5_ofb ();
729
729
}
730
730
version (OPENSSL_NO_RC5) {} else {
731
731
const (EVP_CIPHER )* EVP_rc5_32_12_16_cbc ();
732
732
const (EVP_CIPHER )* EVP_rc5_32_12_16_ecb ();
733
733
const (EVP_CIPHER )* EVP_rc5_32_12_16_cfb64 ();
734
- alias EVP_rc5_32_12_16_cfb64 EVP_rc5_32_12_16_cfb;
734
+ alias EVP_rc5_32_12_16_cfb = EVP_rc5_32_12_16_cfb64 ;
735
735
const (EVP_CIPHER )* EVP_rc5_32_12_16_ofb ();
736
736
}
737
737
version (OPENSSL_NO_AES) {} else {
@@ -740,7 +740,7 @@ const(EVP_CIPHER)* EVP_aes_128_cbc();
740
740
const (EVP_CIPHER )* EVP_aes_128_cfb1 ();
741
741
const (EVP_CIPHER )* EVP_aes_128_cfb8 ();
742
742
const (EVP_CIPHER )* EVP_aes_128_cfb128 ();
743
- alias EVP_aes_128_cfb128 EVP_aes_128_cfb;
743
+ alias EVP_aes_128_cfb = EVP_aes_128_cfb128 ;
744
744
const (EVP_CIPHER )* EVP_aes_128_ofb ();
745
745
const (EVP_CIPHER )* EVP_aes_128_ctr ();
746
746
const (EVP_CIPHER )* EVP_aes_128_ccm ();
@@ -751,7 +751,7 @@ const(EVP_CIPHER)* EVP_aes_192_cbc();
751
751
const (EVP_CIPHER )* EVP_aes_192_cfb1 ();
752
752
const (EVP_CIPHER )* EVP_aes_192_cfb8 ();
753
753
const (EVP_CIPHER )* EVP_aes_192_cfb128 ();
754
- alias EVP_aes_192_cfb128 EVP_aes_192_cfb;
754
+ alias EVP_aes_192_cfb = EVP_aes_192_cfb128 ;
755
755
const (EVP_CIPHER )* EVP_aes_192_ofb ();
756
756
const (EVP_CIPHER )* EVP_aes_192_ctr ();
757
757
const (EVP_CIPHER )* EVP_aes_192_ccm ();
@@ -761,7 +761,7 @@ const(EVP_CIPHER)* EVP_aes_256_cbc();
761
761
const (EVP_CIPHER )* EVP_aes_256_cfb1 ();
762
762
const (EVP_CIPHER )* EVP_aes_256_cfb8 ();
763
763
const (EVP_CIPHER )* EVP_aes_256_cfb128 ();
764
- alias EVP_aes_256_cfb128 EVP_aes_256_cfb;
764
+ alias EVP_aes_256_cfb = EVP_aes_256_cfb128 ;
765
765
const (EVP_CIPHER )* EVP_aes_256_ofb ();
766
766
const (EVP_CIPHER )* EVP_aes_256_ctr ();
767
767
const (EVP_CIPHER )* EVP_aes_256_ccm ();
@@ -778,46 +778,46 @@ const(EVP_CIPHER)* EVP_camellia_128_cbc();
778
778
const (EVP_CIPHER )* EVP_camellia_128_cfb1 ();
779
779
const (EVP_CIPHER )* EVP_camellia_128_cfb8 ();
780
780
const (EVP_CIPHER )* EVP_camellia_128_cfb128 ();
781
- alias EVP_camellia_128_cfb128 EVP_camellia_128_cfb;
781
+ alias EVP_camellia_128_cfb = EVP_camellia_128_cfb128 ;
782
782
const (EVP_CIPHER )* EVP_camellia_128_ofb ();
783
783
const (EVP_CIPHER )* EVP_camellia_192_ecb ();
784
784
const (EVP_CIPHER )* EVP_camellia_192_cbc ();
785
785
const (EVP_CIPHER )* EVP_camellia_192_cfb1 ();
786
786
const (EVP_CIPHER )* EVP_camellia_192_cfb8 ();
787
787
const (EVP_CIPHER )* EVP_camellia_192_cfb128 ();
788
- alias EVP_camellia_192_cfb128 EVP_camellia_192_cfb;
788
+ alias EVP_camellia_192_cfb = EVP_camellia_192_cfb128 ;
789
789
const (EVP_CIPHER )* EVP_camellia_192_ofb ();
790
790
const (EVP_CIPHER )* EVP_camellia_256_ecb ();
791
791
const (EVP_CIPHER )* EVP_camellia_256_cbc ();
792
792
const (EVP_CIPHER )* EVP_camellia_256_cfb1 ();
793
793
const (EVP_CIPHER )* EVP_camellia_256_cfb8 ();
794
794
const (EVP_CIPHER )* EVP_camellia_256_cfb128 ();
795
- alias EVP_camellia_256_cfb128 EVP_camellia_256_cfb;
795
+ alias EVP_camellia_256_cfb = EVP_camellia_256_cfb128 ;
796
796
const (EVP_CIPHER )* EVP_camellia_256_ofb ();
797
797
}
798
798
799
799
version (OPENSSL_NO_SEED) {} else {
800
800
const (EVP_CIPHER )* EVP_seed_ecb ();
801
801
const (EVP_CIPHER )* EVP_seed_cbc ();
802
802
const (EVP_CIPHER )* EVP_seed_cfb128 ();
803
- alias EVP_seed_cfb128 EVP_seed_cfb;
803
+ alias EVP_seed_cfb = EVP_seed_cfb128 ;
804
804
const (EVP_CIPHER )* EVP_seed_ofb ();
805
805
}
806
806
807
807
void OPENSSL_add_all_algorithms_noconf ();
808
808
void OPENSSL_add_all_algorithms_conf ();
809
809
810
810
version (OPENSSL_LOAD_CONF) {
811
- alias OPENSSL_add_all_algorithms_conf OpenSSL_add_all_algorithms;
811
+ alias OpenSSL_add_all_algorithms = OPENSSL_add_all_algorithms_conf ;
812
812
} else {
813
- alias OPENSSL_add_all_algorithms_noconf OpenSSL_add_all_algorithms;
813
+ alias OpenSSL_add_all_algorithms = OPENSSL_add_all_algorithms_noconf ;
814
814
}
815
815
816
816
void OpenSSL_add_all_ciphers ();
817
817
void OpenSSL_add_all_digests ();
818
- alias OpenSSL_add_all_algorithms SSLeay_add_all_algorithms;
819
- alias OpenSSL_add_all_ciphers SSLeay_add_all_ciphers;
820
- alias OpenSSL_add_all_digests SSLeay_add_all_digests;
818
+ alias SSLeay_add_all_algorithms = OpenSSL_add_all_algorithms ;
819
+ alias SSLeay_add_all_ciphers = OpenSSL_add_all_ciphers ;
820
+ alias SSLeay_add_all_digests = OpenSSL_add_all_digests ;
821
821
822
822
int EVP_add_cipher (const (EVP_CIPHER )* cipher);
823
823
int EVP_add_digest (const (EVP_MD )* digest);
@@ -1126,7 +1126,7 @@ int EVP_PKEY_derive_init(EVP_PKEY_CTX* ctx);
1126
1126
int EVP_PKEY_derive_set_peer (EVP_PKEY_CTX * ctx, EVP_PKEY * peer);
1127
1127
int EVP_PKEY_derive (EVP_PKEY_CTX * ctx, ubyte * key, size_t * keylen);
1128
1128
1129
- alias typeof (* (ExternC! (int function (EVP_PKEY_CTX * ctx))).init) EVP_PKEY_gen_cb ;
1129
+ alias EVP_PKEY_gen_cb = typeof (* (ExternC! (int function (EVP_PKEY_CTX * ctx))).init);
1130
1130
1131
1131
int EVP_PKEY_paramgen_init (EVP_PKEY_CTX * ctx);
1132
1132
int EVP_PKEY_paramgen (EVP_PKEY_CTX * ctx, EVP_PKEY ** ppkey);
0 commit comments