Skip to content

Commit

Permalink
fix(plugin): Convert PEM to DER for rsa policies
Browse files Browse the repository at this point in the history
  • Loading branch information
ccvca authored and GoetzGoerisch committed Dec 30, 2024
1 parent efecf53 commit ce2d01c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions plugins/crypto/openssl/ua_openssl_aes128sha256rsaoaep.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@ UA_SecurityPolicy_Aes128Sha256RsaOaep(UA_SecurityPolicy *policy,
channelModule->compareCertificate =
UA_ChannelM_Aes128Sha256RsaOaep_compareCertificate;

/* Copy the certificate and add a NULL to the end */

retval = UA_copyCertificate(&policy->localCertificate, &localCertificate);
/* Load and convert to DER if necessary */
retval =
UA_OpenSSL_LoadLocalCertificate(&localCertificate, &policy->localCertificate);
if(retval != UA_STATUSCODE_GOOD)
return retval;

Expand Down
6 changes: 3 additions & 3 deletions plugins/crypto/openssl/ua_openssl_aes256sha256rsapss.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ UA_SecurityPolicy_Aes256Sha256RsaPss(UA_SecurityPolicy *policy,
channelModule->compareCertificate =
UA_ChannelM_Aes256Sha256RsaPss_compareCertificate;

/* Copy the certificate and add a NULL to the end */

retval = UA_copyCertificate(&policy->localCertificate, &localCertificate);
/* Load and convert to DER if necessary */
retval =
UA_OpenSSL_LoadLocalCertificate(&localCertificate, &policy->localCertificate);
if(retval != UA_STATUSCODE_GOOD)
return retval;

Expand Down

0 comments on commit ce2d01c

Please sign in to comment.