Skip to content

Commit

Permalink
Changing from local to public for some parts of the API.
Browse files Browse the repository at this point in the history
This is done to make it possible to use none Botan private keys when signing certificates.
  • Loading branch information
larssilven committed Jan 2, 2024
1 parent 5fc179f commit a727402
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/lib/asn1/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ asn1_obj.h
der_enc.h
oids.h
ber_dec.h
pss_params.h
</header:public>

<header:internal>
oid_map.h
pss_params.h
</header:internal>
2 changes: 1 addition & 1 deletion src/lib/asn1/pss_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include <botan/internal/pss_params.h>
#include <botan/pss_params.h>

#include <botan/ber_dec.h>
#include <botan/der_enc.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/asn1/pss_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Botan {

class PSS_Params final : public ASN1_Object {
class BOTAN_PUBLIC_API(2, 0) PSS_Params final : public ASN1_Object {
public:
static PSS_Params from_emsa_name(std::string_view emsa_name);

Expand Down
5 changes: 1 addition & 4 deletions src/lib/prov/pkcs11/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ pubkey
pk_pad
</requires>

<header:internal>
p11_mechanism.h
</header:internal>

<header:external>
pkcs11.h
pkcs11f.h
Expand All @@ -34,4 +30,5 @@ p11_randomgenerator.h
p11_rsa.h
p11_types.h
p11_x509.h
p11_mechanism.h
</header:public>
4 changes: 2 additions & 2 deletions src/lib/prov/pkcs11/p11_ecdh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include <botan/der_enc.h>
#include <botan/rng.h>
#include <botan/internal/p11_mechanism.h>
#include <botan/internal/pk_ops.h>
#include <botan/p11_mechanism.h>
#include <botan/pk_ops.h>

namespace Botan::PKCS11 {

Expand Down
4 changes: 2 additions & 2 deletions src/lib/prov/pkcs11/p11_ecdsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include <botan/rng.h>
#include <botan/internal/keypair.h>
#include <botan/internal/p11_mechanism.h>
#include <botan/internal/pk_ops.h>
#include <botan/p11_mechanism.h>
#include <botan/pk_ops.h>

namespace Botan::PKCS11 {

Expand Down
2 changes: 1 addition & 1 deletion src/lib/prov/pkcs11/p11_mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include <botan/internal/p11_mechanism.h>
#include <botan/p11_mechanism.h>

#include <botan/internal/fmt.h>
#include <botan/internal/parsing.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/prov/pkcs11/p11_mechanism.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Botan::PKCS11 {
* for RSA (encryption/decryption, signature/verification)
* and EC (ECDSA signature/verification, ECDH key derivation).
*/
class MechanismWrapper final {
class BOTAN_PUBLIC_API(2, 0) MechanismWrapper final {
public:
/// @param mechanism_type the CK_MECHANISM_TYPE for the `mechanism` field of the CK_MECHANISM struct
explicit MechanismWrapper(MechanismType mechanism_type);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/prov/pkcs11/p11_rsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <botan/pubkey.h>
#include <botan/rng.h>
#include <botan/internal/blinding.h>
#include <botan/internal/p11_mechanism.h>
#include <botan/internal/pk_ops.h>
#include <botan/p11_mechanism.h>
#include <botan/pk_ops.h>
#include <botan/internal/pk_ops_impl.h>

namespace Botan::PKCS11 {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/prov/tpm/tpm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <botan/rsa.h>
#include <botan/internal/fmt.h>
#include <botan/internal/hash_id.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>
#include <botan/internal/workfactor.h>
#include <limits>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ pk_ops_fwd.h
pkcs8.h
pubkey.h
x509_key.h
pk_ops.h
</header:public>

<header:internal>
blinding.h
pk_ops.h
pk_ops_impl.h
workfactor.h
</header:internal>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/mce/mce_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define BOTAN_MCELIECE_INTERNAL_H_

#include <botan/mceliece.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>
#include <botan/internal/polyn_gf2m.h>

namespace Botan {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/pk_keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <botan/hash.h>
#include <botan/hex.h>
#include <botan/internal/fmt.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>

namespace Botan {

Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/pk_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Verification {
/**
* Public key signature creation interface
*/
class Signature {
class BOTAN_PUBLIC_API(2, 0) Signature {
public:
/**
* Add more data to the message currently being signed
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/pk_ops_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <botan/hash.h>
#include <botan/kdf.h>
#include <botan/internal/eme.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>

namespace Botan::PK_Ops {

Expand Down
4 changes: 2 additions & 2 deletions src/lib/pubkey/pubkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#include <botan/bigint.h>
#include <botan/der_enc.h>
#include <botan/mem_ops.h>
#include <botan/pk_ops.h>
#include <botan/pss_params.h>
#include <botan/rng.h>
#include <botan/internal/ct_utils.h>
#include <botan/internal/fmt.h>
#include <botan/internal/parsing.h>
#include <botan/internal/pk_ops.h>
#include <botan/internal/pss_params.h>

namespace Botan {

Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/rsa/rsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <botan/ber_dec.h>
#include <botan/der_enc.h>
#include <botan/pss_params.h>
#include <botan/reducer.h>
#include <botan/internal/blinding.h>
#include <botan/internal/divide.h>
Expand All @@ -19,7 +20,6 @@
#include <botan/internal/monty_exp.h>
#include <botan/internal/parsing.h>
#include <botan/internal/pk_ops_impl.h>
#include <botan/internal/pss_params.h>
#include <botan/internal/workfactor.h>

#if defined(BOTAN_HAS_THREAD_UTILS)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/sm2/sm2_enc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <botan/kdf.h>
#include <botan/internal/ct_utils.h>
#include <botan/internal/fmt.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>
#include <botan/internal/point_mul.h>

namespace Botan {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/xmss/xmss_signature_operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define BOTAN_XMSS_SIGNATURE_OPERATION_H_

#include <botan/xmss.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>
#include <botan/internal/xmss_address.h>
#include <botan/internal/xmss_signature.h>
#include <botan/internal/xmss_wots.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pubkey/xmss/xmss_verification_operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define BOTAN_XMSS_VERIFICATION_OPERATION_H_

#include <botan/xmss.h>
#include <botan/internal/pk_ops.h>
#include <botan/pk_ops.h>
#include <botan/internal/xmss_signature.h>

namespace Botan {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tls/tls_signature_scheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include <botan/ec_group.h>
#include <botan/hash.h>
#include <botan/hex.h>
#include <botan/pss_params.h>
#include <botan/tls_exceptn.h>
#include <botan/tls_version.h>
#include <botan/internal/pss_params.h>
#include <botan/internal/stl_util.h>

namespace Botan::TLS {
Expand Down

0 comments on commit a727402

Please sign in to comment.