Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

putting certificates in seperate file in arduino IDE #9

Closed
shirish47 opened this issue May 6, 2018 · 1 comment
Closed

putting certificates in seperate file in arduino IDE #9

shirish47 opened this issue May 6, 2018 · 1 comment

Comments

@shirish47
Copy link

Hi so I want to use this library but I want to store cert in a seperate AWS_cert.h file that I can add in code in Arduino IDE. and so I don't need to go to library folder and edit it every time I want to add another cert.

Can you suggest some way? though I tried it to comment aws_iot_cert.c in AWS_IOT.cpp and add aws_cert.h with code of aws_iot_cert.c but during compilation I get error

var/folders/w2/jb9h2v3j5s5bs70q009xq2x00000gn/T/arduino_build_683901/libraries/AWS_IOT/AWS_IOT.cpp.o:(.literal._ZN7AWS_IOT7connectEPcS0_+0x10): undefined reference to `aws_root_ca_pem'
/var/folders/w2/jb9h2v3j5s5bs70q009xq2x00000gn/T/arduino_build_683901/libraries/AWS_IOT/AWS_IOT.cpp.o:(.literal._ZN7AWS_IOT7connectEPcS0_+0x14): undefined reference to `certificate_pem_crt'
Multiple libraries were found for "WiFi.h"
/var/folders/w2/jb9h2v3j5s5bs70q009xq2x00000gn/T/arduino_build_683901/libraries/AWS_IOT/AWS_IOT.cpp.o:(.literal._ZN7AWS_IOT7connectEPcS0_+0x18): undefined reference to `private_pem_key'
 Used: /Users/shirishbytelens/Documents/Arduino/hardware/espressif/esp32/libraries/WiFi
collect2: error: ld returned 1 exit status
 Not used: /private/var/folders/w2/jb9h2v3j5s5bs70q009xq2x00000gn/T/AppTranslocation/52665A05-AAB2-4BD4-96BE-401CDCEB2D12/d/Arduino 2.app/Contents/Java/libraries/WiFi
Using library AWS_IOT at version 1.0 in folder: /Users/shirishbytelens/Documents/Arduino/libraries/AWS_IOT 
Using library WiFi at version 1.0 in folder: /Users/shirishbytelens/Documents/Arduino/hardware/espressif/esp32/libraries/WiFi 
exit status 1
Error compiling for board ESP32 Dev Module.

so its not linking to the library.

@shirish47
Copy link
Author

shirish47 commented May 7, 2018

Ok I did it. I defined #include "AWS_cert.h" and put extern const char aws_root_ca_pem[] and other two with the certificate data and it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant