Skip to content

Commit

Permalink
changed flag name to remove it from v07 changes list
Browse files Browse the repository at this point in the history
  • Loading branch information
csoler committed Oct 9, 2024
1 parent 8011b6b commit ba912bb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pgp/pgpkeyutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
}
}

#ifndef V07_NON_BACKWARD_COMPATIBLE_CHANGE_005
#ifdef V06_EXPERIMENTAL_CHANGE_001

// Removes the packets and returns the new total length, including headers, that may be used to update a parent packet

Expand Down
4 changes: 3 additions & 1 deletion src/pgp/pgpkeyutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ class PGPKeyManagement
static void findLengthOfMinimalKey(const unsigned char *keydata,size_t key_len,size_t& minimal_key_len) ;
static std::string makeArmouredKey(const unsigned char *keydata,size_t key_size,const std::string& version_string) ;

#ifndef V07_NON_BACKWARD_COMPATIBLE_CHANGE_005
#ifdef V06_EXPERIMENTAL_CHANGE_001
// Removes the signature subpacket 33, which causes incompatibility with OpenPGP-SDK since it is a RFC9580 packet.
// This function will only need to be called to ensure compatibility with users still using OpenPGP-SDK.
// Since signature subpacket 33 is part of the hashed section of the signature, this also invalidates the signature.
// Depending on the implementation, certificates with self-signature that miss this subpacket may not be accepted.
//
static void removeSignatureSubPacketTag33(unsigned char *keydata,size_t len,size_t& new_len);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/pgp/rnppgphandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,8 @@ bool RNPPGPHandler::privateSignCertificate(const RsPgpId& ownId,const RsPgpId& i
{
RsStackMutex mtx(pgphandlerMtx) ; // lock access to PGP memory structures.

// This has been left unimplemented because it's not used in RS UI anymore. The expected behavior of
// this function was to sign the supplied key using our own key with ID "ownid".
// This has been left unimplemented because RNP doesn't handle this already. The expected behavior of
// this function is to sign the supplied key using our own key with ID "ownid".

try
{
Expand Down
6 changes: 5 additions & 1 deletion src/rsserver/p3peers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,11 @@ std::string p3Peers::GetRetroshareInvite( const RsPeerId& sslId, RetroshareInvit
<< "\". Sorry." << std::endl;
return "";
}
#ifndef V07_NON_BACKWARD_COMPATIBLE_CHANGE_005

#ifdef V06_EXPERIMENTAL_CHANGE_001
// This code is invalid, because it will make the signature invalid since subpacket 33 is inside the hashed section
// of the signature.
//
// remove signature subpacket tag 33 for backward compatibility
size_t new_size = 0;
PGPKeyManagement::removeSignatureSubPacketTag33(mem_block,mem_block_size,new_size);
Expand Down

0 comments on commit ba912bb

Please sign in to comment.