@@ -118,7 +118,7 @@ fn build_wolfssl(wolfssl_src: &Path) -> PathBuf {
118118 . enable ( "supportedcurves" , None )
119119 // Enable TLS/1.3
120120 . enable ( "tls13" , None )
121- // Enable liboqs , etc
121+ // Enable kyber , etc
122122 . enable ( "experimental" , None )
123123 // CFLAGS
124124 . cflag ( "-g" )
@@ -137,21 +137,10 @@ fn build_wolfssl(wolfssl_src: &Path) -> PathBuf {
137137 }
138138
139139 if cfg ! ( feature = "postquantum" ) {
140- // Post Quantum support is provided by liboqs
141- if let Some ( include) = std:: env:: var_os ( "DEP_OQS_ROOT" ) {
142- let oqs_path = Path :: new ( & include) ;
143- conf. cflag ( format ! (
144- "-I{}" ,
145- oqs_path. join( "build/include/" ) . to_str( ) . unwrap( )
146- ) ) ;
147- conf. ldflag ( format ! (
148- "-L{}" ,
149- oqs_path. join( "build/lib/" ) . to_str( ) . unwrap( )
150- ) ) ;
151- conf. with ( "liboqs" , None ) ;
152- } else {
153- panic ! ( "Post Quantum requested but liboqs appears to be missing?" ) ;
154- }
140+ // Enable Kyber
141+ conf. enable ( "kyber" , Some ( "all,original" ) )
142+ // SHA3 is needed for using WolfSSL's implementation of Kyber/ML-KEM
143+ . enable ( "sha3" , None ) ;
155144 }
156145
157146 match build_target:: target_arch ( ) . unwrap ( ) {
@@ -291,10 +280,6 @@ fn main() -> std::io::Result<()> {
291280 // Tell cargo to tell rustc to link in WolfSSL
292281 println ! ( "cargo:rustc-link-lib=static=wolfssl" ) ;
293282
294- if cfg ! ( feature = "postquantum" ) {
295- println ! ( "cargo:rustc-link-lib=static=oqs" ) ;
296- }
297-
298283 println ! (
299284 "cargo:rustc-link-search=native={}" ,
300285 wolfssl_install_dir. join( "lib" ) . to_str( ) . unwrap( )
0 commit comments