Had to dig through a few forums to figure this out.
On MikroTik, create the certificate template and a request
/certificate add name=SSL common-name=SSL key-size=2048
/certificate create-certificate-request template=SSL key-passphrase=mypassword123
You’ll have to use “mypassword123” for the rest of the password prompts.
Copy these files from your MikroTik to a Linux server:
certificate-request.pem
certificate-request_key.pem
You can copy them through the web interface in the Files menu, Winbox, WinSCP (SSH), Tunnelier (SSH), Filezilla (FTP), etc.
On the Linux server navigate to the folder where the files are located via terminal
openssl rsa -in certificate-request_key.pem -text > certificate-request2.pem
openssl x509 -req -days 9999 -in certificate-request.pem -signkey certificate-request2.pem -out mikrotik_ssl.crt
You can probably do the openssl portion on Windows instead of Linux, but I haven’t tried. Go here for Windows binaries:
http://slproweb.com/products/Win32OpenSSL.html
Back on the MikroTik
/certificate import file-name=mikrotik_ssl.crt
/certificate import file-name=certificate-request2.pem
Now print the certificate info to see the name of the imported cert for the final step
[admin@MikroTik] /certificate> print
Flags: K - private-key, D - dsa, L - crl, C - smart-card-key, A - authority, I - issued, R - revoked, E - expired, T - trusted
# NAME COMMON-NAME SUBJECT-ALT-NAME FINGERPRINT
0 SSL SSL
1 K T cert_2 SSL c214f22faa344c8750d8ba...
Finally, set the www-ssl service to use the certificate
/ip service set www-ssl certificate=cert_2
Enjoy!